yevlar Posted October 18, 2014 Share Posted October 18, 2014 I noticed a random issue while testing some of my code. I'm sending lines of text to the command prompt via ControlSend (with WinGetHandle,) to control Plink, and there are occasions when random letters will be swapped out with question marks (i.e. ControlSend($hWnd, "", "", "cd /" & @CRLF) will end up printing "cd ?") It happens completely at random, and never with the same command twice. I have tried separating each command with a sleep(500) line but that doesn't seem to help. Anyone know why this might be happening, and what might be a good solution? Is @ComSpec more reliable? Thanks! Link to comment Share on other sites More sharing options...
Moderators Solution JLogan3o13 Posted October 18, 2014 Moderators Solution Share Posted October 18, 2014 You're asking if @ComSpec would be more reliable, I would suggest trying it and judging for yourself. Do something like this: /k will keep the window open, whereas /c will close it immediately. Run(@ComSpec & " /k <command>") "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Zedna Posted October 19, 2014 Share Posted October 19, 2014 Look here for explanation and solution/workaround Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
jpm Posted October 20, 2014 Share Posted October 20, 2014 I noticed a random issue while testing some of my code. I'm sending lines of text to the command prompt via ControlSend (with WinGetHandle,) to control Plink, and there are occasions when random letters will be swapped out with question marks (i.e. ControlSend($hWnd, "", "", "cd /" & @CRLF) will end up printing "cd ?") It happens completely at random, and never with the same command twice. I have tried separating each command with a sleep(500) line but that doesn't seem to help. Anyone know why this might be happening, and what might be a good solution? Is @ComSpec more reliable? Thanks! Can I know which OS version/ autoit 32/64 bit you are using and the Keyboard too? You can use _DebugBugReportEnv() , the info SciTE panel editor give the keyboard. are more complete. a a little repro script can be useful to confirm Zedna information Thanks Link to comment Share on other sites More sharing options...
yevlar Posted October 24, 2014 Author Share Posted October 24, 2014 using @comspec seems to solve the issue. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now