Autoit-anchor

07/11/2015 14:27 ssamko#1
Hello !
I need help.
I have code and where if 1 condition will be false I want it to go to the 1st condition. Something like anchor.

My code:

What I want:
[Only registered and activated users can see links. Click Here To Register...]
07/11/2015 16:15 lolkop#2
You might just put that script into a loop:
Code:
While True
   $coord = PixelSearch( @DesktopWidth/100*35, @DesktopHeight/100*35, @DesktopWidth/100*65, @DesktopHeight/100*65, 0x2E4C76 )
   If Not @error Then
	  MouseClick("LEFT",($x),($y),1,1)
	  Sleep(1200)
   Else
	  $coord = PixelSearch( @DesktopWidth/100*20, @DesktopHeight/100*20, @DesktopWidth/100*80, @DesktopHeight/100*80, 0x2E4C76 )
	  If Not @error Then
		 MouseClick("LEFT",($x),($y),1,1)
		 Sleep(1200)
	  Else
	  $coord = PixelSearch( @DesktopWidth/100*0, @DesktopHeight/100*0, @DesktopWidth, @DesktopHeight, 0x2E4C76 )
	  If Not @error Then
		 MouseClick("LEFT",($x),($y),1,1)
		 Sleep(1200)
	  EndIf
   EndIf
WEnd
07/11/2015 16:24 ssamko#3
Quote:
Originally Posted by lolkop View Post
You might just put that script into a loop:
Code:
While True
   $coord = PixelSearch( @DesktopWidth/100*35, @DesktopHeight/100*35, @DesktopWidth/100*65, @DesktopHeight/100*65, 0x2E4C76 )
   If Not @error Then
	  MouseClick("LEFT",($x),($y),1,1)
	  Sleep(1200)
   Else
	  $coord = PixelSearch( @DesktopWidth/100*20, @DesktopHeight/100*20, @DesktopWidth/100*80, @DesktopHeight/100*80, 0x2E4C76 )
	  If Not @error Then
		 MouseClick("LEFT",($x),($y),1,1)
		 Sleep(1200)
	  Else
	  $coord = PixelSearch( @DesktopWidth/100*0, @DesktopHeight/100*0, @DesktopWidth, @DesktopHeight, 0x2E4C76 )
	  If Not @error Then
		 MouseClick("LEFT",($x),($y),1,1)
		 Sleep(1200)
	  EndIf
   EndIf
WEnd

I know but it isnt it what I need. Because If 2nd or 3rd If is true I want script to go again immediately. I think that something like that is possible in other languages...not in this one ? ...I dont want in in a loop
07/11/2015 19:54 warfley#4
Use a loop and [Only registered and activated users can see links. Click Here To Register...] and [Only registered and activated users can see links. Click Here To Register...] to Jump within the loop to the beginning at the loop again and to break the loop