1
我正在嘗試爲iTunes創建一個簡單的國際商店。AppleScript - 當使用「從列表中選擇」時,變量命令不起作用
set country to (choose from list {"US", "CA", "UK"} with prompt "What country?")
if country = "US" then
tell application "iTunes"
activate
open location "itmss://itunes.apple.com/WebObjects/MZStore.woa/wa/switchToStoreFront?storeFrontId=143441"
end tell
end if
當我點擊美國,它不會對iTunes做任何事情。我究竟做錯了什麼?
+1表示「從列表中選擇」結果是一個列表。這就是海報沒有得到他預期的原因。因此,在我的兩種解決方案中,我更願意使用......如果(國家的第1項)=「美國」,則接近。 – regulus6633
(國家的第1項)和國家作爲文本產生相同的結果。 – adayzdone