Can a Macro Key have multiple world.SendImmediate commands?

Posted by Weston on Mon 14 Jun 2004 08:28 AM — 6 posts, 23,789 views.

#0
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.)
USA #1
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.
Amended on Mon 14 Jun 2004 08:49 AM by Flannel
#2
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.
Russia #3
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.
Australia Forum Administrator #4
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.
#5
It works now! This is great!

Thanks for the help. I should have known it would be something that simple.