Cutting the queue line

Posted by David B on Wed 07 May 2003 03:16 AM — 10 posts, 37,403 views.

USA #0
i'd like to be able to bump commands to the beginning fo the queue line if possible. If you can do it how, I couldn't find anything in the search engine, searched: queue command queue, discardqueue.

I'd set it up to save the current queue, discard it, insert the new command then resume the previous queue, if I know hoe to do that. I hope there is an easier way to do it.
USA #1
Well, If you actually need it Queue'd, I believe saving, editing, and then resuming is the preferred method, but if you dont need to send it with the queue, and just need it sent now, you can use SendImmediate, which sends it directly to the world, when the command is called, bypassing the Queue all together (this is all rephrased from the online scripting reference)
USA #2
Ok that works perfectly for me

Sub Blah (name, line, wilds)
world.SendImmediate wilds (1)
end sub


Would that be how it might look?

Error number: -2146827850
Event: Execution of line 1 column 1
Description: Object doesn't support this property or method: 'world.SendImmediate'
Line in error:

Called by: Immediate execution

That was what happened.

Also tried doing it from the cmd prompt, got the same thing.

Basically what I want to do is something along the lines of:

Alias: send *
Example: send reply blah blah
exmaple: send say Hello

It scripts: world.SendImmediate wilds (1)

Or something like that.
Amended on Wed 07 May 2003 11:44 PM by David B
USA #3
You need v3.41 or later, that'd be the only thing I can see...

But yeah, Your scripts look good, and you've got the right idea... Make sure you have 3.41 or higher, If you've got that, then its Nicks Realm.
USA #4
That was the problem, I got the newest version and it worked wonderful!
Australia Forum Administrator #5
If you check out the function page SendImmediate it tells you what version is required to use it. All recent functions have that in them, so I can document a function, and you can see whether you have the appropriate version that supports it.
USA #6
I tried what david had posted

Sub Blah (name, line, wilds)
world.SendImmediate wilds (1)
end sub


With an alias called send
it didnt have anything that is sent directly
for label I put Blah
and for script I put blah


But it doesnt do anything
I have scripts enabled too
Any help?
Australia Forum Administrator #7
Your alias should really be "send *", or it won't pick up the rest of the line. However you don't need a script file, in recent versions this will work:


<aliases>
  <alias
   match="send *"
   enabled="y"
   echo_alias="y"
   send_to="12"
   sequence="100"
  >
  <send>world.SendImmediate &quot;%1&quot;</send>
  </alias>
</aliases>

Australia Forum Administrator #8
Or even more simply, recent MUSHclient versions let an alias send to "immediate". So, just make an alias that sends its wildcard to "world (immediate)" like this:


<aliases>
  <alias
   match="send *"
   enabled="y"
   echo_alias="y"
   send_to="13"
   sequence="100"
  >
  <send>%1</send>
  </alias>
</aliases>

USA #9
Ahh, thanks Nick... I love you