Jump to content

Command line help


quake101
 Share

Recommended Posts

I feel so stupid that I can't figure this out myself....

I'm trying to add a simple command line feature that would output my program "version". So how do I output text back into the command line?

If $CmdLine[0]=1 Then
    If $CmdLine[1] = "version" Then
        ;out current version in the dos window...
        ; super awesome code that I can't figure out on my own goes here...
        Exit
    EndIf
EndIf
Link to comment
Share on other sites

I feel so stupid that I can't figure this out myself....

I'm trying to add a simple command line feature that would output my program "version". So how do I output text back into the command line?

If $CmdLine[0]=1 Then
    If $CmdLine[1] = "version" Then
        ;out current version in the dos window...
        ; super awesome code that I can't figure out on my own goes here...
        Exit
    EndIf
EndIf
You need to compile the script for CUI vice GUI interface:
#AutoIt3Wrapper_Change2CUI=Y

If $CmdLine[0] Then
    For $n = 1 To $CmdLine[0]
        If $CmdLine[$n] = "/v" Then
            ConsoleWrite("Param " & $n & ":  AutoIt Version = " & @AutoItVersion & @CRLF)
        Else
            ConsoleWrite("Param " & $n & ":  " & $CmdLine[$n] & @CRLF)
        EndIf
    Next
Else
    ConsoleWrite("There were no command line options!" & @CRLF)
EndIf

:D

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