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

Scripting changes

Participant ,
Jun 24, 2013 Jun 24, 2013

Copy link to clipboard

Copied

I found out this weekend in the CC Javascript Tool Guide that various little things were removed from extendscript, for example I was using addEventListener('click', ... on some buttons and 'click' doesn't seem to be available anymore.

It would really help if instead of being removed straight away things were flagged as deprecated first, and if the Extendscript Toolkit could warn us about deprecated stuff. Are there any plans to enhance the toolkit a bit? It's very useful and well integrated in the suite but a bit too minimalistic.

TOPICS
Scripting

Views

2.0K

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 ,
Jun 24, 2013 Jun 24, 2013

Copy link to clipboard

Copied

It appears to still be listed in the document maxweel. Pg. 119

Screen Shot 2013-06-24 at 6.09.17 PM.png

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
Participant ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Thanks David, I'm not sure how I managed to miss that!

And yet it doesn't seem to work in AE CC. Could anyone save this as a jsx and place it in the Scripts Panel folder to give it a try? Normally all controls should trigger the action but in my case only 'mousedown' works in CC.

function Test(dlg)

{

    var btnCallback = function (e) { alert(e); };

    dlg.btnPnl = dlg.add('panel', [0, 0, 100, 110], 'Click us');

    dlg.btnPnl.btn1 = dlg.btnPnl.add('button', [10, 10, 90, 30], 'click');

    dlg.btnPnl.btn1.addEventListener(   'click',

                                                        btnCallback,

                                                        false);

    dlg.btnPnl.btn2 = dlg.btnPnl.add('button', [10, 40, 90, 60], 'mouseup');

    dlg.btnPnl.btn2.addEventListener(   'mouseup',

                                                        btnCallback,

                                                        false);

    dlg.btnPnl.btn2 = dlg.btnPnl.add('button', [10, 70, 90, 90], 'mousedown');

    dlg.btnPnl.btn2.addEventListener(   'mousedown',

                                                        btnCallback,

                                                        false);

}

Test(this);

I'm sure that this worked in CS6, am I doing something silly?

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 ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Trying it now.

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 ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

It launches fine for me in AE CC, OS X 10.8.2. I get feedback only on the mousedown button, not the other two.

Also your code above assigns button 2 twice, so I changed the third one to 3 on my end.

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
Participant ,
Jun 25, 2013 Jun 25, 2013

Copy link to clipboard

Copied

Thanks David, you're right, btn2 is overwritten but that shouldn't affect the behaviour of the window.

I tried it in CS6 again and the three buttons trigger the function as expected, I guess I should report the bug now.

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
Explorer ,
May 24, 2017 May 24, 2017

Copy link to clipboard

Copied

LATEST

Right now is May of 2017...

I recently meet the same "mouseup" problem while I using onDraw function.

Can Anyone give me suggestion that I can solve this problem?

I tried this

  1. //Buttons 
  2. btn1 = wborda.add ("iconbutton", [0,0,0,0], ScriptUI.newImage (icons.a1, icons.b1, icons.c1, icons.d1),) 
  3. btn1.location = [0, 0

Its work fine, but I don't like the button border, especially I have no way to get rid of it in 2017 floating window.

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