how to randomly show slides in Keynote

In May Cuztheyrefast posted this question (now archived).

"Is there a way to shuffle the order of the slides? I am using Keynote for flashcards but I'm afraid I'll start to memorize the answers by order rather than actually knowing the answer. "

This can be done with Applescript. I won't write the full script because so much depends on how you want it to work exactly, but here are the core components.

Refer to the slideshow:
first slideshow

or to always refer to a specific slideshow:
slideshow “name”

Find number of slides in a slideshow:
set no ofslides to number of slides of first slideshow

Build a list of slideshow numbers:
set no ofslides to number of slides of first slideshow
set nslides to {}
Repeat with n from 1 to no ofslides
set nslides to nslides & n
end repeat

Play a slideshow starting from a random slide:
start from slide (some item of nslides) of slideshow “name”

Jump to a random slide without playing it:
show slide (some item of nslides) of slideshow “name”

As an example here is a script to jump to a random slide without playing it.

tell application "Keynote"
activate
set no ofslides to number of slides of first slideshow
set nslides to {}
-- build a list with this number of items
repeat with n from 1 to no ofslides
set nslides to nslides & n
end repeat
-- jump to a slide
show slide (some item of nslides) of first slideshow
end tell

This is pretty fast. However, if you play the slideshow you'd have to stop after each slide, hit the run button on the script and wait for the show to start. You might be able to put in a delay and have the script automatically display a new slide every few seconds. If you have Salling Clicker you might be able to have your cell phone trigger the script to advance. Other than that, I don't know how you would communicate with your script while Keynote was playing a slideshow.

Unfortunately, the hyperlink function in Keynote doesn't allow linking to an Applescript. That would be really cool and powerful.

17" MacBook Pro, Mac OS X (10.4.7)

Posted on Sep 22, 2006 5:58 PM

Reply

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

how to randomly show slides in Keynote

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.