关闭热字串选项
Turning off hotstring options
我正在浏览关于热字串的 AHK 文档,发现 Options 部分特别有趣
我有一个问题是关于关闭选项,例如:
C: Case sensitive: When you type an abbreviation, it must exactly match the case defined in the script. Use C0 to turn case sensitivity back off.
没有关于如何执行此操作的示例,所以这是我的第一个问题
你会怎么做?
也就是说,我可以使用哪些步骤和一些代码示例来完成它?
关于第二个问题,不是那么重要
你为什么要这么做?
要回答您的第一个问题,有两种主要方法可以创建区分大小写的热字串。
方法 1- 一次性使用 Options 修饰符:
将选项粘贴在热字串的第一个和第二个冒号之间。例如:
;Case Sensitive
:C:ROFL:: Rolling on floor laughing
:C:ICYMI:: In case you missed it
:C:TL;DR:: Too long, didn’t read
;Non case-sensitive
::atot::A Tale of Two Cities
::ctbc::Cry, the Beloved Country
方法 2-#Hotstring
指令
如果你有一个较长的热字串列表,你希望应用某些属性,你可以使用这个指令。该指令将应用于它后面的所有热字串,这就是为什么存在像 #Hotstring C0
这样的选项可以关闭先前声明的 #Hotstring C
的原因。例如:
#Hotstring C
::ROFL:: Rolling on floor laughing
::ICYMI:: In case you missed it
::TL;DR:: Too long, didn’t read
#Hotstring C0
::atot::A Tale of Two Cities
::ctbc::Cry, the Beloved Country
(这两个代码块在功能上是相同的)
要回答您的第二个问题,如果您的意思是为什么需要使用 C0
选项,请参阅上面的 Method 2
。如果您的意思是通常为什么要使用案例选项,那将是个人喜好问题。
我正在浏览关于热字串的 AHK 文档,发现 Options 部分特别有趣
我有一个问题是关于关闭选项,例如:
C: Case sensitive: When you type an abbreviation, it must exactly match the case defined in the script. Use C0 to turn case sensitivity back off.
没有关于如何执行此操作的示例,所以这是我的第一个问题
你会怎么做?
也就是说,我可以使用哪些步骤和一些代码示例来完成它?
关于第二个问题,不是那么重要
你为什么要这么做?
要回答您的第一个问题,有两种主要方法可以创建区分大小写的热字串。
方法 1- 一次性使用 Options 修饰符:
将选项粘贴在热字串的第一个和第二个冒号之间。例如:
;Case Sensitive
:C:ROFL:: Rolling on floor laughing
:C:ICYMI:: In case you missed it
:C:TL;DR:: Too long, didn’t read
;Non case-sensitive
::atot::A Tale of Two Cities
::ctbc::Cry, the Beloved Country
方法 2-#Hotstring
指令
如果你有一个较长的热字串列表,你希望应用某些属性,你可以使用这个指令。该指令将应用于它后面的所有热字串,这就是为什么存在像 #Hotstring C0
这样的选项可以关闭先前声明的 #Hotstring C
的原因。例如:
#Hotstring C
::ROFL:: Rolling on floor laughing
::ICYMI:: In case you missed it
::TL;DR:: Too long, didn’t read
#Hotstring C0
::atot::A Tale of Two Cities
::ctbc::Cry, the Beloved Country
(这两个代码块在功能上是相同的)
要回答您的第二个问题,如果您的意思是为什么需要使用 C0
选项,请参阅上面的 Method 2
。如果您的意思是通常为什么要使用案例选项,那将是个人喜好问题。