windows - Store A Specific Line Of An Application's Output in a Variable -
I am using the utility to get image image information, here is the code that it uses in VBScript Does:
Moderate SH set SH = Wscript Create Object ("WScript Shell") SH Aaron ". \ Intro .XA -Weboz D: \ Scan \ GPG"
Identify it. Exe will start and show JPG information in the console window and it will stop! There are several lines of output on the console window, for example I want to store the line 5 in a variable in VBSP, just imagine the line 5 is "Resolution 72DPI" and I want to store it in rspi in vbscript so that i Use it for future purposes
Dim SH, strobe set SH = WScript.CreateObject ("WScript.Shell") SH.Run ". \ Ident.exe -verbose D: \ Scans \ 1.jpg" StrOut = ident .exe Output Row 5
How to do this?
There are some options:
-
In a file Try redirecting the output that you can later parsed:
sh.Run ". \ Ident.exe -verbose D: \ scans \ 1.jpg> c : \ Exit.txt "
- Use Exec () instead of the run (). With Exec () you can read STDOutput and StdError streams of the Launched application.
Comments
Post a Comment