JohnOne Posted October 8, 2014 Posted October 8, 2014 AdlibRegister is not really a loop. Your reset function should not be calling the main function it was called from, that is called recursion. The called function will return to the calling function itself. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Raizeno Posted October 9, 2014 Author Posted October 9, 2014 well since main() has another function in it that calls main() again it runs endlessly so if my reset() function calls on main() function when I use AdlibRegister("reset",60000) adlib never ends one full run . but I managed to work around that by using a compiled outside script so instead of calling main() function now AdlibRegister sends a hotkey for the other script to start wich sends another hotkey back that starts my reset() function. so this way the adlibregister reaches the end and actualy starts over again but it's trublesome having 2 scripts . do you know any way of doing the same thing without having 2 scripts ?
JohnOne Posted October 9, 2014 Posted October 9, 2014 nevermind that i figured out what the problem was this old version of blue stacks has massive freezes that's why it jumps steps the script does the steps but blue stacks is not responding So because this version isn't that good i get alot of lag spikes and then an mesage pops up telling me "Waiting for server" that brakes my script . my question is : can i make like a function that runs in paralel with my main script and constantly checks for that mesage to popup and pause my main script while it's waiting for server ? The example I provided will do exactly that, the pixelsearch I assume is looking for the "Waiting for server" window. The adlib function will see that and wait until it's gone so your code can continue without "Breaking". Unless you have moved the goalposts. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Raizeno Posted October 9, 2014 Author Posted October 9, 2014 Yeah I gave up my ideea with the waiting because lag spikes also come as freezes without the popup "Waiting for server" to come immediately . So now I'm trying to use AdlibRegister to reset my script to the starting poin and start over at a certain amount of time or when the script failed to find one of the pixels im searching for more than 10 consecutive tries . All is good in the code except I can't call the main() function inside the AdlibRegister because it will run inside AdlibRegister forever . I worked around it with a second script and hotkeys but I don't really like having 2 scripts sending hotkeys one to the other . But that's the best I could come up with.
JohnOne Posted October 10, 2014 Posted October 10, 2014 You seriously want to go to the start and rethink your whole code dynamic, it sounds awful to be honest. Best of luck. Over and out. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans.
Raizeno Posted October 10, 2014 Author Posted October 10, 2014 Ok I will rethink it but I'm not that good with programing . Tnx for your help and your patience so far JhonOne I really appreciate it .
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