Jump to content

stdout


Recommended Posts

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

VW Bug user

Pinheiral (Pinewood) city:

http://pt.wikipedia.org/wiki/Pinheiral

Link to comment
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
Link to comment
Share on other sites

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]

Link to comment
Share on other sites

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
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...