Le code AppleScript :
on dialogBox(theMessage)
display dialog theMessage default answer "" buttons {"Cancel", "Search"} default button 2 with title "Pick a search engine"
end dialogBox
dialogBox("Google, YouTube, Wiki, Dictionary, Apple, Adobe, or Google Images")
if text returned of result = "Google" then
set search to text returned of dialogBox("Enter Google Search")
tell application "Google Chrome"
activate
open location "https://www.google.com/?gfe_rd=cr&ei=4fJgVJ6SM8yD8QfJjYGICA&gws_rd=ssl,cr&fg=1#q=" & search
end tell
else if text returned of result = "YouTube" then
set search to text returned of dialogBox("Enter YouTube Search")
tell application "Google Chrome"
activate
open location "https://www.youtube.com/results?search_query=" & search
end tell
else if text returned of result = "Wiki" then
set search to text returned of dialogBox("Enter Word")
tell application "Google Chrome"
activate
open location "http://en.wikipedia.org/wiki/" & search
end tell
else if text returned of result = "Dictionary" then
set search to text returned of dialogBox("Enter Word")
tell application "Google Chrome"
activate
open location "http://Dictionary.Reference.Com/Browse/" & search
end tell
else if text returned of result = "Apple" then
set search to text returned of dialogBox("Enter Apple Search")
tell application "Google Chrome"
activate
open location "http://www.apple.com/search/?q=" & search
end tell
else if text returned of result = "Adobe" then
set search to text returned of dialogBox("Enter Adobe Search")
tell application "Google Chrome"
activate
open location "http://www.adobe.com/cfusion/search/index.cfm?term=" & search
end tell
else if text returned of result = "Google Images" then
set search to text returned of dialogBox("Enter Image Search")
tell application "Google Chrome"
activate
open location "https://www.google.ca/search?site=imghp&tbm=isch&source=hp&biw=1920&bih=890&q=" & search
end tell
end if
Le problème :
En haut, il est indiqué ("Google, YouTube, Wiki, Dictionnaire, Apple, Adobe, ou Google Images").
Je veux qu'il y ait un point d'interrogation à la fin, comme cela : ("Google, YouTube, Wiki, Dictionnaire, Apple, Adobe, ou Google Images ?")
La page Google Images contient un point d'interrogation, mais lorsque je tape "Google Images" dans la zone de texte, il se ferme. Est-ce que quelqu'un peut m'aider pour que je puisse taper Google Images avec le point d'interrogation sans que le programme ne se ferme ?