summaryrefslogtreecommitdiff
path: root/plugins/Watrack/templates/i_expkey.inc
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-10-08 18:43:29 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-10-08 18:43:29 +0000
commit864081102a5f252415f41950b3039a896b4ae9c5 (patch)
treec6b764651e9dd1f8f53b98eab05f16ba4a492a79 /plugins/Watrack/templates/i_expkey.inc
parentdb5149b48346c417e18add5702a9dfe7f6e28dd0 (diff)
Awkwars's plugins - welcome to our trunk
git-svn-id: http://svn.miranda-ng.org/main/trunk@1822 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
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;