• 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
Re: Unable to send user input string to Webster Dictionary Application using variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Unable to send user input string to Webster Dictionary Application using variable


  • Subject: Re: Unable to send user input string to Webster Dictionary Application using variable
  • From: Geoff Graham <email@hidden>
  • Date: Tue, 18 Aug 2009 09:29:58 -0400

This is what you're sending to MW:

"\"rabbit\""

but you say this works:

"rabbit"

Have you tried not using either of the set statements and just send answer right as it is returned from the dialog? (Of course I don't have MW)

Geoff

On Aug 18, 2009, at 8:47 AM, Window Pen wrote:

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 (applescript- email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users


This email sent to email@hidden

_______________________________________________ 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
References: 
 >Unable to send user input string to Webster Dictionary Application using variable (From: Window Pen <email@hidden>)

  • Prev by Date: Unable to send user input string to Webster Dictionary Application using variable
  • Next by Date: Re: Unable to send user input string to Webster Dictionary Application using variable
  • Previous by thread: Unable to send user input string to Webster Dictionary Application using variable
  • Next by thread: Re: Unable to send user input string to Webster Dictionary Application using variable
  • Index(es):
    • Date
    • Thread