Here's the issue.
If you set the hotkey control to a number (1-0) and then update it, the value gets updated with no problems.
If you then change it to Shift + the same number and update it won't see it as a different value (likewise with the reverse).
But... if you were to do the exact same thing with a letter (a-z) everything works fine.
Is this a bug or something else?
Here is a simple script that can be used to demonstrate what I'm talking about.
Try this.
;----------------------
set the hotkey to 1 and update.
next set the hotkey to Shit + 1 and update again.
Code: Select all
#SingleInstance,Force
Gui,1:+AlwaysOnTop
Gui,1:Add,Hotkey,w200 vMyHotkey,
Gui,1:Add,Button,gUpdateHK,Update Hotkey
Gui,1:Show,,Demo of problem
return
GuiClose:
*ESC::
ExitApp
UpdateHK:
Gui,1:+OwnDialogs
GuicontrolGet,NewKey,1:,MyHotkey
;----------------------------------
;Testing
msgbox,% Newkey "`n" MyHotkey
if(Newkey!=MyHotkey){ ; this test is the same as the last else if
msgbox,not the same
}
;---------------------------------------
;Normal logic (only needed to update the value of "MyHotkey")
if(Newkey=""&&MyHotkey!=""){
ToolTip, in 1
MyHotkey:=Newkey
}else if(Newkey!=MyHotkey&&MyHotkey!=""){
ToolTip, in 2
MyHotkey:=Newkey
}else if(Newkey!=MyHotkey){
ToolTip, in 3
MyHotkey:=Newkey
}
SetTimer,TOTT,-1000
return
TOTT:
ToolTip,
return