black_key Posted April 16, 2021 Share Posted April 16, 2021 AutoIt v3.3.14.5 $targetHost = "127.0.0.1" $targetPort = "5000" $dataBase = "big" Run("notepad.exe") Send("{UP}{UP}{SPACE}{TAB}{UP}{UP}{UP}{UP}") Local $hWnd = WinWait("[CLASS:Notepad]", "", 10) $cmd = StringFormat("aaATALOG TCPIP NODE %s REMOTE %s SERVER %s OSTYPE WIN;CATALOG DATABASE %s AT NODE %s", $dataBase, $targetHost, $targetPort, $dataBase, $dataBase) ControlSend($hWnd, "", "Edit1", $cmd) sleep(1000) Is this a bug? Link to comment Share on other sites More sharing options...
JockoDundee Posted April 16, 2021 Share Posted April 16, 2021 Well, not surprising since you are SendIng keystrokes to whatever happens to be in focus at that moment, which could be anything including the program you started right before. Why not do your sending after the window is opened, and at least use controlsend? Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
wolflake Posted April 16, 2021 Share Posted April 16, 2021 Ok I'll bite... what were your trying to do? What changed between runs for you. As far as I can tell both notepad runs looked the same. You'll need to help us help you. Link to comment Share on other sites More sharing options...
black_key Posted April 25, 2021 Author Share Posted April 25, 2021 The uppercase and lowercase letters are random, but suddenly they are normal, and I can't reproduce them, the person in front of me may have reproduced them Link to comment Share on other sites More sharing options...
JockoDundee Posted April 25, 2021 Share Posted April 25, 2021 8 hours ago, black_key said: the person in front of me may have reproduced them. Sounds like a pattern is emerging. Can you check the people to the left and right of you, and of course anyone directly behind you? Code hard, but don’t hard code... Link to comment Share on other sites More sharing options...
Zedna Posted April 25, 2021 Share Posted April 25, 2021 (edited) Use ControlSetText() instead of ControlSend(). EDIT: For more detailed info about ControlSend() problems/limitations & workarounds look here Edited April 25, 2021 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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