Code:
set actionChoice to (choose from list {"FFplay", "VLC", "MPlayer"} with prompt "Select your media player" OK button name "OK" cancel button name "Cancel" default items "OK" without multiple selections allowed) as text
end tell
if actionChoice is "FFplay" then
set cpu to ((do shell script "machine") as text)
set actionChoice to (choose from list {"Yes", "No"} with prompt "Do you want videos to automatically start full screen?" OK button name "Yes" cancel button name "No" default items "Cancel" without multiple selections allowed) as text
if actionChoice is "Yes" then
if cpu is "i486" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -loglevel quiet\" > /Applications/PPCMC.app/pref"
else if cpu is "ppc" or cpu is "ppc750" or cpu is "ppc7400" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -x 240 -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -skip_frame 8 -skip_loop_filter 48 -fs\" > /Applications/PPCMC.app/pref"
else if cpu is "ppc7450" then
set actionChoice to (choose from list {"Yes (Slow PowerPC G4)", "No (Fast PowerPC G4)"} with prompt "Would you like to optimze FFplay for faster playback at a lesser quality?" OK button name "OK" cancel button name "Cancel" without multiple selections allowed) as text
if actionChoice is "Yes (Slow PowerPC G4)" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -x 240 -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -skip_frame 8 -skip_loop_filter 48 -fs\" > /Applications/PPCMC.app/pref"
else if actionChoice is "No (Fast PowerPC G4)" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -fs\" > /Applications/PPCMC.app/pref"
end if
else
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -fs\" > /Applications/PPCMC.app/pref"
end if
else if actionChoice is "No" then
if cpu is "i486" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -loglevel quiet\" > /Applications/PPCMC.app/pref"
else if cpu is "ppc" or cpu is "ppc750" or cpu is "ppc7400" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -x 240 -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -skip_frame 8 -skip_loop_filter 48\" > /Applications/PPCMC.app/pref"
else if cpu is "ppc7450" then
set actionChoice to (choose from list {"Yes (Slow PowerPC G4)", "No (Fast PowerPC G4)"} with prompt "Would you like to optimze FFplay for faster playback at a lesser quality?" OK button name "OK" cancel button name "Cancel" without multiple selections allowed) as text
if actionChoice is "Yes (Slow PowerPC G4)" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -x 240 -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet -skip_frame 8 -skip_loop_filter 48\" > /Applications/PPCMC.app/pref"
else if actionChoice is "No (Fast PowerPC G4)" then
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet\" > /Applications/PPCMC.app/pref"
end if
else
do shell script "echo \"/Applications/PPCMC.app/bin/ffplay -vf scale=in_color_matrix=yuva420p,format=rgb32 -loglevel quiet\" > /Applications/PPCMC.app/pref"
end if
end if
Last edited: