on run argv set my_path to (system attribute "PWD") & "/" set my_test to item 1 of argv tell application "Virtual ][" activate delay 0.5 -- Close all open machines close every machine saving no -- Create a standard Apple //els set theMachine to (make new AppleIIe) tell theMachine 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 the speed to maximum, to go quickly through the startup phase. set speed to maximum try with timeout of 5 seconds repeat until the last line of the compact screen text = "DONE. PRESS [RETURN] TO REBOOT." delay 0.5 end repeat end timeout on error do shell script "echo timeout" end try -- short test of image, not necessary, next 3 lines can be removed -- delay 0.5 -- type line "" -- delay 3 end tell close every machine saving no quit end tell end run