Page 1 of 1

Launch weirdness

Posted: Sat May 25, 2013 5:25 pm
by adventuresofgreg
Hi: I am using "Launch applicationpath.exe" to activate an autoHotKey macro to make various standalones the active window. It works fine - that is, WAS working fine until my latest standalone generation. Now each version of the launch application works once only - then won't work again. I can't figure out what would have happened to cause this to stop. Following is a better example of what is happening:

button 1: launch notepad.exe
button 2: launch explorer.exe
button 3: launch excel.exe

When I click on button 1, notepad is launched
when I click on button 2, explorer is launched
when I click on button 1 again, nothing happens
when I click on button 3, excel launches
when I click on button 1, or 2, or 3 nothing happens
, etc..

Any ideas?

Re: Launch weirdness

Posted: Sat May 25, 2013 5:29 pm
by BvG
That's probably a silly question, but are you sure that you quit the launched apps before trying again? If they're already running, launch will not start them again, unless you specify a file.

Re: Launch weirdness

Posted: Sat May 25, 2013 5:32 pm
by dunbarx
Is this not what you would expect? I am misunderstanding.

If the launched app is already open, relaunching will do nothing. The dictionary states:

If the application is already running, the launch command does nothing, and "Process is already open." is placed in the result function.

Like I said, misunderstanding...

Craig Newman

Re: Launch weirdness

Posted: Sat May 25, 2013 5:53 pm
by adventuresofgreg
The apps that are launching are macro standalone .exe files. They quit immediately after executing their macro. And these macro .exe's were all working as expected before. I made some changes to my LC standalone (nothing to do with the code that launches the macro exe's), and now this problem with relaunching is happening. It does seem like my LC standalone still 'thinks' that the macro .exe is still running, when it isn't. I know it isn't, because I can manually find the .exe, and launch it again by double clicking on the file in Windows. I could try to force my LC standalone to QUIT the launched .exe after it executes it's macro, but the "quit" function will quit the LC standalone, not the exe (I believe). Is there a way to "UNlaunch" an app in LC ?

Re: Launch weirdness

Posted: Sun May 26, 2013 2:16 pm
by adventuresofgreg
I switched to using the WIndows shell command, and the problem is solved. The shell command isn't as quick though... Still very strange that the 'launch' command was working before, and now won't. Is there a way to force a LC launched app to "unlaunch" and quit ?

Re: Launch weirdness

Posted: Sun May 26, 2013 10:17 pm
by BvG
As far as I know the launch command is more picky about already running apps then windows (who happily launches a gazillion instances if ordered to). Launch has been known to behave a bit weirdly in some cases, but I thought those bugs got fixed some time ago.

As far as I know there's no way to "de-launch" an app. There is however the kill command.

Have you tried the "Launch document" approach?