Multi Commander > Script
New function in 9.5 (ArrayToString)
(1/1)
Mathias (Author):
From version 9.5 ArrayToString(..) now exists
http://multicommander.com/docs/multiscript/functions/array#arraytostring
It let you have an array of strings and create one string out of them, and you can specify what delimiter you want to use. (text bit that should be in between the strings)
and also if you want to put " around the each string.
All this can already be done with MultiScript funtions, but this function will make it much easier.
The main reason for this is to make string that are sent to external program as parameters easier.
like if you want to create a string with all the selected files and want to use them as a parameter
example
--- Code: ---// get FULL path for all selected items from active view
@var $selectedItems = GetSelectedPaths();
// delimiter here is a comma and then space. ", "
// 1 is that all string should have " around then. so if there are space in the string the program can open them correct anyway
@var $selected = ArrayToString( $selectedItems , ", ", 1 );
MC.Run CMD="C:\Apps\NotePad++\notepad++.exe" ARG="{$selected}"
--- End code ---
Navigation
[0] Message Index
Go to full version