Method: Snackhack2::ScreenShot#run

Defined in:
lib/snackhack2/screenshots.rb

#runObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/snackhack2/screenshots.rb', line 14

def run
  File.open('lol.bat', 'w+') { |file| file.write("psr.exe /start /output #{@zip} /sc 1 /gui 0") }
  File.open('lol2.bat', 'w+') { |file| file.write('psr.exe /stop') }
  Process.spawn('lol.bat')
  sleep @time.to_i
  system('lol2.bat')
  sleep 2
  File.delete('lol.bat')
  File.delete('lol2.bat')
end