sending a file to the Microsoft Script Editor 
Author Message
 sending a file to the Microsoft Script Editor

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.



Sat, 14 Sep 2002 03:00:00 GMT  
 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.
:
:


Sun, 15 Sep 2002 03:00:00 GMT  
 sending a file to the Microsoft Script Editor
Ouch, what a hack. Try PrimalSCRIPT at www.sapien.com instead.

Alexander Riedel
Senior Software Engineer
SAPIEN Technologies, Inc.


Quote:

> 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}~")
> }



> ...
> : 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.
> :
> :



Sun, 15 Sep 2002 03:00:00 GMT  
 sending a file to the Microsoft Script Editor
Thank you, mister Zackery.

I find that anything passed to it on the command-line generates an error.
Damn.

Too much GUI-mindedness, I'm afraid.


Quote:

> 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}~")
> }



> ...
> : 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.
> :
> :



Mon, 16 Sep 2002 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. trouble executing scripts in Microsoft Script Editor

2. Executing scripts in Microsoft Script Editor with Debug tools

3. Using Microsoft Script Editor with Windows Script

4. trouble executing scripts in Microsoft Script Editor with Debug tools

5. debugging a WSH-script with microsoft script editor doesn't work

6. Microsoft Scripting Editor Questions

7. Code completion in Microsoft Script Editor?

8. Microsoft Script Editor Standalone Question

9. IntelliSense with Visual Studio InterDev or Microsoft Script Editor

10. Microsoft Script Editor

11. Script Editor for Microsoft Outlook

12. Microsoft Script Editor

 

 
Powered by phpBB® Forum Software