PageRenderTime 54ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/AutoHotkey.docset/Contents/Resources/Documents/commands/_InstallMouseHook.htm

https://gitlab.com/ahkscript/Autohotkey.docset
HTML | 29 lines | 25 code | 4 blank | 0 comment | 0 complexity | 6d8a93700d0de44d3d2c723dc93fdf59 MD5 | raw file
  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>#InstallMouseHook</title>
  5. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  7. <link href="../static/theme.css" rel="stylesheet" type="text/css" />
  8. <script src="../static/content.js" type="text/javascript"></script>
  9. </head>
  10. <body>
  11. <h1>#InstallMouseHook</h1>
  12. <p>Forces the unconditional installation of the mouse hook.</p>
  13. <pre class="Syntax">#InstallMouseHook</pre>
  14. <h3>Remarks</h3>
  15. <p>The mouse hook monitors mouse clicks for the purpose of activating mouse <a href="../Hotkeys.htm">hotkeys</a> and <a href="../Hotstrings.htm#NoMouse">facilitating hotstrings</a>.</p>
  16. <p>AutoHotkey does not install the keyboard and mouse hooks unconditionally because together they consume at least 500 KB of memory (but if the keyboard hook is installed, installing the mouse hook only requires about 50 KB of additional memory; and vice versa). Therefore, the mouse hook is normally installed only when the script contains one or more mouse <a href="../Hotkeys.htm">hotkeys</a>. It is also installed for <a href="../Hotstrings.htm">hotstrings</a>, but that can be disabled via <a href="_Hotstring.htm">#Hotstring NoMouse</a>.</p>
  17. <p>By contrast, the #InstallMouseHook directive will unconditionally install the mouse hook, which might be useful to allow <a href="KeyHistory.htm">KeyHistory</a> to monitor mouse clicks.</p>
  18. <p>You can determine whether a script is using the hook via the <a href="KeyHistory.htm">KeyHistory</a> command or menu item. You can determine which hotkeys are using the hook via the <a href="ListHotkeys.htm">ListHotkeys</a> command or menu item.</p>
  19. <p>This directive also makes a script <a href="_Persistent.htm">persistent</a>, meaning that <a href="ExitApp.htm">ExitApp</a> should be used to terminate it.</p>
  20. <h3>Related</h3>
  21. <p><a href="_InstallKeybdHook.htm">#InstallKeybdHook</a>, <a href="_UseHook.htm">#UseHook</a>, <a href="Hotkey.htm">Hotkey</a>, <a href="_Persistent.htm">#Persistent</a>, <a href="KeyHistory.htm">KeyHistory</a>, <a href="GetKeyState.htm">GetKeyState</a>, <a href="KeyWait.htm">KeyWait</a></p>
  22. <h3>Example</h3>
  23. <pre class="NoIndent">#InstallMouseHook</pre>
  24. </body>
  25. </html>