Search found 31 matches

by cardeiro
May 6th, 2010, 11:51 am
Forum: Scripts Discussion
Topic: localizing variables in script UI
Replies: 4
Views: 4420

Re: localizing variables in script UI

...Of course it will be a global variable across all scriptUI scripts like you describe but by making the object name unique you avoid the problems you describe. Functions can also be part of the object: var myScript_Data = new Object(); myScript_Data.version = 1.0; myScript_Data.scriptName = "mySc...
by cardeiro
May 6th, 2010, 6:29 am
Forum: Scripts Discussion
Topic: localizing variables in script UI
Replies: 4
Views: 4420

Re: localizing variables in script UI

Hey Lloyd, I was trying to avoid doing this as I have functions that say look at the variable VERSION in conjunction with scriptName to see if there's an update. I could feed the function an object, but its just cleaner (for me) having the function look at these variables (that need to be global to ...
by cardeiro
May 5th, 2010, 6:10 am
Forum: Scripts Discussion
Topic: localizing variables in script UI
Replies: 4
Views: 4420

localizing variables in script UI

Hi I have just started playing around with script ui to make dockable panels. The biggest problem I see is the fact that variables in scripts are global to all scripts. My scripts all have a 'VERSION' and 'scriptName' variable; which is fine when run using file->scripts, the problem is with script u...
by cardeiro
April 9th, 2010, 5:42 am
Forum: Scripts Discussion
Topic: typeName differences depending on app.language
Replies: 2
Views: 3245

Re: typeName differences depending on app.language

Dan Ebberts wrote:Like this:

if (item instanceof CompItem)

Brill-Yent! Thanks Dan (again), you are like a scripting/expressions cyborg
by cardeiro
April 8th, 2010, 1:29 pm
Forum: Scripts Discussion
Topic: typeName differences depending on app.language
Replies: 2
Views: 3245

typeName differences depending on app.language

I have a script that makes a list of all compositions in the project by testing if(item.typeName == 'Composition') A person using the script was having errors and it turned out that the language they are running after effects in would have me write if(item.typeName == 'Komposition') Is there a langu...
by cardeiro
March 19th, 2010, 11:48 am
Forum: Scripts Discussion
Topic: no random ?!?
Replies: 3
Views: 3568

Re: no random ?!?

Dan Ebberts wrote:Scripting has access to JavaScript's Math.random().


Dan

boy do I feel silly. thanks Dan, I was just calling random() like you can with expressions.
by cardeiro
March 19th, 2010, 8:52 am
Forum: Scripts Discussion
Topic: no random ?!?
Replies: 3
Views: 3568

Re: no random ?!?

so heres the ugly hack I came up with. I create a slider on my layer, put an expression with a random number generator, read valueAtTime for the slider at frame 1, if I need another, read it at frame 2 and so on, then remove the slider. ugly but it works...still cant beleive theres no random in aeSc...
by cardeiro
March 19th, 2010, 6:15 am
Forum: Scripts Discussion
Topic: no random ?!?
Replies: 3
Views: 3568

no random ?!?

cant believe I've never noticed this before. There does not appear to be a random function in the scripting language. Is this true, or am I an idiot (I did search the entire manual for it)
by cardeiro
November 11th, 2009, 3:00 pm
Forum: Scripts Discussion
Topic: scrollbar not working...docs no help
Replies: 2
Views: 3240

Re: scrollbar not working...docs no help

so I gave up and went with Nabs suggesstion of a listbox.

is it really not possible to do something as simple as adding a scroll bar to a panel and having it scroll? seems like this is a huge limitation on how you build an interface.
by cardeiro
November 9th, 2009, 10:37 am
Forum: Scripts Discussion
Topic: scrollbar not working...docs no help
Replies: 2
Views: 3240

scrollbar not working...docs no help

Hi, I have a window in my script that displays all comps in the project with a checkbox next to them. If there are lots of comps in the project the window gets so big you cant see the 'ok' button. I have been trying for several hours to get a simple scrollbar added to the panel. If I play around wit...
by cardeiro
November 3rd, 2009, 9:48 am
Forum: General Scripts Library
Topic: compsFromSpreadsheet automated versions of your comp from DB
Replies: 0
Views: 5003

compsFromSpreadsheet automated versions of your comp from DB

The compsFromSpreadsheet script allows you to make multiple versions of your compositions using data from a spreadsheet or database. The script goes through your spreadsheet line by line, making a new version of your comp with text layers in the composition receiving text from the spreadsheet automa...
by cardeiro
October 15th, 2009, 2:12 pm
Forum: Scripts Discussion
Topic: dropdown still driving me nuts...why doesnt this work
Replies: 3
Views: 3355

Re: dropdown still driving me nuts...why doesnt this work

Genius! Thanks Paul...I'd given up and resorted to an ugly hack to accomplish my task. Now I can do it right, thanks Paul.
by cardeiro
October 13th, 2009, 10:12 am
Forum: Scripts Discussion
Topic: dropdown still driving me nuts...why doesnt this work
Replies: 3
Views: 3355

dropdown still driving me nuts...why doesnt this work

okay I am trying to do something when a particular item is selected from the dropdown (the following is not my real code, just an example of what is going wrong). What the code syas to me is that if 'dog' is selected an alert box will say 'yay dog' and for everything else it should alert 'boo no dog...
by cardeiro
October 12th, 2009, 12:41 pm
Forum: Scripts Discussion
Topic: value of selected dropdown item
Replies: 1
Views: 2526

Re: value of selected dropdown item

okay...so I figured it out and it was this.selection
by cardeiro
October 12th, 2009, 11:27 am
Forum: Scripts Discussion
Topic: value of selected dropdown item
Replies: 1
Views: 2526

value of selected dropdown item

is it me or does the ui documentation from adobe totally su-huck? anyway, I am trying to implement a dropdown list and I cannot for the life of me figure out how to get the value of the selected item into the function (tried this.item, this.value, this.selected, and they all come up undefined. now I...