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

How to use Javascript Tools? does it has one for each branch?

Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

I use jt cs5 and test a file like pic show, when run, it told document is not define.

what's wrong with it? function is as follow,

function f2c(s) {
  var test = /(\d+(\.\d*)?)F\b/g;    // 初始
  return(s.replace
    (test,
      function($0,$1,$2) {
        return((($1-32) * 5/9) + "C");
      }
    )
  );
}
document.write(f2c("Water freezes at 32F and boils at 212F."));

jsc5.JPG

TOPICS
Scripting

Views

2.2K

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

I visit http://www.adobe.com/devnet/scripting.html

and find each software has one js,

does it has one tools for each?

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
LEGEND ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

I seriously don't understand what you mean... Yes, each of the apps has its own specific reserved keywords, DOM objects etc. but then what? That script example is not doing anything in AE - it's completely different from web-centric JS. Please read the relevant scripting guides for whatever you plan on doing.

Mylenium

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
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

See this page for basics of scripting in After Effects and links to the After Effects scripting guide and addenda that Mylenium referred to.

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

what I want to know is how to use the tools to debug js?

does it has to use accompany with ae or dreamweave etc?

can it run individually?

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
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

After Effects uses ExtendScript, which is an extended form of JavaScript. It is the same language as is used for Photoshop, Illustrator, and InDesign. It is not the same language as is used for Dreamweaver, Flash, and Fireworks---though it is related. The ExtendScript Toolkit is what you use for writing and debugging ExtendScript.

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

thanks,

I know the extend meaning.

does it, too, work individually? or have to accompany ae together when debug?

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

can't access to http://www.adobe.com/go/learn_ae_aeenhancershome

and,

btw, back to top thread,

the clue is document is indefine, why take place such problem?

document class shouldn't be included in the tools plateform?

have I to redefine this object again?

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

for example, how shall I check, say temperature transforming functin listed out in the top thread, and debug by the js tools?

is it working independently or have to work accompany relative software like ae or dreamw...?

thank you all.

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
Community Expert ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

Going back to your original example, if you change document.write to alert it will execute. You apparently can use the toolkit to write and debug vanilla ExtendScript without specifying a target application. You just won't have access to any of the application-specific extensions.

Dan

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

I shall try. thanks very much.

that means document class is different alart.

the front is belong to extendscript?

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

I look them over and find that alert belong to Browser object. its a method of window object in DOM. as well as confirm, prompt etc.

wheares document belong to html object, its method of document object, such as document.write etc.

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
Community Expert ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

Exactly. Extendscript doesn't have the web/html objects, just the core components of the JavaScript language.

Dan

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

LATEST

Thank you very much, Dan,

that settles the matter.

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
Community Beginner ,
Jan 18, 2011 Jan 18, 2011

Copy link to clipboard

Copied

sorry

,I don't know how to express exactly.  see the pic.

each item has an article of js. are they same or not js?

how to express correctly in english?js1.JPG

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