Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Re: having Stata 9 and 10 both installed, and opening files by default with Stata 9 (not 10)


From   Phil Schumm <[email protected]>
To   [email protected]
Subject   st: Re: having Stata 9 and 10 both installed, and opening files by default with Stata 9 (not 10)
Date   Wed, 28 Nov 2007 15:54:45 -0600

On Nov 28, 2007, at 2:22 PM, David Radwin wrote:
F, are you able to right-click on a do-file and have it open up in the do-file editor (rather than than have Stata run it)?

Can anyone tell me if and how I might do this on Stata 10 for Macintosh?

Not possible, I'm afraid. Stata (when last I checked) supports only the required set of Apple Events (Open Application, Open Document, Print Document, and Quit Application). And Open Document when called on a do-file will run it -- not open it in the editor. Thus, the only way to accomplish what you want is to write a shell script that grabs the path to your selected file, creates a temporary do-file with the line:

doedit <filepath>

and then uses an Applescript to ask Stata to open this temporary file. Of course, the alternative is to get a good text editor and then set the Finder to use that editor to open files with the .do extension. This would mean that double-clicking on the file would open it for editing; you could also right-click and open the file in Stata (i.e., run it). If you decide to go this route, I would strongly suggest looking at TextMate. I can send you a Stata bundle for it, if you want.


-- Phil

*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/




© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index