Page 1 of 1

Script advice

Posted: January 24th, 2013, 7:35 am
by )orgen
Hi, I'm attempting to create a ui panel for our promo producers where they can input data into set layers in a project and replace a videofile. They should also be able to send the project to render in the background and I found a script for that.

Being new to scripting I have a few questions;

Why does this work
alert(theComp.layer(1).text.sourceText.value;
and not this?
theComp.layer(1).text.sourceText.value="what?";

How do I reference a comp or layer based on name and not index?

Can I get a comp to highlight based on a dropdownlist?

Can I get the script to open a new project based on a dropdownlist?

I hope someone can help. Thank you! ;)
Jorgen

Re: Script advice

Posted: January 24th, 2013, 3:10 pm
by )orgen
Ok Im starting understand how little I actually understand about this, but at least figured out how to set the text value:

app.project.item(1).layer(1).property("sourceText").setValue(newText);

Would still appreciate any input on the other two questions!

Re: Script advice

Posted: January 25th, 2013, 3:16 am
by )orgen
Yess...finally starting to figure this out, cancel those questions ;)

Re: Script advice

Posted: January 25th, 2013, 4:14 am
by )orgen
Can I start a ram preview with predetermined settings from a script?

Re: Script advice

Posted: January 25th, 2013, 9:04 am
by drockne
I know very little on how to use this command, but one of the scripts I wrote uses this to activate a ram preview. Best of luck. Let us know how it works.

thisComp.ramPreviewTest("",1,"");

Re: Script advice

Posted: February 13th, 2013, 4:02 am
by )orgen
That works great, thank you drockne!!