Sign in to follow this  
Followers 0
yevlar

ControlSend throwing random Question Marks into Command Prompt

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



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>")

√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

using @comspec seems to solve the issue.

Thanks!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0