• 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
telltelltell was[Re: applescript-users digest, Vol 3 #1187 - 13 msgs]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

telltelltell was[Re: applescript-users digest, Vol 3 #1187 - 13 msgs]


  • Subject: telltelltell was[Re: applescript-users digest, Vol 3 #1187 - 13 msgs]
  • From: Andy Wylie <email@hidden>
  • Date: Thu, 02 Jan 2003 20:13:54 +1300

on Thu, 02 Jan 2003 14:54:14 +1300 David Wignall wrote:

>on 2/1/2003 1:31 PM, Nelson Byrne at email@hidden wrote:
>
>> This is a wonderful list.
>>
>> I have another puzzler for you, if you please. Is there a level of
>> complexity that AppleScript can't handle?
>>
>> It seems to me that I often have better luck breaking scripts down into
>> tiny morsels than writing one big line. Here's an example. If I write:
>> tell application "Microsoft Excel"
>> tell Chart 1
>> tell Series 1
>> tell its Values
>> get item 1
>> end tell
>> end tell
>> end tell
>> end tell
>> I get the error message
>> "Microsoft Excel got an error: Can't get item 1 of Values of Series 1
>> of Chart 1.
>>
>> But if I write (what should be the same thing):
>> tell application "Microsoft Excel"
>> tell Chart 1
>> tell Series 1
>> get Values
>> get item 1 of the result
>> end tell
>> end tell
>> end tell
>> I have success!
>>
>> So, wizards, how complex can I get before I have to start using "the
>> result?"
>
>Not an answer at all really but how about
>
>tell application "Microsoft Excel"
> get Values of Series 1 of Chart 1 -- of workbook 1, if necessary
>end tell
>
I find this form easier...

tell application "Microsoft Excel"
(( Chart 1)'s Series 1)'s Values-- of workbook 1, if necessary
end tell

'of' reads right to left (:

I suspect a superfluous 'its' or 'tell' may be the cause of the error.

_____________________________ Andy
_______________________________________________
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: Strange error message
  • Next by Date: Re: Sending parameters to a remote applescript
  • Previous by thread: Re: Script Editor
  • Next by thread: make folder (using label index) with OSX
  • Index(es):
    • Date
    • Thread