• 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: Invalid key form errors with Keynote slides
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Invalid key form errors with Keynote slides


  • Subject: Re: Invalid key form errors with Keynote slides
  • From: Axel Luttgens <email@hidden>
  • Date: Sat, 12 Jul 2008 11:34:54 +0200

Le 12 juil. 08 à 00:04, Tracy Lakin a écrit :

Hi,

I'm wondering if the following "Invalid key form" errors are due to a bug in Keynote or how I've scripted.

I'm using Keynote 4.0.3 from iWork '08, Leopard 10.5.4, Intel iMac.

tell application "Keynote"

-- This works:
   set curSlideNum to slide number of current slide of slideshow 1

-- This also works:
   set curSlideshow to slideshow 1
  set curSlideNum to slide number of current slide of curSlideshow


-- This does not work:
set curSlide to current slide of slideshow 1
set curSlideNum to slide number of curSlide -- Keynote got an error: Invalid key form. (-10002)



-- This also does not work:
set currentSlide to (get current slide of slideshow 1)
set currentSlideNum to slide number of currentSlide -- Keynote got an error: Invalid key form. (-10002)


end tell


Is this my scripting or a bug in Keynote?

Hello Tracy,

Could indeed be a bug.
Trying this here on a bare document with two slides (the second one being selected):


	tell application "Keynote" to get current slide of slideshow 1

yields:

	slide "1" of document "Sans titre"

That is, once de-referenced, property "current slide" shows a strange string-based scheme: slide "0", slide "1", and so on.

Making use of "a reference to" seems to be a viable workaround:

	tell application "Keynote"
		set curSlide to a reference to current slide of slideshow 1
		set curSlideNum to slide number of curSlide
		set curSlideTitle to title of curSlide
	end tell

HTH,
Axel


_______________________________________________ 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: 
 >Invalid key form errors with Keynote slides (From: Tracy Lakin <email@hidden>)

  • Prev by Date: Re: will this code test if a user is in a group?
  • Next by Date: Re: will this code test if a user is in a group?
  • Previous by thread: Invalid key form errors with Keynote slides
  • Next by thread: what is CodeResource? how to make bundles applescriptable?
  • Index(es):
    • Date
    • Thread