import os
import sys
import subprocess
import sublime
import sublime_plugin

class open_log(sublime_plugin.WindowCommand):
	def run(self,type):
		directory=sublime.packages_path()
		if type=="a3":
			command= "cd "+directory+" & cd Poseidon\extra & start _openLog_rpt_a3.bat /c"
			os.system(command)
		elif type == "a2":
			command= "cd "+directory+" & cd Poseidon\extra & start _openLog_rpt_a2.bat /c"
			os.system(command)
		elif type == "a2oa":
			command= "cd "+directory+" & cd Poseidon\extra & start _openLog_rpt_a2oa.bat /c"
			os.system(command)
		elif type == "bulldozer":
			command= "cd "+directory+" & cd Poseidon\extra & start _openLog_rpt_bulldozer.bat /c"
			os.system(command)
		elif type == "server":
			command= "cd "+directory+" & cd Poseidon\extra & start _openLog_rpt_a3server.bat /c"
			os.system(command)
