51
Script / Debugger in 4.3 hangs MC on error
« on: May 31, 2014, 19:17:04 »
I know the debugger is very #beta# right now but thought I'd mention this -
MC 4.3 1691
Playing with the debugger I found it now crashes MC if it encounters a 'serious' syntax error.
Previously hitting 'stop' button & seeing the debugging stopped msg was enough to detach the debugger.
The stop button now stays 'lit' & the debugger must be shut down with X. MC window hangs with 'not responding' white-out & needs to be closed via X & following crash dialog.
I decided to play with this question to reawaken my script knowledge - http://forum.multicommander.com/forum/index.php/topic,1184.0.html
Adding a folder with date works OK.
Adding time to date creates a crash or a folder called $date. (Obviously I have not given the variables correctly
)
Adding the time variable seems a potential problem as HH:MM:SS obviously can't be used for a name/path, (:'s), but with or without : I find in calling the FormatTime function I will see the hour but MM for minutes....? My fault? [See pic]
It would be interesting to know if a folder name using multiple variables is possible, & how far I am off!
Using the following
Gives \$date
(Debug screen attached)
MC 4.3 1691
Playing with the debugger I found it now crashes MC if it encounters a 'serious' syntax error.
Previously hitting 'stop' button & seeing the debugging stopped msg was enough to detach the debugger.
The stop button now stays 'lit' & the debugger must be shut down with X. MC window hangs with 'not responding' white-out & needs to be closed via X & following crash dialog.
I decided to play with this question to reawaken my script knowledge - http://forum.multicommander.com/forum/index.php/topic,1184.0.html
Adding a folder with date works OK.
Adding time to date creates a crash or a folder called $date. (Obviously I have not given the variables correctly

Adding the time variable seems a potential problem as HH:MM:SS obviously can't be used for a name/path, (:'s), but with or without : I find in calling the FormatTime function I will see the hour but MM for minutes....? My fault? [See pic]
It would be interesting to know if a folder name using multiple variables is possible, & how far I am off!

Using the following
Code: [Select]
@var $now = GetTime();
@var $date = FormatDate( "dd-MM-yyyy", $now );
@var $nowLocal = FormatTime( "HHMM", $now);
@var $folder;
@var $FolderBaseName = GetSourcePath();
@var $arr = {"$date", "$nowLocal"};
{
$folder = $FolderBaseName ^ $arr;
MC.Filesystem.Makedir PATH="{$folder}"
}
Gives \$date

(Debug screen attached)