[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  General
. . -> [Subject]  Looping Commands
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Looping Commands

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


Posted by UnderStriker   (7 posts)  [Biography] 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..
[Go to top] top

Posted by Nick Gammon   Australia  (21,387 posts)  [Biography] 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
[Go to top] top

Posted by UnderStriker   (7 posts)  [Biography] 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...
[Go to top] top

Posted by UnderStriker   (7 posts)  [Biography] 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...
[Go to top] top

Posted by Nick Gammon   Australia  (21,387 posts)  [Biography] 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
[Go to top] top

Posted by Poromenos   Greece  (1,037 posts)  [Biography] 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!
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] 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.
[Go to top] 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.


4,391 views.

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

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

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

[Home]


Written by Nick Gammon - 5K   profile for Nick Gammon on Stack Exchange, a network of free, community-driven Q&A sites   Marriage equality

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( https://gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Hosted at FutureQuest]