Okay, here’s another thing I don’t quite understand:
repeat 10 times
tell application "QuickTime Player"
set annot_artist to full text of annotation "artist" of document 1
set annot_title to full text of annotation "information" of document 1
set annot_class to full text of annotation "description" of document 1
end tell
tell application "Microsoft Word"
tell active document
if content of text object is not annot_title & return & return & annot_artist & return & return & annot_class then
set content of text object to ""
set content of text object to annot_title & return & return & annot_artist & return & return & annot_class
--else
end if
end tell
delay 5
end tell
end repeat
What I’m trying to do is to look at the specified annotation properties in the quicktime movie that is currently playing, then display them in a word file. Eventually, I want to have this running all day and it would be used to constantly update (every 5 seconds or so) an information screen pertaining to whatever movie is currently playing.
Right now I’m just trying to get it to work for a short period of time during which I select different movies to make sure it’s working.
The problem I was having was that every time it resets the annotation, the text flashes on and off in the Word file, so I tried to add an if_then_else statement so it would only update the text if the variables had changed. Obviously, I don’t quite understand the if_then_else statement. When I try to add an “else” right before the if then and compile it, it gets rid of it. I thought “else” was used to tell the program where to go if the if statement is false.
This script runs, but the text still flashes every five seconds.
Any ideas?
Thanks,
- Bruce