tell application "Finder" to open alias "path:to:file.txt" using application file id "com.apple.textedit"
This should open the specified file using Apple’s TextEdit. If it’s a different application, simply guess it’s CFBundleIdentifier or CFBundleSignature (ie, “com.apple.safari” for Safari, “com.transtex.texeditplus” for Tex-Edit Plus, etc.).
If you wish the changes being applied globally, the fast way is using Finder’s Info window, then Open-using, then choose the app from the popup, then click change-all.
And, if you wish this being done programmatically, ask again
No. You allways “tell” to the Finder to open [given file] using [specified application]. So, if you wish a .rtf file (using a POSIX path specification instead of an “alias”) using Word, it would be something as:
tell app "Finder" to open ("/fun.txt" as posix file) using application file id "com.microsoft.Word"
Just copy-paste the code into a Script Editor’s window (“/Applications/AppleScript/Script Editor.app”), and click the green button with the rigth arrow. If you wish a double-clickable application, just save as application (from the Script Editor itself).
Well, then it’s now time to explain what you really need. If I understand, you are trying to show a message (instructions or whatever) every time someone opens a given app (ie, iMovie) → ?
OK. Then, my advice would be create an app called “Launch iMovie” which both functions: show the message, launch iMovie. To launch iMovie:
launch application "iMovie HD"
To show the message, you can use the code above (that is, opening a .rtf file using a given app). Depending on the nature of the message, you can use a simple “display dialog”. Eg:
And, depending on your coding skills, you could quickly setup a little AppleScript Studio application displaying the .rtf file (no need of using Word nor a third-party app), then launching later iMovie HD. Ie: http://bbs.applescript.net/viewtopic.php?id=10123