News:

MultiCommander v16.6 is released!

Main Menu

mark the first 10 Files from the buttom of the Filelist

Started by 7mESRq, April 30, 2018, 17:05:02

Previous topic - Next topic

7mESRq

Hi

How can i create a multi script to mark / selected the first 10 Files, start by the buttom of the Filelist ?
It should be using by wildcard or specify extension. E.g. *.txt

by using the script on this forum.

@var $selected_files = GetSourceSelectedFileNames();
MC.Explorer.Selection.Select FILTER={'"' + $selected_files[0] + '"'}

if anyone have suggestion would be helpfull
Thanks

Mathias (Author)

You should not call a CustomCommand from MultiScript in a loop, since the script engine is run on the same thread as the UI and it might not work all the time

Use MultiScript command
http://multicommander.com/docs/multiscript/functions/getfilefromview#setsourceselected

SetSourceSelected( $arrWithFileNames )

And to get items, maybe you should use  GetSourceItems() , else you get only the selected items.