samknight / slack_applescript

AppleScript bundle for Slack methods
274 stars 19 forks source link

Set "Do not disturb" not working for me #7

Closed juliagarrigos closed 4 years ago

juliagarrigos commented 4 years ago

Hi,

I'm having issues setting the "do not disturb" mode.

When running:

tell script "Slack"
    focus workspace "myWorkspace"
    set do not disturb
end tell

I get the error: Can’t make «script "Slack"» into type Unicode text.

When running

tell script "Slack"
    focus workspace "myWorkspace"
    set do not disturb until 5pm
end tell

I get the error: Expected end of line, etc. but found “until”.

Am I doing something wrong or the commands are not working?

Thanks!

samknight commented 4 years ago

Thanks for raising. I'm looking into it.

From initial investigation it's not working as documented the below is a short term fix:

set do not disturb "until 5pm"

I need to fix both the optional parameter and removing the need for the parameter to have quote marks. Going to be on the look out for some AppleScript testing tools as well I think.

samknight commented 4 years ago

I believe this can be closed now - there is possibly another related issue here which I'll keep open https://github.com/samknight/slack_applescript/issues/9