![]() ![]() ![]() You would end up with something the following (which seems to be working for me). You just have to put in there a similar AppleScript piece of code with "on run", as well as "on open inputfile" and do the appropriate adjustments. It is easy to have your VI application also open by double clicking. Please let me know if this script can be improved to handle that case, or in any other ways. Regarding your problem that " Unfortunately, the one thing I haven't figured out is how to get it to open without an input file, so to start a new text file I have to go to the Terminal and type vi filename. ![]() Unfortunately, the one thing I haven't figured out is how to get it to open without an input file, so to start a new text file I have to go to the Terminal and type vi filename. I also checked the Change All box back in the Get Info window. Select that, and a window will open where you can choose your saved application (check the Always Open With box, too). Under Open With, at the bottom of the pull-down menu, is Other. To use your new application to open any text file, control-click on a text file and choose Get Info from the pop-up menu. Tell application "System Events" to tell process "Terminal" to keystroke "t" using command downĭo script "vi " & quoted form of POSIX path of inputfile in selected tab of the front windowĬopy it into Script Editor, and save it as an Application called VI.
0 Comments
Leave a Reply. |