I'm sorry. I'm posting it again because there was a big mistake in the question... (I'm a newbie, I can't edit my post)
Code: Select all
#Requires AutoHotkey v2.0
#SingleInstance Force
#Include <IME>
IME:=Class_IME()
F2::
F3::
F4::
{
; <Set Language to Korean>
IME.SetKeyboardLayout(0x0412), Sleep(50)
IME.SET(1)
IME.SetConvMode(1)
sendkey:="dkssudgktpdy", sendkey_delayed:=""
Switch A_ThisHotkey
{
case "F2":
Loop Parse, sendkey
sendkey_delayed.=A_LoopField "{Sleep 50}"
Send(sendkey_delayed) ; d{Sleep 50}k{Sleep 50}s{Sleep 50}s{Sleep 50}u{Sleep 50}d{Sleep 50}g{Sleep 50}k{Sleep 50}t{Sleep 50}p{Sleep 50}d{Sleep 50}y{Sleep 50}
case "F3":
Loop Parse, sendkey
Send(A_LoopField), Sleep(50)
case "F4":
Loop Parse, sendkey
SendText(A_LoopField), Sleep(50)
}
}
1.
Why is there a difference between F2 and F3 methods?
F2 responds to IME.
F3 does not respond to IME. (each char is not combined by IME)dkssudgktpdy --> 안녕하세요
I wonder why using {Sleep} affects IME.dkssudgktpdy --> ㅇㅏㄴㄴㅕㅇㅎㅏㅅㅔㅇㅛ
(I'm also curious about the meaning of {Sleep} in "Send" commands)
2.
Even if I don't care about input method editor,
I don't understand why this "Send({Sleep 50})" actually has a longer delay than 0.05 seconds.
Also, I don't understand why this does not have uniform delays.
Delays that run earlier tend to be slower than delays that run later.
Does anyone have a detailed understanding of this problem?