Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Run AppleScript Automatically not executing #608

Closed
mig8447 opened this issue Apr 12, 2023 · 2 comments
Closed

Bug: Run AppleScript Automatically not executing #608

mig8447 opened this issue Apr 12, 2023 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@mig8447
Copy link

mig8447 commented Apr 12, 2023

macOS version

13.2.1

MeetingBar version

4.4.0

Installation source

Homebrew

Calendars provider

macOS Calendar app

Bug description

Apple Script is not executed automatically. Executing with "Test on Next Event" works fine

Reproduction steps

  1. Enable "Run Apple Script Automatically"

  2. Select "1 minute before"

  3. Edit the script content and set it to

    on meetingStart(eventId, title, allday, startDate, endDate, eventLocation, repeatingEvent, attendeeCount, meetingUrl, meetingService, meetingNotes)
        tell application "Finder"
            activate
    
            set l_message to "Start: " & ( startDate as text ) & linefeed & "End: " & ( endDate as text )
            # if meetingNotes is not equal to "EMPTY" then
            #     set l_message to l_message & linefeed & linefeed & meetingNotes
            # end if
    
            # set response to button returned of ( display alert "Next Meeting: " & (title as text) message l_message buttons { "Cancel", "Join" } )
            set response to button returned of ( display dialog l_message buttons { "Dismiss", "Join" } default button "Join" with title "Next Meeting: " & ( title as text ) with icon caution )
            if response is equal to "Join" then
                open location meetingUrl
            end if
        end tell
    end meetingStart
  4. Click on "Test on next event" (AppleScript is executed)

  5. Create a new meeting in the calendar

  6. Wait until 1 minute before the meeting (AppleScript is not triggered and/or dialog is not shown)

Expected behavior

The dialog in the Apple Script should be shown

Screenshots/screen recordings

Current settings are as follows

CleanShot 2023-04-11 at 19 38 28@2x

CleanShot 2023-04-11 at 19 41 39@2x

Additional context

My goal with the script was to show a UI as close as possible to a modal alert so that the "notification" is in my face

@mig8447 mig8447 added the bug Something isn't working label Apr 12, 2023
@leits
Copy link
Owner

leits commented Aug 13, 2023

Hi @mig8447,
Sorry for the delay. I have tried to reproduce the issue and I got the alert!
Several releases ago there was a fix related to automatic actions. Perhaps the problem was there.
Please check your side with the latest version.

In the meantime, I will close the ticket, because the error is no longer reproduced.

@leits leits closed this as completed Aug 13, 2023
@mig8447
Copy link
Author

mig8447 commented Aug 13, 2023

This is working after an upgrade to 4.5.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants