Sign in to follow this  
Followers 0
Cyber

I need help for do parameters function

4 posts in this topic

Hi!

i need a function for convert string to array parameter

identical to $cmdline

:P

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

Share this post


Link to post
Share on other sites



What is the expected delimiter? space, comma? Try StringSplit()

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

Ok i resolve it....

command parameter "parameter 2" parameter3 parameter4 "parameter 5" ecc....

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

Share this post


Link to post
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
Sign in to follow this  
Followers 0