I'm launching TexShop table from a statistical package. However upon launching I want it to typeset automatically to see the PDF. Now it opens the tex-file and I still have to press the typeset button to see the PDF. Is there a way to execute TexShop files upon opening a tex-file? I'm using Mac.
As far as I understood, you just want to use TeXShop to compile your document and open it afterwards, automatically. So your are not using TeXShop as an editor.
If so, you could try to change the command in your statistics package to use
pdflatex on the commandline instead of opening TeXShop.
Because I have no idea which statistics package your are using, I'm going to explain using
pdflatex on the commandline in general: Open your Terminal and navigate to your working directory using
cd <path to your dir> and call
pdflatex by simply typing:
pdflatex foo.tex && open foo.PDF
The first part
pdflatex foo.tex will compile your tex-file called 'foo.tex' and the second part of the given command
&& open foo.PDF will open the output PDF-document after compiling was finshed.
You can also pass the path of your file directly to the provided code snippet, so you don't need to navigate to your directory by hand.
If you are not able to change the run command of your statistical package as needed, maybe you could use the commandline instead of the automatically executed run or think about a self-written shell script, which does the commandline stuff for you.