/* * JavaScript Windows ScriptingHost sample file * usage cscript tryCscriptSVG.js * * * this could be useful. I could use this insteal of Awk. */ var stdin = WScript.StdIn; var stdout = WScript.StdOut; /*************************************************** ****************************************************/ header = '' footer = '' rect = '' /* SVG Path - The element is used to define a path. The following commands are available for path data: •M = moveto •L = lineto •H = horizontal lineto •V = vertical lineto •C = curveto •S = smooth curveto •Q = quadratic Bézier curve •T = smooth quadratic Bézier curveto •A = elliptical Arc •Z = closepath Note: All of the commands above can also be expressed with lower letters. Capital letters means absolutely positioned, lower cases means relatively positioned. */ path = '' path2 = '' path3 = '' var opStr = header+rect+path+path2+footer fso = new ActiveXObject("Scripting.FileSystemObject"); function writeFile(){ var ForReading = 1, ForWriting = 2; stdout.WriteLine( "outputting image " ); // Open the file for output. var fop = fso.OpenTextFile(".\\tryCscriptSVG.svg", ForWriting, true); if ( fop ) { fop.WriteLine( opStr ); } if ( fop ) { fop.close(); } } writeFile() /* program to write circuit. Grid:- */ /* Layer 1 Layer 1 */