I am trying to create a simple app with MonoMac and need to execute apple script to access playlist information from different media players (see my previous question).
I decided to give MonoMac a try because I am very familiar with C# and .net development and there is a nice Websocket implementation.
Unfortunately there seems to be no working wrapper for NSAppleScript. I tried Frederic Forjans implementation and tried to use monobjc.
Frederics wrapper class does not even compile when I use his code I get the following exception:
Unhandled Exception: System.IO.FileNotFoundException: Could not load file or assembly 'MonoMac, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies. File name: 'MonoMac, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'
when creating a new NSString
instance. However new NSDictionary();
which is located in the same assembly works fine.
When using monobjc I get the following error:
Unhandled Exception: System.TypeInitializationException: An exception was thrown by the type initializer for Monobjc.ObjectiveCRuntime ---> System.EntryPointNotFoundException: monobjc_install_bridge at (wrapper managed-to-native) Monobjc.NativeMethods:InstallBridge () at Monobjc.ObjectiveCRuntime..cctor () [0x00000] in :0 --- End of inner exception stack trace --- at CocoaApplication1.Program.Main () [0x00000] in :0
Can anyone suggest a simple and working way to execute apple scripts in a mono environment?