AppleScript VLC relaunching bug


#1

Describe the bug

VLC launches/relaunches when its AppleScript library is referenced from within the AppleScript widget, even when the script in question is conditional (i.e. "if application "VLC" is running then..."). This appears to happen specifically when the script is pasted as text ("Enter Apple Script as Text") and does not seem to happen when the same script is selected as a file ("Select Saved Apple Script File").

Affected input device (e.g. MacBook Trackpad, Magic Mouse/Trackpad, Touch Bar, etc.):
Macbook Pro Touch Bar
VLC version 3.0.4 Vetinari (Intel 64bit)

Screenshots
If applicable, add screenshots to help explain your problem. (You can just paste or drag them here)

Device information:

  • Type of Mac: Macbook pro 13-inch, 2018, Four Thunderbolt 3 Ports
  • macOS version: Mojave 10.14.1
  • BetterTouchTool version: 2.6.6.0

Additional information (e.g. StackTraces, related issues, screenshots, workarounds, etc.):

Note: Before bug reporting, please make sure you have the latest version of BetterTouchTool and that you have already tried to restart your system :-). If you encounter a crash, please attach a crash log from the macOS Console.app from the "User Diagnostic Reports" section.


#2

That's a limitation of Apple Script (scripts entered as text need to be compiled everytime).

See https://stackoverflow.com/questions/16064957/how-to-check-in-applescript-if-an-app-is-running-without-launching-it-via-osa for possible solutions.


#3

Oh that would explain it... Thanks very much for the link!