|
rtatum Novice
Joined: 19 Sep 2004 Posts: 45 Location: Houston
|
Posted: Tue Aug 23, 2005 7:41 pm
Simple command alias |
Okay, say I want to make a command called test with anywhere from no parameters with no upper limit, or at least a large one...
For example, I'd like to be able to type test, and have it send just the command test, but if I type test one two three, it would send three separate commands: test one, test two, and test three... what would be the best way of accomplishing this? I've looked through the help and found the %numparam function, but I can't think of a way to do that... I've tried a few things with a while loop to no avail. |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Tue Aug 23, 2005 9:32 pm |
Look into the use of %param(). The example it shows in the helpfile is almost exactly what you are asking for.
#alias Test {#If (%numparam()) {#loop 1,%numparam() {~test %param(%i)};#noop} {~test}} |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|