I am trying to create a simple application with MonoMac and have to run an apple script to access playlist information from different media players (see my previous question ).
I decided to try MonoMac because I am very familiar with the development of C # and .net, and there is a good implementation of Websocket.
Unfortunately, for NSAppleScript, there seems to be no working shell. I tried Deploying Frederic Forjans and tried using monobjc .
The Frederick shell class doesn't even compile when I use its 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 instance NSString. However new NSDictionary();, which is in the same assembly, works great.
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 efficient way to execute Apple scripts in a mono environment?
Zebi source
share