Adding stuff to JavaScript

  • Thread starter Thread starter jodleren
  • Start date Start date
J

jodleren

Hi

We use JavaScript for some of our machinery, in order to be able to
create device specific code.

But we have 5 functions we would like to add to JS. This means, we
need to hook into the chains somewhere.

Have anyone tried this in C#?

WBR
Sonnich
 
We use JavaScript for some of our machinery, in order to be able to
create device specific code.

But we have 5 functions we would like to add to JS. This means, we
need to hook into the chains somewhere.

Have anyone tried this in C#?

Is this a Web question? Could you be more specific?
 
Is this a Web question? Could you be more specific?

It is not a web question.

On our machines, when have an IButton (from Dallas or Maxim). When a
new "thing" is attached to our machine, we can read the IButton, and
we get e.g. a file with JavaScript.
The idea is, that with one programme, we have a number of functions
specific for the "thing".
In JavaScript we have functions such as "open" and "close" etc, which
can be different for each item.

By running the JS, and adding our interface into the chain, we can
have some extra command which works with out hardware - and by that
with each item attached.

So, we read JS from an Ibutton (done), execute some JS, which has a
"callback" for certain commands to our programme

Is it clear now?

Sonnich
 
jodleren said:
Hi

We use JavaScript for some of our machinery, in order to be able to
create device specific code.

But we have 5 functions we would like to add to JS. This means, we
need to hook into the chains somewhere.

Have anyone tried this in C#?

It sounds like the authors of the software you're using have embedded a
Javascript scripting engine in the software so that you can customise
it's behaviour.

If you just want to know how to write (5) extra functions in JavaScript,
then (as it's the most widely used scripting language in the world) you
can probably find someone with such expertise in a Javascript group.

If you're asking whether anyone has used C# as an embedded scripting
language in their .NET programs then, yes, they have:
http://www.csscript.net/
 
If you're asking whether anyone has used C# as an embedded scripting
language in their .NET programs then, yes, they have:
http://www.csscript.net/

For info I down-loaded v 2.6 (I am using VS2008) and it has trashed my VS,
I'm currently re-installing VS and getting error messages about missing
components.
 
Back
Top