Agent29 Posted September 25, 2008 Share Posted September 25, 2008 Hello agian! Last time i asked for help you guys were very helpful, Im hoping for some help agian. My scipt is below, and Everything is working perfectly except for the "IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIF" That should be self explanitory, but I want to make it so if the Active windows is not the Specified the script will exit. Right now, it just seems to pause and then as soon and I make the specified windows the active window agian, it starts back up...; -------------- BEGIN SCRIPT -----------------------------; First, set some options:HotKeySet("{Q}", "Terminate")HotKeySet("{PAUSE}", "TogglePause")Func Terminate() Exit 0EndFuncFunc TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("")EndFuncWhile 1WinWaitActive(" Active Window")Sleep(60)Send("+{TAB}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("Text here")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{TAB}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("Text Here")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{TAB}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{TAB}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{TAB}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("Text here")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{TAB}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{ENTER}")IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIFSleep(60)Send("{Q}")WEnd; -------------- END SCRIPT ----------------------------- Link to comment Share on other sites More sharing options...
dbzfanatic Posted September 25, 2008 Share Posted September 25, 2008 Hello agian! Last time i asked for help you guys were very helpful, Im hoping for some help agian. My scipt is below, and Everything is working perfectly except for the "IF NOT WinWaitActive(" Active Window","",3) THEN EXIT 0 ENDIF" That should be self explanitory, but I want to make it so if the Active windows is not the Specified the script will exit. Right now, it just seems to pause and then as soon and I make the specified windows the active window agian, it starts back up... Try something like this expandcollapse popup; -------------- BEGIN SCRIPT ----------------------------- ; First, set some options: HotKeySet("{Q}", "Terminate") HotKeySet("{PAUSE}", "TogglePause") Func Terminate() Exit EndFunc Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0) WEnd ToolTip("") EndFunc While 1 WinActive(" Active Window") Sleep(60) Send("+{TAB}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("Text here") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{TAB}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("Text Here") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{TAB}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{TAB}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{TAB}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("Text here") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{TAB}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{ENTER}") IF NOT WinActive(" Active Window","",3) THEN Exit ENDIF Sleep(60) Send("{Q}") WEnd ; -------------- END SCRIPT ----------------------------- Not tested. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote] Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now