Search found 321 matches

by byronnash
March 15th, 2012, 5:10 pm
Forum: Scripts Discussion
Topic: Calling Functions with ScriptUI
Replies: 3
Views: 8809

Re: Calling Functions with ScriptUI

Thanks Paul. I worked on it some more today and moved some of the variables our of that function into global space. For some reason now, when I launch it from the Window menu it opens a panel then throws a floating window like I launched the script from the File menu. I looked at the post from the o...
by byronnash
March 15th, 2012, 8:59 am
Forum: Scripts Discussion
Topic: inPoint, outPoint, duration problems
Replies: 3
Views: 9450

Re: inPoint, outPoint, duration problems

I'm not sure I understand your question exactly but I will offer this. Time is expressed in seconds, not timecode. You must multiply by the frame duration of the comp to get the correct times.
by byronnash
March 15th, 2012, 6:53 am
Forum: Scripts Discussion
Topic: put a Solid in an other folder than default folder "Solids"
Replies: 1
Views: 6299

Re: put a Solid in an other folder than default folder "Soli

You can just move it after you create it. Here's a snippet from the docs. //create a new FolderItem in project, with name “comps” var compFolder = app.project. items.addFolder(“comps”); // move all compositions into new folder by set t ing // compItem’s parentFolder to “comps” folder f...
by byronnash
March 14th, 2012, 2:04 pm
Forum: Scripts Discussion
Topic: Calling Functions with ScriptUI
Replies: 3
Views: 8809

Calling Functions with ScriptUI

I have written many scripts but cannot seem to overcome the obstacle of ScriptUI. My problems arise when trying to call certain functions with the buttons. Some functions seem to run and some don't. My script was working somewhat earlier today but I cannot figure out what is failing at the moment. H...
by byronnash
July 7th, 2011, 6:38 am
Forum: Scripts Discussion
Topic: Get layer from selected property?
Replies: 3
Views: 8151

Re: Get layer from selected property?

Thanks Paul, that is good to know.
by byronnash
July 5th, 2011, 1:33 pm
Forum: Scripts Discussion
Topic: Get layer from selected property?
Replies: 3
Views: 8151

Re: Get layer from selected property?

OK, I found the answer. I wasn't going up high enough in the hierarchy. You can stack the parentProperty attribute.

Code: Select all

var comp = app.project.activeItem;
var mask = comp.selectedProperties[0];
maskLayer = mask.parentProperty.parentProperty;
by byronnash
July 5th, 2011, 12:58 pm
Forum: Scripts Discussion
Topic: Get layer from selected property?
Replies: 3
Views: 8151

Get layer from selected property?

How can I determine what layer a property is applied to? I have tried the .parentProperty attribute but I can't seem to get it to work. Anyone have any pointers on this? Thanks.
by byronnash
July 5th, 2011, 9:25 am
Forum: Scripts Discussion
Topic: Get Selected Vertex?
Replies: 0
Views: 5665

Get Selected Vertex?

Is there a way to tell which vertex or vertices are selected via scripting?
by byronnash
September 29th, 2010, 12:48 pm
Forum: Script requests
Topic: AFTER EFFECTS ERROR: RAM PREVIEW needs 2 or more frames to p
Replies: 3
Views: 14796

Re: AFTER EFFECTS ERROR: RAM PREVIEW needs 2 or more frames to p

You can't add menu items to AE, but you can change the prefs via scripting. It would be interesting to find out if changing the prefs through scripting has the same result on that problem as using the GUI.
by byronnash
September 29th, 2010, 12:46 pm
Forum: Scripts Discussion
Topic: Idea for a script
Replies: 1
Views: 5510

Re: Idea for a script

That would be fairly custom from what it sounds like. Although, it doesn't sound overly difficult. If each of the elements are the same as far as layers and properties, it would be easy to write a script that changes all the properties. If it is a matter of different types of comps that share some c...
by byronnash
September 29th, 2010, 11:08 am
Forum: Scripts Discussion
Topic: Setting the active, working composition
Replies: 8
Views: 21090

Re: Setting the active, working composition

Lloyd pointed me to this workaround. It seems to be working my my particular script. function openCompPanel(thisComp) { // remember the original work area duration var duration = thisComp.workAreaDuration; // temporarily set the work area to 2 frames // I know, I should use the comp fps to calculate...
by byronnash
September 28th, 2010, 1:59 pm
Forum: Scripts Discussion
Topic: Setting the active, working composition
Replies: 8
Views: 21090

Re: Setting the active, working composition

Bump.
Is this not possible?
by byronnash
September 14th, 2010, 1:47 pm
Forum: Scripts Discussion
Topic: Select / Unselect a layer?
Replies: 2
Views: 6455

Re: Select / Unselect a layer?

Disregard, it seems to be working now. Weird. :roll:
by byronnash
September 14th, 2010, 1:05 pm
Forum: Scripts Discussion
Topic: Select / Unselect a layer?
Replies: 2
Views: 6455

Select / Unselect a layer?

I tried searching for these terms but it says they are too common. So I apologize if this has been discussed.

Is there a way to select or unselect a layer via scripting? I'm trying something like this and getting an error.

Code: Select all

myLayer.selected = true;
by byronnash
June 14th, 2010, 12:30 pm
Forum: Scripts Discussion
Topic: XML scripting examples?
Replies: 1
Views: 7190

XML scripting examples?

Does anyone have any examples of reading in a XML file and using it in a script with the Extendscript tools? I have an older script that parses the file manually but just ran across the XML section in the CS4 Javascript Tools Guide. I wonder if I could overhaul this scrip by using the built in XML t...