2016-03-29 1 views
0
tell application "Keynote" 
     repeat 
      delay 2 -- seconds. This script does not need to run faster 
      set the_time to current date 
      set the_time to time string of (current date) -- get now() 
      set the_time to every word of the_time -- slice 
      set the_time to item 1 of the_time & ":" & item 2 of the_time -- extract fields 
      set body of the first slide to the_time as string 
     end repeat 
    end tell 
end tell 

Je voudrais montrer l'heure actuelle sur la diapositive 1 (dans ce cas) dans Keynote. J'ai compris que cela devrait fonctionner avec applescript car ce futur n'est pas supporté dans Keynote.Affichage de l'heure actuelle dans Keynote vie Applescript

« AppleScript dit que « Keynote » envoie une erreur:. Corps de la diapositive 1 ne peut pas être converti en spécificateur de type Donc, il y a un problème avec » set body of the first slide to the_time as string », mais je ne vois pas qui

Répondre

0
    .
  • application Keynote a documents
  • A document a slides
  • A slide a text items
  • A text item a un object text

Essayez

repeat 
    delay 2 -- seconds. This script does not need to run faster 
    set the_time to text 1 thru -4 of time string of (current date) 
    tell application "Keynote" 
     set object text of text item 1 of first slide of document 1 to the_time 
    end tell 
end tell