> Try
> Format ContextIf (_file_==?your_path)
> I'm guessing you're right-clicking a folder which means you're using a
> ContextFolder commandlist for this. If you're right-clicking a file,
you'll
> have to trim off the file name using the file plugin
Already tried that.
As best as I could tell, | and _file_ aren't evaluated at the time of menu
creation. I was picking up the *last* value, instead of what I thought
should have been the current value.
For example,
I set up the following command menu:
[2]
Label = Test
LCmd1 = win.debug((index("|",
LParam1 = "Source")>0))
MCmd1 = (none)
RCmd1 = (none)
[4]
Label = Only For Source
LCmd1 = *Format
LParam1 = ContextIf (index(file.folder(_file_), "Source") > 0)
MCmd1 = (none)
RCmd1 = (none)
[5]
Label = Compare with _New
LCmd1 = [EMAIL PROTECTED]
LParam1 = (_file_)
MCmd1 = (none)
RCmd1 = (none)
[6]
Label = End for Source
LCmd1 = *Format
LParam1 = EndContext
MCmd1 = (none)
RCmd1 = (none)
If I open Explorer to c:\temp, and run the test (#2) option, I get "c:\temp"
in the debug window, and the 5th option doesn't show - so far, so good.
Then I change to c:\...\source. Right-click on a folder there, and get no
5th option. Run the test, and then viola, the 5th options appears.
Change back to c:\temp, and the 5th options still appears. Run the test
option again, and then the 5th options is gone.
Repeat the above steps with the _file_, same result.
This lead me to my conclusion that | and _file_ aren't evaluated when PP is
adding options to the right-click menu, and so I was wondering if there was
another way to get the current directory, or a way to force evaluation of
those variables. I tried calling file.folder with those variables, and they
simply returned the value as of the previous eval, and did not refresh.
I just now replaced by ContextIf expression with this:
(win.debug(file.folder(_file_)) > 0), which confirmed my suspicion. The
value showing in my debug window isn't the value of the current folder, it
is the last folder that I ran the Test option on.
Paul
------------------------ Yahoo! Groups Sponsor --------------------~-->
Get Bzzzy! (real tools to help you find a job). Welcome to the Sweet Life.
http://us.click.yahoo.com/A77XvD/vlQLAA/TtwFAA/JV_rlB/TM
--------------------------------------------------------------------~->
Attention: PowerPro's Web site has moved: http://www.ppro.org
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/power-pro/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/