Author Topic: ${focusfilepath} tag  (Read 10055 times)

espkk

  • Junior Member
  • **
  • Posts: 40
    • View Profile
${focusfilepath} tag
« on: April 18, 2016, 12:11:53 »
How to get value of "${focusfilepath}"?

In this code it always returns nothing
Code: [Select]
@var $cmdargs = "powershell dir " + GetTagValue("${focusfilepath}") + "-Recurse | Unblock-File";
MC.Run CMD="powershell" arg="{$cmdargs}"

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4271
    • View Profile
    • Multi Commander
Re: ${focusfilepath} tag
« Reply #1 on: April 18, 2016, 12:39:55 »
if you are in MulitScript you got function for that and do not have to use the GetTagValue function..
http://multicommander.com/docs/multiscript/functions/getfilefromview

Like  GetSourceFocusPath();

And as I sad in previous post.. You can't currently append to a result of a function because of a temp variable issue
So get the focuspath into a variable

@var $focusfile = GetSourceFocusPath();
@var $cmdargs = "powershell dir " + $focusfile + "-Recurse | Unblock-File";
MC.Run CMD="powershell" arg="{$cmdargs}"

espkk

  • Junior Member
  • **
  • Posts: 40
    • View Profile
Re: ${focusfilepath} tag
« Reply #2 on: April 18, 2016, 12:58:22 »
I read about this function, but it is only "Get the full path to the item in focus in the source view." AFAIU. What about target view?

espkk

  • Junior Member
  • **
  • Posts: 40
    • View Profile
Re: ${focusfilepath} tag
« Reply #3 on: April 18, 2016, 13:05:03 »
Ok, I misunderstood the meaning of func names, it works, thanks  :)