Sign in to follow this  
Followers 0
alanakko

restart master loop after event

7 posts in this topic

does anybody know the answer to my problem cause i,m banging my head against the wall atm lol

i have a script running fine, over and over again , in the script i have a pixel search function and if that triggers the script changes, then a changable pausetime

what i cant do is this,

once triggered and after the pause time, make the script exit or exit from the masterloop, and then restart from the first line of the masterloop

i am thinking this should be easy, but its like learning japanese to me, heh please help

Share this post


Link to post
Share on other sites



does anybody know the answer to my problem cause i,m banging my head against the wall atm lol

i have a script running fine, over and over again , in the script i have a pixel search function and if that triggers the script changes, then a changable pausetime

what i cant do is this,

once triggered and after the pause time, make the script exit or exit from the masterloop, and then restart from the first line of the masterloop

i am thinking this should be easy, but its like learning japanese to me, heh please help

stick the "master loop" in a func, then call it?


[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]

Share this post


Link to post
Share on other sites

can we see some code?

Break and ContinueLoop seem to me to be the best option in this case, but until i see code i can't make a definitive suggestion


Share this post


Link to post
Share on other sites

code is an ice mining macro for the game eve online and what i really need is , to run master loop, ie---- (undock, warp to belt, start mining, SCAN FOR HOSTILES, fill cargo, warp to station, unload, start over again)

all working correctly, SCAN FOR HOSTILES is done with If (PixelGetColor(380,741)=0x4a4d4a ) Then warp back to station and dock for timer amount

but then i need to somehow exit master loop and then resart the master loop from the first line

cheers for the help!!

line 84 is the runaway function that breaks from the main loop of the script ???---MY HEAD---------->>BRICK WALL

FINAL.au3

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I think the while "master loop" should be in a function. So you can use ExitLoop and then call the function to start it again.

PS. You got some typos and all that empty lines piss me off. :)

Edited by Aassdd

Share this post


Link to post
Share on other sites

ok thanks for the help guys,will try to work with that method, and try to clean up my scripts and typos, lol am a noob what,d you expect!!

cheers

Share this post


Link to post
Share on other sites

This is how I currently set the number of runs for my scripts.

$i = 0

While $i < 50 ; 50 is the number of loops

;main script body

$i = $i + 1

EndIf

WEnd ; end loop

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  
Followers 0