Unable to send user input string to Webster Dictionary Application using variable
Unable to send user input string to Webster Dictionary Application using variable
- Subject: Unable to send user input string to Webster Dictionary Application using variable
- From: Window Pen <email@hidden>
- Date: Tue, 18 Aug 2009 19:47:56 +0700
Does anyone see my error? This is my first post and my first attempt at writing a script in AppleScript.
I'm trying to send words I want to look up via the script instead of waiting for the desktop application to open.
Websters receives the look up word only if directly quoted in the script. I want to send the lookup word by variable containing the user input.
Is this an encoding problem, unicode to ASCII? If so how do you specify the encoding to such an old (2003) application?
Much thanks in advance.
display dialog "Look up " default answer "" with title "Webster's"
set dialogInfo to result
set answer to text returned of dialogInfo
tell application "Merriam-Webster"
activate
--set answer to (quote & answer & quote) as string -- sends var in quotes but does not place input in application
--set answer to "rabbit" as string --works for "rabbit" but not for "answer" incorporating user input
MWClearPaste answer
end tell
---
Merriam-Webster Dictionary Version 3.0 (Copyright 2003)
Script Editor Version 2.1.2 (82.1)
OS X Version 10.4.11
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden