What should that do? Keep the file selected AND select the corresponding folder additionally too?CookieMonster wrote: selectitems $folder + $base;
Then just take a look into the help about scripting:
//Syntax:
//selectitems itemlist, [flags], [focusfirst=1], [mode], [pane]
mode
n: [Default] New selection (drop current selections).
a: Add the matches to any current selections.
r: Remove the matches from any current selections.
And adjust the code to:
selectitems $folder , , , a;
Select your file and execute this code:
Code: Select all
if(exists("<curitem>") == 1){
$base = "<curbase>";
$folder = "$base-files";
//selectitems itemlist, [flags], [focusfirst=1], [mode], [pane]
selectitems $folder , , , a;
}else{msg "this is not a file";}
Or in short
Select your file and execute this code:
Code: Select all
if(exists("<curitem>") == 1){
selectitems "<curbase>-files" , , , a;
}else{msg "this is not a file";}
If you don't understood what this does, you may want to read the first posts from the scripting forum and the help file about scripting.