Corby Logue
Forum Replies Created
-
Thanks Dan (albeit belated). I got it figured out.
That script will just give the total number of markers, correct?
Just wanted to clean this up for someone looking in the future. Again, I was trying to see if I could access the number of a Marker at a certain point while the script was running its routine. As for why I needed that… I have little idea what I’m doing (or I’m figuring it out as I go), so alert statements have been immense in helping me figure out where things are going wrong. I was never able to get this solved specifically, but by setting up some dummy variables that were counting, I worked around it. Pretty happy that I got everything written and it works. For now. Still one more problem to solve.
Thanks again.
-
Nope… still getting an error.
And I tried the same thing. I just turned “myComp.layer(“audio.aif”).marker.key(10)” into a var. Then tried a trace/alert statement.
Thanks though.
-
Thanks Kevin:
I’m getting an error when I use that (from the script toolkit from inside AE).
Also, while ultimately I do need to get the comment from the marker, still wondering if there is just a way to access the 10-ness (for lack of a better term) from the 10th maker. I’ve got a couple of nested loops going and I’m trying to make sure that I’m starting from the proper marker when I loop back through a second time. So I’m trying to use an alert statement to tell me what number marker the script has reached at that point.
The comment associated with the marker won’t really work, because it’s an audio file with a comment for every marker/word (done through Adobe Media Encoder). Anyway, there are around 400 markers/words, so there are too many duplicates to check the word itself. Getting the number of the marker would be way more helpful.
Thanks
-
Got it… But I thought this was where I started.
Anyway, this: “var curMarker = myMarker.keyValue(i+1);”
Needs to be inside the loop. I could have sworn, that’s where I started, but I kept getting an error when running the script.
Okay… on to the next obstacle as I feel my way around in the low light!
-
Different problem but same project… Not sure I understand why I’m not getting the behavior I think I should be getting:
var myComp = app.project.activeItem
var selLayers = myComp.selectedLayers;
var myMarker = selLayers[0].property("Marker");
var curMarker = myMarker.keyValue(i+1);for (i=0; i < 4; i++){
alert(i + " " + curMarker.comment);
}
Wasn’t getting what I wanted, so I set up the alert to tell me what the script was doing.
Anyway, the alert value for “i” counts up like it should (0… 1… 2… 3… ), but the comment is always the comment at the 5th marker (there is no marker 0, so I add one to it)?
Why is it not cycling through (e.g. first returning the comment at the first marker, second returning the comment at the second marker, etc.)?
-
Yes, I am going to answer my own questions. I promise I’m googling furiously before I ask… It’s just I keep googling.
Anyway… “text.charAt(0);” is what I needed.
-
So I’ve made a little headway, or at least I understand a little better what’s going on.
I’ve got a var called myFile for the text file.
Then I create a var for the text and use ‘readIn()’. So suppose line one in my external my text document is “Once upon a time”
var text;
text = myFile.readln();if (text == "Once")
DS ++;
Nothing happens, because the text variable is assigned the value of the entire line of text (“Once upon a time”).
So is there a way to be able to check just a word or even a single character from the text value?
-
Thanks, Dan
I found the scripting guide for CS 6 on Adobe’s website. Plenty to digest there. Fortunately, the weather here is crappy this weekend, so I should be able to keep myself occupied.
-
Dan, thanks for the reply. That you seem to reply to every post in this section is really commendable. And I do appreciate the feedback/answers.
Re #2. I’m not sure what you mean in terms of scripting. Is there another way to get scripting to control actions in After Effects? I’m not familiar. Sorry if that’s a stupid question.