Trying to make a script that only works if a window exists. I'd like to have this auto run every 3-5 minutes. Not sure how to get it to auto run once and terminate the script if it isn't running:
Code:
greenlight=0
SetTitleMatchMode, 2
IfWinExist, "username that appears in Window title for each person"
greenlight=1
if greenlight=0
MsgBox, Program either not running or you are not authorized to use this script. Please go to some URL for information.
[b]Auto exit<========Possible?[/b]
I guess I could set a master counter each time function and set them to check for the window every 100 functions or so, but I would eally like to have a single function that runs everyonce in a while.