Re: Invalid key form errors with Keynote slides
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