Xenobiologist Posted November 11, 2007 Share Posted November 11, 2007 Hi, anybody an idea of how to get the pairs from $cmdline? Something like this: bla.exe -i Input -o Output -s -t Getting an array back : [1][0] i [1][1] Input [2][0] o [2][1] Output [3][0] s [3][1] [4][0] t [4][1] 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...
picaxe Posted November 11, 2007 Share Posted November 11, 2007 CmdLine is a single dim array. Compile this and run with params If $cmdline[0] > 0 Then $i = "" $j = 1 For $j = 1 To $cmdline[0] $i &= $j & ": " &$cmdline[$j] & @CRLF Next MsgBox(0,"", "params = " & $cmdline[0] & @CRLF & $i) EndIf Link to comment Share on other sites More sharing options...
Tiger Posted November 11, 2007 Share Posted November 11, 2007 Use this: ; Example ShellExecute(@ScriptDir & '\Tool.exe', '"Name=Test,Category=Test,User=Admin"')oÝ÷ ØÆ¢'+ZºÚ"µÍÚ[ÛYH Ð^K]LÉÝÂY ÌÍÐÓQSVÌH ÝÈ[BIÌÍÝHÙ][Y]Ê ÌÍÐÓQSVÌWJBBWÐ^QÜ^J ÌÍÝBB[Y[ÈÙ][Y]Ê ÌÍÜ×ØÛY[JBBQ[H ÌÍÝØ^VÌWVÌBBIÌÍØ^HHÝ[ÔÜ] ÌÍÜ×ØÛY[K ][ÝË ][ÝÊBBRYPÝ[ ÌÍØ^K HHH[BBBTQ[H ÌÍÝØ^VÕPÝ[ ÌÍØ^JWVÌBBBBQÜ ÌÍÚHHHÈPÝ[ ÌÍØ^JHHBBBBBBIÌÍÜHÝ[ÔÜ] ÌÍØ^VÉÌÍÚWK ][ÝÏI][ÝÊBBBBBBIÌÍÝØ^VÉÌÍÚWVÌHH ÌÍÜÌWBBBIÌÍÝØ^VÉÌÍÚWVÌWHH ÌÍÜÌBBBBBS^BBBIÌÍØ^HH ÌÍÝØ^BBBQ[YBT] ÌÍØ^BB[[ÈÏOIÝÑÙ][Y] My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
Danny35d Posted November 11, 2007 Share Posted November 11, 2007 Try it:#include <Array.au3> If $CmdLine[0] <> 0 Then Dim $Array[1][2] For $x = 1 To $CmdLine[0] If StringLeft($CmdLine[$x], 1) = '-' Then ReDim $Array[UBound($Array) + 1][2] $Array[UBound($Array) - 1][0] = StringTrimLeft($CmdLine[$x], 1) ContinueLoop EndIf $Array[UBound($Array) - 1][1] = $CmdLine[$x] Next $Array[0][0] = UBound($Array) - 1 EndIf _ArrayDisplay($Array) AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Xenobiologist Posted November 11, 2007 Author Share Posted November 11, 2007 Hi, thx to for your suggestions/solutions. I'll check them. 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...
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