• 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: Not seeing AppleScript dictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Not seeing AppleScript dictionary


  • Subject: Re: Not seeing AppleScript dictionary
  • From: Kai <email@hidden>
  • Date: Tue, 10 Jun 2003 09:59:17 +0100

on Tue, 10 Jun 2003 13:20:02 +1000, Shane Stanley wrote:

> On 10/6/03 10:35 AM +1000, Stan Cleveland, email@hidden, wrote:
>
>> I'm having a problem that is occurring frequently and predictably with a
>> variety of applications. In certain circumstances, an application's
>> dictionary appears to be inaccessible. The problem can be shown with the
>> following script:
>>
>> tell application "QuarkXPress 4.11"
>> set theInfo to horizontal measure of default document 1
>> activate
>> display dialog theInfo as text
>> end tell
>>
>> When run (in OS 9, of course) from Script Editor the dialog displays
>> "inches". Saved as an applet in the startup items folder, after rebooting
>> the dialog displays "<<constant ****UINC>>". Similar results can be obtained
>> using any application that returns application keywords (as opposed to
>> literals like strings or integers) as a script result.
>>
>> The problem showed up a month or two ago. Any solution or workaround for
>> this frustrating bugaboo would be much appreciated.
>
> What you're seeing is the way AS works. Application keywords aren't saved
> with applets; the raw codes are only converted to the keywords when you open
> the script in an editor. So you have do something like:
>
> tell application "QuarkXPress 4.11"
> set theInfo to horizontal measure of default document 1
> if theInfo = inches then
> set theInfo to "inches"
> else if ...
> ...
> end if
> activate
> display dialog theInfo as text
> end tell

You might also try inserting something like this before the rest of your
original script:

run script "tell application \"QuarkXPress 4.11\" to \"\""

--
Kai
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: dumb question but vital
  • Next by Date: Re: dumb question but vital
  • Previous by thread: Re: Not seeing AppleScript dictionary
  • Next by thread: Regarding Mail
  • Index(es):
    • Date
    • Thread