|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Tue Apr 08, 2003 7:05 pm
Execute on starting zMUD? |
I would like to execute a series of commands when zMUD starts, to correct the states of my push buttons. I have several toggle buttons for auto-this or auto-that, but their states are not remembered upon exiting zMUD. I would just like to restore their state to the correct on/off state based on whether or not the trigger they toggle is enabled or not.
If there's a better way to accomplish this, please enlighten me to that instead.
Thanks! |
|
|
|
Talahaski Enchanter
Joined: 10 Oct 2000 Posts: 656 Location: USA
|
Posted: Tue Apr 08, 2003 7:14 pm |
there is a alias called atconnect. When you connect to a mud, this alias is executed. just add your scripts to this alias. If your system does not already have this alias created, just create it.
You may also think about using default values on your settings.
Talahaski
Processor PIII 1000
Memory 265MB
Video NVIDIA 64MB
Windows XP
Zmud Version 6.55a
Zmapper Version 1.14
http://www.dartmud.com |
|
|
|
Larkin Wizard
Joined: 25 Mar 2003 Posts: 1113 Location: USA
|
Posted: Wed Apr 09, 2003 12:54 am |
This is different. I don't want it to happen when I connect because if I setup the alias to push the buttons, and then reconnect, the buttons get pushed again and now they're all turned off.
I want something that executes once no matter how many connections I make. I'm sure that I could have some variable with a default of 0, and set it to 1 when I initialize things, but I'm hoping for a more elegant, simple way to do things once on startup.
Thanks. |
|
|
|
Rieper Beginner
Joined: 01 Sep 2002 Posts: 27
|
Posted: Wed Apr 09, 2003 1:04 am |
I can think of a few ways to do this, but they all work on the same premise: Button states can be tied to a variable.
HTH |
|
|
|
Kjata GURU
Joined: 10 Oct 2000 Posts: 4379 Location: USA
|
Posted: Wed Apr 09, 2003 1:59 am |
Yes, what Rieper said. To expand a bit more on it, notice that in the Advanced tab, when editing a button, there is a field called Variable. Simply create a variable and put its name here. The variable will store the button's state.
Kjata |
|
|
|
|
|