Page 1 of 1

Hi, script that opens and closes on closing and opening program?

Posted: 12 Aug 2017, 20:06
by Spencerg1984
Hi, trying to get a script that opens and closes while opening and closing a program.

Re: Hi, script that opens and closes on closing and opening program?

Posted: 12 Aug 2017, 20:08
by Spencerg1984
Tried this but with starcraft but it didn't work. https://autohotkey.com/board/topic/980- ... -close-it/

Re: Hi, script that opens and closes on closing and opening program?

Posted: 13 Aug 2017, 04:43
by SirRFI
Use following:
SetTimer - continuously run a part of code every now and then
WinExist() - check if process exists or not
Process - close process
Run - open process