Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Is there a way to pass multiple numbers to a function as a single parameter?

$
0
0
So I've run into a very simple problem. I've looked at what I can think of in the documentation for an answer, and I have searched the forums, but I haven't found a solution just yet (mostly I'm not quite sure the query I should search for in this situation!). I'm really stumped on this one, and I thought maybe you folks could help.

I have a function:

Do
DuckDuckGoose()
exit
until 1





func DuckDuckGoose($duck, $goose)

For $i= 1 to $goose
if $i = $duck then
msgbox(0,"","Duck..")
continueloop
endif
msgbox(0,"","GOOSE!")
Next
endfunc

I'm trying to find a simple way to send numbers to the function, if possible, using the $duck parameter. Basically, I'd like to be able to send something like "1 to 3, 5", and have it skip those numbers in the loop. Anybody know a way I can do this?

Viewing all articles
Browse latest Browse all 12506

Trending Articles