Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions What’s wrong with my script?

  • What’s wrong with my script?

    Posted by Francois Germain on March 9, 2015 at 6:31 pm

    Hi guys. I’m new to javascripting. I just can’t figure why it doesn’t alert “Hello World” when I click OK. It’s probably right in face but i just can’t see it.

    var myWindow=new Window(“dialog”,”My Window”);
    myWindow.okButton = myWindow.add(“button”);
    myWindow.okButton.text=”OK”;
    myWindow.cancelButton = myWindow.add(“button”);
    myWindow.cancelButton.text=”Cancel”;
    myWindow.show();

    myWindow.okButton.onClick = function () {
    alert (“Hello world”);
    myWindow.close();
    }

    thanks

    Francois Germain replied 11 years, 2 months ago 1 Member · 1 Reply
  • 1 Reply
  • Francois Germain

    March 9, 2015 at 6:37 pm

    Hey I just found it!

    var myWindow=new Window(“dialog“,”My Window”);

    it is supposed to be window or palette

    Thanks anyway guys

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy