Jump to content

I need help for do parameters function


Recommended Posts

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
Link to comment
Share on other sites

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