• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How can I put a marker on the time line ?

New Here ,
Feb 06, 2012 Feb 06, 2012

Copy link to clipboard

Copied

Hi,

I'm trying to set a marker on a composition timeline with a script but... I can't do it.

I easily create a marker on a layer in my composition, I easily create a marker on my composition when nested in an other comp, but I just don't find how to say, "Hey, I just want you tu put a marker on top of everything", just when you hit the " * " on your keyboard with no layer selected.

Can anyone help me ?

Thx,

See ya.

--- EDIT ---

I totally missed it when I first searched on the forum, but I found this thread : http://forums.adobe.com/thread/496748?tstart=180

Two years ago, my request was impossible to solve, is it the same now ?

---

TOPICS
Scripting

Views

2.5K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Feb 09, 2012 Feb 09, 2012

I just found, while doing something else, that in CS5 (not sure how far back it goes) you can move the timeline cursor by using .time.

myComp.time = 4;     //Moves cursor to 4 seconds.

So if you were point script to your comp, deselect all layers, then loop through your marker times, move the cursor to that time, then run the executeCommand() code I mentioned above, you could make your task possible.

Votes

Translate

Translate
Advocate ,
Feb 07, 2012 Feb 07, 2012

Copy link to clipboard

Copied

You could use the executeCommand() method with the findMenuCommandId() method:

app.executeCommand(app.findMenuCommandId("Add Marker"));

This will trigger the adding of a marker as if you clicked the option in the dropdown menus within the app. The only issue with this is it will only place a marker where the current timeline cursor is, so it would be limiting as I think you can't move the cursor itself via scripting.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 09, 2012 Feb 09, 2012

Copy link to clipboard

Copied

I just found, while doing something else, that in CS5 (not sure how far back it goes) you can move the timeline cursor by using .time.

myComp.time = 4;     //Moves cursor to 4 seconds.

So if you were point script to your comp, deselect all layers, then loop through your marker times, move the cursor to that time, then run the executeCommand() code I mentioned above, you could make your task possible.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2012 Feb 10, 2012

Copy link to clipboard

Copied

Hey,

It works just fine ! Thx for the help. I wouldn't have find it alone !

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 14, 2012 Feb 14, 2012

Copy link to clipboard

Copied

Just remember that I think Lloyd Alvarez posted somewhere that using the executeCommand function is not the most stable way to go about something. Although if it works, it works.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 14, 2012 Feb 14, 2012

Copy link to clipboard

Copied

Just remember that I think Lloyd Alvarez posted somewhere that using the executeCommand function is not the most stable way to go about something. Although if it works, it works.

Very true, it only acts like a user went and clicked a menu item, but if the same name exists more than once, it can get confused. For the most part though it holds up.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 15, 2012 Feb 15, 2012

Copy link to clipboard

Copied

What do you mean when saying "if the same name exists" ? If the same menu item exists ?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Feb 15, 2012 Feb 15, 2012

Copy link to clipboard

Copied

LATEST

What do you mean when saying "if the same name exists" ? If the same menu item exists ?

Yes, for example "File > Import > File..." and "Composition > Save Frame As > File...", both are labeled as "File..."

app.executeCommand(app.findMenuCommandId("File..."));     Wouldn't know which one you are talking about.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines