I have written an in-house application to generate and save Purchase Orders. I have not been able to figure out how to set type/creator codes or document types for the app. I want to be able to double-click on a PO document and have the application launch. Right now if I double-click a PO doc Image Capture launches.
I have searched here and on the Applescript Studio Mail List and haven’t found how to do this. Hopefully I have just overlooked the information :oops: or someone here has the answer.
Thanks in advance,
Brad Bumgarner, CTA
First, define a new document-type entry in your project:
Important parts are the extension (“nlt” in the example, choose an original extension instead of “txt” or “jpg”) and the OS Type (the so-called “file type” in AppleScript). If you write a simple text file using standard IO read/write commands, the file will be a TEXT file by default.
Second… None. Build. Restart or logout and it should be done.
Thanks for the info jj. I tried it and I the program would no longer open a new document. When I would try to open a new document I got an error message saying that I couldn’t open a new document.
Then I went and did a bad, bad thing. I THOUGHT I was deleting the newly made document type, but I ACTUALLY deleted the entire target
So, after I recreate my app (shouldn’t take too long, I can copy the code from the existing app and do the same in IB) I will try again. I guess I need to read those caution alerts a little closer. D’oh!!
Thanks again (and I’ll let you know how it goes),