scubasteve1281 Posted February 9, 2010 Share Posted February 9, 2010 I'm trying to run a installer application and while this installer is running I want a Gui to popup with a progress bar the progress bar doesn't have to mean any thing just continuously move across the Gui screen as long as the installer program is running. I have built progress bars before were the bar moved as the script executed each function in the script but for the life of me I can't see to get this work. here is my code so far any help would be appreciated. expandcollapse popup#Region ### START Koda GUI section ### Form=c:\scripts\recoverycontinue.kxf $Formcontinue = GUICreate("test", 355, 180, 333, 225) $Yes = GUICtrlCreateButton("Yes", 64, 136, 75, 25, 0) $No = GUICtrlCreateButton("No", 224, 136, 75, 25, 0) $Label1 = GUICtrlCreateLabel("Click Yes to start", 24, 96, 316, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Label2 = GUICtrlCreateLabel("this computer ", 32, 8, 295, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Label3 = GUICtrlCreateLabel("To blah ", 72, 32, 204, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") $Label4 = GUICtrlCreateLabel("goaway", 48, 64, 266, 24) GUICtrlSetFont(-1, 12, 800, 0, "MS Sans Serif") #EndRegion ### END Koda GUI section ### #Region ### START Koda GUI section ### Form=c:\Scripts\progress.kxf $Formprogress = GUICreate("Form1", 406, 257, 303, 219) $Label1 = GUICtrlCreateLabel("Gary busey is working his magic", 128, 184, 154, 17) $Progress1 = GUICtrlCreateProgress(16, 208, 374, 41) $Pic1 = GUICtrlCreatePic("C:\scripts\GBprogress.jpg", 0, 0, 404, 180, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS)) #EndRegion ### END Koda GUI section ###Func Continue1() $varloc= "c:\scripts\installer.exe" $varapp= (@ComSpec & " /c " & $varapp, "", @SW_HIDE) Func Continue1() GUISetState (@SW_SHOW, $Formcontinue) While 1 $nMsg = GUIGetMsg() If $nMsg=-3 Then Exit If $nMsg=$No then Exit If $nMsg=$Yes then Yes1() Switch $nMsg Case $GUI_EVENT_CLOSE Main() EndSwitch WEnd EndFunc Func Yes1() GUISetState(@SW_HIDE, $Formcontinue) GUISetState(@SW_SHOW, $Formprogress) Run $varapp While $varapp GUICtrlSetData($progress1, ) EndFunc Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted February 9, 2010 Moderators Share Posted February 9, 2010 scubasteve1281, If you are not interested in the timing aspect of the progress and only want an indication that something is happening, use a marquee style like this: #include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateProgress(10, 10, 400, 20, $PBS_MARQUEE) _SendMessage(GUICtrlGetHandle(-1), $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms GUISetState() While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd I hope it does what you want. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
scubasteve1281 Posted February 9, 2010 Author Share Posted February 9, 2010 Awesome this worked perfect thanks lot 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