I am sending a text to the text writing field. But I had to use Backspace. Because the shortcut key also writes to the text field. Backspace can cause problems.
How can I handle it? I want a solution to not write the shortcut to the text field instead of Backspace or Ctrl + Z.
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.uytu
#SingleInstance Force ; Allow only one running instance of script.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetNumLockState, AlwaysOn
dize := ["2011/","2012/","2013/","2014/","2015/","2016/","2017/","2018/","2009/","2010/"]
YilGir:
KeyWait, NumLock, D
Loop,
{
Input, ts, L1 V
if( ts = 0 || ts = 1 || ts = 2 || ts = 3|| ts = 4 || ts = 5|| ts = 6|| ts = 7|| ts = 8|| ts = 9)
{
If (GetKeyState("NumLock", "P"))
{
if(ts = 0)
ts := 10
;Send, {Control Down}{z}{Control Up}
Send, {Backspace}
SendRaw, % dize[ts]
}
}
Break
}
Goto,YilGir
return