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
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Wed Aug 21, 2002 2:20 am   

Button position
 
Is there a way to access the button position from the script in the button?

I need to send a 1 for the first button, 2 for the second, etc... and am generating the buttons via a script.

AzCowboy
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Wed Aug 21, 2002 3:08 am   
 
If that's not possible, is there a way to force it to expand a variable in a #button command??? It always seems to stick the variable in there, rather than the value...
I can put in %1 and such, and they expand fine, but variables don't...
Reply with quote
LightBulb
MASTER


Joined: 28 Nov 2000
Posts: 4817
Location: USA

PostPosted: Wed Aug 21, 2002 3:26 am   
 
No, not unless you assign the button to a particular number to start with, in which case you could put that number in the button's script.

Yes, you can force expansion of variables in the command line with <> (if you haven't disabled that option), the %expand function, or the Expand Vars option in Preferences.

LightBulb
Senior Member
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Wed Aug 21, 2002 4:29 am   
 
Ok, %expand doesn't work (tried that already) it's created from a trigger, so that's out... Hrmm... <> almost works, problem is, I've got an alias, which creates a trigger, which creates the buttons.... *sigh* So close... if I put the <> in, it evaluates when it creates the trigger, I need to to evaluate when the trigger fires. *ponder*
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Wed Aug 21, 2002 4:36 am   
 
Ok, I tried editing the trigger created , putting in:

#BUTTON <@tmpbtn> {%1 -- buy %2} {buy <@tmpbtn>} {} {} {} {} {} {Size} {150} {23} {} {} {} {} {} {} {} "_MapperRoom" {} {} {}

tmpbtn is the variable with the button number in it, anyway, I get an error parsing script. So I don't seem to be able to get this to work. *sigh*
Reply with quote
Vijilante
SubAdmin


Joined: 18 Nov 2001
Posts: 5187

PostPosted: Wed Aug 21, 2002 11:03 am   
 
Perhaps if you list the whole alias and the message from the mud you are looking to trigger something can be figured out.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Wed Aug 21, 2002 12:04 pm   
 
#EXEC %concat("#BUTTON ", @tmpbtn, " {", %1, " -- buy ", %2, "} {buy ", @tmpbtn, "} {} {} {} {} {} {Size} {150} {23} {} {} {} {} {} {} {} {_MapperRoom} {} {} {}")

Kjata
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Wed Aug 21, 2002 4:08 pm   
 
Hmmm... looks promising... Damn, now I wish I HAD called in sick... *sigh* I'll try it out when I get home. I should even be ablet to get that nested down to where I need it...

Thanks for the tip, Kjata.

AzCowboy
Reply with quote
AzCowboy
Adept


Joined: 09 Nov 2000
Posts: 222
Location: USA

PostPosted: Thu Aug 22, 2002 6:22 am   
 
It works, it WORKS!

*cackle*
Now, to take over the world!
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