Forum Replies Created

Page 2 of 2
  • Thanks for getting back to me. Last night I came to the same conclusion but I appreciate the link that confirms it.

    What I ended up doing is implementing a “mouseover” and “mouseout” function on the panel itself that automatically updates information on the selected layer, at the very least, when you navigate the mouse over the panel. When you leave the panel or have nothing selected, some conditional messaging helps the user remember that information will refresh when the mouse hovers over the panel again.

    Would be nice to have some system wide event listeners but I realize that could open up a can of worms for normal functionality if not used responsibly.

    Thanks for taking the time!

  • Thanks for the tip on using write() and changedComp. I did not know about those functions. I’ll start some testing on my end as well. Thanks!

  • Thanks for responding Tomas! I have a working ScriptUI button that runs a function that acts on one selected comp layer only. (When clicked, it queries weather or not a layer is selected, then queries weather or not it is a comp layer, and then either executes or throws an alert indicating that only one comp layer must be selected.)

    Assuming all the conditions are met, it currently opens a new panel window and lists out information about that comp. In my particular script, a listbox is populated with all the timeline comp markers that exist inside that comp. I’m able to select one and then do something with that information.

    Right now, the interaction is:
    1. Select a comp layer
    2. Go to my ScriptUI panel
    3. Click a button
    4. New panel window pops up with information unique to that comp
    5. Select some information
    6. Click OK (and the feature is implemented)

    I’d like to streamline the process to:
    1. Select a comp layer
    2. Desired comp information automatically loads into a persistent list-box in my ScriptUI panel
    3. A button on the ScriptUI panel executes the option.

    Because the workflow requires this interaction so many times, i’d like eliminate the pop up panel and just load information on the fly right to the ScriptUI panel. I realize that this function will run every time a layer is selected, but the function is light and I don’t think it will create a huge overhead on the system. I’m just not sure if a ScriptUI panel can have a listener for clicks that are happening in another panel when it itself is not in focus.

    If this doesn’t make sense I can do a quick screen recording. Thanks so much!

  • Reuben Lara

    December 29, 2018 at 12:56 am in reply to: Expression to created a stepped interpolation on a curve

    Works perfectly, thanks!

    Reuben

  • Thanks for the ideas. Tried them and they didn’t respond as expected. In the end, it turns out ScriptUI dialogues can only have one default “OK” button and one default “cancel” button where the window returns either “1” or “0” for OK and Cancel respectively. Script UI detects if the “name” is “ok” or “cancel” to give those buttons default functionality. If multiple buttons have a “name” of “ok”, then only the first one is recognized. So, to add additional buttons that behave like the OK button (i.e. do some code and close the window), see below:

    var myWindow = new Window ("dialog");
    myWindow.add ('statictext', undefined, 'Mode:', {multiline: false});

    // some more window input options

    var additionalOKbutton = myWindow.add ("button", undefined, "Option 1", {name: "option01"});
    myWindow.add ("button", undefined, "Option 2", {name: "ok"});
    myWindow.add ("button", undefined, "CANCEL", {name: "cancel"});

    additionalOKbutton.onClick = function (){
    //execute some code
    //close window
    myWindow.close();
    }

    if (myWindow.show () == 1) {
    alert("You chose Option 2");
    //execute some code
    //window closes automatically
    }else{
    alert("You chose Cancel");
    //execute some code
    exit ();
    //window closes automatically
    }

  • Reuben Lara

    October 8, 2018 at 3:14 pm in reply to: Accessing marker.nearestKey from ExtendScript

    No wonder i’ve been banging my head. Thanks!

  • Reuben Lara

    October 8, 2018 at 1:30 pm in reply to: Return a specific value from a linear range

    Dan, thanks so much. This helped me understand how linear works under the hood.

    R

Page 2 of 2

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