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

Reveal Selected Clip in Finder issue with final step.

By Kaspar @Kaspar
    2024-03-11 15:07:29.135Z

    Title

    Reveal Selected Clip in Finder issue with final step.

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

    Reveal Selected Clip in Finder.

    Are you seeing an error?

    11.03.2024 15:05:05.33 [Backend]: Logging error in action (01) WaitForPopupMenuAction: Popup window was not found after waiting 2000 ms Logging error in action (01) OpenPopupMenuFromElementAction: Popup menu was not found Logging error in action (01) PopupMenuSelectAction: Could not open popup menu

    11.03.2024 15:05:05.33 [Backend]: !! Command Error: Reveal Selected Clip in Finder PLUS Video - KASPAR PT [user:ckz70n60t00014j10r2sz2902:clslxwzkj00006010xiq6oawg]:
    Could not open popup menu (Reveal Selected Clip in Finder PLUS Video - KASPAR PT: Line 59)
    Popup menu was not found
    Popup window was not found after waiting 2000 ms

    What happens when you run this script?

    Completes most of the script fine but is not right clicking and selecting 'Reveal in Finder' once the clip is attentioned in the clip list.

    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": "Reveal Selected Clip in Finder.\n",
        "inputIsError": true,
        "inputError": "11.03.2024 15:05:05.33  [Backend]: Logging error in action (01) WaitForPopupMenuAction: Popup window was not found after waiting 2000 ms\nLogging error in action (01) OpenPopupMenuFromElementAction: Popup menu was not found\nLogging error in action (01) PopupMenuSelectAction: Could not open popup menu\n\n11.03.2024 15:05:05.33  [Backend]: !! Command Error: Reveal Selected Clip in Finder PLUS Video - KASPAR PT [user:ckz70n60t00014j10r2sz2902:clslxwzkj00006010xiq6oawg]:\nCould not open popup menu (Reveal Selected Clip in Finder PLUS Video - KASPAR PT: Line 59)\n    Popup menu was not found\n    Popup window was not found after waiting 2000 ms",
        "inputWhatHappens": "Completes most of the script fine but is not right clicking and selecting 'Reveal in Finder' once the clip is attentioned in the clip list.",
        "inputHowRun": {
            "key": "-MpfwYA4I6GGlXgvp5j1",
            "title": "I clicked the \"Run Script\" or \"Run Macro\" button in SoundFlow"
        },
        "inputImportance": 4,
        "inputTitle": "Reveal Selected Clip in Finder issue with final step."
    }

    Source

    sf.ui.proTools.appActivate();
    
    // Open Rename, copy Filename and close Rename
    
    sf.ui.proTools.menuClick({
        menuPath: ["Clip","Rename..."],
    });
    
    sf.ui.proTools.menuClick({
        menuPath: ["Edit","Copy"],
    });
    
    sf.ui.proTools.focusedWindow.buttons.whoseTitle.is('OK').first.mouseClickElement();
    
    
    // Wait
    
    sf.wait({
        intervalMs: 500,
    });
    
    
    // Open Find from Clips List, Paste Filename and close Find
    
    sf.keyboard.press({
        keys: "cmd+shift+f",
    });
    
    sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.elementWaitFor();
    
    
    sf.ui.proTools.menuClick({
        menuPath: ["Edit","Paste"],
    });
    
    
    sf.ui.proTools.windows.whoseTitle.is('Find Clips').first.buttons.whoseTitle.is('OK').first.mouseClickElement();
    
    
    // Go to the beginning of the clip, select it to make it appear in Clips View
    
    sf.keyboard.press({
        keys: "l",
    });
    
    sf.keyboard.press({
        keys: "ctrl+shift+tab",
    });
    
    sf.wait({
        intervalMs: 1000,
    });
    
    
    // Reveal in Finder 
    
    var selectedClipRows = sf.ui.proTools.mainWindow.clipListView.getElements('AXSelectedRows');
    
    selectedClipRows[0].children.allItems[1].children.first.popupMenuSelect({
        isRightClick: true,
        menuPath: ['Reveal in Finder'],
    });
    

    Links

    User UID: VsW63KQlOvQ4pS3VRklEUcKKQz42

    Feedback Key: sffeedback:VsW63KQlOvQ4pS3VRklEUcKKQz42:-Nsi2Txug_hlq38SnmdL

    Feedback ZIP: gsjwpvR42Iq4Vgbcr3eCX6pE3ImxrFD9E4kwxq/7SF9ibI8oQPvwH5c7qoW55pICILizyRRbDHUagePMnCDXBoOQCKAVS5ODY6xH307f+JfJHzssfIrxydhJWLvB6ac63vrQ72HJg/taR7Xn1fKlJQakB5KKaZ7T7Yh3966u/bScYQbGNV+zpWZzMR27+1i/ggJC6oHeifF2dok4YjZXZW742YCfRpObyllJmsKhP8YTVy7jN/nbFM5rcuFWPb2Jq1kN6Y0zmXskMi/vYDibVkOZEeaWZnPwQ+OFvRhN76vzmgNNu9ffeb1nQUMao7i0raOClnLNBDjgq0c7zIp5Yv6D2R7IHVaxXLO993dlX4o=

    Solved in post #4, click to view
    • 5 replies
    1. Hi Kaspar,

      It looks like you're running a quite old version of SoundFlow. My first suggestion would be to make sure to update to 5.7.4 here:

      https://my.soundflow.org/

      Note that instead of simulating a right click directly on the row, it would be better to click on the popup menu button for the whole clip list (top right, above clip list).

      1. KKaspar @Kaspar
          2024-04-17 11:58:35.239Z

          Hi Christian,

          Thanks we've updated soundflow now, however, I wouldn't be able to use the popum menu button for the whole clip list as it doesn't have the necessary 'Reveal In Finder' menu Item.

          I thought an alternative way of doing it which I've asked about on the post below but it hasn't had any traction:

          1. If you're on a new-ish version of Pro Tools, you can do the following to reveal the selected clip in the timeline in Finder:

            
            var path = sf.app.proTools.getFileLocation({
                fileFilters: ['SelectedClipsTimeline'],
            }).fileLocations[0].path;
            
            if (!sf.file.exists({ path: path, }).exists)
                throw `Couldn't find file`;
            
            sf.system.exec({
                commandLine: `open -R "${path}"`,
            });
            
            Reply3 LikesSolution
            1. KKaspar @Kaspar
                2024-04-19 14:02:23.962Z

                That works a charm thanks!

                1. In reply tochrscheuer:
                  BBen Rauscher @Ben_Rauscher
                    2025-01-18 04:24:04.683Z

                    Where has this been all my life!?