if { $argc != 2 } { puts "Wrong number of arguments, expecting path to SteamCMD script and AppId" exit 1 } set timeout 30 set STEAMCMD [lindex $argv 0] set APPID [lindex $argv 1] spawn $STEAMCMD +login anonymous +app_info_request $APPID +app_info_update +app_info_update 1 +app_info_print $APPID expect { "Connecting anonymously" { } timeout { puts "\n\nNo connect message found, aborting\n\n"; exit 2 } } expect { "App info request sent" { } timeout { puts "\n\nNo AppInfo request sent, aborting\n\n"; exit 3 } } expect { "\"$APPID\"" { } timeout { puts "\n\nNo result body found, aborting\n\n"; exit 4 } } expect { "\n\}" { } timeout { puts "\n\nNo end of result found, aborting\n\n"; exit 5 } } send "quit\n" puts "\n\nSUCCESS!\n"