This script is ment to get info when u made great frags in demo. It should work with every game that has demo recording and screenshots possibility.

When u play the only thing that has to be done is to take a screenshots when u make a great frag. Bind it somewhere where u can reach it quick.

What it does? It finds screens that u have taken while playing and finds the time based on dates. Screens have to be taken while playing!



Its writen for Microsoft Powershell (u will have to dl and install it to use the script) Just copy paste save it as q3demo.ps1 and run it with powershell
1. type: Set-ExecutionPolicy Unrestricted (so that scripts can be executed)
2. go to the folder where u have the script, type demo +(press tab) ;) ); like this:


demo.ps1

#===============DEFINE================= v 1.00
$demoFolder = "c:\Igre\Quake III Arena\cpma\demos"
$screenshotsFolder = "c:\Igre\Quake III Arena\cpma\screenshots"
$outFolder = "D:\Movie\mme\demos"
#======================================

#=============== COUNTER ===============
if(Test-Path $outFolder/xgoCounter.txt) { $counter = [int](cat $outFolder/xgoCounter.txt -totalCount 1) }
else { sc -path $outFolder/xgoCounter.txt -value 0; $counter = 0 }
#=============== LAST COPY ===============
if(Test-Path $demoFolder/xgoLastCopy.txt) {
$dateFile = get-item $demoFolder/xgoLastCopy.txt
$lastCopyDate = $dateFile.LastWriteTime
}
else { $lastCopyDate = Get-Date -month 12 -day 31 -year 2006 -hour 23 -minute 30 }

#=============== START ===============
Write-Host Counter: $counter
foreach($demo in dir $demoFolder)
{
#=============== GET PICTURES ===============
$pictures = dir -path $screenshotsFolder | where {$demo.CreationTime -le $_.LastWriteTime -and $_.LastWriteTime -le $demo.LastWriteTime.AddSeconds(-8) -and $demo.CreationTime -gt $lastCopyDate} | sort-object -property LastWriteTime

if ($pictures -ne $null)
{
$name = $demo.BaseName.Replace("__", "_"); $ext = $demo.Extension; $counter++
Write-Host "==== Found Images ===="
Write-Host DEMO Ime: $name

$times = "__"
#=============== COPY PICTURES ===============
foreach($pick in $pictures)
{
#===== GET TIME =====
$gameTime = New-TimeSpan $demo.CreationTime $pick.LastWriteTime
$time = $gameTime.Minutes.ToString()+"."+$gameTime.Seconds.ToString()+"_"
$times += $time

$pickName = $outFolder+"\"+$counter.ToString()+"-"+$name+"__"+$time+"_"+$pick.Extension
Copy-Item $screenshotsFolder\$pick -destination $pickName
Write-Host pickName: $pickName
}
$times += "_"

#=============== COPY DEMO ===============
$demoName = $outFolder+"\"+$counter.ToString()+"-"+$name+""+$times+""+$ext
Copy-Item $demoFolder\$demo -destination $demoName
Write-Host $demoName
}
}
sc -path $outFolder/xgoCounter.txt -value $counter
sc -path $demoFolder/xgoLastCopy.txt -value $lastCopyDate;