summaryrefslogtreecommitdiff
path: root/plugins/Watrack/templates/i_expkey.inc
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Watrack/templates/i_expkey.inc')
-rw-r--r--plugins/Watrack/templates/i_expkey.inc34
1 files changed, 34 insertions, 0 deletions
diff --git a/plugins/Watrack/templates/i_expkey.inc b/plugins/Watrack/templates/i_expkey.inc
new file mode 100644
index 0000000000..f6594acebb
--- /dev/null
+++ b/plugins/Watrack/templates/i_expkey.inc
@@ -0,0 +1,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:HOTKEYDESC;
+begin
+ FillChar(hkrec,SizeOf(hkrec),0);
+ with hkrec do
+ begin
+ cbSize :=HOTKEYDESC_SIZE_V1;
+ 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;