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 

Help with Applescript to move Created to Date Created

 
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
emccainaz



Joined: 28 Jun 2004
Posts: 24
Location: Tucson, Arizona, USA

PostPosted: Wed Apr 18, 2007 3:45 pm    Post subject: Help with Applescript to move Created to Date Created Reply with quote

I want to move the date from Media Info>Created to Annotations?Date Created. I have tried to adapt this from another script that is similar.

Here's what I came up with, but I can't get the Applescript to work:

tell application "iView MediaPro"
set selectedItems to selection of catalog 1
end tell

repeat with mediaItem in selectedItems
tell application "iView MediaPro"
set creation date to name of mediaItem
set event date of mediaItem to creation date
end tell
end repeat
beep 3

I get an error message when I try to run this script. Can anyone help me get this to work?

Thanks,

Edwrad McCain
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Tim Plumb
iView staff
iView staff


Joined: 18 Mar 2004
Posts: 72

PostPosted: Thu May 10, 2007 10:28 pm    Post subject: Reply with quote

Hi emccainaz,
You were very nearly there with this. Here is a modified version of your script that should do what you want. I've also added some simple error checking so you won't get an error if the catalog isn't open or a media item isn't selected.
Code:
tell application "iView MediaPro"
   try
      set selectedItems to selection of catalog 1
      repeat with mediaItem in selectedItems
         tell mediaItem
            set event date to creation date
         end tell
      end repeat
   on error
      display dialog "Select one or more media items and try again" buttons "OK" default button 1
   end try
end tell
beep 3

Regards,
Tim.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
emccainaz



Joined: 28 Jun 2004
Posts: 24
Location: Tucson, Arizona, USA

PostPosted: Fri Jun 29, 2007 2:27 am    Post subject: Reply with quote

Thanks, Tim, that script works perfectly and I have adapted it for several other things.

Edward
Back to top
View user's profile Send private message Send e-mail Visit poster's website
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