删除 Autohotkey 中某个字符后的字符

Remove characters after a certain character in Autohotkey

我正在使用 Autohotkey。

我有这个字符串变量ABCDEF.XX。我想通过剥离 . 之后的字符(包括 . 本身)将其转换为 ABCDEF

inputVar:="ABCDEF.XX"
StringTrimRight, inputVar, inputVar, 3

如果我想让代码识别点的位置怎么办。并相应地删除字符。如何做到这一点?

inputVar:="ABCDEF.XX"
StringSplit, input_array, inputVar, .
MsgBox, %input_array1%

https://autohotkey.com/docs/commands/StringSplit.htm#Examples

FileName :="ABCDEF.XX"
SplitPath, FileName,,,,name_no_ext
MsgBox, %name_no_ext%

https://autohotkey.com/docs/commands/SplitPath.htm

Remove last n characters of string after the dot with Autohotkey