leits / MeetingBar

🇺🇦 Your meetings at your fingertips in the macOS menu bar
https://meetingbar.app
Apache License 2.0
4.44k stars 192 forks source link

Bug: Run AppleScript automatically doesn't work #480

Closed mega-joe closed 1 year ago

mega-joe commented 2 years ago

App version 4.0.5 Installation source

Describe the bug "Run AppleScript automatically" doesn't fire. I have it set to "5 minutes before" with the checkbox on. If I click on "Test on next event" the AppleScript properly executes. But 5 minutes before the meeting, nothing happens. The AppleScript is:

on meetingStart(eventId, title, allday, startDate, endDate, eventLocation, repeatingEvent, attendeeCount, meetingUrl, meetingService, meetingNotes)
    tell application "Finder"
        activate
        set headers to title
            set myMessage to "FIVE minutes until it starts"
        display alert headers message myMessage as critical buttons {"OK"} default button "OK"
    end tell
end meetingStart

To Reproduce Steps to reproduce the behavior:

  1. Check the "Run AppleScript automatically" on the Advanced tab
  2. Select "5 minutes before" on the drop down next to it
  3. Click "Edit script" and add the code above
  4. Save the script to the correct (default) location
  5. Click "Test on next event" and confirm that it is working (it is)
  6. Wait until 5 minutes before next event (nothing happens)

Expected behavior Alert should fire 5 minutes before the next meeting

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

esahin90 commented 2 years ago

Same for me with the same hardware. I set it to 1 minute before the meeting.

Desktop:

▶ brew info meetingbar
meetingbar: 4.0.5
https://github.com/leits/MeetingBar
/opt/homebrew/Caskroom/meetingbar/4.0.5 (124B)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/meetingbar.rb
==> Name
MeetingBar
==> Description
Shows the next meeting in the menu bar
==> Artifacts
MeetingBar.app (App)
==> Analytics
install: 391 (30 days), 1,191 (90 days), 4,156 (365 days)
mega-joe commented 2 years ago

I'm not sure what changed, but it appears to be working now. I think if you use the "Test on next event" button, then the next event doesn't fire at the scheduled time (perhaps because it already fired with the text button?). But just leaving it on beyond that and the scripts are running now.

esahin90 commented 2 years ago

For me it is still not running, also after hitting the Test-Button :(

will check again with the new version

leits commented 1 year ago

@esahin90, did you have time to look at this in the new version?

leits commented 1 year ago

As there was no feedback, I will close the issue now. Feel free to reopen the issue again.