Judical Posted August 27, 2007 Share Posted August 27, 2007 I know this is probably a stupid question but how can I tell a script to continue running after a function has ended. Link to comment Share on other sites More sharing options...
weaponx Posted August 27, 2007 Share Posted August 27, 2007 Show some code. Link to comment Share on other sites More sharing options...
Judical Posted August 27, 2007 Author Share Posted August 27, 2007 Sleep(100) WinWait("Global Edition") WinSetState("Global Edition", "", @SW_MAXIMIZE) Send("!d") Send("http://trackweb.bose.com/trackweb/") Send("{ENTER}") Sleep(4000) MouseClick("left", 591, 434, 1, 1) Sleep(2000) EndFunc ;The script stops here, but I want it to keep going. $mainwindow = GUICreate("eTestcase", 300, 80) GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUICtrlCreateLabel("Choose eTestcase then click continue.", 60, 10) $poop = GUICtrlCreateButton("continue", 120, 50, 60) GUICtrlSetOnEvent($poop, "test") GUISetOnEvent($GUI_EVENT_CLOSE, "CLOSEClicked") GUISwitch($mainwindow) GUISetState(@SW_SHOW) $handle = WinGetHandle ("eTestcase") WinSetOnTop ($handle, "", 1) While 1 Sleep(1000) ; Idle around WEnd Func test() GUISetState(@SW_HIDE) MouseClick("left", 678, 343, 1, 1) WinWait($userid&" - Trackweb -") Sleep(3000) MouseClick("left", 49, 275, 1, 1) Sleep(1000) Send("Midfield_Ballpark_Cycle_v1.0") Send("{ENTER}") Sleep(500) MouseClick("left", 556, 211, 1, 1) WinWait("File Download") Sleep(2000) Send("!s") Link to comment Share on other sites More sharing options...
weaponx Posted August 27, 2007 Share Posted August 27, 2007 You have a dangling EndFunc, you should have it checked out. But seriously is this the entire script? Link to comment Share on other sites More sharing options...
qazwsx Posted August 27, 2007 Share Posted August 27, 2007 where is the begining of the func for the first one? Use code tags its easier to rd. Link to comment Share on other sites More sharing options...
Judical Posted August 27, 2007 Author Share Posted August 27, 2007 No, that is just part of the script. I just want to know how to make the script continue after an EndFunc or if theres a way to have a function within a function. Link to comment Share on other sites More sharing options...
Judical Posted August 27, 2007 Author Share Posted August 27, 2007 (edited) If you want the whole thing here it is. Edited August 27, 2007 by Judical Link to comment Share on other sites More sharing options...
qazwsx Posted August 27, 2007 Share Posted August 27, 2007 usually for code all of the funcs go at the bottom of the script and then you call them as you need them. And your script should resume after a func finishes. 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