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 

scripting event date

 
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
pedroparamo



Joined: 13 Jan 2005
Posts: 25
Location: New York

PostPosted: Fri Jun 17, 2005 3:35 pm    Post subject: scripting event date Reply with quote

How do I script the event date? I've got a script that executes and seems to work--the event log tells me that the Event Date (in the annotations) is set to the proper date and the date appears in the caption, but the Event Date is still blank in the annotations? Very strange..??

Pedro

tell application "iView MediaPro"

tell front catalog
activate

import fileRef
count media items
set currentMediaItem to result
set the people of media item currentMediaItem to thePeople
set the keywords of media item currentMediaItem to theKeywords
set the categories of media item currentMediaItem to theCategories
set the event of media item currentMediaItem to theEvent
set event date of media item currentMediaItem to theEventDate--the event date stays blank here
set the author of media item currentMediaItem to theAuthor
set the copyright of media item currentMediaItem to "Yeshiva University"
set the caption of media item currentMediaItem to thePeople & return & theCategories & return & theEvent & return & theEventDate & return & theKeywords--the event date is correct here

end tell
end tell

_________________
pedroparamo
Back to top
View user's profile Send private message
Tim Plumb
iView staff
iView staff


Joined: 18 Mar 2004
Posts: 72

PostPosted: Mon Jun 20, 2005 9:14 am    Post subject: Re: scripting event date Reply with quote

pedroparamo wrote:
set event date of media item currentMediaItem to theEventDate--the event date stays blank here


Hi Pedro,
The reason this isn't working in the Event Date field but is in the Caption field is that the former expects a valid date object to be passed into the field where as the Caption field will take any text you give it.
Try coercing the variable theEventDate into a date object with;
Code:
set event date of media item currentMediaItem to date theEventDate

Regards,
Tim.
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