No internet connection
  1. Home
  2. How to

Dolby Atmos Renderer Mouse Click Relative to UI Element

By Michael Keeley @Michael_Keeley
    2021-03-28 15:51:42.843Z

    Hi all, there are several of us that would love to see if it is possible to get Mouse Click Relative to UI Element working on the Dolby Atmos Renderer.
    Currently I’m doing a bunch of stuff with press keys. But there are some things for ex entering in TC for punching in and out that would be really great to have set up with a push of a button.

    When I try to get that set up with Mouse Click Relative to UI Element it won’t work. Is there a possible fix for this?

    Thanks so much!!

    Solved in post #15, click to view
    • 16 replies
    1. When I try to get that set up with Mouse Click Relative to UI Element it won’t work

      Can I get you to quote your script here that you're using? Which part about it doesn't work (what does actually happen vs what did you expect to happen)?

      Generally, Mouse Click Relative to UI Element should work in all apps, so I wonder if it's because it's being set up incorrectly or if there's something specific to the Renderer.

      1. For future reference, please use the "Script Help" workflow here as it guides you on how to embed macros/scripts into the question so it's easier to help :)

        1. MMichael Keeley @Michael_Keeley
            2021-03-28 20:40:36.579Z

            Copy will do. Here is the script. Is there anything that I'm doing wrong here?

            Thx

            quoted text

            sf.ui.app("com.dolby.atmos.renderer").mainWindow.mouseClickElement({
            relativePosition: {"x":1023,"y":98},
            anchor: "TopCenter",
            });

            quoted text

            1. This looks correct, provided that you want to measure from the horizontal center (in x-coords) of the top of the window. Normally people would measure most things from the top left corner, but there are cases where you want to measure from other anchor points.
              But to figure out if this is wrong or not, I would need to know what you're trying to do and what you're experiencing when running this code :) I can't guess it.

              For example, if you show us a screenshot in 1x1 resolution with a description of the button you're trying to press, it'd be easier :) But just from the code and with no description of what's actually happenning when you run it, it's impossible to say if it's correct code or not.

              1. MMichael Keeley @Michael_Keeley
                  2021-03-28 21:03:03.781Z

                  Copy here you go with this command I'm trying to toggle the Mute button. Also fyi when picking the UI elementl. On the Dolby Renderer it is only letting me choose the entire screen and not individual sub boxes like PT.

                  1. MMichael Keeley @Michael_Keeley
                      2021-03-28 21:04:36.988Z
                      1. Right. From this it looks like you're incorrectly using TopCenter - you should use Top Left anchor.

                        The whole window being highlighted is a limitation in the Renderer and expected.

                        sf.ui.app("com.dolby.atmos.renderer").mainWindow.mouseClickElement({
                            relativePosition: {"x":1023,"y":98},
                            anchor: "TopLeft",
                        });
                        
                        1. I'd recommend this tutorial to learn how to use this:

                          1. MMichael Keeley @Michael_Keeley
                              2021-03-29 14:58:00.756Z

                              Thanks yes I’ve watched this. I originally used the left anchor and it has the same result and doesn’t work.

                              1. Gotcha. Besides adding an application activate main window action before this call I probably can't help much since I don't have the renderer myself.

                                1. @Ivan_Markovic - I think you have this working, right? Maybe you can help Michael.

                                  1. I think @Sreejesh_Nair @Sreejesh_Nair2 may also be using this :)

                                    1. This is the code I would put in front of your script:

                                      sf.ui.app("com.dolby.atmos.renderer").appActivateMainWindow();
                                      

                                      To make sure that the renderer is focused before you simulate the mouse click.

                                    2. In reply tochrscheuer:
                                      IIvan Markovic @Ivan_Markovic
                                        2021-03-30 18:05:40.394Z

                                        I made it work somehow, it was pretty straightforward actually. But then I switched to the keyboard shortcuts they added in the new version of the renderer so I don't use it anymore.

                                        This is the screenshot when I made it work:

                                        ReplySolution
                                        1. MMichael Keeley @Michael_Keeley
                                            2021-04-01 04:58:16.485Z

                                            Ivan Thank you that's it. It needed the activate app's main window before mouse click relative to UI. I've switched a bunch of stuff over with the new quick key commands as well. But now with this I can select punch in and out. Which is huge when having to deal with crazy qc notes..
                                            @Sreejesh_Nair this is what I was missing. It now works great!

                                            Thanks @chrscheuer !!

                                            1. IIvan Markovic @Ivan_Markovic
                                                2021-04-05 18:27:28.810Z

                                                Happy to help!