I have a lot of scripts that alter text, etc. - but none of them require parameters. So all of these are just listed in the scripts dialog and I either hit [Execute] or use hotkeys to run them.
I want to minimize all MDI window tabs at once, so I think I would like to execute:
Code: Select all
Call("Scripts::Main", 1, "RunScriptOnTabs.js", `-cmd='TabMinMax.js -' -tab=2`)
Ah! It seems that I need another script to be able to call scripts that need parameters. So I made a test.js script to call RunScriptOnTabs.js, but I cannot get the parameters correct for that call:
Code: Select all
var nResult=AkelPad.Call("Scripts::Main", 1, "RunScriptOnTabs.js", '-cmd="TabMinMax.js" -par="-" -tab=2');
"Script does not exist: TabMinMax.js"
I even tried using the fullpath for the TabMinMax.js script, but still got that error. Any idea what I am doing wrong in the call?
-------------------------
Ok... figured it out... my second call above had the correct parameters - but I had renamed the TabMinMax.js file while testing... named it correctly and now all of my MDI windows get minimized by the script!
-------------------------
.