I work on a program designed in C++ to run on windows, but the program is being used by some of our clients running Macs by installing it with crossovers. It works fine for the most part but our email generating has a problem. I wrote code to generate an applescript that will create an email for the mac but I am having issues executing it.
Things I've tried:
1) ```
sprintf(cmd, "osascript -e 'tell app \"Finder\" to open POSIX file \"%s/%s\"'", getcwd(path, MAXPATHLEN), file);
system(cmd);
The system command never seems to execute with this method.
2) I created a .app using applescript that when run, it executes my mail generating applescript. I tried running the script and the .app with ShellExecute() but it will just open the script or .app in the AppleScript Editor and WINE explorer respectively.
I'm assuming the windows environment that Crossover is creating in its "Bottle" is preventing me from running the scripts or .app. Is there anyway to get around this and accomplish running the script or .app?