Code: Select all
sendText(text){
clip := clipboardall
sleep 1000
Clipboard = %text%
sleep 1000
ClipWait, 1
sleep 1000
send, ^v
; sleep 100
sleep 1000
clipboard := clip
sleep 1000
clip =
}
; there's more same code as following one in my ahk script file
send, ^l
sendText( "https twitter.com /compose/tweet" Broken Link for safety )
send, {enter}
; sleep, 2000
sleep, 8000
text =
sleep, 2000
FileRead, text, C:/pg/autohotkey/somefiles/text_22.txt
sleep, 2000
sendText( text ) ; some issue here
sleep, 2000
send, ^{enter}
sleep, 3230000
This script works well for times, however sometimes I found there was no text content pasted on the desired textarea.
I thought why and I came up with that the reason why is the computer's low spec, so I modified some code to add some `sleep`. But even after that there still was this issue. so I thought the reason why is version of autohotkey, so I updated autohotkey version to latest. But this also didn't solve this issue. I want your help. Thanks in advance.