Jump to content

write status to a DOS console


andrewJ
 Share

Recommended Posts

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

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

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

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

I 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

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.

EDIT

Speak of the Devil, you posted just as i did and was talking about you Valik!1!1 ;)

Edited 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

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