0

Applescriptでこれに問題があります:

display dialog "Open Which Application" buttons {"Chrome", "AppleScript", "Textedit"} 
set the button_pressed to the button returned of the result
if the button_pressed is "Chrome" then
Open application "Google Chrome"-- action for 1st button goes here
if the button_pressed is "Applescript" then
Open application "Applescript Editor"-- action for 2nd button goes here
if the button_pressed is "Textedit" then
Open application "Textedit"-- action for 3rd button goes here
end

SYNTAX ERROR: Expected “else” などと言い続けますが、スクリプトの終わりが見つかりました。

私は何をすべきか

4

2 に答える 2

0

試す:

display dialog "Open Which Application" buttons {"Chrome", "AppleScript", "Textedit"}
set the button_pressed to the button returned of the result
if the button_pressed is "Chrome" then tell application "Google Chrome" to activate -- action for 1st button goes here 
if the button_pressed is "Applescript" then tell application "AppleScript Editor" to activate -- action for 2nd button goes here 
if the button_pressed is "Textedit" then tell application "TextEdit" to activate -- action for 3rd button goes here end
于 2013-03-01T23:44:48.350 に答える