Pixel script help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
bushez
Posts: 61
Joined: 16 Nov 2015, 15:36

Pixel script help

10 Jul 2016, 03:24

so what i want to do is when he found the pixel , then the script need to wait until he dosent find the pixel and continue with the script
(when he dosent find the pixel Send space)

this is my script for now its works but not so good if someone can fix it for me to be more organized and to make the script to work faster it will be great tnx.

Code: Select all

F1::
Macro1:
Loop
{
	CoordMode, Pixel, Screen
	PixelSearch, FoundX, FoundY, 1002, 519, 1053, 687, 0xFFFFFF, 0, Fast RGB			
	if ErrorLevel= 1															
		continue																
	If ErrorLevel = 0														
	{																		
		Loop																
		{
			CoordMode, Pixel, Screen
			PixelSearch, FoundX, FoundY, 1002, 519, 1053, 687, 0xFFFFFF, 0, Fast RGB	
			If ErrorLevel= 0													
				continue														
			if Errorlevel= 1													
				break														
		}
 
	}
Send, {Space}															 

}
																		
 
Return
alfema
Posts: 32
Joined: 04 Sep 2015, 11:04

Re: Pixel script help

10 Jul 2016, 06:00

Try this

Code: Select all

F1::
Macro1:
If fSP(0)
	{
	If fSP(1)
	   Send, {Space}
	}

Return

fSP(wYesNo){
   Loop
   {
      CoordMode, Pixel, Screen
      PixelSearch, FoundX, FoundY, 1002, 519, 1053, 687, 0xFFFFFF, 0, Fast RGB
	  
     ; Sleep 1000
	  
   }  Until ErrorLevel = wYesNo 
  
	Return True
}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: macromint, peter_ahk, Spawnova, wineguy and 265 guests