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