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
slvr
Newbie


Joined: 14 Dec 2007
Posts: 1

PostPosted: Fri Dec 14, 2007 9:35 am   

How to check if connection is active + window events
 
As it's my first post - let me start with congrats for this great piece of software :)

And now a few questions...
1) Is there any possibility for a script to check if a window's connection is active or not?
2) Are more in-built events planned for CMUD? I'm interested in window-specific stuff like "window gets focus", "window is resized" etc.
3) How can you retrieve window properties, like number of lines / columns it can display etc.

Thanks for any help!

slvr
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5182

PostPosted: Fri Dec 14, 2007 4:05 pm   
 
1. The easiest way is to use the onConnect and onDisconnect events to set a variable. The only way to do it without using those events is to check %ctime, if it has a value delay for a little over a second and see if the value has changed. The new version also allows detecting the programming icon's color state which can be used as factor.

2. I am not sure how many new events Zugg plans to provide as part of the future mapper and database rewrites. I am quite certain that windows messages are pretty much right out.

3. Take a look at all the things in the %pref function. There is some stuff there in there about window size, but I think it is in pixels. Columns displayed depends on the font and text size which actually can be changed individually on each line.
_________________
The only good questions are the ones we have never answered before.
Search the Forums
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