Jump to content

printf()?


maqleod
 Share

Recommended Posts

  • Developers

ConsoleWrite() will work and when you need it as CLI then compile it with the right option in aut2exe.

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

I dont know anything about C/C++, but do you mean the magic

CODE: AutoItMsgBox()

AlmarM

not quite, I don't want anything but a command prompt, I want all error messages to show up there.

ConsoleWrite() will work and when you need it as CLI then compile it with the right option in aut2exe.

Jos

hmm, missed that one somehow, thanks

[u]You can download my projects at:[/u] Pulsar Software
Link to comment
Share on other sites

AutoIt does not really associate with the command prompt. You are out of luck for this. ConsoleWrite() will be the closest...

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Link to comment
Share on other sites

  • Developers

AutoIt does not really associate with the command prompt. You are out of luck for this. ConsoleWrite() will be the closest...

I don't understand this remark.. care to explain?

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

If you want output on the commandline, you should

a) 1) install the full Scite4AutoIt package ( if you have not already )

....2) insert #AutoIt3Wrapper_Change2CUI=y

....3) compile ( CUI must be compiled first )

b ) OR: use AutToExe and check the Commandline checkbox :mellow:

To format text, just use --> ConsoleWrite(StringFormat(...))

///Edit: you have a third option (if you want console prompt, too and not just CMDLine params): My COnsole UDF: http://www.autoit.de/index.php?page=Thread...44881#post44881

Edited by ProgAndy

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Link to comment
Share on other sites

Just for the record:

$formated_string = StringFormat('Line one\n\t\tLine two\n')

DllCall("msvcrt.dll", "int:cdecl", "printf", "str", $formated_string)
Still requires the CUI compile option to write to the shell console (as opposed to the SciTE console):
#AutoIt3Wrapper_Change2CUI=y

$formated_string = StringFormat('Line one\n\tLine two\n\t\tLine three\n')

DllCall("msvcrt.dll", "int:cdecl", "printf", "str", $formated_string)

And if you provide that compile option, the DLL call is not requiered:

#AutoIt3Wrapper_Change2CUI=y

$formated_string = StringFormat('Line one\n\tLine two\n\t\tLine three\n')

ConsoleWrite($formated_string)

:mellow:

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