|
SolReapr Beginner
Joined: 03 Sep 2003 Posts: 13 Location: USA
|
Posted: Thu Dec 18, 2003 9:21 am
Trigger on Exit |
I'm trying to get zMud to send a recall command to the mud when it closes, either through the File|Exit command or by clicking the Close Window button. atexit logically disconnects before executing. Does anyone know of a way to get around the problem ?
|
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Thu Dec 18, 2003 10:17 am |
The system alias Atdisconnect works.
|
|
|
|
SolReapr Beginner
Joined: 03 Sep 2003 Posts: 13 Location: USA
|
Posted: Thu Dec 18, 2003 10:28 am |
Thank you for the reply,
Atdisconnect only fires after you disconnect from the mud. It seems to work if you need to change zMud settings but not if you need to send a command to the mud. What i'm looking for is something that will detect when the zMud window is closing and send a command to the mud before disconnecting. |
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Thu Dec 18, 2003 11:04 am |
When I tested it, it did indeed send it BEFORE zmud actually disconnected. Try testing it yourself. Drop something, put into the alias to pick it up, disconnect, log back on, and see if you picked it up.
|
|
|
|
SolReapr Beginner
Joined: 03 Sep 2003 Posts: 13 Location: USA
|
Posted: Thu Dec 18, 2003 12:29 pm |
I wouldn't post if I hadn't tested it. Using v6.66 and 6.62. Both with atexit and atdisconnect. In all instances the commands are executed, but not before the connection is lost. Unless there is some zMud setting that I am missing, I can't think of why it would work for you but not for me.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Thu Dec 18, 2003 5:50 pm |
Write your own quit-zMUD alias, and use that instead of File|Exit or the Close Window button. Yes, that means you'll have to use the keyboard instead of the mouse. Of course, you could add a Push button with the alias as its value. Or, you could skip the alias and just make a button with the desired commands.
#AL qz {recall;#MENU File|Exit} |
|
|
|
SolReapr Beginner
Joined: 03 Sep 2003 Posts: 13 Location: USA
|
Posted: Fri Dec 19, 2003 6:19 am |
The reason i'm trying to send a command on zMud closing is as a contingency measure. It's not a problem when i'm there to quit out, but a situation came up recently when I was not there and my zMud was closed, my character was not recalled before that, causing me no end of trouble.
Danlo's test indicates that what I wan't to do could work, however it does not work correctly for me. Can anyone confirm that atexit will send a command to the mud before disconnecting, and i'm just doing something wrong, or verify that it does NOT work in the current version ? |
|
|
|
|
|