Ok - so I got it all put together and this is what I have.
Step 1:
Create aliases in game and bind them to [ & ] to turn on and off chat logging while on the combat tab. I turn it on when I start an encounter and off when I finish it dumps the encounter time out to a file. I have a master AHK script with a key to invoke this timer script:
DestFile = time.txt
IfExist, %DestFile%
{
FileDelete, %DestFile%
}
~[::
StartTime := A_TickCount
return
~]::
ElapsedTime := (A_TickCount - StartTime)/1000
MsgBox, Encounter was %ElapsedTime% seconds long.
FileAppend,% ElapsedTime, % DestFile
exitapp
Step 2: I now have the Encounter duration in seconda and a log that I can refine to get the damage per name. At this points I have 2 one whith my user name where you see Yourchar in this script, and second one with my pets user name ( I dont know why but I cant put a var in the regex bracket ? ) this is all still very WIP
FileSelectFile, SourceFile, 3,, Pick a Combat file to analyze.
if SourceFile =
return
SplitPath, SourceFile,, SourceFilePath,, SourceFileNoExt
DestFile = refined.txt
IfExist, %DestFile%
{
FileDelete, %DestFile%
}
Loop, read, %SourceFile%
If RegexMatch(A_LoopReadLine,"Yourchar\sscored.*?(\d+)",match)
text.=match1 "`n"
FileAppend,% text, % DestFile
Step3: This just ads everything together for Yourchar to get the total dmg which is used to divide by the time I got from my encounter timer.
destfile = dmg.txt
IfExist, %DestFile%
{
FileDelete, %DestFile%
}
FileRead, sumdmg, %A_scriptdir%\refined.txt
if not ErrorLevel ; Successfully loaded.
{
Loop, Parse, sumdmg, `n
var += A_LoopField
msgbox, % var
FileAppend,% var, % DestFile
}
step 4: Finaly take that total dmg and divide it by the encounter time
DestFile = DPS.txt
IfExist, %DestFile%
{
FileDelete, %DestFile%
}
FileRead, dps, %A_scriptdir%\time.txt
if not ErrorLevel ;
FileRead, dmgc, %A_scriptdir%\dmg.txt
if not ErrorLevel ;
ydps := dmgc / dps
msgbox, %ydps%
fileappend, % ydps, % Destfile
So I got myself a neat crude DPS tally - Thanks to all you guys for your Help so far - Im sure it could be streamlined possibly have a GUI and OSD - still needs a ton of work but like I said as I go ill just keep dropping the results in here.