Chmielsen Posted July 16, 2015 Share Posted July 16, 2015 Hello im really new, and i found here script which is following mous in pix colors, but i need some help, can somebody help me that if mouse will find that color, wait 5 second before jump to other one??: here is my scriptGlobal $Paused, $counter = 0 HotKeySet("{ESC}", "TogglePause") HotKeySet("+!d", "ShowMessage") ;Shift-Alt-d #include <Misc.au3> $dll = DllOpen("user32.dll") Dim $coord[3] While 1 $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x634b6a, 10) If Not @error Then MouseMove ($coord[0], $coord[1], 1) Sleep(50) EndIf WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',0,0, $counter, 1) WEnd ToolTip("") EndFunc Func Terminate() Exit 0 EndFunc Func ShowMessage() MsgBox(4096,"","This is a message.") EndFunc Link to comment Share on other sites More sharing options...
JohnOne Posted July 16, 2015 Share Posted July 16, 2015 First of all... Sleep(50) is sleep 50 milliseconds Sleep(5000) is 5 seconds.Next, what does this mean "i found here script which is following mous in pix colors"?Next that script only looks for 1 colour, so the mouse will probably not move anywhere, anyway. AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Chmielsen Posted July 16, 2015 Author Share Posted July 16, 2015 Its working, but on screen i have few places with that color, but problem is that its jumping from one to other one.I found script on this forum that mouse follow pix color. Link to comment Share on other sites More sharing options...
Chmielsen Posted July 16, 2015 Author Share Posted July 16, 2015 Its possible to make that mouse pointer will follow group of pix colors? Link to comment Share on other sites More sharing options...
JohnOne Posted July 16, 2015 Share Posted July 16, 2015 I would have thought that if you want a mouse to follow something, it makes sense that you would want it to move to the next one.Is that your entire script? AutoIt Absolute Beginners Require a serial Pause Script Video Tutorials by Morthawt ipify Monkey's are, like, natures humans. Link to comment Share on other sites More sharing options...
Chmielsen Posted July 16, 2015 Author Share Posted July 16, 2015 Yes, i want it to move to the next one but after while. Yes its mine entire script. And Im asking about group of pix colors because sometimes mouse jump to wrong place and i cant find a right color, but i think group of colors could work. Sorry for my ENG Link to comment Share on other sites More sharing options...
Chmielsen Posted July 16, 2015 Author Share Posted July 16, 2015 If I will double this line with deferent color it will works for 2 colors?While 1 $coord = PixelSearch(0, 0, @DesktopWidth, @DesktopHeight, 0x634b6a, 10) If Not @error Then MouseMove ($coord[0], $coord[1], 1) Sleep(50) EndIf WEnd Link to comment Share on other sites More sharing options...
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