No internet connection
  1. Home
  2. Macro and Script Help

DROPBOX script not working

By Matthew Bronleewe @Matthew_Bronleewe
    2024-03-25 19:35:39.509Z

    Title

    DROPBOX script not working

    What do you expect to happen when you run the script/macro?

    This script worked before I upgraded to Mac OS Sonoma 14.3.1 I'm running the latest version of SoundFlow.

    Are you seeing an error?

    "no popup: line 8" seems to be the error. I believe maybe the popup dialogue box has changed since the script was originally written?

    What happens when you run this script?

    When I try to run the script I get the error mentioned: "Could not open popup menu".

    How were you running this script?

    I clicked the "Run Script" or "Run Macro" button in SoundFlow

    How important is this issue to you?

    4

    Details

    {
        "inputExpected": "This script worked before I upgraded to Mac OS Sonoma 14.3.1 I'm running the latest version of SoundFlow.",
        "inputIsError": true,
        "inputError": "\"no popup: line 8\" seems to be the error. I believe maybe the popup dialogue box has changed since the script was originally written?",
        "inputWhatHappens": "When I try to run the script I get the error mentioned: \"Could not open popup menu\".",
        "inputHowRun": {
            "key": "-MpfwYA4I6GGlXgvp5j1",
            "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow"
        },
        "inputImportance": 4,
        "inputTitle": "DROPBOX script not working"
    }

    Source

    sf.ui.finder.appActivate()
    
    const popupMenu = sf.ui.finder.focusedWindow.children.whoseRole.is("AXToolbar").first
        .children.whoseRole.is("AXMenuButton").whoseDescription.is("Dropbox").first
        .children.whoseRole.is("AXMenuButton").first;
    
    
        popupMenu.popupMenuSelect({
        relativePosition: { x: 20, y: 15 },
        menuPath: ["Make online-only"],
    });
    
    

    Links

    User UID: ZJThBgjWOiYIRoV2xvzYGkmadl52

    Feedback Key: sffeedback:ZJThBgjWOiYIRoV2xvzYGkmadl52:-Ntr66mEdPBa-JVuBKuF

    Feedback ZIP: ljK2VRxG+jdPQDZezxkNxKYn0P3GJiaj+H2h+8Kdj6tgRcl0kNCzcWB6HmpdGK4ijnHcfeta7psSWDvhysXn4ZhEoKt2uZz6rG40d+V8i2gLVZgLD/7Oh+YndwMMRK7oqJumAw9rPtLLfMhDgKVyZ7KM++CrFCbdzmcS+sRJH/f9C4QtZQWbYVzY2ayNkt2DtCuQd2HVskpQbi1TVJWZgcnE/tgBQd6zcj/M0OrEcwgD2EQ5AaRU4thO9ZFoKc/auE7m5UUBjCXElWZLacScy5xAgoL0/Egwlb2xhcP66lmAOGC/YOjPzhZlTmbcd8mOQVhK5yDmSinM9SzuMuWwzw==

    Solved in post #6, click to view
    • 6 replies
    1. Hi Matthew,

      There were quite a few changes in Sonoma that required changes on the SoundFlow side. You're currently running 5.7.1, the newest version is 5.7.6 - please upgrade manually here:

      https://my.soundflow.org/

      If this doesn't fix it, you may have to change the relativePosition that you're clicking with.

      1. Thanks for the response! I did the upgrade and still having the same issue. How do I change the relative position and how do I know what to adjust it to? Newbie here!

        1. Or let me know if there's a better script / macro to do this job!

          1. Automating Finder is sometimes tricky as it tends to change with each version of macOS, so I might not be able to help much personally, unless I have the exact same version as you. What version of macOS are you running?

            I would start by setting the relativePosition to 0,0 like so:

            popupMenu.popupMenuSelect({
                relativePosition: { x: 0, y: 0 },
                menuPath: ["Make online-only"],
            });
            

            Depending on the error you're seeing and what happens, you'd need to troubleshoot accordingly. Ie. does the popup show up or does nothing seemingly happen?

            If the popup shows but SoundFlow doesn't click it, that's one problem, but if the popup never shows, it's indicative of the mouse click being simulated in the wrong place.

            If that's the case, you'll likely need to double check that this path is still correct:

            const popupMenu = sf.ui.finder.focusedWindow.children.whoseRole.is("AXToolbar").first
                .children.whoseRole.is("AXMenuButton").whoseDescription.is("Dropbox").first
                .children.whoseRole.is("AXMenuButton").first;
            

            You could try rebuilding that by using the "Pick" button in the script editor.

      2. M
        Matthew Bronleewe @Matthew_Bronleewe
          2024-03-25 20:00:30.817Z

          I changed the relative position to 0 for both the "x" and "y", like you suggested, and that did the trick! Thanks!

          Reply1 LikeSolution
          1. Amazing :)