Making KeyWait act similarly to hotkey

Get help with using AutoHotkey and its commands and hotkeys
Dannyg97x
Posts: 3
Joined: 30 Aug 2018, 10:28

Making KeyWait act similarly to hotkey

15 Sep 2018, 14:42

It seems quite simple, but I can't for the life of me wrap my head around it nor find documentation covering it.
When you use a hotkey such as

the right mouse button won't actually activate, this is the effect I'm looking for during a KeyWait.
The excerpt I'm working with is as follows:

Code: [Select all] [Download] GeSHi © Codebox Plus

GoldButton:
FileDelete, GoldLoc.txt
gui, -AlwaysOnTop
gui, Minimize
KeyWait, RButton, D
MouseGetPos, x, y
FileAppend,%x%`n%y% ,GoldLoc.txt
gui, Restore
gui, +AlwaysOnTop
return

So, in layman's terms; I'm looking to temporarily deactivate the effect of RButton from within a label while still allowing RButton to activate the KeyWait command.
Is this possible without extensive code?
Danny
User avatar
Nextron
Posts: 1208
Joined: 01 Oct 2013, 08:23
Location: Netherlands OS: Win7 x64 AHK: Unicode x32

Re: Making KeyWait act similarly to hotkey

15 Sep 2018, 22:13

Code: [Select all] [Download] GeSHi © Codebox Plus

SomeLabel:
RButtonDisabled:=1
MsgBox RButotn disabled
KeyWait,RButton,D
RButtonDisabled:=0
MsgBox RButton enabled
Return

#If RButtonDisabled
RButton::Return
#If

Return to “Ask For Help”

Who is online

Users browsing this forum: newbieforever, scriptors, songdg and 93 guests