I’m working on an AppleScript application which involves a dialog box with a text box on it and it’ll do different things depending on what the user types (I don’t plan on distributing this, I just plan to use it myself and it is kind of a project of mine).
For example if the user types “Open” or “I need to look something up in the dictionary” then it’ll open run a script which displays a dialog box prompting the user to type a word to look up in the dictionary.
I’ve done this by using the following code (just for that dictionary part)…
if chosen contains "dictionary" or "meaning" or "mean" or "look something up" or "thesaurus" then run script ("Dictionary.scpt" as alias)
(“chosen” refers to the text entered in the dialog box by the user) but if I try and add something similar to that, for say a google search, and type all the keywords and do virtually the same code, AppleScript Editor doesn’t seem to like it and it doesn’t work.
Any help would be appreciated.
Model: MacBook Pro
Browser: Google Chrome 5.0.307.9
Operating System: Mac OS X (10.6)