ndinev Posted January 23, 2015 Share Posted January 23, 2015 (edited) Hi all, I found two problems when I am trying to run scripts from command line Here is the script 123.au3: For $i=1 To 10 Sleep(1000) ConsoleWrite($i & @CRLF) Next here is how I start it AutoIt3.exe /AutoIt3ExecuteScript 123.au3 Problem1: I am not getting any console print as a expected - 1,2,3... etc Problem2: Seems the script is executed as separated process and console is free immediately When script is compiled with /console to an exe it works fine. But I want my scripts not to be compiled. How can I solve those problems? Is it possible to run script in console way? Thanks Edited January 23, 2015 by ndinev Link to comment Share on other sites More sharing options...
Developers Jos Posted January 23, 2015 Developers Share Posted January 23, 2015 This is because AutoIt3.exe is not compiled a console application. Try using another compiled script as the launcher of your script. Ensure it is compiled as console and contains this directive: #pragma compile(AutoItExecuteAllowed, true) Jos 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...
mikell Posted January 24, 2015 Share Posted January 24, 2015 AutoIt3.exe "path123.au3" doesn't work ? Link to comment Share on other sites More sharing options...
ndinev Posted January 26, 2015 Author Share Posted January 26, 2015 AutoIt3.exe "path123.au3" doesn't work ? It doesn't work as console application - it detaches from console(it is asynchronous ) and there is no output. Link to comment Share on other sites More sharing options...
ndinev Posted January 26, 2015 Author Share Posted January 26, 2015 (edited) This is because AutoIt3.exe is not compiled a console application. Try using another compiled script as the launcher of your script. Ensure it is compiled as console and contains this directive: #pragma compile(AutoItExecuteAllowed, true) Jos Thanks! I am not sure how this will work ... since autoit doesn't provide output I may not be able to collect it anyway. Can you give me example how to collect output from autoit in this way? I believe it will be very helpful to have something like Autoit3console.exe in the installation package. Thanks Edited January 26, 2015 by ndinev 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