This has been my solution - I am happy for feedback as how to make this faster and easier to read, but it does have all the steps.
;SAVE THESE 4 Lines of DATA AS A TEXT FILE. OMIT THIS LIINE.
;21:21:34: Exile's Den has fallen!
;21:21:07: [Ender] has looted [Coldwater Seabug]!
;21:20:59: Loc: 4223 1224 2051
;21:21:07: [Ender] has looted [Coldwater Seabug]!
LogLoc = FullLogFileHereWith.TXT
Chars1 = [ ;used to parse lines ONLY without this Character
FileRead, Tlog, %LogLoc% ;Read the complete file into a variable. This includes ~n on the end of each line.
Tlog := RegExReplace(Tlog,"`r`n","|#") ;Replace the Newline `N with |#. The reason to use 2 replacements is below.
Tlog := RegExReplace(Tlog,":","") ;Remove : from the Variable. "" means it removes the space entirely.
Tlog := RegExReplace(Tlog,"!","") ;Remove ! from the Variable.
Tlog := RegExReplace(Tlog,"'","") ;Remove ' from teh Variable.
Loop, Parse, Tlog,"|" ;Parse the logfile, each time it see's | it starts a new line.
IfNotInstring A_LoopField , %Chars1% ; If [ is not in the string, then process the line into a new variable.
{
Tlog2 .= A_LoopField ; .= means it adds all the lines together as they are parsed. Interesting that the | that is used to parse the lines is stripped. Leaving only the # as shown above.
}
Loop, parse, Tlog2, #, ; Open and read our log file from memory - now use # to start a new line
IfInstring A_LoopField , Loc ;check the string for text Loc. if it exists action it.
{
StringSplit, word_array, A_LoopField , %A_Space%, . ; Omits periods. Splits the line into variables based on spaces.
BaseX := word_array3 ; set variable to the 4th object returned - It starts at 0
BaseY := word_array5 ; set variable to the 6th object returned - It starts at 0
Tooltip, X= %BaseX%`nY= %BaseY% ; Show under the mouse what is returned.
}
MsgBox, X=%BaseX%`nY=%BaseY%
Exitapp
F2::exitapp
So basically here it whats happening
Set a variable to the character "[" allows it to be parsed by Expressions via the varaible. You often cannot use these characters directly.
Remove a few other characters in the string
Read line by line, and create a new variable that only contains lines without "[" in them.
Check the variable for the text "Loc"
Split Loc into parts, and grab the bits you want.
Cheers