StringCaseSense - Syntax & Usage | AutoHotkey

AutoHotkey

StringCaseSense

Determines whether string comparisons are case sensitive (default is "not case sensitive").

StringCaseSense, On|Off|Locale

Parameters

On|Off|Locale

On: String comparisons are case sensitive. This setting also makes the expression equal sign operator (=) and the case-insensitive mode of InStr() use the locale method described below.

Off (starting default): The letters A-Z are considered identical to their lowercase counterparts. This is the starting default for all scripts due to backward compatibility and performance (Locale is 1 to 8 times slower than Off depending on the nature of the strings being compared).

Locale [v1.0.43.03+]: String comparisons are case insensitive according to the rules of the current user's locale. For example, most English and Western European locales treat not only the letters A-Z as identical to their lowercase counterparts, but also ANSI letters like Ä and Ü as identical to theirs.

[v1.1.30+]: The decimal values 1 and 0 may be used in place of On and Off, respectively.

Remarks

This setting applies to:

The built-in variable A_StringCaseSense contains the current setting (the word On, Off, or Locale).

Every newly launched thread (such as a hotkey, custom menu item, or timed subroutine) starts off fresh with the default setting for this command. That default may be changed by using this command in the auto-execute section (top part of the script).

Related

IfEqual, IfInString, if var between, StringReplace, StringGetPos

Example

StringCaseSense Locale