maqleod Posted October 30, 2008 Share Posted October 30, 2008 I can't seem to locate any equivalent to printf() in the help file, is there one? I only see functions to input to a command line app or read from one, but not to act as one. [u]You can download my projects at:[/u] Pulsar Software Link to comment Share on other sites More sharing options...
AlmarM Posted October 30, 2008 Share Posted October 30, 2008 I dont know anything about C/C++, but do you mean the magic MsgBox() AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes. Link to comment Share on other sites More sharing options...
Developers Jos Posted October 30, 2008 Developers Share Posted October 30, 2008 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 More sharing options...
maqleod Posted October 30, 2008 Author Share Posted October 30, 2008 I dont know anything about C/C++, but do you mean the magicCODE: AutoItMsgBox()AlmarMnot 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.Joshmm, missed that one somehow, thanks [u]You can download my projects at:[/u] Pulsar Software Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 30, 2008 Share Posted October 30, 2008 ConsoleWrite doesn't perform any formatting though so you'll have to create your own string. Link to comment Share on other sites More sharing options...
maqleod Posted October 30, 2008 Author Share Posted October 30, 2008 ConsoleWrite doesn't perform any formatting though so you'll have to create your own string.true, but what I was most concerned with was getting feedback to any commands to show up in the prompt, formatting the string is easy. [u]You can download my projects at:[/u] Pulsar Software Link to comment Share on other sites More sharing options...
Richard Robertson Posted October 30, 2008 Share Posted October 30, 2008 Ok. Just thought I'd mention it. Link to comment Share on other sites More sharing options...
Skrip Posted October 30, 2008 Share Posted October 30, 2008 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 More sharing options...
Developers Jos Posted October 31, 2008 Developers Share Posted October 31, 2008 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 More sharing options...
ProgAndy Posted October 31, 2008 Share Posted October 31, 2008 (edited) 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 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 October 31, 2008 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 More sharing options...
trancexx Posted October 31, 2008 Share Posted October 31, 2008 Just for the record: $formated_string = StringFormat('Line one\n\t\tLine two\n') DllCall("msvcrt.dll", "int:cdecl", "printf", "str", $formated_string) ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 31, 2008 Share Posted October 31, 2008 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) 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 More sharing options...
trancexx Posted October 31, 2008 Share Posted October 31, 2008 As alternative I meant, Master Yoda. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
PsaltyDS Posted October 31, 2008 Share Posted October 31, 2008 As alternative I meant, Master Yoda.Learning, you are. Yes. 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 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