var nStrID = 150; //STR_MESSAGEBOX_CANCEL
var sStrID = nStrID.toString();

while (true)
{
  sStrID = AkelPad.InputBox(AkelPad.GetMainWnd(), WScript.ScriptName, "Resource string ID:", sStrID);

  if (! sStrID)
    break;

  nStrID = parseInt(sStrID);
  WScript.Echo(GetStringFromResource(nStrID));
}

function GetStringFromResource(nStrID)
{
  var oSys      = AkelPad.SystemFunction();
  var nLangID   = AkelPad.GetLangId();
  var lpBuffer  = AkelPad.MemAlloc(260 * 2); //sizeof(MAX_PATH)
  var nStrTabID = Math.floor(nStrID / 16) + 1; //string table ID
  var nStrInTab = nStrID % 16;
  var sString   = "";
  var hLangLib;

  if (AkelPad.SendMessage(AkelPad.GetMainWnd(), 1222 /*AKD_GETMAININFO*/, 52 /*MI_LANGMODULEW*/, lpBuffer))
    hLangLib = oSys.Call("Kernel32::GetModuleHandleW", AkelPad.GetAkelDir(3 /*ADTYPE_LANGS*/) + "\\" + AkelPad.MemRead(lpBuffer, 1 /*DT_UNICODE*/));
  else //internal language
    hLangLib = AkelPad.GetInstanceExe();

  AkelPad.MemFree(lpBuffer);

  var hRes      = oSys.Call("Kernel32::FindResourceExW", hLangLib, 6 /*RT_STRING*/, nStrTabID, nLangID);
  var hResData  = oSys.Call("Kernel32::LoadResource", hLangLib, hRes);
  var lpPointer = oSys.Call("Kernel32::LockResource", hResData);
  var nSize     = oSys.Call("Kernel32::SizeofResource", hLangLib, hRes);

  if (nSize)
  {
    for (var i = 0; i < nStrInTab; ++i)
      lpPointer += (AkelPad.MemRead(lpPointer, 4 /*DT_WORD*/) + 1) * 2;

    nSize   = AkelPad.MemRead(lpPointer, 4 /*DT_WORD*/);
    sString = AkelPad.MemRead(lpPointer + 2, 1 /*DT_UNICODE*/, nSize);
  }

  return sString;
}
