Author Topic: Script Documentation Updated  (Read 25488 times)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Script Documentation Updated
« 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

UnpackFile
PackFile
MakeDir
FileExists

PathMakeRelativeMC
PathMakeAbsoluteMC
PathTranslatePath

TranslateEnvString

ChkSum_Calculate

Also the list with all the Custom Commands have been updated

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 514
    • View Profile
Re: Script Documentation Updated
« Reply #1 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?

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Script Documentation Updated
« Reply #2 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.

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 514
    • View Profile
Re: Script Documentation Updated
« Reply #3 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 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...
« Last Edit: June 18, 2014, 11:38:00 by Ulfhednar »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Script Documentation Updated
« Reply #4 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"

Ulfhednar

  • Contributor
  • VIP Member
  • *****
  • Posts: 514
    • View Profile
Re: Script Documentation Updated
« Reply #5 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.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4484
    • View Profile
    • Multi Commander
Re: Script Documentation Updated
« Reply #6 on: June 19, 2014, 18:15:23 »
I never used AutoCAD so I have no idea what AutoCAD does with it