1

I am trying to use the Scripting Bridge to control VLC. However, I seem unable to access all methods. I generated the file using:

sdef /Applications/VLC.app | sdp -fh --basename VLC

I can access properties such as vlc.pathOfCurrentItem just fine. Even this notation works: [vlc pathOfCurrentItem];.

However, all methods seem to be grouped into a VLCGenericMethods protocol and seperate from the VLCApplication interface. [vlc stop] throws a compile-time error of: No visible @interface for 'VLCApplication' declares the selector 'stop'.

What am I doing wrong? My code is literally:

VLCApplication *vlc = (VLCApplication *)[self.application sbApplication];
[vlc stop];
Coder-256
  • 5,212
  • 2
  • 23
  • 51

1 Answers1

1

Scripting Bridge is buggy, crippled, and very prone to application conflicts. You may want to consider using AppleScript instead - the language may be crap, but it's the only supported option that knows how to speak Apple events right. The AppleScript-ObjC bridge takes most of the pain out of bridging between the two languages: here's a quick how-to.

foo
  • 3,171
  • 17
  • 18
  • This would work, but I would prefer to use the scripting bridge. If nobody else answers for a while, I will mark this as accepted. – Coder-256 Mar 03 '16 at 23:26