jmoney Posted August 13, 2009 Posted August 13, 2009 (edited) Here is my script so far Global $Paused HotKeySet("{PAUSE}", "TogglePause") While 1 Sleep(300) $mousedata = MouseGetPos() $var = PixelGetColor( 637, 446 ) If $var = 0x300A07 Then MouseClick("left", 571, 757, 1, 0) If $var = 0x55291B Then MouseClick("left", 605, 757, 1, 0) If $var = 0xA3832A Then MouseClick("left", 588, 791, 1, 0) If $var = 0x7B0000 Then MouseClick("left", 725, 772, 1, 0) If $var = 0x260700 Then MouseClick("left", 555, 772, 1, 0) If $var = 0xF1CC7B Then MouseClick("left", 603, 791, 1, 0) If $var = 0x411E22 Then MouseClick("left", 688, 772, 1, 0) If $var = 0xC44711 Then MouseClick("left", 587, 757, 1, 0) If $var = 0xBBA2E5 Then MouseClick("left", 622, 757, 1, 0) MouseMove($mousedata[0], $mousedata[1], 0) WEnd Func TogglePause() $Paused = NOT $Paused While $Paused sleep(100) ToolTip('Script is "Paused"',1150,0) WEnd ToolTip("") EndFunc Basically I want the script to momentarily pause or not click if I left or right click manually. How can I accomplish this? I was thinking something like: If $var = 0x300A07 And (Mouse = not clicked) Then MouseClick("left", 571, 757, 1, 0) I just do not know exactly what code you would use. TIA Edited August 13, 2009 by jmoney
somdcomputerguy Posted August 13, 2009 Posted August 13, 2009 #include <Misc.au3> $dll = DllOpen("user32.dll") While 1 Sleep ( 250 ) If [color="#ffffff"]_IsPressed[/color]("23", $dll) Then MsgBox(0,"_IsPressed", "End Key Pressed") ExitLoop EndIf WEnd DllClose($dll)See _IsPressed UDF in AutoIt docs - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
somdcomputerguy Posted August 13, 2009 Posted August 13, 2009 Maybe like this? If $var = 0x300A07 AND NOT _IsPressed("23", $dll)Then MouseClick("left", 571, 757, 1, 0) - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change.
jmoney Posted August 13, 2009 Author Posted August 13, 2009 Maybe like this? If $var = 0x300A07 AND NOT _IsPressed("23", $dll)Then MouseClick("left", 571, 757, 1, 0) Great Success! This is exactly what I did >_< Thanks
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