• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Unable to send user input string to Webster Dictionary Application using variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: Unable to send user input string to Webster Dictionary Application using variable
      • From: Geoff Graham <email@hidden>
    • Re: Unable to send user input string to Webster Dictionary Application using variable
      • From: Shane Stanley <email@hidden>
    • Re: Unable to send user input string to Webster Dictionary Application using variable
      • From: Window Pen <email@hidden>
    • Re: Unable to send user input string to Webster Dictionary Application using variable
      • From: Window Pen <email@hidden>
    • Re: Unable to send user input string to Webster Dictionary Application using variable
      • From: Geoff Graham <email@hidden>
  • Prev by Date: Open command in Photoshop CS3
  • Next by Date: Re: Unable to send user input string to Webster Dictionary Application using variable
  • Previous by thread: Re: Open command in Photoshop CS3
  • Next by thread: Re: Unable to send user input string to Webster Dictionary Application using variable
  • Index(es):
    • Date
    • Thread