I just ran into the strangest of problems when I was working on some AppleScript that deals with VLC and I think this must be some sort of bug. I have managed to break down the problem into the simplest macro.
Consider this macro:
vlc_bug.kmmacros (1.4 KB)
As you can see, it should simply return
1 and leave VLC alone, as the
else condition will never be true. The problem: Whenever I run this macro (or any macro with an AppleScript mentioning VLC), it returns 1 and it launches VLC.
This happens both in KM 7 and KM 6. In KM 6 however (where I ran into this problem initially) it gets even stranger: Even selecting this macro in the KM Editor, without running it, launches VLC (which btw. does not happen, when the AppleScript action is collapsed).
So, I have no idea, what's going on. Is this some sort of pre-compiling causing VLC to launch? (I have no idea really what pre-compiling is ...) This does not happen with other apps that are used in AS in the same way and it also does not happen, when I use the same script in the AppleScript Editor for example.
Does anybody know, what is going on and how I can avoid VLC launching?