*****************************************************************
***                Hotkeys AkelPad plugin v6.5                ***
*****************************************************************

2008-2016   aka Instructor (Shengalts@mail.ru)


***  ***

   .


***  ***

Hotkeys::Main
  .


***  ***

:
  %f  
  %d   
  %a  AkelPad'
  %%  %
  % %

:
  [Command() | Call() | +Call() | Exec() | OpenFile() | SaveFile() | Font() | Recode() | Insert()]
    Command()
      Command(4162)
              4162.     
             "  ...".
           : . AkelHelp-Rus.htm  AkelDLL.h    .
      Command(0)
           .
      Command(-1)
              ,   .
    Call("::"[,  ])
      Call("Scripts::Main")
           Scripts   Main.
    +Call("::"[,  ])
      +Call("LineBoard::Main")
           LineBoard   Main.     
         .
    Exec(" "[, " "][, ][, ])
      " "
         .
      " "
         .   "".
      
          . 1 - , 0 -   ( ).
       (  ):
        0  .
        1    ( ).
        2  .
        3  .
        6 ,   .
        9   .
        :     .
      Exec("notepad.exe")
          .
      Exec(`notepad.exe`)
          .
      Exec('notepad.exe')
          .
      Exec('%windir%\notepad.exe')
          .
      Exec(`rundll32.exe shell32,ShellExec_RunDLL "%f"`, "%d")
                Windows.
    OpenFile(""[, ][, BOM])
      ""
          .
      
         .  -1   ,    .
      BOM
         BOM .  -1   ,    .
      OpenFile("C:\File.txt", 65001, -1)
             UTF-8.
    SaveFile(""[, ][, BOM])
      ""
             .
      
         .  -1   ,    .
      BOM
         BOM . 1 - , 0 - , -1    -   BOM.
      SaveFile("C:\File.txt", 65001, 0)
             UTF-8  BOM.
    Font("", , )
      ""
         , , "Courier".  ,  "".
       (  ):
        0  .
        1   .
        2   .
        3   .
        4    .
      
         .  ,  0.
      Font("Courier", 4, 10)
            Courier   10 pt.
    Recode(, )
      
         .  -1,    .
      
         .  -1,    .
      Recode(1251, 866)
             1251  866.
    Insert(""[, Esc-])
      ""
         .
      Esc-:
        0  ""   Esc- ( ).
        1  ""  Esc-.   
            /  ,  :
           "\s" -       ;
           "\|" -       .
      Insert(" ")
             .
      Insert("<B>\s</B>", 1)
              .
      Insert("\[0031 0032 0033]", 1)
            "123".

:
  " " Command(4182)
  "" Command(4182)
  " " Call("Format::LineSortStrAsc")
  -" " Call("Scripts::Main", 1, "SpellCheck.js", "")
  " " +Call("Coder::Highlight")
  " " Exec("regedit.exe")


***   ***

Call("Hotkeys::Main", 1, HOTKEY, *BOOL, *NAME, NAMELENGTH)
  :
    1
           .    Scripts .
    HOTKEY
        .
    *BOOL
         BOOL.   NULL.
    *NAME
        ,     .   NULL.
    NAMELENGTH
        ,      NAME.
  :
    WScript.Echo(GetHotkeyName(118));

    function GetHotkeyName(nHotkey)
    {
      var pHotkeyName="";
      var lpHotkeyName;

      if (lpHotkeyName=AkelPad.MemAlloc(256 * 2 /*sizeof(wchar_t)*/))
      {
        AkelPad.CallW("Hotkeys::Main", 1, nHotkey, 0, lpHotkeyName, 256);
        pHotkeyName=AkelPad.MemRead(lpHotkeyName, 1 /*DT_UNICODE*/);
        AkelPad.MemFree(lpHotkeyName);
      }
      return pHotkeyName;
    }

Call("Hotkeys::Main", 10)
  :
    10
      /   .
