Last selected file

Discuss and share scripts and script files...
Post Reply
LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Last selected file

Post 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.

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

Re: Last selected file

Post 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; 

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

Re: Last selected file

Post 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>.

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Last selected file

Post 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...

LittleBiG
Posts: 1848
Joined: 08 Apr 2011 12:57
Location: Win10x64

Re: Last selected file

Post by LittleBiG »

Is it possible to make the path, base, ext versions of the <curitemprev>?

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

Re: Last selected file

Post by admin »

Sth similar will come.

Post Reply