Deye Posted July 24, 2017 Share Posted July 24, 2017 perhaps try something like posted here Link to comment Share on other sites More sharing options...
Piotr12 Posted July 24, 2017 Author Share Posted July 24, 2017 2 minutes ago, Jos said: Which limitation? I don't understand which limitations you refer to. Inability to print text (display) in cmd windows which executed the script, without first compiling the script. 2 minutes ago, cbruce said: Piotr12, I'm guessing you launched "AutoIt.exe myscript.au3" from Windows RUN or from Windows Explorer. No, I executed it from cmd window. 2 minutes ago, cbruce said: Also, if you launch a Command Prompt window first and then run your AutoIt script from that command line... you will see the output because that Command Prompt window will not close until you exit it manually. It does not work that way for me Are you sure you don't mean compiled script? 1 minute ago, Deye said: perhaps try something like posted here I think that is different - simulating keypresses. That's not what I want. Link to comment Share on other sites More sharing options...
Piotr12 Posted July 24, 2017 Author Share Posted July 24, 2017 I think here people had similar (same?) problems: https://www.autoitscript.com/forum/topic/133127-print-output-to-the-command-shell-that-sharted-the-script/ https://stackoverflow.com/questions/34761334/print-to-console-command-prompt-in-autoit Link to comment Share on other sites More sharing options...
Developers Jos Posted July 24, 2017 Developers Share Posted July 24, 2017 (edited) 3 minutes ago, Piotr12 said: Inability to print text (display) in cmd windows which executed the script, without first compiling the script. That is because AutoIt3.exe is not a console program but rather a windows program... and it can only be one at the same time. Jos EDIT: There is NO problem! Edited July 24, 2017 by Jos WIHedgehog 1 SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Piotr12 Posted July 24, 2017 Author Share Posted July 24, 2017 14 minutes ago, Jos said: That is because AutoIt3.exe is not a console program but rather a windows program... and it can only be one at the same time. Hm I see, well it's a pity. Would be nice if there was AutoIt3CLI.exe. On the other hand, when you run AutoIt3.exe /help, or without any options, won't it print help to cmd window from which you run it? 14 minutes ago, Jos said: EDIT: There is NO problem! OK, that's why I called it "limitation" (and it's a problem for people like me). Link to comment Share on other sites More sharing options...
cbruce Posted July 24, 2017 Share Posted July 24, 2017 Whoops! Piotr12... My bad... I forgot that ConsoleWrite() is only good with compiled AutoIt scripts. This will work when run from the command line with AutoIt.exe: #include <WinAPI.au3> _WinAPI_AttachConsole() $hConsole = _WinAPI_GetStdHandle(1) _WinAPI_WriteConsole($hConsole, "Hello Piotr12" & @CRLF) Gianni 1 Link to comment Share on other sites More sharing options...
Piotr12 Posted July 24, 2017 Author Share Posted July 24, 2017 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