I've been playing around with two different presentation tools and found the different approaches to scripting to be quite interesting. The two scripts are shown below.
tell application "A"
set title of (current slide of first slideshow) to "Hello World"
end tell
tell application "B"
activate
set theIndex to slide index of slide of view of active window
set selectedSlide to slide theIndex of active presentation
set content of text range of text frame of shape 1 of selectedSlide to "Hello World"
end tell
and the moral of the story is... "don't over engineer your code... keeping things simple with clean abstractions is always better"
No comments:
Post a Comment