We are developing an application for the Mac App Store using Qt 5.2.0.Framework on MacOSX 10.9.
Here is a simple AppleScript that creates a Microsoft Excel workbook and saves to any location.
tell application "Microsoft Excel"
set myworkbook to make new workbook
set fname to POSIX file "/Private/var/root/Download/ExcelFile" as text
save workbook as myworkbook filename fname
end tell
The above script is saved as Untitled.scpt
in /Library/ApplicationScript/
.
Inside the application, we use the Cocoa framework to execute the AppleScript.
This AppleScript works in a non-sandboxed application. It fails in a sandboxed application.
My question is: How do you use an AppleScript in a sandboxed application? Or is there an alternative to this?
Kindly tell me the solution, because my project is being delayed by this.
Thanks
new.scpt
, but your Objective-C code referencesUntitled.scpt
. I know little about sandboxing, but I wouldn't expect paths such as/private
and/Library
to be writable from a sandboxed application. How is the.scpt
file saved to the target location? – Chandless