1字符串拼接
两种方式:
1 通过 “.” 和空格拼接,例如
backSlash := "\"
snapStr := "_snap"
picNo := 0
PicPath := pictureDir . backSlash . picNo
2通过%%进行拼接,例如:
path := "a_"
fileSuffix := "*position.txt"
realPath = %path%%fileSuffix%
2字符串切分
通过StrSplit函数
使用指定的分隔符把一个字符串分解成多个子字符串并保存到数组中。
StringSplit, OutputArray, InputVar [, Delimiters, OmitChars]
例如:
words := "0,1,2"
commaSymbol := ","
currentPoint := StrSplit(words , commaSymbol , A_Space)
3字符串替换
StringReplace, OutputVar, InputVar, SearchText [, ReplaceText, ReplaceAll?]
StringReplace , outputPath , productionDir , %sourceDir% , %destDir%