Hi!
I am trying to use the Qt cross-platform framework ( www.trolltech.com) to build aplications for Windows and OSX, and possibly Linux. One problem with this is that Windows (and Linux?) is using main(argc, argv[]) to pass the result of dropping-on-app or document double-click to the application to open the documents, while OSX does not. Please correct me if I am wrong. So document double-click or drop-on-app just launches the OSX application, but does not open any documents. Again, please correct me if I have missed something.
I have tried to use an applescript "droplet" to collect the drop input list and then pass this to the application, and this actually works. However, I do not know how to set this up correctly when combining the droplet executable and the Qt executable into the same bundle. I want to set the path to the Qt app in the droplet script so that it finds it properly.
Here is a script that works, but it is of course useless because of the absolute path I used for testing:
on idle (* Add any idle time processing here. *) set j51command to "/Users/bnilsson/Programming/Qt/J51Viewer/build/Debug/J51Viewer.app/Contents/MacOS/J51Viewer" do shell script j51command quit end idle
on open names (* Add your script to process the names here. *) set j51command to "/Users/bnilsson/Programming/Qt/J51Viewer/build/Debug/J51Viewer.app/Contents/MacOS/J51Viewer " & POSIX path of names do shell script j51command -- Remove the following line if you want the application to stay open. quit end open
Any comments or suggestions?
bnilsson |