For example: When I'm in the target active window, if I have "~" in front of the number/operator Hotkeys ("$1", "$-") then windows dings when I press the desired calculator keyboard buttons (only when the target window, my gui calculator, is active), but then I don't need the send, "Keys" section and everything works perfectly (with the exception of the DING). Also, when I hijack the NumpadSub for this, it doesn't comment things out in SciTE anymore.
Here's the code for One and Dash/Minus/Subtract:
Code: Select all
$1::
$Numpad1::
_pfc:=0 ;; OFF
WinGetTitle,var,A,,
if (var="target active window")
{
GuiControlGet,var,,mathText
var.= "1"
GuiControl,,mathText, %var%
}
else
Send, 1
_pfc:=1 ;; ON
return
Code: Select all
$NumpadSub::
_pfc:=0 ;; OFF
WinGetTitle,var,A,,
if (var="target active window")
{
GuiControlGet,var,,mathText
GuiControlGet,result,,guiEdit_Result
if (result="")
{
var.= " - "
GuiControl,,mathText, %var%
GuiControl,,mathText, %var%
}
else
{
var:=""
var.= result " - "
GuiControl,,mathText, %var%
}
}
else
Send, -
_pfc:=1 ;; ON
return
I know my issue with SciTE is the Send, "Key". I need a method that if not in the target active window it will act as normal, and not ding at me when IN the target active window...
_pfc is a variable that I have set to activate a SetTimer (not related to the issue).
Any help would be appreciated!!