Automator file association
Hi,
I'm trying to associate an automator script that I wrote with a certain filetype.
What I'm trying to accomplish is that when a receive an email with a file with an extension .ggg, a certain program will be used to open the file.
To make a short story long, the file is actually an argument to a java program in the form of a jar file. The command line to run the program would be
java -jar program.jar $1
where $1 will be the name of the file attached to the email, for example myfile.ggg
As far as I can tell, there isn't a way to associate the .ggg type file with the program "java -jar program.jar", so I wrote a .sh script to handle this. The shell contains the command line mentioned above.
Then, to make things even more complicated, I wrote an automator script to move the file from the email to a temporary directory and then run the script on the file in the temporary directory. I named this automator script runprogram.app
I then selected a .ggg file, changed the application that it launches to runprogram.app, and pressed "change all" to associate all files of that type with the app.
I successfully did all of this on Leopard, and the process has survived upgrades to Snow Leopard and Lion.
Now I'm trying to do the same sort of thing on a brand new computer running Lion. Everything works fine until I press the "Change All" button. When I do that, it changes the name of the application to "Application Stub" (instead of runprogram.app), and messes everything up. (If I don't press Change All, only the particular file is associated with runprogram.app, not all files with the .ggg extension)
Thanks for your help.
MacBook Pro, Mac OS X (10.6.5)