Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
teylos
Newbie


Joined: 26 Dec 2007
Posts: 5

PostPosted: Wed Dec 26, 2007 4:22 am   

Esc to abort all running scripts?
 
The help says that hitting Esc should abort all running scripts, but that doesn't seem to work for me. For instance, if I use an alias and that alias starts running and then it's waiting for certain text from the MUD (using #WAITFOR), I can hit Esc all I want but when the text comes up it still responds to it and then continues the script. Am I missing something?
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Wed Dec 26, 2007 10:34 am   
 
Esc is only usable on code running in the main command line thread. Since your alias is using waitfor, it has its own thread, which then can't be aborted with Esc.

Esc is pretty much only for use when you've run a big loop on the command line (bigger than you expected) and it's going to take ages to finish.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
teylos
Newbie


Joined: 26 Dec 2007
Posts: 5

PostPosted: Wed Dec 26, 2007 11:17 pm   
 
Thanks for the answer! Is there some other way to kill em all, even the ones using waitfor?
Reply with quote
Alcander
Wanderer


Joined: 04 Aug 2001
Posts: 79
Location: USA

PostPosted: Wed Dec 26, 2007 11:24 pm   
 
will #ABORT {all} not work for youre problem teylos?
Reply with quote
teylos
Newbie


Joined: 26 Dec 2007
Posts: 5

PostPosted: Thu Dec 27, 2007 12:36 am   
 
No unfortunately #abort {all} doesn't seem to work either. For instance, I have an alias that starts out like this:

#SLOW coinguard1
#WAITFOR {^Barracks.}
get box

Coinguard1 is just a path to a particular spot. Then I #WAITFOR an indication that I've arrived at that spot, and then get box. If I start this alias running and I hit Esc while it's still running the Coinguard1 path, the WAITFOR is still waiting. #abort {all} doesn't seem to make it go away, because if I then start the same alias again, when I arrive at Barracks, "get box" happens twice (or more, depending on how many times I started the alias and then hit Esc to stop it).
Reply with quote
Dharkael
Enchanter


Joined: 05 Mar 2003
Posts: 593
Location: Canada

PostPosted: Thu Dec 27, 2007 6:20 am   
 
Teylos,
Try typing #THREAD with no arguments.
this will give you a list of all currently active threads from the Status and Script columns you should be able to see the Thread-ID of the thread you want to kill.
now type either #STOP Thread-ID or #RESU Thread-ID
This should kill the Thread in question.

The help files indicate this should work from v. 2.0 onwards
_________________
-Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style."
Reply with quote
teylos
Newbie


Joined: 26 Dec 2007
Posts: 5

PostPosted: Thu Dec 27, 2007 11:46 pm   
 
That worked! I was able to see the threads and get rid of them with #stop. Thanks very much. I wish there was an easier way, but this gets the job done at least.
Reply with quote
Fang Xianfu
GURU


Joined: 26 Jan 2004
Posts: 5155
Location: United Kingdom

PostPosted: Fri Dec 28, 2007 3:13 am   
 
Well, if you want to do it with a script, you can name a thread with the #thread command, too, and then stop it using that name instead.
_________________
Rorso's syntax colouriser.

- Happy bunny is happy! (1/25)
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net