say "Would you like to search for a website, an image or a video?" parse pull format if format \= "website" && format \= "image" && format \= "video" /* only allows to enter website, image or video */ then do say "Invalid input." exit end say "What would you like to search for?" parse pull phrase myIE = .OLEObject~New("InternetExplorer.Application") /* open internet explorer */ myIE~Width = 1000 myIE~Height = 800 myIE~Visible = .True /* IE visible */ /* google search: website, image or video */ select when format = "website" then myIE~Navigate("https://www.google.com/search?q=" || phrase) when format = "image" then myIE~Navigate("https://www.google.com/search?tbm=isch&q=" || phrase) when format = "video" then myIE~Navigate("https://www.google.com/search?tbm=vid&q=" || phrase) otherwise exit end