Just wanting to get some details on evars Thread last updated on 2004-03-17 15:03:53

Posted by member 34295 on 2004-03-16 13:16:24

I did post this on loose-screws but this place looks more frequented. Note: I have tried searching through the posts but with nothing quite what I'm running into. Here's the text from my original post. Thanks much if you can help explain what's going on:

How does the logic work?

I've got a few themes, mostly from Teschio that refer to
$Programs$Media
$Programs$Office
for dynamic popups.

At first I redefined these to be simple program shortcuts to individual programs so, say, IE would open rather than a popup.

A problem cropped up. The program path for IE lies within "Program Files" which litestep wouldn't read when I edited the reference to $Browser$:

Browser "C:\Program Files\Internet Explorer\iexplore.exe"

"Odd," I thought. I did some extra editing and defining with no success. Other programs that exist *outside* of Program Files worked:

FileManager "C:\WINDOWS\explorer.exe"

"Odder," I thought. Then I redefined the IE path to be simply "Iexplore.exe" and it worked.


Now since these Popup menu links seem to be common, at least amongst Teschio's work, I thought I'd change things and create a Programs folder inside my litestep folder and Office, Media, Graphics, and Internet folders inside that folder along with some shortcuts. I defined this:

Programs "C:\LiteStep\Programs"

for: ...!PopupDynamicFolder "$Programs$media" X=-160 Y=90

It didn't work. So I defined the office folder directly and edited the theme.rc thusly:

Office "C:\liteStep\programs\office"

and ...!PopupDynamicFolder "$office$" X=-160 Y=70

It worked like a charm! What gives here? What don't I understand about declaring evars that's making life so difficult?

Thanks
Bedwyr

Posted by member 1949 on 2004-03-16 17:14:19 link

Simply put:
Evars can be defined anywhere in the theme
Themevars.rc
Theme.rc
Where ever they can be neatly put.
If I define "apps C:\litestep\themes\mytheme\apps" in any of the files you place it in, it can be called from a bang like this one.
*Popup "apps" !DynamicFolder:"$apps$"
or
*Popup "apps" !Execute ["$FileManager$" /e, "$apps$"]
or
*Shortcut "" -10 0 image.png .none none #0 !Exec "$apps$"

Also, spaces in the path will cause issues.
Use the dos name if needed
C:\progra~1\apps

Posted by member 34295 on 2004-03-16 20:33:27 link

That's very interesting. So even with quotation marks, litestep *can* get goofy sometimes and refuse to work and truncating might be a better solution. Hmm, I'll have to experiment with that, thanks. Are there any other quirks I should know about?

Posted by member 99 on 2004-03-17 01:05:37 link

Issues with spaces are almost always caused by forgetting to put quotes in somewhere. There are some rare cases where the module will manage to screw up anyway, but afaik !popupdynamicfolder is not one of them. !PopupDynamicFolder "$Programs$" works fine for me, and there are definitely spaces in there.

Posted by member 34295 on 2004-03-17 15:03:53 link

For some reason, it just wasn't working. I did finally get it to work by using "$Shortcuts$" instead. Maybe I should test whether defining: Shortcuts "C:\litestep\programs" instead of Shortcuts "C:\litestep\shortcuts" causes problems. That would be an interesting test of the module.