Jump to content

ControlSend throwing random Question Marks into Command Prompt


yevlar
 Share

Go to solution Solved by JLogan3o13,

Recommended Posts

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

  • Moderators
  • Solution

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...