JustinM Posted November 3, 2016 Posted November 3, 2016 I know nothing about Javascript. I didn't write this script but I know what it does. I'm just trying to understand the syntax used. Is there a better way to code this with C# or powershell or a bat file? fin4 = fso.OpenTextFile( src4, forReading ); fout = fso.OpenTextFile( dest, forWriting, true ); try { var CineCPU; var OpenGL; while( !fin4.AtEndOfStream ){ var line = fin4.ReadLine(); var expCineCPU = /^.*Rendering.*$/; var expOpenGL = /^.*fps.*$/; if(expCineCPU.test(line)) CineCPU =line if(expOpenGL.test(line)) OpenGL =line } fout.WriteLine("========================================================================"); fout.WriteLine(" BENCHMARK SCORES "); fout.WriteLine("========================================================================"); fout.WriteLine("CineBench Scores"); CineCPU=CineCPU.replace("Rendering (Multiple CPU) : "," CPU Score: "); fout.WriteLine(CineCPU) OpenGL=OpenGL.replace("Shading (OpenGL) : "," OpenGL Score: "); fout.WriteLine(OpenGL) } catch( e ) { WScript.Echo( "Error: " + e.description ); }
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now