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
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Sun Jan 24, 2010 2:26 am   

#close <windowname>
 
is there a way to do like a <send href="#close windowname">close window</send> within the window, i tried that exact string and it failed epicly
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 24, 2010 2:38 am   
 
embed the #close in an #execwin command.
_________________
EDIT: I didn't like my old signature
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Sun Jan 24, 2010 3:03 am   
 
like #window clanmember {<send href="#execwin clanmember {#close}">Close Window</send>} or am i doing it wrong? i have never tried to make a link to close a window i just normally click the X but this makes it more pleasing
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Sun Jan 24, 2010 6:01 am   
 
yep, like that. Perhaps some ~ action and perhaps the "" might not jive so well, just to calm things down. You should be able to ditch the href= part since that's only formally necessary with a simple tag like yours.
_________________
EDIT: I didn't like my old signature
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Jan 25, 2010 2:53 pm   
 
#WIN windowname close
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Mon Jan 25, 2010 5:59 pm   
 
Might also be an old bug in the 2.37 version. I just tried the original poster's SEND tag in the 3.12 Beta and it worked fine:

#WINDOW test
#MXP <send href="#close test">close window</send>

Clicking the link properly closed the "test" window.
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Mon Jan 25, 2010 9:50 pm   
 
i know that way works fine zugg, but im trying to do it from inside the window it-self which it does not like
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Mon Jan 25, 2010 10:08 pm   
 
Out of curiosity... whats wrong with the little X in the corner? its a built in feature of every window to close it....
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jan 26, 2010 1:23 am   
 
The #CLOSE command doesn't allow you to close the window that is issuing the command. There are too many issues dealing with the fact that the script is running in a separate thread and closing the window attached to the thread can cause problems.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Tue Jan 26, 2010 7:40 pm   
 
would making it send

:%item(%names,1): #CLOSE windowname

work? then it would be telling the main window to close it
_________________
Discord: Shalimarwildcat
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Tue Jan 26, 2010 8:25 pm   
 
Not really. That *might* cause the window to close, but you might also get a crash when CMUD finishes the #CLOSE command and tries to return to the thread attached to the window that you just closed. You'll just have to try it and see what happens.
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4691
Location: Pensacola, FL, USA

PostPosted: Thu Jan 28, 2010 11:29 am   
 
Just had another thought...

#MENU {File|Close window}

i see what you mean about the thread issue... to bad you cant return before the close goes off... an alarm of sorts

:%item(%names,1): #ALA "windowcloser" +0.001 {#CLOSE windowname}

Just tested and this code runs flawlessly.

Code:
#WIN Test {<send ':%item(%names,1): #ALA "windowcloser" +0.001 {#CLOSE test}' 'Close Window'>Close me!</send>}
_________________
Discord: Shalimarwildcat
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