1. What is the proper dispIDmember name I can use to set the Language?

The ones I used did not work.



If I don't set language, I get
---------------------------
Windows Script Host
---------------------------
Script: c:\documetn and setting\smith\Local Settings\Temp\z.vbs
Line: 11
Char: 1
Error: The operation could not be completed because the script engine has
not been initialized to a valid language.
Code: 80004005
Source: ScriptControl

---------------------------
OK
---------------------------

If I try settign the language with any of the names I used I get something
like:
---------------------------
Windows Script Host
---------------------------
Script: c:\documetn and setting\smith\Local Settings\Temp\z.vbs
Line: 10
Char: 2
Error: Object doesn't support this property or method: 'Language'
Code: 800A01B6
Source: Microsoft VBScript runtime error

---------------------------
OK
---------------------------




For example:

Dim objVbscript

' Dim is_ScriptControl = "MSScriptControl.ScriptControl"
' set objVbscript = CreateObject("VBScript.Control")
set objVbscript = CreateObject("MSScriptControl.ScriptControl") ' works


' XX objVbscript.Language("VB Script Language") ' non of these 3
statemetns work
' objVbscript.Language("VBScript")
' objVbscript.Language("{B54F3741-5B07-11cf-A4B0-00AA004A55E8}")
objVbscript.Reset()




' -------------------------------- end of test script --------------------

What I am trying to do to to debug the protocol so I can call the scirpt
control from another programming language and use the script control to
execute some vbscript. Do I really need reset()?

If anyone has experience in this area, I will appreciate very much some
samples or some pointers.

Re: how to set script language on a script control by gg

gg
Fri Apr 29 21:29:22 CDT 2005

the object browser mislead me. Language is a property not function as
purported by the object browser!

objVbscript .Language = "VBScript" ' works fine
objVbscript .Language ( "VBScript" ) ' does not work

The download from Microsoft for scriptcontrol has a help file while the
built-in for winxp does not seem to have! They certainly bury that really
well from me

"gg" <gg@nomail.nil> wrote in message
news:evgHFSPTFHA.2680@tk2msftngp13.phx.gbl...
> 1. What is the proper dispIDmember name I can use to set the Language?
>
> The ones I used did not work.
>
>
>
> If I don't set language, I get
> ---------------------------
> Windows Script Host
> ---------------------------
> Script: c:\documetn and setting\smith\Local Settings\Temp\z.vbs
> Line: 11
> Char: 1
> Error: The operation could not be completed because the script engine has
> not been initialized to a valid language.
> Code: 80004005
> Source: ScriptControl
>
> ---------------------------
> OK
> ---------------------------
>
> If I try settign the language with any of the names I used I get something
> like:
> ---------------------------
> Windows Script Host
> ---------------------------
> Script: c:\documetn and setting\smith\Local Settings\Temp\z.vbs
> Line: 10
> Char: 2
> Error: Object doesn't support this property or method: 'Language'
> Code: 800A01B6
> Source: Microsoft VBScript runtime error
>
> ---------------------------
> OK
> ---------------------------
>
>
>
>
> For example:
>
> Dim objVbscript
>
> ' Dim is_ScriptControl = "MSScriptControl.ScriptControl"
> ' set objVbscript = CreateObject("VBScript.Control")
> set objVbscript = CreateObject("MSScriptControl.ScriptControl") ' works
>
>
> ' XX objVbscript.Language("VB Script Language") ' non of these 3
> statemetns work
> ' objVbscript.Language("VBScript")
> ' objVbscript.Language("{B54F3741-5B07-11cf-A4B0-00AA004A55E8}")
> objVbscript.Reset()
>
>
>
>
> ' -------------------------------- end of test script --------------------
>
> What I am trying to do to to debug the protocol so I can call the scirpt
> control from another programming language and use the script control to
> execute some vbscript. Do I really need reset()?
>
> If anyone has experience in this area, I will appreciate very much some
> samples or some pointers.
>