Jump to content

How to assign TogglePause to mouse right click button.


Mucho
 Share

Recommended Posts

I am trying to do it with the following code.

#include <Misc.au3>
Do
  .
  .
  .  
   While 1
       If _IsPressed(02) Then
          TogglePause()
       Endif
   Wend
until $count = 125
 
 
Func TogglePause()
    $Paused = NOT $Paused
    While $Paused
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    WEnd
    ToolTip("")
EndFunc

The problem is that the addition of the code into the loop stops the loop. Now it executes only once. And I did not even press any key or mouse button.

Link to comment
Share on other sites

something like this?

#include <Misc.au3>
$count = 0
Do
    If _IsPressed(02) Then TogglePause()
until $count = 125

Func TogglePause()
    ToolTip('Script is "Paused"',0,0)
    Do
        Sleep(10)
    Until Not _IsPressed(02)
    Do
        sleep(100)
        ToolTip('Script is "Paused"',0,0)
    Until _IsPressed(02)
    Do
        Sleep(10)
    Until Not _IsPressed(02)
    ToolTip("")
EndFunc

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
There are those that believe that the perfect heist lies in the preparation.
Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost.

 
Link to comment
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
 Share

×
×
  • Create New...