Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: RE: switching from Do-File Editor to Results window after sending a line of code with Execute Selection


From   Eric Booth <ebooth@ppri.tamu.edu>
To   "<statalist@hsphsun2.harvard.edu>" <statalist@hsphsun2.harvard.edu>
Subject   Re: st: RE: switching from Do-File Editor to Results window after sending a line of code with Execute Selection
Date   Mon, 4 Oct 2010 19:47:32 +0000

<>

I don't see an option to turn on the behavior you describe in the Stata (in Mac OSX) preferences.  
When running a do-file , you can add this line:

 window manage forward results

however, you mention wanting to activate the results window after running only a single line selection.  
The only ways I know to do this would be to:  (1) include the line above in the selection you are running each time;  (2)  press command(⌘) + 1 in Stata to switch to the results window after you run your selection;  or (3) include the following in an applescript that sends your selection from an external, 3rd party text editor to Stata (e.g., Vim, Text Wrangler, AlphaX, etc.   see:  http://fmwww.bc.edu/repec/bocode/t/textEditors.html  ):

tell application "StataMP"
	activate
end tell

**or send this to the shell:

osascript -e 'tell application "StataMP" to activate'

because activating the Stata application seems to default to the results window.   
Change "StataMP" above to whatever flavor of Stata you use.

There are already scripts for many of the 3rd party text editors linked above that allow you to run a  single selection/line from the do-file and then automatically switch to the results window using something similar to the 'tell' script.

- Eric
__
Eric A. Booth
Public Policy Research Institute
Texas A&M University
ebooth@ppri.tamu.edu
Office: +979.845.6754

On Oct 4, 2010, at 2:07 PM, Michael McCulloch wrote:

> Thank you, Mac OS X: 10.5.8
> 
> On Oct 4, 2010, at 12:05 PM, Nick Cox wrote:
> 
>> Please specify operating system for all questions for which operating system may be important.
>> 
>> Nick
>> n.j.cox@durham.ac.uk
>> 
>> Michael McCulloch
>> 
>> is there a way to set Stata to automatically switch the active
>> window view from
>> 	the Do-File Editor to the Results window
>> after sending a line of code with Execute Selection, as was the case
>> in my previous version of Stata (9)?
>> 
>> 
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
> 
> 
> Best wishes,
> 
> Michael McCulloch, LAc MPH PhD
> Pine Street Foundation
> 124 Pine Street
> San Anselmo, CA 94960-2674
> tel:	415-407-1357
> fax: 	206-338-2391
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/




*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index