Search found 461 matches

by lloydalvarez
December 28th, 2010, 11:59 am
Forum: Scripts Discussion
Topic: Searching for a string in an external file
Replies: 15
Views: 14928

Re: Searching for a string in an external file

Try setting the encoding of the file before reading through it to see if that helps: var readOK = QT.open("r"); QT.encoding = "UTF-8"; Otherwise you can try duplicating the file then using applescript open and save the file with TextEdit or TextWrangler to see if it converts it to a text file. -Lloyd
by lloydalvarez
December 28th, 2010, 6:16 am
Forum: Scripts Discussion
Topic: Reset value and remove keyframes - possible?
Replies: 5
Views: 8345

Re: Reset value and remove keyframes - possible?

You will need to setup for loops to remove the keyames one by one on each property that has them. When you remove keyframes you probably want to do it in reverse because the numKeyframes value will change when you remove a keyframe and will affect your loop. The CS3 guide is still relevant, very lit...
by lloydalvarez
December 28th, 2010, 6:12 am
Forum: Scripts Discussion
Topic: Searching for a string in an external file
Replies: 15
Views: 14928

Re: Searching for a string in an external file

Like I mentioned before, not sure you can read in a binary file with extendscript so this is most likely what is stopping you. What are you trying to find out from the reference movie? Is there any other way to get this info?
by lloydalvarez
December 27th, 2010, 5:01 pm
Forum: Scripts Discussion
Topic: Searching for a string in an external file
Replies: 15
Views: 14928

Re: Searching for a string in an external file

If it's binary data then I am not sure you'll be able to do it with extendscript but I would try the line by line trick. To read a line at a time use readln() instead of read().

Lloyd
by lloydalvarez
December 27th, 2010, 4:36 pm
Forum: Scripts Discussion
Topic: Searching for a string in an external file
Replies: 15
Views: 14928

Re: Searching for a string in an external file

Is it hex or binary data? One thing you can try is reading one line at a time and trying the match and see if that works better. If it is hanging maybe it is too much text to load at once.

Lloyd
by lloydalvarez
December 27th, 2010, 8:55 am
Forum: Expression Discussion
Topic: doing a wiggle on a loopout range
Replies: 1
Views: 6050

Re: doing a wiggle on a loopout range

Not sure I am completely clear on what you are asking but if you want to vary the number of keyframes used for the loop then simply assign that value to a slider and keyframe that slider: //this ranged wiggle is form the examples. timeToStart = 3.2; timeToStop = 3.76; if ((time > timeToStart) && (ti...
by lloydalvarez
December 27th, 2010, 8:52 am
Forum: Scripts Discussion
Topic: Duplicate a layer and a camera and do stuff individually?
Replies: 3
Views: 5549

Re: Duplicate a layer and a camera and do stuff individually

btw, to figure out what the object name to test against is, just do an alert on the layer and it will tell you what it is within brackets like this: [AVLayer]

Keep in mind that these are case-sensitive.

-Lloyd
by lloydalvarez
December 27th, 2010, 8:51 am
Forum: Scripts Discussion
Topic: Duplicate a layer and a camera and do stuff individually?
Replies: 3
Views: 5549

Re: Duplicate a layer and a camera and do stuff individually

Hi Simma, Layers are objects so you can test to see if they are instanceof's known objects like this: var selLayers=app.project.activeItem.selectedLayers; for (var i=0; i<selLayers.length;i++){ if(selLayers[i] instanceof CameraLayer) alert("Layer: \""+selLayers[i].name+"\" is a camera"); if(selLayer...
by lloydalvarez
December 23rd, 2010, 12:42 pm
Forum: Scripts Discussion
Topic: Searching for a string in an external file
Replies: 15
Views: 14928

Re: Searching for a string in an external file

Hey Phil, If you post the code up to where it is working and then it will be easier to help you. You will need to use Regular Expressions to find the string and everything after it until the $. The regular expression for that would be this: var a = "czxdfsdjStringaskdjkjneni$asdijoaua"; alert(a.matc...
by lloydalvarez
December 22nd, 2010, 7:35 am
Forum: Scripts Discussion
Topic: Possible to slect project setup (incl folders) on startup?
Replies: 4
Views: 5898

Re: Possible to slect project setup (incl folders) on startu

Lloyd, you're a star. Absolutely brilliant. Just what I needed :). One suggestion to improve even more would be to add a "save as" dialog when the project is loaded, as you could accidentely save your project and thereby overwrite your template at the moment. Or load the template as a "untitled pro...
by lloydalvarez
December 21st, 2010, 5:17 pm
Forum: Scripts Discussion
Topic: Possible to slect project setup (incl folders) on startup?
Replies: 4
Views: 5898

Re: Possible to slect project setup (incl folders) on startu

I updated my loadProject script to v2.0 with this functionality. To can download it here: http://aescripts.com/load-project-at-startup/

Cheers,
-Lloyd
by lloydalvarez
December 19th, 2010, 4:36 pm
Forum: Scripts Discussion
Topic: Creating New Window Palettes
Replies: 1
Views: 3791

Re: Creating New Window Palettes

Are you trying to run it as a dockable panel (ie. installed in the ScriptUI Panels folder and run from the window menu)? Script installed and launched this way have to be run as panels hence the if else statement in the code that is working for you. However you should still get a window that launche...
by lloydalvarez
October 22nd, 2010, 5:35 am
Forum: Script requests
Topic: should i add folder hierachy?
Replies: 2
Views: 5784

Re: should i add folder hierachy?

Immigration imports a folder hierarchy and more: http://aescripts.com/immigration
by lloydalvarez
October 12th, 2010, 6:53 pm
Forum: Scripts Discussion
Topic: return array of folders only?
Replies: 1
Views: 4203

Re: return array of folders only?

Hello coders! I'm trying to use the getFiles method to make a list of folders and choose the last one modified. I understand that fileorfolderObject.modified() churns out a Date object which I can use, but I can't figure out how to make the getFile method to choose folders only.. Can't test this ri...
by lloydalvarez
October 12th, 2010, 6:40 pm
Forum: Scripts Discussion
Topic: Ignore Expression Errors
Replies: 1
Views: 3949

Re: Ignore Expression Errors

You could disable the expressions, update the layer names, update the expressions with the new layer names and reenable the expressions.

Lloyd