 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
gark Guest
|
Posted: Tue Mar 16, 2010 9:29 am Post subject: let user change default hotkey combination |
|
|
hi,
i already have a perfect working autohotkey script but i'd like to add an option where the user can change the default hotkey combination (its only one) to his own...
i would be quite happy if someone can give me a clue where to start.
tia |
|
| Back to top |
|
 |
SoLong&Thx4AllTheFish
Joined: 27 May 2007 Posts: 4999
|
|
| Back to top |
|
 |
Learning one
Joined: 04 Apr 2009 Posts: 1000 Location: Croatia
|
Posted: Tue Mar 16, 2010 4:53 pm Post subject: |
|
|
Example4you
| Code: | ;===Settings============================================================================
Hotkey = 1 ; default hotkey
;===Auto-execute continuation===========================================================
Hotkey, %Hotkey%, HotkeySubroutine
DefaultHotkeyBackup := Hotkey
Gui 1: Add, Hotkey, x5 y6 w130 vHotkey, %Hotkey%
Gui 1: Add, Button, x145 y5, Apply
Gui 1: show, w190, Change hotkey
Return ;===Auto-execute ends here===
;===Subroutines=========================================================================
ButtonApply:
Hotkey, %Hotkey%, HotkeySubroutine, off
Gui 1: submit, nohide
if Hotkey = ; security: if user didn't specified hotkey in dialog and clicked Apply, use default hotkey
Hotkey := DefaultHotkeyBackup
Hotkey, %Hotkey%, HotkeySubroutine, on
Return
GuiClose:
ExitApp
HotkeySubroutine:
MsgBox,,, Hotkey works.,1
Return |
|
|
| Back to top |
|
 |
jaco0646
Joined: 07 Oct 2006 Posts: 3113 Location: MN, USA
|
Posted: Tue Mar 16, 2010 5:03 pm Post subject: |
|
|
| I've written a fairly comprehensive demonstration of the hotkey command as well: User-defined Dynamic Hotkeys. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|