Draw graphs in VBscript

I have an HTML application, part HTML, part VBscript, disguised as a form. It does this by opening several local files, runs the DOS box containing the GAWK, and presents a text file as the result. I want to extend it to allow it to create a bitmap with the results as a bar graph, for example as a .BMP file. But I'm stumped. I have no idea where to start.

0


source to share


4 answers


Is javascript an option? This would be much easier than creating an image file.

I've used this jQuery plugin http://code.google.com/p/flot/ several times and it works well.



I haven't used VBScript for several years now, I think you probably need to use some kind of active-x object to generate the image file, but I could be wrong there.

+3


source


The graphics are beyond the scope of VBScript alone. You can try if you find an ActiveX / COM component that can do it for you. At Google, I believe most of these are stunning trial versions of fairly expensive commercial products. Maybe someone else here knows what's free.



As an alternative route, you can set up a web service somewhere where the image is processed (like PHP / gdlib) using URL parameters. Then you just need to link to the image in your HTA with the tag <img>

as usual.

0


source


I believe you will be able to use this library http://www.walterzorn.com/jsgraphics/jsgraphics_e.htm in VBScript. It can be used to draw all kinds of lines, rectangles, circles, etc.

Once you've drawn the graph, you can print the page to a PDF printer (like cutePDF) to get the image to file for later use.

0


source


The Microsoft Scripting Guys developers have posted an article that discussed it for quite some time, but it involves using an Excel ActiveX control or OWC control, the article does really detail how to do that, look here: http://www.microsoft.com/ technet / scriptcenter / topics / activex / chart.mspx

0


source







All Articles