Multi Commander Support Forum

Multi Commander => Script => Topic started by: Mathias (Author) on December 06, 2020, 13:39:57

Title: Look for script
Post by: Mathias (Author) on December 06, 2020, 13:39:57
I know many of you are write scripts.

I'm look for nice generic script that you think should be included in a standard installation of MultiCommander.
Both as fully functional and as examples..

Tips of scripts and/or full script are wanted.
Title: Re: Look for script
Post by: St├ęphane P. on December 08, 2020, 20:01:09
Hello,

Some examples to show the different possibilities.

System Variable
Code: [Select]
@var $env = TranslateEnvString("%COMPUTERNAME%");
SetClipboardText( $env);
MessageBox( "Env Var", $env,0);

Run system executable
Code: [Select]
MC.Run CMD={"c:\windows\System32\shutdown.exe /r /f /t 0"}
Read File and Put Content to the clipboard
Code: [Select]
@var $content = LoadStringFromFile( '\\10.69.0.200\CounterString_1000.txt' );
SetClipboardText( $content );

Create folder with the date of the day
Code: [Select]
@var $now = GetTime();
@var $date = FormatDate( "dd-dddd" , $now );
@var $folder;
@var $FolderBaseName = GetSourcePath();
{
 $folder = $FolderBaseName ^ $date;
 MC.Filesystem.Makedir PATH="{$folder}"
 }
Title: Re: Look for script
Post by: ReneMiner on April 09, 2021, 22:29:45
i don"t get the script together myself but described how to mount the registry from a currently offline windows installation to fix and repair it or to change settings that prevent the other installation from successful boot.

http://forum.multicommander.com/forum/index.php/topic,4179.msg11897.html#msg11897