1
Script / Re: Look for script
« on: December 08, 2020, 20:01:09 »
Hello,
Some examples to show the different possibilities.
System Variable
Run system executable
Read File and Put Content to the clipboard
Create folder with the date of the day
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}"
}