I want the 'x' variable to be also responsive to a different length of the text that my macro info box might have when I add more macros down the line as 'y' does, but I am struggling to get the subpatterns for each new line.
Also don't know, if it's a better option to put the new lines into an actual new line, but that messed my ability to get the subpatterns even more.
Only idea, apart from getting the subpatterns to be rightly recognized (damn these RegEx elements ), is to loop it with a new StartingPos parameter each iteration and add it into a list that I will check the different lengths of after and add the longest one to the 'x' with an appropriate modifier. Or if there is any other option to get the same desired result that I don't know of?
If anyone could spare some time, I would really appreciate it.
Code: Select all
msg := "Alt+F1 - Command Hint`nAlt+Q - Bold+Paste`nF1 - Hello World`nF2 - This is a much longer text that might make the info box extremely long`nF4 - Thank you"
RegExMatch(msg, "(\b|`n)\K(.*?)(?=(\b|`n))", Rows)
x := 190 ;placeholder
y := (Count := StrLen(RegExReplace(msg, "[^`n]")) + 1) * 23 + 1
SplashTextOn, %x%, %y%, Command Hint, %msg%