This script reliably results in a crash:
function OnClick(clickData) {
var cmd = clickData.func.command;
var tab = clickData.func.sourcetab;
if (tab.selected_files.count != 3) return;
cmd.RemoveFile(tab.selected_files(1));
cmd.RunCommand('Delete QUIET');
cmd.AddFile(tab.selected_files(1));
cmd.RunCommand('Rename PRESET="ABC..."');
}
XML
<?xml version="1.0"?>
<button backcol="none" display="label" hotkey_label="yes" label_pos="right" textcol="none">
<label>54245 crash</label>
<tip>script-to-delete-file-1-and-3-and-rename-file-2-if-all-3-files-are-selected</tip>
<icon1>#script</icon1>
<function type="script">
<instruction>@script JScript</instruction>
<instruction>function OnClick(clickData) {</instruction>
<instruction> var cmd = clickData.func.command;</instruction>
<instruction> var tab = clickData.func.sourcetab;</instruction>
<instruction />
<instruction> if (tab.selected_files.count != 3) return;</instruction>
<instruction />
<instruction> cmd.RemoveFile(tab.selected_files(1));</instruction>
<instruction> cmd.RunCommand('Delete QUIET');</instruction>
<instruction />
<instruction> cmd.AddFile(tab.selected_files(1));</instruction>
<instruction> cmd.RunCommand('Rename PRESET="ABC..."');</instruction>
<instruction>}</instruction>
</function>
</button>
With the preset being:
ABC....orp (207 Bytes)
ID 432, 434