I have script looks like this:
DetectHiddenWindows, On
Run,%comspec% /k, , hide, pid2
WinWait, ahk_pid %pid2%
ControlSend, ,winscp.com script="path\to\script.txt", ahk_pid %pid2%
sleep,3000
;-- close hidden DOS window --
Process, Close, %pid2%
Process, WaitClose, %pid2%
But the problem is sometimes the controlsend works and send right letters and sometimes it change the double columns to single one and sometimes change the winscp.com to winscp>com and etc which I dont know from where these letters sometimes come so Any idea how to fix this issue and make it always send the right letters cuz this really frustrate me and makes the whole script mess up.
Thanks a lot
Max
run, winscp.com script="path\to\script.txt",,hideand addexitin yourscript.txt. - wOxxOmpidvariable and useprocess, waitcloseexactly the way you already have. - wOxxOmRun, program and arguments, , hide, pid2<< pid2 here is the Process ID variable (PID). - wOxxOm