Jump to content

Looping problem, or goto?


Recommended Posts

  • Developers

You never finished this thread with your other account you created: 

I guess it is time to read our forumrules first now and don't create an account for each question! 

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

If you want it always running it's probably better if you put it in a loop such as

#include <AutoItConstants.au3>


HotKeySet("+9", "Terminate")
HotKeySet("+5", "Lucerne")


While 1
  MouseDown("left")
  $point = PixelSearch(957,537,963,541, 0xFE4040, 3)
  Sleep(1800)
  If IsArray($point) Then MouseUp("left")
WEnd


Func Terminate()
   Exit 
EndFunc

or 

#include <AutoItConstants.au3>


HotKeySet("+9", "Terminate")
HotKeySet("+5", "Lucerne")

While 1
    ;insert script...
    Lucerne()
    ;insert script...
WEnd


Func Lucerne()
  MouseDown("left")
  $point = PixelSearch(957,537,963,541, 0xFE4040, 3)
  Sleep(1800)
  If IsArray($point) Then MouseUp("left")
EndFunc


Func Terminate()
   Exit
EndFunc

if you want the script to run while looping pixelsearch maybe look into the AdLibRegister  function

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...