 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: 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 |
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: 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... |
|
|
 |
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: 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 |
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: 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*
|
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: 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* |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: 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.
|
|
|
 |
Kjata GURU

Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Aug 21, 2002 12:04 pm |
#EXEC %concat("#BUTTON ", @tmpbtn, " {", %1, " -- buy ", %2, "} {buy ", @tmpbtn, "} {} {} {} {} {} {Size} {150} {23} {} {} {} {} {} {} {} {_MapperRoom} {} {} {}")
Kjata |
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: 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 |
|
|
 |
AzCowboy Adept
Joined: 09 Nov 2000 Posts: 222 Location: USA
|
Posted: Thu Aug 22, 2002 6:22 am |
It works, it WORKS!
*cackle*
Now, to take over the world! |
|
|
 |
|
|