iView home page
iView Multimedia Forum Index

FAQ FAQ     SearchSearch     MemberlistMemberlist     UsergroupsUsergroups    RegisterRegister  
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Script to copy annotations to rest of selection

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    iView Multimedia Forum Index -> AppleScript
View previous topic :: View next topic  
Author Message
JohnJ80



Joined: 26 Jun 2005
Posts: 4

PostPosted: Sat Oct 22, 2005 3:47 pm    Post subject: Script to copy annotations to rest of selection Reply with quote

When I edit an image and want to keep multiple version of the same thing, the annotations wouldn't follow. So, I created this script that gets the annotations from the first picture in a selection in a catalog and copies it to all the other items in the selection.

Some of this is hacked from the provided example scripts.

No warranty express or implied, use at your own risk.

Script follows:

-- get the list of selected ID's in front window
set selectedItems to GetSelection()
set num to count of selectedItems

tell window 1 of application "iView MediaPro"
set myRecord to the annotations of the first item of selectedItems
repeat with theItem in selectedItems
set oldAnno to the annotations of theItem
set the annotations of theItem to myRecord
set newAnno to the annotations of theItem
end repeat

end tell
on GetSelection()
set selectedItems to {}
tell application "iView MediaPro"
if catalog 1 exists then set selectedItems to the selection of catalog 1
end tell
if number of items in selectedItems is 0 then
display dialog
"You need to select at least one media item in the front catalog in order to use this script." buttons {"OK"} default button
"OK" with icon 1 giving up after 10
error number -128
end if
return selectedItems
end GetSelection
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    iView Multimedia Forum Index -> AppleScript All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



  © iView Multimedia Ltd. | All Rights Reserved Privacy Policy | Copyright | Site Map