Thursday, July 19, 2018

#1 2014-06-28 09:48:31 am

LightSoul94
Member
Registered: 2014-06-18
Posts: 14

Web search [AppleScript]

Hello MacScripter, Today i want show you a shortcut for Google and Youtube searchbar

Applescript:

set choice to button returned of (display dialog "Which service wish you use?" buttons {"Google", "Youtube", "Annulla"} with title "Web search")
if choice = "Google" then
   set search to text returned of (display dialog "Google Search!" default answer "" buttons {"Cerca", "Annulla"} with title "Google" default button 1)
   open location "[url]http://www.google.com.au/search?q=[/url]" & search
else if choice = "Youtube" then
   set search to text returned of (display dialog "Youtube Search!" default answer "" buttons {"Cerca", "Annulla"} with title "Youtube" default button 1)
   open location "[url]http://www.youtube.com/results?search_query=[/url]" & search
end if

Last edited by LightSoul94 (2014-07-15 04:35:02 pm)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)