[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: RE: TextEditor Automation

From   Nick Winter <>
Subject   Re: st: RE: TextEditor Automation
Date   Sun, 03 Feb 2008 13:43:11 -0500

It opens up TextPad as the front-most window, in whatever state it would have opened anyway. So if the TextPad window was maximized the last time it was shut down, it will be maximized when run by tp.ado.

Another route would be to use a scripting language (I like AutoIt) to invoke and maximize your text editor.


Nick Cox wrote:

Nick -> Nick: But _maximized_?
Nick Winter

I use the following program to automate opening up my editor (TextPad) with a specified file to edit. Presumably code from this could be modified to simply open up the editor automatically.

This program lets me type "tp myfile.ado" to open up -myfile.ado- in the

editor. The -findfile- line means that I can load up an ado file even if I'm not in its directory, as long as its along the ado path.

--Nick Winter

program tp
version 9.1
qui findfile `1'
local fn `r(fn)'
local fn : subinstr local fn "/" "\" , all
winexec "c:\program files\textpad 4\textpad.exe" "`r(fn)'"

Martin Weiss

I was wondering whether it is possible to have the open
favorite texteditor in a maximized window automatically. gives advice on
handle editors to edit do-files. I cannot find a section on passing
line arguments to the winexec command to have it open the editor
though. Any ideas?
*   For searches and help try:
Nicholas Winter                                 434.924.6994 t
Assistant Professor                             434.924.3359 f
Department of Politics         e
University of Virginia w
PO Box 400787, 100 Cabell Hall
Charlottesville, VA 22904
*   For searches and help try:

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