Jump to content

Command Line Support?


Recommended Posts

is there anyway to write a script that can accept commands from the command line?

There are a few programs I want to write that are too simple to need a gui, and it would just be nice to be able to call it in a cmd prompt with arguments to do what I want.

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

I did it like this:

Func getNamedArgument($NamedArgument)
    For $i = 1 to $CmdLine[0]
        If stringinstr($CmdLine[$i],$NamedArgument) Then 
            $TmpArray = StringSplit($CMDLINE[$i],':')
            Global $return = $TmpArray[2]
        EndIf
    Next
EndFunc

you can call this function easy:

getNamedArgument("/CommandLineSwitch:")

$CommandLineSwitch = $return

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