
sending a file to the Microsoft Script Editor
The Script Editor can be launched as a standalone application. On my
system it is the file "C:\Program Files\Microsoft Visual
Studio\Common\IDE\IDE98\MSE.EXE". It even has some command line
switches(navigate it to its home directory and type mse /? at the
command prompt to see the switches). Unfortunately, I couldn't get any
of the switches to work for me. Maybe you'll have better luck.
However, the fact that it can be launched as a separate app means that
it can be manipulated with the ultimate kludge, SendKeys. The jscript
script below will launch any file passed to it in the Microsoft Script
Editor.
/* Must pass a filename as an argument to the script.
May want to add error-checking to ensure that a
filename is passed to the script. The path of the
program on the Run commandline may not be correct
on your system. If path is changed, be sure to
substitute // for each / in the path name. */
with (new ActiveXObject("WScript.Shell"))
{
Run('\"C:\\Program Files\\Microsoft Visual Studio' +
'\\Common\\IDE\\IDE98\\MSE.EXE\"')
WScript.Sleep(1000)
AppActivate("microsoft development environment")
SendKeys("^+o")
WScript.Sleep(1000)
SendKeys(WScript.Arguments(0) + "{tab 2}~")
Quote:
}
...
: Perhaps this question is better suited to a VS ng:
:
: Why is it that a command-line (a shortcut, sendto) cannot specify a
file to
: opened in the Microsoft Script Editor?
: Is it impossible? Must you send it to Visual Studio instead?
:
: Thanks for any suggestions on opening existing files with the
script
: editor.
:
: