[Solved] Favorite tools - new variables & re-arrange menus

Discussion and questions - donor version.
Post Reply
Message
Author
user8899
Posts: 13
Joined: 11.07.2013, 22:24

[Solved] Favorite tools - new variables & re-arrange menus

#1 Post by user8899 » 18.07.2013, 00:29

Hi.

I have 2 suggestion regarding variables used as parameters inside Define favorite toolbars option dialog.

1. Variable modifiers or new variables

Please, introduce modifiers to parameter variables to allow the user to extract specific data from the paths to the items, i.e.
  1. filename (without extension) part of the full path, examples:

    Code: Select all

    X:\path\to\the\FILE.EXT => FILE
    X:\path\to\the\DIRECTORY => DIRECTORY
  2. extension part of the filename, example:

    Code: Select all

    X:\path\to\the\FILE.EXT => EXT
  3. filepath part of the full path (its the path to the directory which contains the item), examples:

    Code: Select all

    X:\path\to\the\FILE.EXT => X:\path\to\the\
    X:\path\to\the\DIRECTORY => X:\path\to\the\
If modifiers proved to be too cumbersome to implement, new variables, the counterparts to the existing ones could be introduced instead.

Example names for modifiers and new variables:

Code: Select all

I (item)            A                       B                       C
-------------------------------------------------------------------------------------------
modifier            $Name(I)                $Ext(I)                $Dir(I)
-------------------------------------------------------------------------------------------
%LeftItem%          %LeftItemName%          %LeftItemExt%          %LeftItemDir%
%RightItem%         %RightItemName%         %RightItemExt%         %RightItemDir%
%ActivItem%         %ActivItemName%         %ActivItemExt%         %ActivItemDir%
%InactivItem%       %InactivItemName%       %InactivItemExt%       %InactivItemDir%
-------------------------------------------------------------------------------------------
%LeftSel%           %LeftSelName%           %LeftSelExt%           %LeftSelDir%
%RightSel%          %RightSelName%          %RightSelExt%          %RightSelDir%
%ActivSel%          %ActivSelName%          %ActivSelExt%          %ActivSelDir%
%InactivSel%        %InactivSelName%        %InactivSelExt%        %InactivSelDir%
-------------------------------------------------------------------------------------------
%LeftSelAsFile%     %LeftSelNameAsFile%     %LeftSelExtAsFile%     %LeftSelDirAsFile%
%RightSelAsFile%    %RightSelNameAsFile%    %RightSelExtAsFile%    %RightSelDirAsFile%
%ActivSelAsFile%    %ActivSelNameAsFile%    %ActivSelExtAsFile%    %ActivSelDirAsFile%
%InactivSelAsFile%  %InactivSelNameAsFile%  %InactivSelExtAsFile%  %InactivSelDirAsFile%
Note:
The way the temporary files (%...AsFile% variables) are being passed to the command line stays the same (full path), only the content of the file should change accordingly to what kind of modification the chosen variable represent.

2. Re-arrange Variables menu

In the Define favorite toolbars window the menu for adding variables to the Parameter edit field IMO should be re-arranged to use submenus and I belive the choices also need to be grouped differently.

When using the menu now user's attention flows as such:
I want my tool to process items => Which items? => From which pane?
IMO it actually should be the other way around, ie.:
I want my tool to process items => From which pane? => What items?

I belive it's more intuitive. Firstly you want to find the location of the files (Which pane?) and only after that, you decide which files you actually choose (Which items?).
Also the way the names of the variables suggest exactly that (ie. %ActivSel% : from "Activ pane" get "Selected items").

So, I imagine menu looking similar to this:

Code: Select all

... (Parameter)
|
+- Active pane
|  +- Selected items            %ActivSel%
|  +- Selected items (as file)  %ActivSelAsFile%
|  +- Focused item              %ActivItem%
|  +- Folder                    %ActivDir%
|
+- Inactive pane
|  +- Selected items            %InactivSel%
|  +- Selected items (as file)  %InactivSelAsFile%
|  +- Focused item              %InactivItem%
|  +- Folder                    %InactivDir%
|
+- Left pane
|  +- Selected items            %LeftSel%
|  +- Selected items (as file)  %LeftSelAsFile%
|  +- Focused item              %LeftItem%
|  +- Folder                    %LeftDir%
|
+- Right pane
|  +- Selected items            %RightSel%
|  +- Selected items (as file)  %RightSelAsFile%
|  +- Focused item              %RightItem%
|  +- Folder                    %RightDir%
|
+- Modifiers
   +- Extract filename          $Name()
   +- Extract extension         $Ext()
   +- Extract directory path    $Dir()
Or, if implementing counterpart variables instead of modifiers, to this:

Code: Select all

... (Parameter)
|
+- Active pane
|  +- Selected items
|     +- Full paths             %ActivSel%
|     +- Filenames only         %ActivSelName%
|     +- Extensions only        %ActivSelExt%
|     +- Directory paths only   %ActivSelDir%
|  +- Selected items (as file)
|     +- Full paths             %ActivSelAsFile%
|     +- Filenames only         %ActivSelNameAsFile%
|     +- Extensions only        %ActivSelExtAsFile%
|     +- Directory paths only   %ActivSelDirAsFile%
|  +- Focused item
|     +- Full paths             %ActivItem%
|     +- Filenames only         %ActivItemName%
|     +- Extensions only        %ActivItemExt%
|     +- Directory paths only   %ActivItemDir%
|  +- Folder                    %ActivDir%
|
+- Inactive pane
|  +- Selected items
|     +- Full paths             %InactivSel%
|     +- Filenames only         %InactivSelName%
|     +- Extensions only        %InactivSelExt%
|     +- Directory paths only   %InactivSelDir%
|  +- Selected items (as file)
|     +- Full paths             %InactivSelAsFile%
|     +- Filenames only         %InactivSelNameAsFile%
|     +- Extensions only        %InactivSelExtAsFile%
|     +- Directory paths only   %InactivSelDirAsFile%
|  +- Focused item
|     +- Full paths             %InactivItem%
|     +- Filenames only         %InactivItemName%
|     +- Extensions only        %InactivItemExt%
|     +- Directory paths only   %InactivItemDir%
|  +- Folder                    %InactivDir%
|
+- Left pane
|  +- Selected items
|     +- Full paths             %LeftSel%
|     +- Filenames only         %LeftSelName%
|     +- Extensions only        %LeftSelExt%
|     +- Directory paths only   %LeftSelDir%
|  +- Selected items (as file)
|     +- Full paths             %LeftSelAsFile%
|     +- Filenames only         %LeftSelNameAsFile%
|     +- Extensions only        %LeftSelExtAsFile%
|     +- Directory paths only   %LeftSelDirAsFile%
|  +- Focused item
|     +- Full paths             %LeftItem%
|     +- Filenames only         %LeftItemName%
|     +- Extensions only        %LeftItemExt%
|     +- Directory paths only   %LeftItemDir%
|  +- Folder                    %LeftDir%
|
+- Right pane
   +- Selected items
      +- Full paths             %RightSel%
      +- Filenames only         %RightSelName%
      +- Extensions only        %RightSelExt%
      +- Directory paths only   %RightSelDir%
   +- Selected items (as file)
      +- Full paths             %RightSelAsFile%
      +- Filenames only         %RightSelNameAsFile%
      +- Extensions only        %RightSelExtAsFile%
      +- Directory paths only   %RightSelDirAsFile%
   +- Focused item
      +- Full paths             %RightItem%
      +- Filenames only         %RightItemName%
      +- Extensions only        %RightItemExt%
      +- Directory paths only   %RightItemDir%
   +- Folder                    %RightDir%
The modifiers/new variables would bring so much additional flexibility to the Favorite tools feature.

Above all, I think the ability to pass as a parameter a list of only the bare filenames (in contrast to their full paths) to a program would be a thing of GOLD, especially when considering how limited the command line in Windows is (accepting 8191-character wide command at a time).

For example, using some image converter if one needed now to modify a thousand of image files (called IMG0001.JPG, IMG0002.JPG etc.) all of them stored in a single directory at:
C:\Documents and Settings\User\My documents\My images\Family pictures\Christmass 2000
only a pitiful 80 or so images could be accessed that way in single go.

But using the above modifiers/variables one could very easily turn this number into over a 700!

Sorry for this long post.

Regards.
Last edited by user8899 on 08.04.2015, 02:32, edited 5 times in total.

Karol
Posts: 988
Joined: 19.08.2007, 12:05

Re: Favorite toolbars - variable modifiers & menu re-arrange

#2 Post by Karol » 18.07.2013, 15:49

extension part of the filename, example:
X:\path\to\the\FILE.EXT => FILE.EXT
Extension part from X:\path\to\the\FILE.EXT is ".EXT".

How would you like to use for example %ActivSelExt%?
If you have selected e.g. 100 jpg files, then you have then the list like: ".jpg .jpg .jpg........jpg" (100x .jpg).
What's the use of it?

user8899
Posts: 13
Joined: 11.07.2013, 22:24

Re: Favorite toolbars - variable modifiers & menu re-arrange

#3 Post by user8899 » 19.07.2013, 14:42

Karol wrote:
extension part of the filename, example:
X:\path\to\the\FILE.EXT => FILE.EXT
Extension part from X:\path\to\the\FILE.EXT is ".EXT".

How would you like to use for example %ActivSelExt%?
If you have selected e.g. 100 jpg files, then you have then the list like: ".jpg .jpg .jpg........jpg" (100x .jpg).
What's the use of it?
Hello!

I agree, %ActivSelExt% is not that useful in too many cases, but it can be quite handy, ie. if you want to add prefixes or sufixes to the filename and preserving its original extension.

That said, I was only expanding on my explanation of the idea there. Having a variable just for the sake of accessing the extension alone is not that important for me.

In fact, the only really useful thing I want from this are %ActivSelName% (item's filename including extension) and %ActiSelPath% (the path to the containing folder of the item).

What I really want to achieve with this is to reduce the length of the parameter string passed to the command line, when not using the temporary file list file (i.e. the "700 instead of 80" example).

The problem now for me is, because I constantly use non-ASCII letters in my file and directory names, I can't use simple BATCH scripts to process them, because:
  1. when using %ActivSel% the command line for the execution of a tool will very quickly exceed the 8191-character limit if too many items are selected at once,
  2. if I use %ActivSelAsFile% the command line won't properly decode the non-ASCII characters from the temporary file list.
But what about the re-arranginng the menus?
The idea is to eliminate the mismatch between the naming pattern of the variables ("WHERE=>WHAT items"), and the way the menu choices are grouped ("WHAT=>WHERE items").

That's really all what I'm about here.

Regards.

Marek
Author
Author
Posts: 4229
Joined: 10.04.2006, 09:48
Location: Germany
Contact:

Re: Favorite tools - new parameter variables & re-arrange me

#4 Post by Marek » 23.07.2013, 21:02

%ActivSelName% variable added for the release 630.

user8899
Posts: 13
Joined: 11.07.2013, 22:24

Re: Favorite tools - new parameter variables & re-arrange me

#5 Post by user8899 » 23.07.2013, 22:40

Marek wrote:%ActivSelName% variable added for the release 630.
Again, wow! Thanks!
That's so cool of you, to consider my idea. I hope some users will appreciate this little addition. I know I will.

Thank you.
Big regards.

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests