2010-11-29 4 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 

Просто измените URL-адреса, чтобы все, что вы хотите для поиска или Search2.

+0

спасибо, что это мне очень помогло :-) – help 2010-12-04 10:17:27

Смежные вопросы