<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-1632085368384154" crossorigin="anonymous"></script><script src="https://autohotkey.top/gtag.js"></script></head> <body> <h1>#SuspendExempt</h1> <p>豁免后续<a href="../Hotkeys.htm">热键</a>和<a href="../Hotstrings.htm">热字串</a>的<a href="Suspend.htm">挂起</a>.</p> <pre class="Syntax"><span class="func">#SuspendExempt</span> <span class="optional">Exempt</span></pre> <h2 id="Parameters">参数</h2> <dl> <dt>Exempt</dt> <dd> <!--p>Type: literal word/digit</p--> <p><strong>True</strong> 或 <strong>1</strong> 表示允许豁免后续热键, 或者 <strong>False</strong> 或 <strong>0</strong> 表示禁用豁免. 如果省略, 则默认为 <em>True</em>.</p> </dd> </dl> <h2 id="Remarks">备注</h2> <p>可以通过 <a href="Suspend.htm">Suspend</a> 函数, 或<a href="../Program.htm#tray-icon">托盘图标</a>或<a href="../Program.htm#main-window">主窗口</a>挂起热键和热字符串.</p> <p>如果在脚本中未指定此指令, 则在挂起脚本时禁用所有热键或热字符串, 即使是那些调用 <a href="Suspend.htm">Suspend</a> 函数的热键或热字符串.</p> <p>该指令不影响 <a href="Hotkey.htm">Hotkey</a> 或 <a href="Hotstring.htm">Hotstring</a> 函数, 它们可以使用 <a href="Hotkey.htm#SuspendExempt">S 热键选项</a>或 <a href="../Hotstrings.htm#SuspendExempt">S 热字串选项</a>来代替.</p> <p>和其他指令一样, #SuspendExempt 不能有条件地执行.</p> <h2 id="Related">相关</h2> <p><a href="Suspend.htm">Suspend</a>, <a href="../Hotkeys.htm">热键</a>, <a href="../Hotstrings.htm">热字串</a></p> <h2 id="Examples">示例</h2> <div class="ex" id="ExBasic"> <p><a class="ex_number" href="#ExBasic"></a> 本例中的第一个热键是用来切换暂停的. 为了防止这个热键在开启暂停后被暂停, 从而无法再关闭暂停, 必须将其豁免.</p> <pre>#SuspendExempt <em>; 从 Suspend 中豁免以下热键.</em> #Esc::Suspend -1 #SuspendExempt False <em>; 禁用下面任何热键/热字符串的豁免.</em> ^1::MsgBox "This hotkey is affected by Suspend." </pre> </div> <a href="https://dftg.net">dftg</a><!-- Cloudflare Pages Analytics --><script defer src='https://static.cloudflareinsights.com/beacon.min.js' data-cf-beacon='{"token": "d5a9c4fcb9b6482fa53ce820d892f969"}'></script><!-- Cloudflare Pages Analytics --><script defer src="https://static.cloudflareinsights.com/beacon.min.js/vcd15cbe7772f49c399c6a5babf22c1241717689176015" integrity="sha512-ZpsOmlRQV6y907TI0dKBHq9Md29nnaEIPlkf84rnaERnq6zvWvPUqr2ft8M1aS28oN72PdrCzSjY4U6VaAw1EQ==" data-cf-beacon='{"rayId":"95b064c66bf1ac72","version":"2025.6.2","r":1,"serverTiming":{"name":{"cfExtPri":true,"cfEdge":true,"cfOrigin":true,"cfL4":true,"cfSpeedBrain":true,"cfCacheStatus":true}},"token":"51750bb5dc4f40cc91a5ec55c63bbc01","b":1}' crossorigin="anonymous"></script> </body> </html>