PowerISO integration question

Sure. Try this and uncomment the last line, if the command looks ok.

// https://resource.dopus.com/t/poweriso-integration-question/11978

function OnClick(clickData) {
    var cmd = clickData.func.command;
    var tab = clickData.func.sourcetab;
    var dtab = clickData.func.desttab;
    var dlg = clickData.func.Dlg();
    cmd.deselect = false;

    if (tab.selected.count == 0) return;
    if (!dtab) return;
    if (String(dtab.path).substring(0, 2) == '::') return;
    
    var label = dlg.GetString('Label der ISO-Datei:', tab.selected(0).name_stem);
    if (typeof label != 'string') return;
    var name = dlg.GetString('Name der ISO-Datei:', tab.selected(0).name_stem);
    if (typeof name != 'string') return;
    
    cmd.RunCommand('Set UTILITY=otherlog');
    DOpus.ClearOutput();

    var cmdLine = '"%ProgramFiles(x86)%\\PowerISO\\PIso.exe" create -label "' + label + '.iso" -o "' + dtab.path + '\\' + name + '.iso"';

    for (var e = new Enumerator(tab.selected); !e.atEnd(); e.moveNext()) {
        var item = e.item();
        cmdLine += ' -add "' + item + '" /';
    }

    DOpus.Output(cmdLine);
    // cmd.RunCommand(cmdLine);
}
Button as XML
<?xml version="1.0"?>
<button backcol="none" display="both" label_pos="right" textcol="none">
	<label>11978</label>
	<icon1>#copyfilenames</icon1>
	<function type="script">
		<instruction>@script JScript</instruction>
		<instruction>// https://resource.dopus.com/t/poweriso-integration-question/11978</instruction>
		<instruction />
		<instruction>function OnClick(clickData) {</instruction>
		<instruction>    var cmd = clickData.func.command;</instruction>
		<instruction>    var tab = clickData.func.sourcetab;</instruction>
		<instruction>    var dtab = clickData.func.desttab;</instruction>
		<instruction>    var dlg = clickData.func.Dlg();</instruction>
		<instruction>    cmd.deselect = false;</instruction>
		<instruction />
		<instruction>    if (tab.selected.count == 0) return;</instruction>
		<instruction>    if (!dtab) return;</instruction>
		<instruction>    if (String(dtab.path).substring(0, 2) == &apos;::&apos;) return;</instruction>
		<instruction>    </instruction>
		<instruction>    var label = dlg.GetString(&apos;Label der ISO-Datei:&apos;, tab.selected(0).name_stem);</instruction>
		<instruction>    if (typeof label != &apos;string&apos;) return;</instruction>
		<instruction>    var name = dlg.GetString(&apos;Name der ISO-Datei:&apos;, tab.selected(0).name_stem);</instruction>
		<instruction>    if (typeof name != &apos;string&apos;) return;</instruction>
		<instruction>    </instruction>
		<instruction>    cmd.RunCommand(&apos;Set UTILITY=otherlog&apos;);</instruction>
		<instruction>    DOpus.ClearOutput();</instruction>
		<instruction />
		<instruction>    var cmdLine = &apos;&quot;%ProgramFiles(x86)%\\PowerISO\\PIso.exe&quot; create -label &quot;&apos; + label + &apos;.iso&quot; -o &quot;&apos; + dtab.path + &apos;\\&apos; + name + &apos;.iso&quot;&apos;;</instruction>
		<instruction />
		<instruction>    for (var e = new Enumerator(tab.selected); !e.atEnd(); e.moveNext()) {</instruction>
		<instruction>        var item = e.item();</instruction>
		<instruction>        cmdLine += &apos; -add &quot;&apos; + item + &apos;&quot; /&apos;;</instruction>
		<instruction>    }</instruction>
		<instruction />
		<instruction>    DOpus.Output(cmdLine);</instruction>
		<instruction>    // cmd.RunCommand(cmdLine);</instruction>
		<instruction>}</instruction>
	</function>
</button>

4 Likes