terrypin Posted October 22, 2007 Report Share Posted October 22, 2007 Could someone please advise how I can construct a macro which will start program X when I first start program A, and start program Y when I close program A? (For background, this is to let me start the driver for my new toy, a sort of joystick thingie that lets me navigate more easily in Google Earth. I've noticed that it consumes 4-5% of CPU even when I'm not using it, so I'd like it to run only when Google Earth is running. It came with two utilities, to start and stop the driver, so those are X and Y, and Google Earth is A.) -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
terrypin Posted October 27, 2007 Author Report Share Posted October 27, 2007 No one with any experience of macros that start a program when another one starts please? -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Amerifax-Bob Posted November 2, 2007 Report Share Posted November 2, 2007 :rolleyes:I'm looking to do about the same. But I want to use a hot key to open a prorgam (If it's not already open). So it would be like a TOGGLE. IF IT'S OPEN IT WOULD THEN CLOSE. IF it's closed it would open. Very basic. I hope with both get some help. Bob Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 2, 2007 Author Report Share Posted November 2, 2007 :rolleyes:I'm looking to do about the same. But I want to use a hot key to open a prorgam (If it's not already open). So it would be like a TOGGLE. IF IT'S OPEN IT WOULD THEN CLOSE. IF it's closed it would open. Very basic. I hope with both get some help. Bob That sounds different to my requirement, Bob, and I'd have thought fairly easy. Can't you just make the first step of your macro (started by the hotkey) to test whether Program X is running. If it is, close it (send keys to it to do so). If it's not, open it (launch it). -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
kahamri Posted November 2, 2007 Report Share Posted November 2, 2007 I am pretty sure i can answer both of your questions. Terry, I'm not sure if what you want to do is better than just having that driver running. The way i would do it would have the macro constenly searching for that program. I envison bad things happening then. as for the Toggle key. This is simple. In MacroExpress you'll create a new macro and set a Hot-key, like Win+F2. I indcluded the code you can take a look at but basically i did this. If Program not running "program.exe" Run macro "startprogram" If program running "program.exe" Run Macro "stopprogram" Simple eh? <IFOTH:14:1:EXPLORER.EXE><MACRUN2:Runprogram><ENDIF><IFOTH:06:1:EXPLORER.EXE><MACRUN2:StopProgram><ENDIF> Quote Link to comment Share on other sites More sharing options...
terrypin Posted November 2, 2007 Author Report Share Posted November 2, 2007 Thanks kahamri. On reflection, you're right about having to keep it runing permanently - not satisfactory. The reason I hesitate to keep the driver running permanently is that it consumes about 3-4% CPU constantly. Also, its blue LEDs are not only a small waste of power but they constantly distract and tempt me to open Google Earth! -- Terry, East Grinstead, UK Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.