c2t/test.scrp

54 lines
1.3 KiB
Plaintext

on run argv
set my_path to (system attribute "PWD") & "/"
set my_test to item 1 of argv
set my_done to item 2 of argv
tell application "Virtual ]["
activate
delay 0.5
-- Close all open machines
close every machine saving no
-- Create a new (AppleIIe, AppleIIPlus, AppleII)
-- set theMachine to (make new AppleIIPlus)
set theMachine to (make new AppleIIe)
tell theMachine
-- Change to a color screen
-- set monochrome screen to false
set speaker volume to 0.25
insert my_path & my_test into device "S6D1"
-- Now wait for the startup screen
delay 0.5
reset
repeat until the last line of the compact screen text = "]"
delay 0.5
end repeat
type line "LOAD"
play my_path & "test.aif" on device "cassette recorder"
set speed to maximum
try
with timeout of 25 seconds
-- repeat until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT."
-- delay 0.5
-- end repeat
waiting until screen equals imagefile POSIX path of (my_path & my_done)
end timeout
on error
return "ERROR: TIMEOUT: Virtual ][ screen != " & my_done
end try
-- short test of image, not necessary, next 3 lines can be removed
-- delay 0.5
-- type line ""
-- delay 3
end tell
delay 0.5
close every machine saving no
quit
end tell
end run