Sign in to follow this  
Followers 0
calthabis

stdout

6 posts in this topic

Hi I am running a tcl-script which will start autoitscript from time to time.

So my question is if there are any way to print to stdout or whatever it is called =) for my tcl-script to catch?

Share this post


Link to post
Share on other sites



ConsoleWrite( "my message here" )

:)


Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator[center] VW Bug user[/center]Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

Share this post


Link to post
Share on other sites

ConsoleWrite( "my message here" )

:)

You need to compile as CLI for that to write to STDOUT on the console shell.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Could you be kind explaining how i compile as CLI and what that means? ^^

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

I dont think he wants to print it out to a console(i could be wrong) i think he literaly want to capture the stream.

if you do want to have the text show up in a console you must compile it with the option to use a CUI instead of GUI

Edited by IchBistTod

[center][/center][center]=][u][/u][/center][center][/center]

Share this post


Link to post
Share on other sites

#6 ·  Posted (edited)

Could you be kind explaining how i compile as CLI and what that means? ^^

If you run Aut2Exe from a command line, add the "/console" switch to it. Or you can put "#AutoIt3Wrapper_Change2CUI=y" at the top of your script when compiling from SciTE.

AutoIt scripts compile as GUI apps by default. Compiling as a console app makes it a text based program to run from a cmd shell, like telnet.exe.

For example, compile this and run the .exe from a commandline:

#AutoIt3Wrapper_Change2CUI=y

For $n = 5 To 1 Step -1
    ConsoleWrite("This is a test: " & $n & @LF)
    Sleep(1000)
Next
ConsoleWrite("Done." & @LF)

Now run it from the command line again like this (shows lines that don't contain '3'):

MyScript.exe | FIND /v "3"

Recompile it without the compiler directive a the top and you get nothing out.

:)

Edit: Added demo.

Edited by PsaltyDS

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
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
Sign in to follow this  
Followers 0