2010-11-29 9 views

Répondre

2

Essayez ceci:

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 

Il suffit de modifier les URL à ce que vous voulez pour la recherche ou Search2.

+0

merci ça m'a beaucoup aidé :-) – help