Jump to content
Sign in to follow this  

Pause while mouse clicked

Recommended Posts


Here is my script so far

Global $Paused
HotKeySet("{PAUSE}", "TogglePause")

While 1
    $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) 

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        ToolTip('Script is "Paused"',1150,0)

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.


Edited by jmoney

Share this post

Link to post
Share on other sites

#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")

See _IsPressed UDF in AutoIt docs

- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post

Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.