Re: drop down box or something like it.
Brian Wolven <[email protected]>
| Newsgroups | gmane.comp.windows.shells.litestep |
|---|---|
| Message-ID | <[email protected]> |
Hale, Paul wrote:
>>
>> The %1 and %2 are just the two arguments to the bang; the
>> first is the setting/evar name, the second is the
>> setting/evar value. So
>>
>> !savesetting "username" "BigDaddy"
>>
>> would place this line in the settings file after defining the evar:
>>
>> username "BigDaddy"
>>
>
> Right here is where it loses me. Where is it be said "username"? I see
> how the %2 represents the filepath, I just don't see how this command
> knows the Var I am defining.
>
> Am I saying this correctly?
The bang takes two arguments - you have to tell it the name of the evar you're
saving, and then what you want the evar to be. So the following would save the
full path to a color scheme file in the evar "colorscheme":
*Popup "Select color scheme" !new !popupSchemes
*Popup "Select color scheme" !popupDynamicACtionFolder:!savesetting
colorscheme:"$SchemesDir$"
*Popup ~New
If you want just the "name" of the scheme, then you have to be a little fancier,
since the full path just gets tacked on at the end of the popup dynamic action
bang. Instead I define the popup action to be !savescheme:
*Popup "Select color scheme" !new !popupSchemes
*Popup "Select color scheme" !popupDynamicACtionFolder:!savescheme:"$SchemesDir$"
*Popup ~New
...and then define !savescheme to do the saving and stripping, where the %1 is
the full path that is passed in from the popup:
*alias !savescheme !execute [!saveSetting colorscheme %1][!strippath
colorscheme][!stripextn colorscheme]
Try it both ways and look at the results - you'll get the picture. =)
---------------------------------------------------------------------
Can't Unsubscribe? Check http://desktopian.org/listunsub.html
LS List Homepage: http://wuzzle.org/list/litestep.php
Get the LS FAQ: http://lsfaq.shellfront.org