samknight/slack_applescript

Status command sometimes malforms

Closed this issue · 2 comments

Hello -- thanks for this amazing Applescript!

Occasionally, it seems that Slack malforms the /status command as /s. atus which then results in an error:

image

  • macOS 10.15.7
  • Apple Script Editor Version 2.11 (208)
  • Spotify 1.1.64.561.g71bd09eb-a
  • slack_applescript 2.0.1 Fix

Here is my full Applescript:

repeat
	if application "Spotify" is running then
		tell application "Spotify"
			set currentSong to (get artist of current track) & " – " & (get name of current track)
			tell script "Slack"
				set status currentSong with icon ":headphones:"
			end tell
		end tell
	end if
	delay 60
end repeat

However, if I close and restart Slack, the Apple script will work (just once). Subsequent attempts results in the malformed status.

Would appreciate your guidance here if you're able to shed some light, perhaps a mistake in my syntax -- thank you!

Hi I think this may have been fixed in the latest 2.0.2 version. Could you give it a try and let me know?

Thank you @samknight -- the issue appears fixed!