Jump to content
Sign in to follow this  
Judical

Func Problem

Recommended Posts

Judical

I know this is probably a stupid question but how can I tell a script to continue running after a function has ended.

Share this post


Link to post
Share on other sites
weaponx

Show some code.

Share this post


Link to post
Share on other sites
Judical

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")

Share this post


Link to post
Share on other sites
weaponx

You have a dangling EndFunc, you should have it checked out. But seriously is this the entire script?

Share this post


Link to post
Share on other sites
qazwsx

where is the begining of the func for the first one? Use code tags its easier to rd.

Share this post


Link to post
Share on other sites
Judical

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.

Share this post


Link to post
Share on other sites
Judical

If you want the whole thing here it is.

Edited by Judical

Share this post


Link to post
Share on other sites
qazwsx

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.

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×