How to use the value of <focitem>

Discuss and share scripts and script files...
paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Re: How to use the value of <focitem>

Post by paul0 »

I resolve the problem by removing the <focitem>. :D

Code: Select all

"Tag && Rename|C:\Program Files (x86)\tag-ren\TagRename.exe"
  openwith "C:\Program Files (x86)\tag-ren\TagRename.exe";
Does this mean that openwith will automatically follow the value of <focitem>?

Thanks a lot for your testing. :D :D

paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Re: How to use the value of <focitem>

Post by paul0 »

admin wrote:Idea: try open instead of openwith.
for open, <focitem> should be also removed from the line. thanks. :appl:

paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Re: How to use the value of <focitem>

Post by paul0 »

:(

Now it would work only for list item but not tree item. It requires the parameter <focitem> for the tree item.

I need to define the choice cases.

Code: Select all

If (the item is tree case) {

} 
else (the item is list case){

} 
else { //category item

}
But I don't know how to specify the statement for "the item is tree case".

admin
Site Admin
Posts: 66279
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: How to use the value of <focitem>

Post by admin »

I'm sure there is a solution, but I have no time now to check further...

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: How to use the value of <focitem>

Post by Stefan »

paul0 wrote::(

Now it would work only for list item but not tree item. It requires the parameter <focitem> for the tree item.

I need to define the choice cases.

Code: Select all

If (the item is tree case) {

} 
else (the item is list case){

} 
else { //category item

}
But I don't know how to specify the statement for "the item is tree case".


Take a look at "Scripting Commands Reference" > get()
get("FocusedControl");
"A" for AddressBar, "T" for Tree, "C" for Catalog, "L" for List, "X" for other.
if (get("FocusedControl") == "T") { msg "Tree has the focus";}


and Scripting > If/ElseIf/Else Blocks

General syntax:

Code: Select all

  if (expression) {
     statement;
  } 
  elseif (expression) {
     statement;
  }
  else {
     statement;
  }

paul0
Posts: 137
Joined: 23 Oct 2009 19:26

Re: How to use the value of <focitem>

Post by paul0 »

Stefan, your note is quite helpful. Thanks a lot.

The problem is solved now. :D :D :D

Thanks all for comments.

Post Reply