Adding stuff to JavaScript

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
 
J

Jeff Johnson

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?
 
J

jodleren

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
 
J

Jason Keats

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/
 
J

Jeff Gaines

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top