Hi,
ich bin gerade dran mein Programm zu verbessern, indem ich mehr Codecs ein baue jedoch öffnet sich keine Variable, wenn ich auf den Button klicke.
Hier mein Code:
on clicked theObject
set a to display dialog {“MP3”, “Apple Lossless”, “AAC”, “AIFF”}
if the answer is "MP3" then
tell application "iTunes"
set current encoder to encoder "MP3 Encoder"
convert playlist "convertlist"
end tell
end if
if the answer is "Apple Lossless" then
tell application "iTunes"
set current encoder to encoder "Apple Lossless Encoder"
convert playlist "convertlist"
end tell
end if
if the answer is "AAC" then
tell application "iTunes"
set current encoder to encoder "AAC Encoder"
convert playlist "convertlist"
end tell
end if
if the answer is "AIFF" then
tell application "iTunes"
set current encoder to encoder "AIFF Encoder"
convert playlist "convertlist"
end tell
end if
on clicked theObject
set a to choose from list {“MP3”, “Apple Lossless”, “AAC”, “AIFF”}
if the answer is “MP3” then
tell application “iTunes”
set current encoder to encoder “MP3 Encoder”
convert playlist “convertlist”
end tell
end if
if the answer is “Apple Lossless” then
tell application “iTunes”
set current encoder to encoder “Apple Lossless Encoder”
convert playlist “convertlist”
end tell
end if
if the answer is “AAC” then
tell application “iTunes”
set current encoder to encoder “AAC Encoder”
convert playlist “convertlist”
end tell
end if
if the answer is “AIFF” then
tell application “iTunes”
set current encoder to encoder “AIFF Encoder”
convert playlist “convertlist”
end tell
end if
end clicked
Da musste set a to choose from list, anstatt set a to display dialog hin…
Aber, nächstes Problem, wenn ich den Codec wähle, kommt Variable Answer ist not defined… Wo liegt jetzt der fehler