#include "pakedit_tools.au3"
if ($CmdLine[0]<4) then
   msgbox(0,"","Usage: "&@scriptname&" PakEdit.exe_path qb.pak.ngc_path songlist.qb.ngc_path [replace|extract]")
   exit
EndIf

$pakedit = $CmdLine[1]
$pakpath = $CmdLine[2]
$file = $CmdLine[3]
$action = $CmdLine[4]
$gui = "PAK Editor GUI 0.1"

_SongEdit_init( $pakedit, $gui, $pakpath)

Select 
   Case $action=="replace"
      _Replace($file,$gui)     
   Case $action=="extract"
      _Extract($file,$gui)
   Case Else
      msgbox(0,"","Unkown action")
EndSelect
  
Sleep(1000)
WinClose($gui)
Sleep(1000)
Exit