I asked a question in this thread, but I figure it is probably better to ask the question in its own thread.
I am running Stata on a Windows machine and want to use an external editor (in my case Sublime Text 3) instead of Stata's native do-file editor. I therefore want to use Stata automation to send commands to Stata from my editor. To do so, I tried to write a simple VBScript (which I can then call from ST3) in the following way:
The script makes Stata run the given do-file. However, as soon as the script is finished, Stata closes. My question is therefore if there is any way to execute a VBScript that supplies commands to Stata but where Stata is kept open after the script is finished. I have read the instructions at http://www.stata.com/automation/ but have not been able to find a solution and would be grateful for any help on how to solve this problem.
I am running Stata on a Windows machine and want to use an external editor (in my case Sublime Text 3) instead of Stata's native do-file editor. I therefore want to use Stata automation to send commands to Stata from my editor. To do so, I tried to write a simple VBScript (which I can then call from ST3) in the following way:
Code:
dim stataobj set stataobj=CreateObject("stata.StataOLEApp") stataobj.DoCommand("do some_dofile.do")
Comment