L3G3NdKillEr Posted August 22, 2009 Posted August 22, 2009 (edited) hi, I want my script to read only particular string from a lengthy output.. #include <Constants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> Local $cmd = Run(@comspec & " /c diskid32 /d", @SystemDir, @SW_SHOW, $STDERR_CHILD + $STDOUT_CHILD) Local $ResponseText $nOffset = 1 While 1 $ResponseText &= StdoutRead($Cmd) If @error Then ExitLoop $array = StringRegExp($ResponseText, 'Drive Serial Num(".*?")', 0, $nOffset) If @error = 0 Then $nOffset = @extended msgbox(0, "Drive Serial Number is- ", $array) Else ExitLoop EndIf WEnd i am using this and it returns 0 in a msgbox() Edited August 22, 2009 by L3G3NdKillEr i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>
BrettF Posted August 22, 2009 Posted August 22, 2009 CompInfo UDF? Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
L3G3NdKillEr Posted August 22, 2009 Author Posted August 22, 2009 Its for only retrieving hard drive serial number, actually iam making it for win9x.. =] i'm very responsible, when ever something goes wrong they always say I'm responsible.Life is like an Adventure... BUT COOL GRAPHICS<====================----=LEGEND KILLER=----=========================>
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