Removing a label's previously assigned keyname and assign a new keyname

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
gandalfgarfield
Posts: 29
Joined: 20 Jun 2020, 22:27

Removing a label's previously assigned keyname and assign a new keyname

19 Aug 2020, 02:19

Hello :D
Does anyone know how to remove the previously assigned keyname on a label and assign a new one while the script is running?

I made a GUI that will stay open and will control the Hotkey mapping, when you run the script, the GUI will appear
with a text box where youll input the desired keyname to be assigned on a certain label. It will be assigned right after you click the Set button. The thing is when i assign a first keyname for example F1, when i press F1 the expression will run. Then when i want to change it, Ill assign F2, then set, when i press F2, the expression works too. But when i press F1 it still works. I want that the be removed. THANKS
lexikos
Posts: 9690
Joined: 30 Sep 2013, 04:07
Contact:

Re: Removing a label's previously assigned keyname and assign a new keyname

19 Aug 2020, 02:57

Keynames are not assigned to labels. Labels are assigned to hotkey variants. A label can be used by any number of hotkey variants.

I suppose what you want is to deactivate the old hotkey with the Off option and then register the new hotkey. It doesn't matter whether the label is the same or different, and you do not have to specify it when turning off an existing hotkey.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: peter_ahk and 358 guests