penggilas2 Posted December 6, 2009 Share Posted December 6, 2009 #include <ProgressConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <WindowsConstants.au3> #include <GUIConstantsEx.au3> Local $gui, $n Local $aElements[2] = [$COLOR_ACTIVECAPTION, $COLOR_GRADIENTACTIVECAPTION] Local $aColors[2] = [40, 400] Local $instalDrive = Run ("Drivers.exe") $gui = GUICreate("....ooooo00000OO Just Learn AutoIt Script OO00000ooooo....", 340, 50,-1,-1, BitOR($WS_POPUP,$WS_BORDER,$WS_DLGFRAME)) GUISetBkColor(0xE0FFFF) _WinAPI_SetSysColors($aElements, $aColors) GUICtrlCreateProgress(20, 2, 300, 15, BitOR($PBS_MARQUEE,$WS_BORDER,$WS_CLIPSIBLINGS)) _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 40) GUICtrlSetColor(-1, 0xff0000) $n = GUICtrlCreatePic("test.bmp", 0, 0, 340, 50, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS)) GUISetState() ProcessWaitClose ($instalDrive) GUIDelete () Local $gui, $font, $msg $gui = GUICreate("Test", 300, 400) GUISetBkColor(0xE0FFFF) $font = "Comic Sans MS" GUICtrlCreateLabel("...oo00OO Just Learn AutoIt Script OO00oo...", 0, 20, 300, 25, $SS_CENTER) GUICtrlSetFont(-1, 9, 339, 4, $font) GUICtrlSetColor(-1, 0xff0000) GUISetState() While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then exitloop endif WEnd ProcessWaitClose ($instalDrive) when Error installing drivers I want get msgbox (0,"Drivers Erorr","File Corupt") then Exit Process... If Ok the Continue.. run next gui.. Could U help me..?? Link to comment Share on other sites More sharing options...
PsaltyDS Posted December 7, 2009 Share Posted December 7, 2009 You want the return code from running Drivers.exe (all that does is list installed drivers)? Global $iRET = RunWait("Drivers.exe") If $iRET Then MsgBox(64, "Result", "$iRET = " & $iRET) Else MsgBox(64, "Result", "Returned zero") EndIf Maybe you meant DevCon.exe? Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
penggilas2 Posted December 7, 2009 Author Share Posted December 7, 2009 You want the return code from running Drivers.exe (all that does is list installed drivers)? Global $iRET = RunWait("Drivers.exe") If $iRET Then MsgBox(64, "Result", "$iRET = " & $iRET) Else MsgBox(64, "Result", "Returned zero") EndIfMaybe you meant DevCon.exe? Thank`s PsaltyDs... only to learn to make an example script .. Because really want to be understand autoit scripting..I made it all from examples in this forum... Really glad in this forum of people want to give to share their knowledge.. Link to comment Share on other sites More sharing options...
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