【发布时间】:2016-03-11 03:39:22
【问题描述】:
Applescript 结果是 Display "end tell"
我不知道为什么会这样,需要修复它。 当我第二次点击下一页时,它会随机“结束”
这是脚本:
display dialog "What would you like to launch? choose wisely!" buttons
{"Next Page", "cancel", "Google Chrome"} default button "Next Page"
if result = {button returned:"Google Chrome"} then
tell application "Google Chrome" to activate
else if result = {button returned:"cancel"} then
else if result = {button returned:"Next Page"} then
display dialog "Page 2" buttons {"Next page", "Mari0", "Minecraft"} default button "Next page"
if result = {button returned:"Minecraft"} then
tell application "Minecraft" to activate
else if result = {button returned:"Mari0"} then
tell application "Terminal"
activate
do script with command "open /Users/_________/Desktop/Mari0.app/"
delay 1
quit
end tell
else if return = {button returned:"Next page"} then
display dialog "Page 3" buttons {"Safari", "Roblox", "Next Page"} default button "Next Page"
if result = {button returned:"Roblox"} then
tell application "Google Chrome" to open location "http://www.roblox.com/home"
else if result = {button returned:"Safari"} then
tell application "Safari" to activate
else if return = {button returned:"Next Page"} then
display dialog "Final Page" buttons {"iMessages", "Applescript Folder", "Back to Start"} default button "Back to start"
if return = {button returned:"Back to start"} then
run script (open applications)
else if return = {button returned:"iMessages"} then
tell application "Messages" to activate
else if return = {button returned:"Applescript Folder"} then
do shell script "open /Users/__________/Desktop/Applescript/"
end if
end if
end if
end if
这些是脚本的结果:
告诉应用程序“脚本编辑器”
显示对话框“您想启动什么?明智地选择!” 按钮 {“下一页”、“取消”、“Google Chrome”} 默认按钮“下一页” 页面"
--> {按钮返回:“下一页”}
显示对话框“第 2 页” 按钮 {“下一页”、“Mari0”、“我的世界”} 默认按钮“下一页” --> {按钮返回:“下一页”}
结束讲述
【问题讨论】:
-
它只是显示“end tell”还是中途停止执行?问题不清楚。
标签: applescript