I have a project that needs to create and use COM objects. I found some examples using Javascript on the command-line and it looks like the perfect option for me. They will likely be short scripts (<100 lines) that talk to a COM server and a Postgres database.
Does anyone have a better approach? Is there a good tool that can assist with creating this type of Javascript. Most tools (like aptana) tend to focus on running javascript from a browser, not from the command line. I would really like just a simple IDE with breakpoints and watches or even a simple terminal application that would allow me to type a javascript command and see a result. Any suggestions?
2 Answers 2
You can run JavaScript on the command line using either Rhino for Java or Windows Script Host.
http://msdn.microsoft.com/en-us/library/9bbdkx3k%28VS.85%29.aspx
Running JavaScript from the command line will prevent access to browser only objects and the DOM such as: window, document, location, and so forth.
1 Comment
print, println and readln for simple commandline console I/O: DigitalMars.Com/dscript Have you tried creating a JSCript.Net file in Visual Studio? It should be able to debug Javascript compiled into a .Net assembly, though I'll admit that I haven't tried it.