summaryrefslogtreecommitdiff
path: root/plugins/Watrack/templates/i_expkey.inc
blob: fd990cda312db94d1d3787884f8ffb20ce9a7bcc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
{main hotkey code}
const
  HKN_EXPORT:PAnsiChar = 'WAT_Export';

function ExportProc(wParam:WPARAM;lParam:LPARAM):int_ptr; cdecl;
var
  p:pWideChar;
begin
  result:=0;
  if DisablePlugin<>dsPermanent then
  begin
    p:=pointer(CallService(MS_WAT_REPLACETEXT,0,tlparam(ExportText)));
    SendString(0,p);
    mFreeMem(p);
  end;
end;

procedure reginshotkey;
var
  hkrec:THOTKEYDESC;
begin
  FillChar(hkrec,SizeOf(hkrec),0);
  with hkrec do
  begin
    cbSize          :=SizeOf(hkrec);
    pszName         :=HKN_EXPORT;
    pszDescription.a:='WATrack data insert hotkey';
    pszSection.a    :=PluginName;
    pszService      :=MS_WAT_EXPORT;
    DefHotKey       :=((HOTKEYF_ALT or HOTKEYF_SHIFT) shl 8) or VK_F7;
//    lParam          :=0;
  end;
  CallService(MS_HOTKEY_REGISTER,0,lparam(@hkrec));
end;