macmedic13 Posted August 5, 2010 Posted August 5, 2010 So I've been trying to figure this out for 3 hours now, I have no idea what is going on. Hope that you guys can help. I think this is the right forum since it is a calculation. If I'm in the wrong area please forgive me. So here is the script, very basic. I'm looking to capture video to a time and date stamped file in a predetermined folder location. For this I'm using the Troi file plugin and the Grabber plugin. Set Variable [ $filename; Value:BOSIS Basic::File Location & Get ( CurrentTimeStamp ) & ".mov" ] Set Field [ BOSIS Basic::Video File; Grab_OpenMovieGrabWindow( "-Unused" ; "QTKit"; "Built-in iSight" ; "$filename") ] I've run it through the debugger. The variable is evaluating as expected. But the field calculation won't use it. It creates the file name $filename? Have I done something or is it Grab_OpenMovieGrabWindow can't evaluate the variable?
macmedic13 Posted August 6, 2010 Author Posted August 6, 2010 Thanks for the assist. I have the variable working. now, but when I try to add it to the calculation I'm getting an error saying there is a no such directory? So how should I structure the file naming part of the function. This is what I have currently. Set Variable [ $filename; Value:Get ( CurrentTimeStamp ) & ".mov" ] Set Variable [ $savedir; Value:BOSIS Basic::File Location ] Set Field [ BOSIS Basic::Video File; Grab_OpenMovieGrabWindow( "-Unused" ; "QTKit"; "Built-in iSight" ; $savedir & $filename ) ] I have the directory I want to use in a text field. But I'm still getting an error saying it can't find the directory. Thoughts?
Raybaudi Posted August 6, 2010 Posted August 6, 2010 Get ( CurrentTimeStamp ) returms a string that can't be used as a part of a file name: there are some not allowed chars. Try: Filter ( Get ( CurrentTimeStamp ) ; " 1234567890" )
bruceR Posted August 6, 2010 Posted August 6, 2010 I agree with raybaudi; but I think further explanation would be helpful. Get(currentTimeStamp) returns something like this. Note the slashes; they will be interpreted as folders if used for a file path. 8/6/2010 2:20:17 PM raybaudi's suggested function returns something like this: 862010 21814 But it seems to me a more useful result is something like this: 20100707.152305 You can make your own calc or use a custom function like this: http://www.briandunning.com/cf/392 It returns a nice readable, sortable, no-folder-conflict format like this: 2006-01-09_14-05-00
Recommended Posts
This topic is 5217 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now