Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

[no subject]



. winexec /Applications/TextEdit.app/Contents/MacOS/TextEdit

So what you want to add to your profile.do is

qui window menu append item "stUser" "TextEdit" "winexec /Applications/TextEdit.app/Contents/MacOS/TextEdit"

Stata is not a bundle so it is possible to launch another instance of Stata by
specifying the path of the application

. winexec /Applications/Stata/StataSE

Don't forget that Stata will take command line arguments (see
http://www.stata.com/support/faqs/mac/advanced8.html#startup).

You can also pass arguments to applications launched by -winexec- (assuming
they will accept them).  For example,

. winexec /Applications/TextEdit.app/Contents/MacOS/TextEdit /Users/someuser/myfile.do

will launch TextEdit and open the file myfile.do.

You must specify the absolute path to the file though.  Stata can't resolve
the path for you because it has no idea the argument you're trying to pass is
a path.  If you read [R] Shell, you'll notice a typo.  We tried to say that
you could not use ~ to specify your home directory when using -winexec- but it
came out as a space.

> When would I use the suggested script:
> tell application "Stata"
>      activate
>      open file myfile
> end tell




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