Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/ionic-framework/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在注释记号vie Applescript中显示当前时间_Applescript_Keynote - Fatal编程技术网

在注释记号vie Applescript中显示当前时间

在注释记号vie Applescript中显示当前时间,applescript,keynote,Applescript,Keynote,我想在Keynote中的幻灯片1(本例中)上显示当前时间。我发现它应该与applescript一起使用,因为在Keynote中不支持这个未来的ist Applescript表示“Keynote”发送了一个错误:幻灯片1的主体无法在类型说明符中转换。 因此,“将第一张幻灯片的主体设置为字符串时出现问题,但我看不出是哪个。 应用程序Keynote具有文档 文档有幻灯片 幻灯片有文本项 文本项具有对象文本 试一试 tell application "Keynote" repe

我想在Keynote中的幻灯片1(本例中)上显示当前时间。我发现它应该与applescript一起使用,因为在Keynote中不支持这个未来的ist

Applescript表示“Keynote”发送了一个错误:幻灯片1的主体无法在类型说明符中转换。 因此,“
将第一张幻灯片的主体设置为字符串时出现问题,但我看不出是哪个。

  • 应用程序
    Keynote
    具有
    文档
  • 文档
    幻灯片
  • 幻灯片
    文本项
  • 文本项
    具有
    对象文本
试一试

    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
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