[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]  Can a Macro Key have multiple world.SendImmediate commands?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?

Can a Macro Key have multiple world.SendImmediate commands?

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


Posted by Weston   (28 posts)  [Biography] bio
Date Mon 14 Jun 2004 08:28 AM (UTC)
Message
Can a Macro Key have multiple world.SendImmediate commands?

I would like to immediately send two different commands without having to use two macro keys.

(If you need more information or don't know what I mean, please ask me a follow-up question.)
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Reply #1 on Mon 14 Jun 2004 08:48 AM (UTC)

Amended on Mon 14 Jun 2004 08:49 AM (UTC) by Flannel

Message
Macros can be multi-line, so yes, you can send multiple things. Just type one, hit return, type the other. Just like aliases, or triggers that send more than one line.

And you shouldnt need to use the sendimmediate command, just type in whatever you want sent.

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Weston   (28 posts)  [Biography] bio
Date Reply #2 on Mon 14 Jun 2004 04:13 PM (UTC)
Message
I tried that, but it doesn't work with world.SendImmediate commands.

When I put in:

/world.SendImmediate "command1"
/world.SendImmediate "command2"



In the space provided I get a 'Scripting Error'.

Error number: -2146827264
Event: Execution of line 2 column 1
Description: Expected statement
Line in error: /world.SendImmediate "command2"
Called by: Immediate execution


It does work if I remove the /world.SendImmediate "", but I want the macro key commands to bypass the queue.
[Go to top] top

Posted by Ked   Russia  (524 posts)  [Biography] bio
Date Reply #3 on Mon 14 Jun 2004 06:08 PM (UTC)
Message
It seems like there's actually a problem with sending 2 lines in one macro. You can go around that by either putting both commands on one line, using your scripting language's convention for doing so (think that won't work in vbscript though), or put your script in an alias and send that alias from a macro.
[Go to top] top

Posted by Nick Gammon   Australia  (21,674 posts)  [Biography] bio   Forum Administrator
Date Reply #4 on Mon 14 Jun 2004 09:57 PM (UTC)
Message
Quote:

When I put in:

/world.SendImmediate "command1"
/world.SendImmediate "command2"



In the space provided I get a 'Scripting Error'.


The "script escape" character only needs to appear once. Thus for multiple lines it should read:


/world.SendImmediate "command1"
world.SendImmediate "command2"


That will work.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Weston   (28 posts)  [Biography] bio
Date Reply #5 on Tue 15 Jun 2004 05:53 AM (UTC)
Message
It works now! This is great!

Thanks for the help. I should have known it would be something that simple.
[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,420 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]