Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ MUSHclient ➜ General ➜ Looping Commands

Looping Commands

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by UnderStriker   (7 posts)  Bio
Date Mon 06 Dec 2004 02:22 PM (UTC)
Message
Hello all, its been a long time since i used Mushclient, i forgot how to loop commands using Mushclient, i've been using Zmud for a looong time, only know how to use its command looping since its a lot easier, less complicated..
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #1 on Mon 06 Dec 2004 06:35 PM (UTC)
Message
It isn't complicated in MUSHclient these days, as you can "send to script".
Here is an example, using Lua scripting, however VBscript would be very similar:


<aliases>
  <alias
   match="looptest"
   enabled="y"
   send_to="12"
   sequence="100"
  >
  <send>for i = 1, 10 do
  Note ("item ", i)
end</send>
  </alias>
</aliases>


You can copy and paste that into MUSHclient, but the important part is, in your "send" box put:


for i = 1, 10 do
  Note ("item ", i)
end


That loops 10 times doing something. The alias must be set to "send to script" for the commands to be evaluated like that.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by UnderStriker   (7 posts)  Bio
Date Reply #2 on Thu 09 Dec 2004 02:20 PM (UTC)
Message
heh, tried that...
Got a error from that it goes as follows...

Error number: -2146827244
Event: Execution of line 1 column 20
Description: Cannot use parentheses when calling a Sub
Line in error:
Note ("item ", i)
Called by: Immediate execution

I didn't do anything different then what you said to use on there... i made the alias using the client since i have no clue how to do it with the world file...

I'm looking for something simple, not complicated... i thought there was a way to command loop with #run, but i don't remember how to do that stuff...
Top

Posted by UnderStriker   (7 posts)  Bio
Date Reply #3 on Thu 09 Dec 2004 02:51 PM (UTC)
Message
ROFL

I just happend to try something, happend to find a way to do what i was after :)

#10 (command)

lol, that worked perfectly.... kinda funky i found it by accident...
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #4 on Thu 09 Dec 2004 06:24 PM (UTC)
Message
As I said in my post my example was "using Lua scripting". The error message you got was for VBscript.

I think the solution you found was done with an alias, however I am glad it works. I wasn't sure what you meant by "looping commands".

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Poromenos   Greece  (1,037 posts)  Bio
Date Reply #5 on Thu 09 Dec 2004 10:59 PM (UTC)
Message
That's the speedwalk. It's quite useful with the interval and filler and all.

Vidi, Vici, Veni.
http://porocrom.poromenos.org/ Read it!
Top

Posted by Flannel   USA  (1,230 posts)  Bio
Date Reply #6 on Thu 09 Dec 2004 11:17 PM (UTC)
Message
Nicks example (in VBscript) is:

for i = 1 to 10
note "item " & i
next

Just copy/paste that into the send box (of the same trigger you copy/pasted from nick).

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,426 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.