Jump to content

No Endless Loop Problem


Recommended Posts

Hey guys,

sry for comming here just for this nooby Question.
My Job is coding but I have no idea about Autoit.
I want the code to let a php script run for endless (after 20 minutes it stoped with errors)
But he restarts it just 1-2 times.

 

func _stop()
    Exit
endFunc

HotKeySet("{ESC}","_stop")
Call("Main")

Func Main()
While 1
    $pixel = PixelSearch( 11, 72, 1851, 700, 0x000000)
    If Not @error Then Call("dostuff") 
    sleep(60000);
WEnd
EndFunc

Func dostuff()
MouseClick(("primary"), 382, 12, 1) ;Close php
MouseClick(("primary"), 2661, 493, 1) ;New IP (vpn button)
sleep(30000)
ShellExecute("http://localhost/datencrawler.php")
EndFunc

Would be awesome if you can give me a hint.
Have a nice day!

Edited by Solaron
Link to comment
Share on other sites

Sry was written shortly before I woke up (just like this text).
I want the php script to end with errors.
But can anyone see why my autoit script does for 2-3 loops what I want and then just ingores the if clause ?
Thanks

Edited by Solaron
Link to comment
Share on other sites

  • Developers
4 minutes ago, Solaron said:

I want the php script to end with errors.

? Maybe a shower first?

4 minutes ago, Solaron said:

But can anyone see why my autoit script does for 2-3 loops what I want and then just ingores the if clause ?

What about you do some debugging to see what the result is of PixelSeach() ?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...