Special tokens

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Steve
Member
Member
Posts: 13
Joined: 2005 Jan 09, 06:04
Location: Los Gatos, CA

Special tokens

Post by Steve »

Perhaps I've overlooked something, but I'm attempting to create a user command that passes two file names within the same directory/view pane to an external file comparison utility, and none of the special token combinations I've tried work quite right.

Using the $F and $G tokens as arguments for files in different panes works fine, as such:

> C:\Bin\ExamDiff.exe "$F" "$G"

Similarly, selecting two files within the same view pane and and passing them to the external utility via a "sendto" link also works correctly. The $A or $S put both file names in the same text field.

Any ideas? Is it possible to pass or insert a tab or newline character into a command string with a special token? Or perhaps allow an incremented suffix to $F, as in $F1, $F2?

Obviously, since I have a workaround, this request falls into the "nice to have" category, but it would be nice to see eventually.

Also relative to user commands, do you have any plans to allow user-configurable toolbar icons as a means of distinguishing custom commands, column sets, etc? While it's simple enough to hover over a "hammer" icon and wait for the tool tip to display the command, a number icon or such might make it faster to differentiate them.

As always, thanks for such an quality tool.
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

i am not sure i understand you
when i want to compare 2 files from the same folder, i select them and do >windiff $a. Is that what you're after?

toolbar customizable icons will come eventually
Steve
Member
Member
Posts: 13
Joined: 2005 Jan 09, 06:04
Location: Los Gatos, CA

Post by Steve »

Ah, your reply actually solved the mystery. My apologies for the user error. As a means of accomodating file names with embedded spaces, I customarily surround registry file variables in quotes, as in:

program.exe "%1"

As such, I'd assumed this applied to tokens in X2. Once I removed the quotes for the command in the same folder it worked perfectly.

For two files in the same directory (and view pane), this works:
> windiff $a

However, this version doesn't:
> windiff "$a"

The funny thing is that the quoted "$a" does work when selecting a file from different view panes, i.e. in different directories.

Thanks...
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Post by nikos »

the good thing with lowercase tokens ($a as opposed to $A) is that they are 8.3 versions of names and don't contain spaces or anything else that would have required quotation marks
Steve
Member
Member
Posts: 13
Joined: 2005 Jan 09, 06:04
Location: Los Gatos, CA

Post by Steve »

Definitely. And I've clearly not had enough coffee/sleep, as I'd mentioned in my previous reply that "$a" works for different view panes. That token doesn't apply in this context; I meant "$F" "$G"

Using lowercase tokens simplifies things, but it's nice to have both options.