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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
SolReapr
Beginner


Joined: 03 Sep 2003
Posts: 13
Location: USA

PostPosted: 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 ?
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: Thu Dec 18, 2003 10:17 am   
 
The system alias Atdisconnect works.
Reply with quote
SolReapr
Beginner


Joined: 03 Sep 2003
Posts: 13
Location: USA

PostPosted: 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.
Reply with quote
Danlo
Magician


Joined: 28 Nov 2003
Posts: 313
Location: Australia

PostPosted: 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.
Reply with quote
SolReapr
Beginner


Joined: 03 Sep 2003
Posts: 13
Location: USA

PostPosted: 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.
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: 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}
Reply with quote
SolReapr
Beginner


Joined: 03 Sep 2003
Posts: 13
Location: USA

PostPosted: 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 ?
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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