I'm trying to make it so when I put L or R in my second edit box, it will call one of the two functions when i press `. I want it to either press the v key or press Shift + v. I can't seem to get it to recognize LRdirection and it instantly activates SC. I'm fairly new to this so I kind of frankensteined it out of something an old friend sent me, and I haven't been able to find a fix. Thank you for your help
Code: Select all
#MaxThreadsPerHotkey 2
#SingleInstance Force
#NoEnv
SetWorkingDir %A_ScriptDir%
SetBatchLines -1
Gui -MaximizeBox
Gui Add, Text, x22 y20 w50 h20 +Border, SC
Gui Add, Edit,vSC x47 y20 w13 h20
Gui Add, Edit,vLR gOnEdit x59 y20 w13 h20, R
Gui Add, CheckBox, vCheck3 gCheckSub x92 y20 w80 h20, Enable
;
GUIControlGet,LR,,LRdirection
;
Gui Show
Return
GuiClose:
ExitApp
F2::
Suspend,
Pause, , 1
return
OnEdit:
Gui, Submit, nohide
if (LR = "L")
{
LRdirection := +v
}
else if (LR = "R")
{
LRdirection := v
}
else
{
LRdirection := v
}
return
CheckSub:
Gui, Submit, NoHide
return
#If Check3
`::
ControlSend,,%LRdirection%,
sleep 50
ControlSend,,%SC%,
Return