open with specific app

this might be a very basic question, I’m not sure, it seems like I should know how to do this, but how do I open a document finder item with Applescript Editor?


tell application "Finder"
   activate
set theItem to the selection as alias

   open document file theItem of folder "Desktop" of startup disk using application file ((path to applications folder as Unicode text) & "Applescript Editor.app")
end tell


Again, sorry if this is basic, but I am just trying to improve the time it takes me to get stuff done :confused:

And yes, I do know I can right-click and do open with, but I have Butler and I want to set a hotkey for a similar task…


tell application "Finder" to set tDoc to first item of (get selection) as alias -- I chose a jpg file
tell application "Preview" to open tDoc -- must be able to open the file

wow, thanks, that was really fast!