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

Gammon Software Solutions 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?
(New message)
Subject: Looping Commands
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Thu 09 Dec 2004 11:17 PM (UTC)  quote  ]
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

Posted by Poromenos   Greece  (1,037 posts)  [Biography] bio
Date Thu 09 Dec 2004 10:59 PM (UTC)  quote  ]
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 Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 09 Dec 2004 06:24 PM (UTC)  quote  ]
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 UnderStriker   (7 posts)  [Biography] bio
Date Thu 09 Dec 2004 02:51 PM (UTC)  quote  ]
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 UnderStriker   (7 posts)  [Biography] bio
Date Thu 09 Dec 2004 02:20 PM (UTC)  quote  ]
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 Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 06 Dec 2004 06:35 PM (UTC)  quote  ]
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 Mon 06 Dec 2004 02:22 PM (UTC)  quote  ]
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

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.


1,874 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

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

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]