Multi Commander Support Forum

Multi Commander => Script => Topic started by: Mathias (Author) on June 17, 2014, 09:53:41

Title: Script Documentation Updated
Post by: Mathias (Author) on June 17, 2014, 09:53:41
The Documentation for the new MultiScript functions added in v4.3 and for some other that was added before are now updated.

ArraySort (http://multicommander.com/docs/multiscript/functions/array#arraysort)

UnpackFile (http://multicommander.com/docs/multiscript/functions/filesystem#unpackfile)
PackFile (http://multicommander.com/docs/multiscript/functions/filesystem#packfile)
MakeDir (http://multicommander.com/docs/multiscript/functions/filesystem#makedir)
FileExists (http://multicommander.com/docs/multiscript/functions/filesystem#fileexists)

PathMakeRelativeMC (http://multicommander.com/docs/multiscript/functions/filesystem#pathmakerelativemc)
PathMakeAbsoluteMC (http://multicommander.com/docs/multiscript/functions/filesystem#pathmakeabsolutemc)
PathTranslatePath (http://multicommander.com/docs/multiscript/functions/filesystem#pathtranslatepath)

TranslateEnvString (http://multicommander.com/docs/multiscript/functions/misc#translateenvstring)

ChkSum_Calculate (http://multicommander.com/docs/multiscript/extensions/checksum#chksumcalc)

Also the list with all the Custom Commands (http://multicommander.com/docs/customcommands_list) have been updated
Title: Re: Script Documentation Updated
Post by: Ulfhednar on June 17, 2014, 11:04:22
Excellent, look forward to trying these functions.  8)

Do you intend to add the 'overwrite' function to the custom commands?  Or are the more 'advanced' options restricted to MS?
Title: Re: Script Documentation Updated
Post by: Mathias (Author) on June 17, 2014, 11:26:20
Maybe in the future. But for now it is not possible because the CustomCommands are using the functions from the 'middle' layer (same way the UI talk to the engine) and there is no way to set that yet.
Title: Re: Script Documentation Updated
Post by: Ulfhednar on June 18, 2014, 11:32:01
I suspected that might be the case.  I guess it doesn't matter if one has a script assigned to a button  ;)
I altered what we discussed before http://forum.multicommander.com/forum/index.php/topic,1200.0.html (http://forum.multicommander.com/forum/index.php/topic,1200.0.html) to use the script unpack command & being able to call the unpack function with these options works very well.

Code: [Select]
// get & extract zips
@var $root = GetSourcePath();
@var $arrFiles = FindFiles( $root + "*.zip");
@var $count = arrayCount($arrFiles);
@var $zipFiles = "";
@var $zip;
@var $n1;

// Create ; separated list with all zip files to unpack
for( $n1 = 0; $n1 < $count ; $n1++ )
{
 $zip = $arrFiles[ $n1];
 $zipFiles += $zip;
 $zipFiles += ";";
UnpackFile( $zip, $root, "*.*" , "OVERWRITEALL, USEEXISTINGQUEUE" );
}
Thanks for expanding the scripting side, as I slowly learn it, it gets more & more useful.

With TranslateEnvString is this only for returning the OS environment or can it be used with other things.  I am trying to imagine how it can be used...
Title: Re: Script Documentation Updated
Post by: Mathias (Author) on June 18, 2014, 12:42:02
With TranslateEnvString is this only for returning the OS environment or can it be used with other things.  I am trying to imagine how it can be used...
Other things ? no it is if system Environment string like %PATH% , %WINDIR% and all other you see in a command prompt when typing "set"
Title: Re: Script Documentation Updated
Post by: Ulfhednar on June 19, 2014, 11:08:37
Thanks for that info Mathias. 
It was things like AutoCAD that create their "own environment" that had crossed my mind.
Title: Re: Script Documentation Updated
Post by: Mathias (Author) on June 19, 2014, 18:15:23
I never used AutoCAD so I have no idea what AutoCAD does with it