Page 1 of 1

Open file and reuse existing akelpad window

Posted: Tue Jun 09, 2009 9:45 am
by guest
Would you add a command line option or internal command so that the Favorite menu can open file in current window even when akelpad in running in SDI mode.

Posted: Tue Jun 09, 2009 12:18 pm
by Instructor
OpenFile.js

Code: Select all

var AkelPad=new ActiveXObject("AkelPad.document");

if (WScript.Arguments.length)
{
  AkelPad.OpenFile(WScript.Arguments(0));
}

ContextMenu:

Code: Select all

"F&avourites" Index(3)
{
  -"File1" Call("Scripts::Main", 1, "OpenFile.js", "C:\SCANDISK.LOG", 0)
  -"File2" Call("Scripts::Main", 1, "OpenFile.js", "C:\file.txt", 0)
}