Doppio Posted July 22, 2009 Share Posted July 22, 2009 (edited) I have the following script which I found on this forum, and would like to use it to show the progress while installing a KB (Windows Patch) #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <GDIpProgress.au3> $Form1 = GUICreate("Form1", 492, 80, 193, 125) GUICtrlCreatePic(@ScriptDir & "\background.bmp", 0, 40, 492, 40, $WS_CLIPSIBLINGS) $Button1 = GUICtrlCreateButton("Start", 208, 8, 75, 25, 0) $Progress1 = _ProgressCreate(55, 60, 386, 14) _ProgressSetText($Progress1, "") _ProgressSetImages($Progress1, @ScriptDir & "\progress1.bmp", @ScriptDir & "\progress2.bmp") _ProgressSet($Progress1, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $i = 1 to 100 Step 1 sleep(100) _ProgressSet($Progress1, $i) Next EndSwitch WEnd Can someone point me in the right direction? Thanks guys. Edited July 22, 2009 by Doppio Link to comment Share on other sites More sharing options...
Doppio Posted July 22, 2009 Author Share Posted July 22, 2009 I have the following script which I found on this forum, and would like to use it to show the progress while installing a KB (Windows Patch) #include <GUIConstants.au3> #include <WindowsConstants.au3> #include <GDIpProgress.au3> $Form1 = GUICreate("Form1", 492, 80, 193, 125) GUICtrlCreatePic(@ScriptDir & "\background.bmp", 0, 40, 492, 40, $WS_CLIPSIBLINGS) $Button1 = GUICtrlCreateButton("Start", 208, 8, 75, 25, 0) $Progress1 = _ProgressCreate(55, 60, 386, 14) _ProgressSetText($Progress1, "") _ProgressSetImages($Progress1, @ScriptDir & "\progress1.bmp", @ScriptDir & "\progress2.bmp") _ProgressSet($Progress1, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Button1 For $i = 1 to 100 Step 1 sleep(100) _ProgressSet($Progress1, $i) Next EndSwitch WEnd Can someone point me in the right direction? Thanks guys. The KB I'm Using is Windows6.0-KB952627-x64.MSU 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