CScript Error: Can't find script engine "LScript" for script
"hello.ls".
WScript raises an analagous error, and IE calls InitNew,
SetScriptSite, GetScriptState, SetScriptState, and Close. None of the
hosts seem to call AddNamedItem, which is what I expect would be next.
When I write my own scripting host in C++, there is no problem ---
everything works just fine.
Anyone have any suggestions?
Kudos
------------------------------------------------------
Where have you been ?
"I write my own scripting host in C++"
Where have you been ?
------------------------------------------------------
Because it is not working well, ain't it.
not because you had an opinion long ago.
------------------------------------------------------
The world will have to absorb your mess.
Not the other way around, you will find out.
<eval....@gmail.com> wrote in message
news:1189453230....@w3g2000hsg.googlegroups.com...
> When I write my own scripting host in C++, there is no problem ---
> everything works just fine.
>
So why would you try to do it in C#, adding up to
100 MB of dependencies and slowing down script even
worse than it is already? One doesn't write a script
enigine in .Net for the same reason that one doesn't
write most desktop software, drivers, disk uitilities, etc.
in .Net or Java: It's slow, uncompiled, and once removed
from the API. It's software running software running
software.
Well, PowerShell is a pretty nice scripting engine and it's written in C#.
That 100MB of dependencies includes some very useful stuff.
Are you sure it's not actually written in C++?
I know the "cmdlets" are .Net classes, but I would
guess that the shell itself is actual compiled
software.
I don't know much about Powershell, as it requires
XP SP2, .Net 2.0, and also requires submitting to the
installation of the WGA spyware. So far I haven't had any
reason to deal with any of those things. I guess that
Powershell must have some useful things for network
administrators, but frankly I'm baffled at why any significant
number of people would actually want to revert to the
primitive inconvenience of a DOS/UNIX-style command line
interface. (That's what I'm waiting for Linux to outgrow. :)
Especially when it involves so many limitations and dependencies,
and also involves learning yet again another new syntax and
set of keywords. Maybe it's nostalgia? Maybe people just
feel like they're running "close to the metal" when they
type abstruse commands into black windows?
And you yourself are running on Vista. You've paid an
extra $300+- to get 3-D techno-kitsch graphics on your
Desktop, yet you prefer to work out of a terminal
window? I don't get it.
In any case, creating "DOS 2.0" as a set of something
akin to Java applets doesn't strike me as a particularly
clever design.
The whole thing is written in C#.
>
> I don't know much about Powershell, as it requires
> XP SP2, .Net 2.0, and also requires submitting to the
> installation of the WGA spyware. So far I haven't had any
> reason to deal with any of those things. I guess that
> Powershell must have some useful things for network
> administrators, but frankly I'm baffled at why any significant
> number of people would actually want to revert to the
> primitive inconvenience of a DOS/UNIX-style command line
> interface. (That's what I'm waiting for Linux to outgrow. :)
> Especially when it involves so many limitations and dependencies,
> and also involves learning yet again another new syntax and
> set of keywords. Maybe it's nostalgia? Maybe people just
> feel like they're running "close to the metal" when they
> type abstruse commands into black windows?
GUIs are great until you have to do something more than once.
>
> And you yourself are running on Vista. You've paid an
> extra $300+- to get 3-D techno-kitsch graphics on your
> Desktop, yet you prefer to work out of a terminal
> window? I don't get it.
If you want to develop software that's "Certified for Windows Vista", you
really need to run Vista.
>
> In any case, creating "DOS 2.0" as a set of something
> akin to Java applets doesn't strike me as a particularly
> clever design.
>
Ok, "cmdlets" and "applets" both end in "lets" but, that's the only
similarity.
I'm not quite sure what you're doing, but I'll throw in my two cents.
1. First off, yes you can create a scripting engine in C#. I've even
seen some incomplete examples on the web for just this, though I don't
remember the sites. Since you can multithread in C#, you should also
be able to integrate the IActiveScriptDebug interfaces as well.
2. If you have the engine already built in C++ why not just make this
an OLE object and use this from your C#.
3. There is a lot of negative issues with the script engine - its
depracating technology and any .NET objects passed to the script need
to be visible via COM interop.
4. A better scripting solution would be to just use the .NET designer/
compilation objects provided in the framework to create true .NET code
and execute that.
5. If you're die-hard set to use a scripting engine I'd purchase one -
several are available. The one I wrote is available at www.orangesoftwaredesigns.com,
though I've not got the site completed yet - I've only recently
decided to start selling the engine. Let me know if you're interested
in that option.
For examples that work Google the following: C# Script, Dot Net
Script, NScript. Or you could just go to www.codeproject.com.