1
我按照這個YouTube教程:http://www.youtube.com/watch?v=0ux3S_G8HuUAppleScript的按鈕
我想第二個按鈕去專門的網站....
我已經試過這樣:
if "button 2" then open location "(the name of the site)"
什麼我該怎麼辦?我希望你能幫忙。
我按照這個YouTube教程:http://www.youtube.com/watch?v=0ux3S_G8HuUAppleScript的按鈕
我想第二個按鈕去專門的網站....
我已經試過這樣:
if "button 2" then open location "(the name of the site)"
什麼我該怎麼辦?我希望你能幫忙。
試試這個:
set search to (display dialog "Enter YouTube Video Search" default answer "" buttons {"Cancel", "Search", "Search2"} default button 3)
set keyword to text returned of search
set buttonPressed to button returned of search
if buttonPressed is equal to "Search" then
tell application "Safari"
open location "http://www.youtube.com/results?search_query=" & keyword
end tell
else if buttonPressed is equal to "Search2" then
tell application "Safari"
open location "http://www.youtube.com/results?search_query=" & keyword
end tell
end if
只要改變任何你想要的搜索或搜索2的URL。
謝謝你幫了我很多:-) – help 2010-12-04 10:17:27