Skip to content

Instantly share code, notes, and snippets.

@patroza
Created February 13, 2010 16:58
Show Gist options
  • Save patroza/303546 to your computer and use it in GitHub Desktop.
Save patroza/303546 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# encoding: UTF-8
require 'emp/arma/tools/common'
class Bla
include EMP::Arma::Tools
def wait
STDIN.gets
end
def run #your code goes in run
begin
$base_path = 'P:\x'
puts "\nJunctions:"
addjunc( 'acex', 'C:\unused' )
puts "\nRestore P3D:"
recren( 'ace', '.b3d', '.p3d' )
puts "\nPress enter when ready to rename P3D..."
wait
puts "\nRename P3D:"
recren( 'ace', '.p3d', '.b3d' )
puts "\nJunctions:"
remjunc( 'acex' )
rescue StandardError, Interrupt, Exception => msg
puts "Error"
puts msg
wait
end
end
end
obj = Bla.new
obj.run
puts "Done"
obj.wait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment