31
MultiCommander v15.8 is released!
@var $path = GetSourceFocusPath();
@var $ext = StrToLower( PathGetFileExtPart( $path, 2 ) );
@var $rules[] = {'udc|txt,ini,log,ahk,mtxt,vbs,conf,cpp,h,rc,asm,nfo,info,ps1,xml,jsee,cfg|b85b4bf468ab418e87b4e09e95dca4a0','udc|jpg,jpeg,jpe,jfif,png,gif,webp,bmp,tiff,psd,svg|c3424b15b3dd4a75a83ce0d9ba857bbb','udc|pdf,epub,djvu,mobi,fb2,cb7,cbr,cbt,cbz,prc,azw|3bd046dd55484d62aa82285076ea1c15','udc|zip|e271faf8469f4e96ac335fde319ab818','udc|chm|45cd3dfb7fc348ec99de80122481c55d','udc|sms,gen,smd,bin,md|468167006ee54bb995e28940823ec958','udc|sfc,smc,fig|6d1061dff5014030bcd2062fee6701cf','udc|nes|3d966becbbb640f983aab1f18a109f51','udc|wav,mp3,mid,midi,wma,flac,ogg,aac,alac,aiff|4e1f3a7ca0224c6ba0ff02f3f07cd7c4','udc|cur,ani|3c16c3020c384373a4dd96060cb856e3','run|pptx|\"C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE\"|/S \"{$path}\"','run|ppt|\"C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE\"|\"{$path}\"','run|sln|\"D:\\Download\\VS 19 CE\\Common7\\IDE\\devenv.exe\"|\"{$path}\"','udc|exe|e07317b5406b4c19b069ea4bd926f706'};
@var $matched = 0;
foreach $rule in $rules
{
@var $parts = StrTokenize2Array( $rule, "|" );
@var $kind = $parts[0];
@var $extList = StrTokenize2Array( $parts[1], "," );
if( arrayIFind( $extList, $ext ) > -1 )
{
$matched = 1;
if( $kind == "udc" )
{
MC.RunUserCmd ID=$parts[2];
}
else if( $kind == "run" )
{
MC.Run CMD=$parts[2] ARG=$parts[3];
}
break;
}
}
if( $matched == 0 )
{
MessageBox( "SmartOpen", "No handler defined for extension: ." + $ext, 0 );
}
@var $path = GetSourceFocusPath();
@var $ext = StrToLower( PathGetFileExtPart( $path, 2 ) );
@var $rules[14];
// ====================== TEXT FILES ======================
$rules[0] = 'udc|txt,ini,log,ahk,mtxt,vbs,conf,cpp,h,rc,asm,nfo,info,ps1,xml,jsee,cfg|b85b4bf468ab418e87b4e09e95dca4a0';
// ====================== IMAGE FILES ======================
$rules[1] = 'udc|jpg,jpeg,jpe,jfif,png,gif,webp,bmp,tiff,psd,svg|c3424b15b3dd4a75a83ce0d9ba857bbb';
// ====================== DOCUMENT FILES ======================
$rules[2] = 'udc|pdf,epub,djvu,mobi,fb2,cb7,cbr,cbt,cbz,prc,azw|3bd046dd55484d62aa82285076ea1c15';
$rules[3] = 'udc|chm|45cd3dfb7fc348ec99de80122481c55d';
// ====================== ARCHIVE ======================
$rules[4] = 'udc|zip|e271faf8469f4e96ac335fde319ab818';
// ====================== EMULATORS ======================
$rules[5] = 'udc|sms,gen,smd,bin,md|468167006ee54bb995e28940823ec958';
$rules[6] = 'udc|sfc,smc,fig|6d1061dff5014030bcd2062fee6701cf';
$rules[7] = 'udc|nes|3d966becbbb640f983aab1f18a109f51';
// ====================== AUDIO ======================
$rules[8] = 'udc|wav,mp3,mid,midi,wma,flac,ogg,aac,alac,aiff|4e1f3a7ca0224c6ba0ff02f3f07cd7c4';
// ====================== CURSORS ======================
$rules[9] = 'udc|cur,ani|3c16c3020c384373a4dd96060cb856e3';
// ====================== MICROSOFT OFFICE ======================
$rules[10] = 'run|pptx|C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE|/S "{$path}"';
$rules[11] = 'run|ppt|C:\\Program Files\\Microsoft Office\\root\\Office16\\POWERPNT.EXE|"{$path}"';
$rules[12] = 'run|sln|D:\\Download\\VS 19 CE\\Common7\\IDE\\devenv.exe|"{$path}"';
// ====================== DOSBox ======================
$rules[13] = 'udc|exe|e07317b5406b4c19b069ea4bd926f706';
@var $matched = 0;
@var $i;
@var $rule;
@var $parts;
@var $kind;
@var $extList;
for( $i = 0; $i < 14; $i++ )
{
$rule = $rules[$i];
$parts = StrTokenize2Array( $rule, "|" );
$kind = $parts[0];
$extList = StrTokenize2Array( $parts[1], "," );
if( arrayIFind( $extList, $ext ) > -1 )
{
$matched = 1;
if( $kind == "udc" )
{
MC.RunUserCmd ID={$parts[2]};
}
else if( $kind == "run" )
{
MC.Run CMD="{$parts[2]}" ARG='{$parts[3]}';
}
break;
}
}
if( $matched == 0 )
{
MessageBox( "SmartOpen", "No handler defined for extension: ." + $ext, 0 );
}
arrays and collections. (e.g. foreach $item in $array { ... }) MultiScript
supports new functions: Pow, abs, clamp, IsNumeric, StrStartsWith, StrEndsWith,
StrContains, StrFormat, StrPadLeft, StrPadRight, StrCount, StrRepeat,
ArrayReverse, ArraySlice MultiScript supports boolean operators AND / OR / NOT.
Still getting Bad Gateway when trying to upload, 7z is <67mb
Thanks for the new build Mathias. Lots of interesting additions to play with
I may .....so SFC /SCANNOW - also OK.
So adding items to an already running queue while also doing CRC checking ? Only if you do CRC at the same time ?
and yes current file copy will pause for a short while while it scan the new items that is added to the queue., but then it starts again.
If MC hangs, Not repsonding.. please go into task manager and select MultiCommander.exe process and right click and do Create Memory Dump file. then compress it and upload it at
http://multicommander.com/support/upload
Thanks for the reply Mathias.
- Yes queue is running & I am adding to it as it progresses (I normally do this as the move button allows me to add from different dirs easily, for years this method has been fine for me);
- I added CRC separately after first occurence - check done before & then after all moves completed, if MC has halted with High CPU use, I terminate it & then run CRC check on what has been copied. So far, files that have actually moved pass CRC but anything else doesn't appear to arrive at all;
- The pause for additional files - previously not very noticeable even with big files, now as you can see from the screenshot the To: has a blank path suddenly, so something is being lost.
Since my update it's only happened ~5 times & I am trying to determine if I can replicate it effectively. So far it's random but TM 'terminate' solves the problem, MC is restarted (Admin) & then works OK with identical files/dirs.
Trying to upload the dump gives "Bad Gateway The proxy server received an invalid response from an upstream server." will try again later...
Thanks for the new build Mathias. Lots of interesting additions to play with
I may .....so SFC /SCANNOW - also OK.
So adding items to an already running queue while also doing CRC checking ? Only if you do CRC at the same time ?
and yes current file copy will pause for a short while while it scan the new items that is added to the queue., but then it starts again.
If MC hangs, Not repsonding.. please go into task manager and select MultiCommander.exe process and right click and do Create Memory Dump file. then compress it and upload it at
http://multicommander.com/support/upload
Thanks to the Boolean Operators —my script got optimized by "Grok-AI 4.20 Reasoning" to less than a quarter of its original size ! 'Smart Open (Ctrl+F9)' MultiScript went from 443 to just 103 lines of code (not discounting half of them being comments !), it's much more efficient & easier to maintain now ! I'am sure that /w Arrays & ForEach Loops it can be optimized even further.