Cyber Posted March 2, 2009 Share Posted March 2, 2009 Hi! i need a function for convert string to array parameter identical to $cmdline help me please func _parameter($text) .. .. return $cmdlineArray endfunc Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
Authenticity Posted March 2, 2009 Share Posted March 2, 2009 What is the expected delimiter? space, comma? Try StringSplit() Link to comment Share on other sites More sharing options...
Cyber Posted March 2, 2009 Author Share Posted March 2, 2009 Space and Comma Parm0 "parameter one" parametertwo = parm0 "parameter one" parametertwo stringsplit is less usefull Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key Link to comment Share on other sites More sharing options...
Cyber Posted March 2, 2009 Author Share Posted March 2, 2009 (edited) Ok i resolve it.... command parameter "parameter 2" parameter3 parameter4 "parameter 5" ecc.... expandcollapse popup#include "array.au3" func _parametersplit($t) if StringInStr($t, """") > 0 Then Dim $array[1] $array[0] = 0 $a = StringSplit($t, """") $d = $a For $i=1 to $a[0] if Mod($i,2) > 0 Then $t = StringSplit($a[$i], " ") for $j = 1 to $t[0] if $t[$j] <> "" Then $array[0] = $array[0]+1 ReDim $array[$array[0]+1] $array[$array[0]] = $t[$j] EndIf Next Else $array[0] = $array[0]+1 ReDim $array[$array[0]+1] $array[$array[0]] = $a[$i] EndIf Next Else $array = StringSplit($t, " ") EndIf return $array Edited March 2, 2009 by Cyber Console Browse: Navigate on the WEB in a textual consoleMultiPing!: Show computer on the lan and/or show the local/remote task, ALL animated!KillaWin: Event executingCryptPage: Crypt your webpage and show only with key 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