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

[no subject]

. winexec /Applications/

So what you want to add to your is

qui window menu append item "stUser" "TextEdit" "winexec /Applications/"

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

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

. winexec /Applications/ /Users/someuser/

will launch TextEdit and open the file

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–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index