Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Bring a window to front?

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,36112
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Bring a window to front?
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Bring a window to front? - 7/11/2006 9:15:27 AM   
  coyotewrw

 

Posts: 5
Score: 0
Joined: 7/11/2006
Status: offline
Hi all,

There is a desktop calendar program called Rainlendar, that I would occasionally like to bring to the front of other windows, to view my appointments, todo, etc. I'm looking for a vbscript to do this, that I could run via a shortcut in my taskbar's quicklaunch.

Rainlendar resides on the desktop and does not display a button on the taskbar, as would a normal window. However, there is a config setting (ini) called UseWindowName that, according to the manual, "If set to 1 the window will have a name "Rainlendar". Useful feature e.g. with some virtual windows managers." The process in taskmanager is "rainlendar.exe".

Rainlendar currently has a toggle command, but it will only show/hide the program entirely from the screen. I also don't want to set it always-on-top cuz it will get in the way.

Is there a vbscript I can use to "pull" a particular program/window/process to the front, without changing its z-order? It would then hide naturally as other windows are activated.

Thanks for any help! :)

< Message edited by coyotewrw -- 7/11/2006 9:19:10 AM >
 
 
Post #: 1
 
 RE: Bring a window to front? - 7/11/2006 2:08:14 PM   
  dm_4ever


Posts: 2640
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
Is the application visible in the "Applications" tab of the task manager? How do you normally bring it to the front? Is it an icon on the lower right hand corner?

(in reply to coyotewrw)
 
 
Post #: 2
 
 RE: Bring a window to front? - 7/11/2006 3:25:03 PM   
  coyotewrw

 

Posts: 5
Score: 0
Joined: 7/11/2006
Status: offline
Hi dm_4ever, thanks or responding :)

"Is the application visible in the "Applications" tab of the task manager?"

No, it only shows as a process (rainlendar.exe). Not even after setting the UseWindowName option and restarting the program, so I'm not sure if that will help.

"How do you normally bring it to the front?"

You can toggle it on/off the screen via commandline or dbl-clicking the tray icon, but it will still be hidden by overlapping windows if its always-on-top setting isn't on.

"Is it an icon on the lower right hand corner?"

Yes, there is a tray icon. Rainlendar is basically a widget-type program, that displays on the desktop. It can work as a standalone calendar or reflect events, etc. from Outlook. Very cool app, btw, except that it's hard to get to if I have a bunch of windows running.

Thanks again.

< Message edited by coyotewrw -- 7/11/2006 3:29:04 PM >

(in reply to dm_4ever)
 
 
Post #: 3
 
 RE: Bring a window to front? - 7/11/2006 4:59:47 PM   
  dm_4ever


Posts: 2640
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
if it can be started via the command line then you can do something like

set objShell = createobject("wscript.shell")
objShell.Run "your command"

if you can have the window up you could bring it to the front by using
objShell.AppActivate("TitleofApp")

I'm not familiar with the app you're using so i'm not sure what method would work best for you.

(in reply to coyotewrw)
 
 
Post #: 4
 
 RE: Bring a window to front? - 7/12/2006 12:24:22 AM   
  coyotewrw

 

Posts: 5
Score: 0
Joined: 7/11/2006
Status: offline
Sorry for my noobness, but I can't get that script to work with any running apps.

Dim objShell
set objShell = createobject("wscript.shell")
objShell.AppActivate("Rainlendar") (I also tried referencing the process "rainlendar.exe")

Is this the right syntax?

(in reply to dm_4ever)
 
 
Post #: 5
 
 RE: Bring a window to front? - 7/12/2006 1:30:35 AM   
  dm_4ever


Posts: 2640
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
in order for appactivate to work your apps windows should be visible. all appactivate does is give focus to it. try it with another program like notepad so you can see how it works.

(in reply to coyotewrw)
 
 
Post #: 6
 
 RE: Bring a window to front? - 7/12/2006 10:54:07 AM   
  coyotewrw

 

Posts: 5
Score: 0
Joined: 7/11/2006
Status: offline
okay, thanks dm_4ever :)

(in reply to dm_4ever)
 
 
Post #: 7
 
 RE: Bring a window to front? - 7/19/2006 7:55:05 AM   
  dm_4ever


Posts: 2640
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
If you have Office 2k3 you can try what's described in this article to activate and maximize any window running in your processes.

http://www.microsoft.com/technet/scriptcenter/topics/office/tasks.mspx

(in reply to coyotewrw)
 
 
Post #: 8
 
 RE: Bring a window to front? - 7/19/2006 9:25:26 AM   
  coyotewrw

 

Posts: 5
Score: 0
Joined: 7/11/2006
Status: offline
very useful, thanks :)

(in reply to dm_4ever)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Bring a window to front? Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts