Page 1 of 1

Last selected file

Posted: 02 May 2011 21:46
by LittleBiG
Is it possible to get the previous selected file from a script? (similar to compare previous file) I have checked the help, but I haven't found it.

Re: Last selected file

Posted: 02 May 2011 22:05
by Stefan

Code: Select all

"Restore just last Selection"
    #257; //Edit > Select > Restore Selection

Code: Select all

"Store Selection temporary to file"
  $toredSelection = get("selecteditemsnames", "|");  //store
  writefile("%temp%\XYStoredSelection.ini", $toredSelection);
"Restore temporary stored Selection"
  $toredSelection = readfile("%temp%\XYStoredSelection.ini");
  selectitems $toredSelection; //restore

Code: Select all

"Copy selected names to clipboard"
  focus;     #102; //File > To Clipboard > Item Name(s)
"Select items from Clipboard"
  selectitems  "<clipboard>",,,a; 

Re: Last selected file

Posted: 03 May 2011 09:11
by admin
LittleBiG wrote:Is it possible to get the previous selected file from a script? (similar to compare previous file) I have checked the help, but I haven't found it.
Good idea. I added a new variable <curitemprev>.

Re: Last selected file

Posted: 03 May 2011 10:51
by LittleBiG
Thank you! I would like to match the selected file name to the last selected one by one click. It comes in handy when you have video and subtitle with different names...

Re: Last selected file

Posted: 05 May 2011 16:29
by LittleBiG
Is it possible to make the path, base, ext versions of the <curitemprev>?

Re: Last selected file

Posted: 06 May 2011 08:40
by admin
Sth similar will come.