andrewJ Posted December 7, 2006 Share Posted December 7, 2006 I just recently started using AutoIt but can't find the answer to a question. I am creating a script that takes command line parameters. If a '?' is passed (i.e. 'script.exe /?') then I want the script to output some information and then exit. It should behave just like a typical console app (i.e. 'dir /?'). I can't find any function that will simply output text to the command prompt that started the script. Is this possible? Thanks, Andy Link to comment Share on other sites More sharing options...
Xenobiologist Posted December 7, 2006 Share Posted December 7, 2006 Hi, If $CmdLine[0] > 0 And $CmdLine[1] = "/?" Then MsgBox (0, "Parameterlist", "/1 = ..." & @CRLF & "/2 = ...") So long, Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times Link to comment Share on other sites More sharing options...
andrewJ Posted December 7, 2006 Author Share Posted December 7, 2006 Thank you. I understand how to get the parameters and how to use a message box. What I want to know if there is a way to output the text to the DOS console? For example, if I open up a Command Console and type "myscript.exe /?" I want to see output right there. Andy Link to comment Share on other sites More sharing options...
sheck Posted December 9, 2006 Share Posted December 9, 2006 Thank you. I understand how to get the parameters and how to use a message box.What I want to know if there is a way to output the text to the DOS console? For example, if I open up a Command Console and type "myscript.exe /?" I want to see output right there. AndyI don't believe that's possible, because AutoIt executables are 32 bit and DOS is 16 bit. Live and Learn, 'cause Knowledge is Super Power. Link to comment Share on other sites More sharing options...
Valik Posted December 9, 2006 Share Posted December 9, 2006 That's not the reason why. It's because console applications are console applications and AutoIt is a Windows application. Link to comment Share on other sites More sharing options...
The Kandie Man Posted December 9, 2006 Share Posted December 9, 2006 (edited) I don't believe that's possible, because AutoIt executables are 32 bit and DOS is 16 bit.Correct, Autoit is not a native console program. Search the example scripts forum for a few utilities from other people who have gotten it to work with prompts. I believe Valik made a real nice work around that made autoit work like a console program, but i believe it will require some external files, not sure though.EDITSpeak of the Devil, you posted just as i did and was talking about you Valik!1!1 Edited December 9, 2006 by The Kandie Man "So man has sown the wind and reaped the world. Perhaps in the next few hours there will no remembrance of the past and no hope for the future that might have been." & _"All the works of man will be consumed in the great fire after which he was created." & _"And if there is a future for man, insensitive as he is, proud and defiant in his pursuit of power, let him resolve to live it lovingly, for he knows well how to do so." & _"Then he may say once more, 'Truly the light is sweet, and what a pleasant thing it is for the eyes to see the sun.'" - The Day the Earth Caught Fire Link to comment Share on other sites More sharing options...
andrewJ Posted December 11, 2006 Author Share Posted December 11, 2006 Thank you for the replies. That answers my question. I'll rework my script for GUI replies. Andy 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