like this following script do NOT work with "vs code" but it works fine with "notepad++" (in spammy way)
Code: Select all
horizontalFunc(code, clipMethod := "^v" , codeEnd:="", EnterMethod := " {Enter}" ,AllowAutoPaste := true){
local textOutput := (code . codeEnd)
A_Clipboard := textOutput
if AllowAutoPaste := true {
send(clipMethod)
Send(EnterMethod)
}
}
it won't work on VS.code unless I add sleep(50)
Code: Select all
horizontalFunc(code, clipMethod := "^v" , codeEnd:="", EnterMethod := " {Enter}" ,AllowAutoPaste := true){
local textOutput := (code . codeEnd)
A_Clipboard := textOutput
if AllowAutoPaste := true {
send(clipMethod)
sleep(50) ;=====================here new line
Send(EnterMethod)
}
}
why this happened?