ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE. Software > Post New Requests Here

Execute only if not running

<< < (2/2)

if you want an AHK solution as Miles suggested, this snippet would be a start. win+a launches notepad if it is not running.

--- Code: Autohotkey ---notepadpath = c:\windows\notepad.exe #a::Process, Exist, notepad.exe ; see if notepad is running{If ! ErrorLevel        {        IfExist, % notepadpath                Run,% notepadpath        Return        }}

See number 12 on the page I linked.  It explains that if the Find command finds only white space ( " " ) then the program is not running.  Change "imagename eq notepad.exe" so that your program's exe file is substituted for notepad.

Running to try.
Best Regards


[0] Message Index

[*] Previous page

Go to full version