Hello,
In the last weeks i often encounter DOpus crashes in the context of renaming files. I just ran a rename script which was faulty (inproper syntax) but dopus continued trying to apply it to ~300 files. So i closed the rename dialog but its progress dialog remained open and was not closable. So I tried to use the taskbar icon "exit dopus" but it still remained open so i killed dopusrt aswell. After reopening DOpus (without dopus or dopusrt running previously/having killed them previously) I always get this error message.
Let me know if and how i can contribute more information.
Have a nice weekend.
Felix
The script is actually useless (because unfinished and replaced by another one, but i wasnt aware of that when i started it). Hopefully you can still go on some bug hunting
<?xml version="1.0" encoding="UTF-8"?>
<rename_preset case="none" group="Date Time" ignoreext="yes" script="yes" type="normal" version="12">
<from>*</from>
<to>*</to>
<script>@script jscript
function OnGetNewName(getNewNameData)
{
// Add script code here.
//
// Main inputs (all read-only):
//
// - getNewNameData.item:
// Object with information about the item being renamed.
// e.g. item.name, item.name_stem, item.ext,
// item.is_dir, item.size, item.modify,
// item.metadata, etc.
// item.path is the path to the parent folder.
// item.realpath is the full path to the file, including its name,
// and with things like Collections and Libraries resolved to
// the real directories that they point to.
// - getNewNameData.oldname_field:
// - getNewNameData.newname_field:
// Content of the "Old Name" and "New Name" fields in the Rename dialog.
// - getNewNameData.newname:
// - getNewNameData.newname_stem and newname_stem_m:
// - getNewNameData.newname_ext and newname_ext_m:
// The proposed new name for the item, based on the non-script
// aspects of the Rename dialog. Scripts should usually work from this
// rather than item.name, so that they add to the dialog's changes.
// newname_ext is the file extension, or an empty string if none.
// newname_stem is everything before the file extension.
// The *_m versions handle multi-part extensions like ".part1.rar".
// - getNewNameData.custom:
// Contains any custom field values for additional user input.
//
// Return values:
//
// - return true:
// Prevents rename.
// The proposed getNewNameData.newname is not used.
// - return false: (Default)
// Allows rename.
// The proposed getNewNameData.newname is used as-is.
// - return "string":
// Allows rename.
// The file's new name is the string the script returns.
//20.08.2017_9_47_24_nachm.
//22.08.2017_12_17_20
try
{
var item = getNewNameData.item;
if(item.is_dir)
return true;
var itemName = item.name_stem + "";
var day = itemName.substring(0, 2);
var month = itemName.substring(3, 5);
var year = itemName.substring(6, 10);
var timePart = itemName.split('_');
if(timePart.length
var hour = "";
var min = "";
var sec = "";
return year + "-" + month + "-" + day + " " + hour + "-" + min + "-" + sec;
}
catch(e)
{
return true;
}
}
</script>
</rename_preset>