|
Dyste Newbie
Joined: 18 Jan 2004 Posts: 8 Location: USA
|
Posted: Mon Jan 19, 2004 12:50 pm
This is a doozy. (Pick/Variable Organizing) |
Okay, here we go on this one:
I have a PICK Menu to select different options (6 of them, but 3 for
this example) to change:
#PICK {p:What would you like to change? (Choose as many as desired){Item:enccif0;esccck1=0} {Level:esccif2;esccck2=0} {Size:esccif3;esccck3=0}
The enccif's are the actual alias they will execute.
The esccck are variables that will set themselves to 0.
Now all of these variables add up in a main ccck variable.
Now everytime one of the chosen items alias's runs it adds +1 again.
This main variable is checked every time one of the chosen aliases is
run to see if it adds up to for this example 3. If it doesn't it moves
on to the next alias. If it does, it is presumably at the end of the
line of chosen items and will execute a final alias.
Unfortunately, instead of just subtracting the chosen items variables
right away it seems to do it per item. So it ends up going....
3-1=2 (item alias) +1=3 (final executes) -1=2 (size alias) +1 =
(final executes again)
When I would rather have it....
3-1-1=1 (item alias) +1 =2 (size alias) +1 = 3 (final executes)
I hope that made some sense. The reasoning is for this kind of script is
because there is no way of the script knowing where the end is to start the
final alias. They could pick the 1,2,5 items on the list, or the 2,4,6 etc.
Basically it is matter of organizing the execution and I have been stumped
all day. |
|
|
|
Dyste Newbie
Joined: 18 Jan 2004 Posts: 8 Location: USA
|
Posted: Mon Jan 19, 2004 12:51 pm |
Should be {p:What would you like to change?:}, just for error correcting.
|
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Mon Jan 19, 2004 1:37 pm |
You could just put another pick at the end of the picklist that is selected by default, that executes your final alias. Since its at the end of the picklist, it will always be executed last. Just don't unselect it.
#PICK {p:What would you like to change? (Choose as many as desired)} {Item:enccif0;esccck1=0} {Level:esccif2;esccck2=0} {Size:esccif3;esccck3=0} {*:finalalias} |
|
|
|
Dyste Newbie
Joined: 18 Jan 2004 Posts: 8 Location: USA
|
Posted: Mon Jan 19, 2004 2:04 pm |
A good idea, saves me a lot of grief. However, is there a way to hide that pick off the menu, so it can't be unselected or seen? It would really make it helpful. If not, I'll have to try to figure out other options.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Mon Jan 19, 2004 6:33 pm |
The simplest solution is probably to include the #PICK command in an #ALIAS, with the "final" alias coming after it.
#AL picksome {#PICK {p:What would you like to change? (Choose as many as desired)} {Item:enccif0;esccck1=0} {Level:esccif2;esccck2=0} {Size:esccif3;esccck3=0};final} |
|
|
|
Dyste Newbie
Joined: 18 Jan 2004 Posts: 8 Location: USA
|
Posted: Tue Jan 20, 2004 4:02 am |
Well, see that's the problem. There are 6 choices, and 1 or all 6 could be chosen, so there is no definate way to set the final alias under any of the choises. Thus why I tried to set up a math system to determine when the of the choices had been executed. Which failed because of the way Zmud handles the order in which the picks are executed. Doh. The idea that was given after I posted would work as well but I would need a way to mask its existance on the list. That or get the math to work. *sighs*
|
|
|
|
Danlo Magician
Joined: 28 Nov 2003 Posts: 313 Location: Australia
|
Posted: Tue Jan 20, 2004 9:16 am |
What is the problem with Lightbulb's solution? The final alias is not a part of the pick system but occurs after it, and will only be executed after the user chooses some items, or presses escape.
|
|
|
|
Dyste Newbie
Joined: 18 Jan 2004 Posts: 8 Location: USA
|
Posted: Tue Jan 20, 2004 2:36 pm |
Wow, I feel embarrassed. I had misread Lightbulb's reply as...
#AL picksome {#PICK {p:What would you like to change? (Choose as many as desired)} {Item:enccif0;esccck1=0} {Level:esccif2;esccck2=0} {Size:esccif3;esccck3=0;final}
Instead of...
#AL picksome {#PICK {p:What would you like to change? (Choose as many as desired)} {Item:enccif0;esccck1=0} {Level:esccif2;esccck2=0} {Size:esccif3;esccck3=0-->}<--;final}
So I thought he was trying to show me to just put it in with the last choice. It worked great! Man, really gets my goat that I had been looking for the problem all night and the answer was so simple and was presented to me the whole time. Thank you for your replies and aid. If I have anymore trouble I know who to write to, you're great. |
|
|
|
|
|