SOLVED: Unable to send user input string to Webster Dictionary Application using variable
SOLVED: Unable to send user input string to Webster Dictionary Application using variable
- Subject: SOLVED: Unable to send user input string to Webster Dictionary Application using variable
- From: Window Pen <email@hidden>
- Date: Thu, 27 Aug 2009 20:47:55 +0700
I wanted to thank all who helped and for anyone still using Tiger 10.4.11 and might still use even older applications like the Webster dictionary 2003.
In the Event Logs and testing input "rabbit" assigned before compiling in the script and "rabbit" after compiling, passed to a variable from a user dialog display looked the same, but it was not ( in AppleScript 1.10.7 on OS X 10.4.11 interacting with an old 2003 application ). Only the "literal" worked. The string input from a user dialog box was the problem and required a Unicode > Plain String hack.
How do you know if your problem is in encoding when some input works and another doesn't? I don't know, but you can click on the app installed in the Applications folder and press Ctrl + i and get the information about "Kind". If you see (Power PC) most likely you'll too need some encoding handling. This was my first AppleScript and thank you all again for your help.
display dialog "Look up " default answer "" with title "Webster's"
set varUserEntry to text returned of result
set {text:varUserEntry} to (varUserEntry as string) -- Unicode text -> plain string hack. (credit to: Nigel Garvey)
tell application "Merriam-Webster"
MWClearPaste varUserEntry
end tell
_______________________________________________
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