AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Execute rekey binding via button?

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
TheShadow
Guest





PostPosted: Fri Nov 27, 2009 3:07 am    Post subject: Execute rekey binding via button? Reply with quote

I have been plying around with AHK for the last few hours and I am wondering if there is a way to rebind a key (or disable it) via a button on a GUI or right click on the tray. I have everything set up, just need to know if that is possible.
-Shadow
Back to top
HotKeyIt



Joined: 18 Jun 2008
Posts: 1994
Location: GERMANY

PostPosted: Fri Nov 27, 2009 6:00 am    Post subject: Reply with quote

Yes it is, use a subroutine and Hotkey command.
Code:
Hotkey,a,HotkeyOFF,Off
Gui,Add,Edit
Gui,Add,Button,gSub,Off
Gui,+LastFound
hwnd:=WinExist()
Gui,Show
Return
GuiClose:
ExitApp
Sub:
toggle:=!toggle
Hotkey,a,% toggle ? "On" : "Off"
ControlSetText,Button1,% toggle ? "On" : "Off",ahk_id %hwnd%
Return

HotkeyOFF:
Return

_________________
AutoHotFile - ToolTip(n,text,title,options) Wink
Back to top
View user's profile Send private message
TheShadow
Guest





PostPosted: Sat Nov 28, 2009 3:21 am    Post subject: Reply with quote

Exactly what I was looking for.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group