Spoiler
need help toggling action, not keypress.
need help toggling action, not keypress.
okay, this is the code. I want the right mouse button to toggle the script action off and on, but not for the right mouse button to the toggled.
Re: need help toggling action, not keypress.
Hallo,
you do not want an RClick? Remove the tilde "~".
you do not want an RClick? Remove the tilde "~".
Re: need help toggling action, not keypress.
What in god's name is that code?
It adds a new Gui item each time you click ?!?!?
It adds a new Gui item each time you click ?!?!?
Re: need help toggling action, not keypress.
lol yes, that's what it does. I want to have a Dot in the center of my screen, then make it go away when I press Rbutton then come back when I press Rbutton again. But idk how to make it so the Rbutton still works and is not always down when dot is onscreen. But right now when the dot is on the keyboard press's will not work because the Rbutton stays toggled down.evilC wrote:What in god's name is that code?
It adds a new Gui item each time you click ?!?!?
Re: need help toggling action, not keypress.
Hallo,
The KeyState of RButton switches up and down!
Try:
The KeyState of RButton switches up and down!
Try:
Code: Select all
Loop
{
ToolTip, % GetKeyState("RButton")?"Down":"Up"
Sleep, 300
}
*~RButton::
Toggle := !Toggle
If toggle
{
diam = 5 ; diameter of dot
Gui +AlwaysOnTop -Caption +ToolWindow
Gui margin,0,0
Gui add, ListView, w%diam% h%diam% -Hdr -E0x200 BackgroundWhite
SysGet, mon, MonitorWorkArea ; get screen size (to include taskbar height delete text 'WorkArea')
Gui show, % "x" monRight//2-(diam//2) " y" monBottom//2-(diam//2)
WinSet, Region, 0-0 W%diam% H%diam% E, A ; make it circular
return
}
else
Gui, destroy
Re: need help toggling action, not keypress.
I got it to work with most everything thanks, guys!Rohwedder wrote:Hallo,
The KeyState of RButton switches up and down!
Try:Code: Select all
Loop { ToolTip, % GetKeyState("RButton")?"Down":"Up" Sleep, 300 } *~RButton:: Toggle := !Toggle If toggle { diam = 5 ; diameter of dot Gui +AlwaysOnTop -Caption +ToolWindow Gui margin,0,0 Gui add, ListView, w%diam% h%diam% -Hdr -E0x200 BackgroundWhite SysGet, mon, MonitorWorkArea ; get screen size (to include taskbar height delete text 'WorkArea') Gui show, % "x" monRight//2-(diam//2) " y" monBottom//2-(diam//2) WinSet, Region, 0-0 W%diam% H%diam% E, A ; make it circular return } else Gui, destroy
Who is online
Users browsing this forum: Joey5 and 197 guests