Jump to content

Print output to the command shell that sharted the script


Rexkix
 Share

Recommended Posts

I'm sure this is a really basic question, but I'm new. I'm loving this language so far.

How can I print output to the command prompt window that I start the AutiIt script in? I've tried ConsoleWrite() and even ConsoleWriteError().

Also, why do I get a prompt back before my script has finished when I type, "script.au3" at the command line prompt? Is there an implicit argument to the engine that tells it not to wait?

Thanks,

Link to comment
Share on other sites

Dont know much about it, but StdinWrite() might be what you are looking for.

But I'll go out on a limb and suggest your script might need to be compiles and you probably have to pass it the process ID of your command prompt as an argument.

:graduated:

AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Link to comment
Share on other sites

If I read that page right, it doesn't print to the shell that started the script, it lets an AutoIt script sends data to a process your it created. If so, it's just one more clever way to control an external component. I've barely been exposed to this product, but I'm really liking it a lot.

Edited by Rexkix
Link to comment
Share on other sites

I'm sure this is a really basic question, but I'm new. I'm loving this language so far.

How can I print output to the command prompt window that I start the AutiIt script in? I've tried ConsoleWrite() and even ConsoleWriteError().

Also, why do I get a prompt back before my script has finished when I type, "script.au3" at the command line prompt? Is there an implicit argument to the engine that tells it not to wait?

Thanks,

It is a lot easier if you post your effert here.

Question: Did you try and compile your script as CUI and run the exe?

Example:

#AutoIt3Wrapper_Change2CUI=y

$sResponse = $cmdLine[1]
ConsoleWrite("You Entered: " & $sResponse & @CRLF)
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...