computergroove Posted May 6, 2008 Posted May 6, 2008 I need to know how to scan xposition 596 and y position 433 and if the color is 000000 the mouseclick(left,596,433) else scan (596,433) again. Heres what I have so far: While 1 Sleep(100) WEnd Func start() IF MouseClick ("left",596,433) EndFunc Func _quit() Exit EndFunc Thanks in advance Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
computergroove Posted May 6, 2008 Author Posted May 6, 2008 So: While 1 Sleep(100) WEnd Func start() PixelGetColor (596,433) IF PixelGetcolor = "000000" MouseClick ("left",596,433) Else call start EndFunc Func _quit() Exit EndFunc Am I close? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
Valuater Posted May 6, 2008 Posted May 6, 2008 Maybe.... expandcollapse popup; Press Esc to terminate script, Pause/Break to "pause" Global $Paused, $Runner, $begin, $wait = 3 ; wait = 3 seconds HotKeySet("{PAUSE}", "TogglePause") HotKeySet("{ESC}", "Terminate") HotKeySet("{F9}", "ShowMe") Opt("MouseCoordMode", 1) ;1=absolute, 0=relative, 2=client Opt("PixelCoordMode", 1) ;1=absolute, 0=relative, 2=client ;;;; Body of program would go here ;;;; While 1 Sleep(10) If $Runner Then $dif = Int(TimerDiff($begin) / 1000) If $dif >= $wait Then If PixelGetColor(596, 433) = 000000 Then MouseClick("left", 596, 433) $begin = TimerInit() EndIf EndIf WEnd ;;;;;;;; Func TogglePause() $Paused = Not $Paused While $Paused Sleep(100) ToolTip('Script is "Paused"', 0, 0) WEnd ToolTip("") EndFunc ;==>TogglePause Func Terminate() Exit 0 EndFunc ;==>Terminate Func ShowMe() $Runner = Not $Runner $begin = TimerInit() EndFunc ;==>ShowMe 8)
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