Go away a Zoom assembly utilizing AppleScript

    0
    104


    I’ve a Stream Deck and need to have the ability to hit a button and depart my present Zoom assembly.

    There is a Stream Deck plugin for Zoom that I take advantage of, however after I hit the button to go away a gathering (and am the assembly host) it kills the assembly for everybody.

    So I made a decision to attempt to script it utilizing AppleScript. Whereas I am a software program engineer, I have never used AppleScript extensively but, so I want some assist. I am additionally hoping if we do discover a answer that it may possibly assist others.

    This is what I’ve up to now:

        inform utility "zoom.us"
            activate
            
            
            inform utility "System Occasions"
                keystroke "w" utilizing {command down}
            finish inform
            
            -- Click on the "Go away Assembly" button if it exists
            attempt
                inform utility "System Occasions"
                    -- If the "Go away Assembly" button does not exist, click on the "Finish Assembly" button
                    inform course of "zoom.us"
                        -- present an alert with the title of the button
                        show dialog (title of button 1 of window 1 of utility course of "zoom.us")
                        -- click on button "Finish Assembly" of window 1
                    finish inform
                    
                    -- If it then pops up a dialog, click on Assign and Go away
                    inform course of "zoom.us"
                        show dialog (title of button 1 of window 1 of utility course of "zoom.us")
                        -- click on button "Assign and Go away" of window 1
                    finish inform
                finish inform
            on error errMsg quantity errorNumber
                show dialog "An unknown error occurred:  " & errMsg & " - Quantity: " & errorNumber as textual content
            finish attempt
            
        finish inform
        
        return enter
    

    Nonetheless, this does not fairly work — it exhibits an error which says:

    An unknown error occurred:
      System Occasions obtained an error:
      Can’t make title of button 1 of window 1 of utility course of "zoom.us" of course of "zoom.us" into kind string.
      Quantity: -1700
    

    As a result of Zoom offers you totally different buttons primarily based on whether or not you are the host or not, I am undecided the way to navigate this.

    Anybody else capable of check this and assist get it found out? I will put up an answer if I discover one, however thought it might be useful to get different concepts.

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here