2010-11-29 72 views

回答

2

試試這個:

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。

+0

謝謝你幫了我很多:-) – help 2010-12-04 10:17:27