Author Topic: Focused Path Field  (Read 22800 times)

macmore

  • Junior Member
  • **
  • Posts: 20
    • View Profile
Focused Path Field
« on: February 06, 2014, 22:27:23 »
Is there a variable I can pass to an external command that represents the folder path of the focused file without the file name?  If the focused file is "C:\MultiCommander\xyz.txt", I want "C:\MultiCommander".

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 555
  • Old Skull
    • View Profile
Re: Focused Path Field
« Reply #1 on: February 07, 2014, 04:18:46 »

macmore

  • Junior Member
  • **
  • Posts: 20
    • View Profile
Re: Focused Path Field
« Reply #2 on: February 08, 2014, 18:27:32 »
I found ${focusfilepath} there, but what I need is ${focuspath}.

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 555
  • Old Skull
    • View Profile
Re: Focused Path Field
« Reply #3 on: February 08, 2014, 19:01:11 »
macmore
What about {$sourcepath}?

macmore

  • Junior Member
  • **
  • Posts: 20
    • View Profile
Re: Focused Path Field
« Reply #4 on: February 18, 2014, 16:57:59 »
{$sourcepath} did not work.  It is blank.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: Focused Path Field
« Reply #5 on: February 18, 2014, 18:13:47 »
A type from Jungle, it is "${sourcepath}"
 ( $ before the { } tag. )

But It depends on where you use it and what UserDefinedCommand type you use..
If you are creating a UserDefinedCommand of External type then use the MultiTags as Jungle say..



macmore

  • Junior Member
  • **
  • Posts: 20
    • View Profile
Re: Focused Path Field
« Reply #6 on: February 19, 2014, 00:56:13 »
${sourcepath} is blank too.  I am using it as a Program parameter to a Quick Launch program.

macmore

  • Junior Member
  • **
  • Posts: 20
    • View Profile
Re: Focused Path Field
« Reply #7 on: February 19, 2014, 06:32:46 »
From the documentation
http://multicommander.com/docs/filetypesetup:

Quote
Under "Program Parameters" you enter the parameters you want to send to the program (if the Program type is "External Program"). There are a couple of tags you can also select that will for example expand to the selected file path. You will get a list of them by pressing the [<] button.

When I click the [<] button, I don't get a list of tags.  Is there something wrong with my configuration?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: Focused Path Field
« Reply #8 on: February 19, 2014, 06:51:09 »
${sourcepath} is blank too.  I am using it as a Program parameter to a Quick Launch program.

That is because the QuickLaunch Bar is not a script.

It is like the QuickLaunch bar that you had/have in Windows on the taskbar, a place to quickly launch programs.
And you can drag and drop files on an icon and they will be sent as parameters to the program.
If you want it to interact with MC then you need to create a UserDefinedCommand and then add that to the Quicklaunch bar.

Here is a example, Create a new UserDefinedCommand of "CustomCommand" type
then enter
Code: [Select]
MC.Run CMD="C:\Bin\Notepad++\notepad++.exe" ARG="${sourcepath}"Then Right click on QuickLaunch bar and select insert User defined command.
The Right click on the quicklaunch program icon for the command and select customize and then you can modify the icon.
« Last Edit: February 19, 2014, 07:07:00 by Mathias (Author) »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4491
    • View Profile
    • Multi Commander
Re: Focused Path Field
« Reply #9 on: February 19, 2014, 06:55:16 »
From the documentation
http://multicommander.com/docs/filetypesetup:

Quote
Under "Program Parameters" you enter the parameters you want to send to the program (if the Program type is "External Program"). There are a couple of tags you can also select that will for example expand to the selected file path. You will get a list of them by pressing the [<] button.

When I click the [<] button, I don't get a list of tags.  Is there something wrong with my configuration?

FileTypeSetup is found under Menu > Configuration > FileTypeSetup. It is where you configure default program to be used for Viewers and Editor based on file type.
It has nothing to do with the QuickLaunchBar. it does not support any script tags (Except Windows Enviroment strings. )