#!/usr/bin/expect

set timeout 1       

spawn QBgen.exe
set song [lindex $argv 0]
set pos [lindex $argv 1]
expect "Write the name of the .chart file that you want to convert:"
send "$song.chart\r"
expect "Select the ID of the target song:"
send "$pos\r"
expect "Write the name of the PAK file that contains the song:"
send "$song.pak.ngc\r"
expect "Lead guitar:"
send "1\r"
expect "Rhythm:"
send "2\r"
expect "..."
send "\r"