Jump to content
Sign in to follow this  
j0sh

On Left Click Mouse Down

Recommended Posts

j0sh

How would I do the following:

I want the script to stay open at all times, unless F4 is pressed.

F4 = Closes script

Q = Pause the script, and then start it over again once pressed a second time

On Mouse1 (left click), sleep(50), then mousewheeldown, pause the script [Q, hopefully, if possible], so when I press Q again, I can restart the same script.

I don't know where to start, hopefully I explained it will enough, if not let me know and I will try again. Thanks!

Edited by j0sh

Share this post


Link to post
Share on other sites
Valuater

how about this for starts

#include <Misc.au3>
#NoTrayIcon
Global $Paused
HotKeySet("q", "TogglePause")
HotKeySet("{F4}", "Terminate")
HotKeySet("m", "ShowMessage")  

$dll = DllOpen("user32.dll")
While 1
    
    If _IsPressed("01", $dll) Then
        MouseMove( 400,400)
    ; do other stuff
    EndIf
    
    Sleep(10)
WEnd
DllClose($dll)

Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

Func Terminate()
    Exit 0
EndFunc

Func ShowMessage()
    MsgBox(64,"thanks ...","... Valuater.   ", 1)
EndFunc

8)


NEWHeader1.png

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.