|
teylos Newbie
Joined: 26 Dec 2007 Posts: 5
|
Posted: 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?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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. |
|
|
|
teylos Newbie
Joined: 26 Dec 2007 Posts: 5
|
Posted: 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?
|
|
|
|
Alcander Wanderer
Joined: 04 Aug 2001 Posts: 79 Location: USA
|
Posted: Wed Dec 26, 2007 11:24 pm |
will #ABORT {all} not work for youre problem teylos?
|
|
|
|
teylos Newbie
Joined: 26 Dec 2007 Posts: 5
|
Posted: 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). |
|
|
|
Dharkael Enchanter
Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: 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." |
|
|
|
teylos Newbie
Joined: 26 Dec 2007 Posts: 5
|
Posted: 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.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: 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.
|
|
|
|
|
|