View Full Version : Opening, closing and focusing on a program
itstime98
October 14th, 2003, 09:54 PM
here is what i want to do with the one button press, can you tell me how to do it in girder or if at all possible:
1. open a program if it isnt already open
2. close the application if it is the application in focus
3. put the application in focus if it is open but in the background
miked
October 14th, 2003, 10:25 PM
Basically, you want to create five commands of equal hiearchy, with the event string for the button press under Command A.
Command "A": use the Girder --> Window Exists command to see if the Window Exists. If yes (i.e., application is running), then jump to command B. If no (i.e., application is not running), then jump to command C.
---------> EventString is hierarchically dependent on this Command A
Command "B": use the Girder --> Is ForeGround command to see if the program has focus. If yes (app has focus) then jump to command D. If no (app doesn't have focus) then jump to command E. [NOTE -- I *think* that this is the command, but you may want to do a search to make sure.]
Command "C": Use OS --> Execute command to open program.
Command "D": Use keyboard ALT-F4 command to close program.
Command "E": Use Window --> Set Focus to give program window focus.
miked
October 15th, 2003, 01:40 PM
I should mention that others may be able to propose a simpler solution. I seem to always find complicated solutions! :)
itstime98
October 15th, 2003, 04:04 PM
thnx for the advice i will attempt to implement what you have suggested. if anyone thinks they have an easier solution feel free to post it.
Powered by vBulletin® Version 4.1.8 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.