Page 2 of 2

Re: How to use the value of <focitem>

Posted: 29 Mar 2012 12:41
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

Re: How to use the value of <focitem>

Posted: 29 Mar 2012 12:44
by paul0
admin wrote:Idea: try open instead of openwith.
for open, <focitem> should be also removed from the line. thanks. :appl:

Re: How to use the value of <focitem>

Posted: 29 Mar 2012 12:54
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".

Re: How to use the value of <focitem>

Posted: 29 Mar 2012 13:37
by admin
I'm sure there is a solution, but I have no time now to check further...

Re: How to use the value of <focitem>

Posted: 29 Mar 2012 14:46
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;
  }

Re: How to use the value of <focitem>

Posted: 29 Mar 2012 20:20
by paul0
Stefan, your note is quite helpful. Thanks a lot.

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

Thanks all for comments.