BTT doesn't work with Spotify

Hey
When I launched the BTT app in macOS 10.14, the spotify close, and try reopen again and again but doesn't work it.
It's a bug in BTT or in Spotify?

I don't think BTT can influence Spotify at all (unless you are using some Apple Script in BTT that controls Spotify). However even then, quitting BTT should bring back everything to normal immediately.

I use "now playing" in BTT (this is an Apple Script) and yes, when I close BTT spotify it's working good again.
But i'd like to use BTT and Spotify in same time :smiley:

try to run the Apple script from the apple script editor and see if there are any error messages. There are currently some bugs with Apple Script on Mojave (not related to BTT though). I think they will be fixed with the next alphas (I'll report them to Apple)

I am actually seeing the same thing. In my BTT config, I have a few widgets on my touchbar. One of them for example displays the current running track on the touchbar, another one is just a simple play/pause button for Spotify (not such a weird system wide button, thanks Apple ... :smiley: ).

Anyway, it seems that everything using Apple Script does not work with the current BTT alpha version. For example this simple script:

if application "Spotify" is running then
tell application "Spotify"
	set currentArtist to artist of current track as string
	set currentTrack to name of current track as string
	
	set completeString to currentArtist & " - " & currentTrack
	set numberOfCharacters to length of completeString
	if numberOfCharacters > 20 then
		return text 1 thru 20 of completeString
	else
		return completeString
	end if
end tell

else
	return ""
end if

Writing this into an AppleScript with the macOS script editor works just fine, however using it in BTT leads to Spotify opening and closing over and over again (depending on how often this runs of course).

So, I'm not entirely sure if this can be explained with the AppleScript bugs in Mojave since the script actually works fine when using it with the ScriptEditor.

Your script seems to be working fine here (however I'm on High Sierra).
How are you using it exactly?

There are really still some serious bugs in the Apple Script implementation in Mojave (and in how some apps handle it). However Apple is aware of them as far as I know.

Unfortunately running it in the Apple Script editor and in BTT's widgets is not completely comparable because BTT can not run the scripts in the main app, as that would cause it to hang constantly. Also the Apple Script Editor has special privileges... Apple is currently implementing some new security measures and I believe these are currently affecting this in some cases. It's the first beta, so such stuff is expected :slight_smile: I have already prepared a detailed bug report for Apple.

//edit: tested on Mojave. Definitely a system bug, I don't think there is any workaround right now unfortunately.