 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Oct 21, 2002 2:24 am
How /Is it possible, to pass vars between windows? |
I'd like to set the values for several variables in my main window by hitting buttons in a secondary window. I read the help files many times, and I can get the secondary window to send to the mud, but not to the primary window. I'd think something like this should work, but I've been unsuccessful...
Abc: @var = 3
What am I doing wrong? Or is this simply not possible? I'd rather not use global vars if I don't have to. |
|
|
 |
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Mon Oct 21, 2002 2:33 am |
You don't need the space in front, nor the @ character when referencing variables in the a = b syntax.
You might want to check your window preferences to see if Allow A=B syntax is checked, but I believe it's set that way by default.
li'l shmoe of Dragon's Gate MUD |
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Oct 21, 2002 2:40 am |
Thanks for the quick reply!
How about this?
Abc:mainvar=<tempvar>
Is thist possible? Where mainvar is native to the main window, and tempvar is native to the secondary window? |
|
|
 |
Vijilante SubAdmin

Joined: 18 Nov 2001 Posts: 5187
|
Posted: Mon Oct 21, 2002 3:37 am |
Expansion is actually preformed prior to sending the command to the other window. In order to do what you want it would be
mainvar=@{abc.tempvar} |
|
|
 |
mr_kent Enchanter
Joined: 10 Oct 2000 Posts: 698
|
Posted: Mon Oct 21, 2002 3:51 am |
quote:
Expansion is actually preformed prior to sending the command to the other window. In order to do what you want it would be
mainvar=@{abc.tempvar}
YEEEHA! YOU ROCK!
What I really wanted was
abc:mainvar=@{def.tempvar}
But I never would have figured that out without your help! Thanks!
Oh, this is sweet! |
|
|
 |
|
|