MultiScript Examples

Examples of MultiScripts

 


 

Search on Google from the command line bar

Read the parameters (arguments) supplied to this command and build a search url for Google and then go to that url.

Create the command then go to the Alias Manager and assign 'g' to "@<Unique  command id>"

function CreateGoogleSearchQuery()
{
  @var $query = "";
  @var $n = 0;
  for( $n = 0; $n < $argcount; $n = $n + 1 )
  {
    if( $n > 0 )
    {
      $query = $query + "+";
    }
    $query = $query + $arg($n);
  }
  return $query;
}
@var $s = "";
$s = "http://www.google.com/search?g=" + CreateGoogleSearchQuery();
MC.Run CMD="{$s}" SHELL

 

View first *.txt file found in the folder currently in focus

Connect this command to a hotkey, for example Alt+V. Then in an Explorer Panel with a folder in focus, if you press Alt+V - and if a *.txt file exists under that folder - that file will be shown.

MC.DataViewer.View FILE={_findfirstfile( "{focusfilepath}\\*.txt" )}


 


Play First *.avi or *.mkv found in folder currently in focus

Connect this command to a hotkey, for example Alt+P. Then in an Explorer Panel with a folder in focus, if you press Alt+P, the first *.avi or *.mkv found will be played in your default movie player.

@var $file;
$file = _findfirstfile( "{focusfilepath}\\*.avi" );
if(StrIsEqual($file,""))
{
  $file = _findfirstfile( "{focusfilepath}\\*.mkv" );
}
MC.Run CMD={$file} SHELL