Advertisement
pecka

wolfcamql batch demo capture powershell

Jan 14th, 2014
483
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cls
  2. $dir_root = "D:\wolftrue"
  3. $gamestart_cfg = "D:\wolftrue\wolfcam-ql\gamestart.cfg"
  4. $wolfcam = "D:\wolftrue\wolfcamql.exe"
  5. $wolfcam_oargs = "+set fs_homepath `"D:\wolftrue`" +exec cap.cfg +demo "
  6.  
  7. $demos = @(
  8.   ("demo01.dm_73","12:37-12:54"),
  9.   ("demo02.dm_73","02:37-02:54"),
  10.   ("demo03.dm_73","03:17-03:24"),
  11.   ("demo04.dm_73","03:17-03:24"),
  12.   ("demo05.dm_73","03:17-03:24"),
  13.   ("demo06.dm_73","03:17-03:24"),
  14.   ("demo07.dm_73","03:17-03:24"),
  15.   ("demo08.dm_73","03:17-03:24"),
  16.   ("demo09.dm_73","03:17-03:24"),
  17.   ("demo10.dm_73","03:17-03:24"),
  18.   ("demo11.dm_73","03:17-03:24")
  19.   )
  20.  
  21. cd $dir_root
  22. foreach ($demo in $demos)
  23. {
  24.   $time_s = $demo[1].split('-')[0]
  25.   $time_e = $demo[1].split('-')[1]
  26.  
  27.   $dummystring = "seekclock "+$time_s+"; video avi; at "+$time_e+" quit"
  28.   echo "wcstatsresetall" | Out-File $gamestart_cfg -Encoding default
  29.   echo $dummystring  | Out-File $gamestart_cfg -Encoding default -Append
  30.   $wolfcam_margs = $wolfcam_oargs+$demo[0]
  31.  
  32.   Start-Process $wolfcam -ArgumentList $wolfcam_margs
  33.   Start-Sleep -s 10
  34.   while (@(get-process "wolfcamql").count -ge 4) { Start-Sleep -s 10 }
  35. }
  36.  
  37. while (@(get-process "wolfcamql").count -ge 1) { Start-Sleep -s 10 }
  38.  
  39. echo "wcstatsresetall" | Out-File $gamestart_cfg -Encoding default
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement