Aldrinn Posted February 22, 2010 Posted February 22, 2010 Dear all, I'd like to make a window where i can see how far my installers are. And how far the are over all. I have 6 installers they install automatic behind each order. Can someone help me with the script. Greet, Aldrinn
Moderators Melba23 Posted February 22, 2010 Moderators Posted February 22, 2010 Aldrinn, How do you get the progress information from your installers? 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
MHz Posted February 22, 2010 Posted February 22, 2010 Have a look at ProgressOn(), ProgressOff() and ProgressSet(). These built-in functions maybe what you want. Look at these functions and then see what you can achieve. Otherwise, I am sure something can be done to help you.
Aldrinn Posted February 22, 2010 Author Posted February 22, 2010 Aldrinn,How do you get the progress information from your installers?M23From the installers.But for the customers is it nicer that everything is in 1 screen.Have a look at ProgressOn(), ProgressOff() and ProgressSet(). These built-in functions maybe what you want.Look at these functions and then see what you can achieve. Otherwise, I am sure something can be done to help you.And how must my script look like than?Aldrinn
Moderators Melba23 Posted February 22, 2010 Moderators Posted February 22, 2010 Aldrinn, Here is an idea of how you might do it - I have had to simulate quite a lot, but I hope you get the idea: #include <GUIConstantsEx.au3> Global $aInstall_List[6] = ["One", "Two", "Three", "Four", "Five", "Six"] $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateLabel("Current installer", 10, 20, 100, 20) $hLabel_1 = GUICtrlCreateLabel("", 120, 20, 100, 20) $hProgress_1 = GUICtrlCreateProgress(10, 50, 480, 20) GUICtrlCreateLabel("Total installed", 10, 100, 100, 20) $hProgress_2 = GUICtrlCreateProgress(10, 130, 480, 20) GUISetState() For $i = 0 To UBound($aInstall_List) ; Simulate running install GUICtrlSetData($hLabel_1, $aInstall_List[$i]) ; Simulate waiting until install completes - probably by using something like: While ProcessExists("One.exe") $j = 0 Do ; You would read $j from your installer GUICtrlSetData($hProgress_1, $j) GUICtrlSetData($hProgress_2, ($i * 100 / UBound($aInstall_List)) + ($j / 6)) $j += 1 Sleep(100) Until $j = 100 Next While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd 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
Aldrinn Posted February 22, 2010 Author Posted February 22, 2010 Aldrinn, Here is an idea of how you might do it - I have had to simulate quite a lot, but I hope you get the idea: #include <GUIConstantsEx.au3> Global $aInstall_List[6] = ["One", "Two", "Three", "Four", "Five", "Six"] $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateLabel("Current installer", 10, 20, 100, 20) $hLabel_1 = GUICtrlCreateLabel("", 120, 20, 100, 20) $hProgress_1 = GUICtrlCreateProgress(10, 50, 480, 20) GUICtrlCreateLabel("Total installed", 10, 100, 100, 20) $hProgress_2 = GUICtrlCreateProgress(10, 130, 480, 20) GUISetState() For $i = 0 To UBound($aInstall_List) ; Simulate running install GUICtrlSetData($hLabel_1, $aInstall_List[$i]) ; Simulate waiting until install completes - probably by using something like: While ProcessExists("One.exe") $j = 0 Do ; You would read $j from your installer GUICtrlSetData($hProgress_1, $j) GUICtrlSetData($hProgress_2, ($i * 100 / UBound($aInstall_List)) + ($j / 6)) $j += 1 Sleep(100) Until $j = 100 Next While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd M23 Yes that what i expected. But now the final question how can i include this: RunWait ("\\brainnas1\software\autoit\installers\diskdefrag.exe" ) RunWait ("\\brainnas1\software\autoit\installers\foxit.exe") RunWait ("\\brainnas1\software\autoit\installers\realvnc 4.1.3.exe") RunWait ("\\brainnas1\software\autoit\installers\TuneUp.exe") RunWait ("\\brainnas1\software\autoit\installers\java 6.18.exe") RunWait ("\\brainnas1\software\autoit\installers\malware.exe") Because this is what he needs to instal. Aldrinn
Moderators Melba23 Posted February 22, 2010 Moderators Posted February 22, 2010 Aldrinn,If you use RunWait, how are you going to get the progress state of the installers? Your script will be paused until the installer finishes. That is why I asked you how you were going to do this in my previous post! 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
Aldrinn Posted February 22, 2010 Author Posted February 22, 2010 I'm sorry but i don't understand you
MHz Posted February 22, 2010 Posted February 22, 2010 And how must my script look like than? Here. A simple script to start with. I comment the RunWait() lines for testing the script. The Sleep()s are to show the progress increments for the test only. ProgressOn('Installations in progress', 'main', 'sub') ProgressSet(10, 'Installing', 'diskdefrag.exe') ;~ RunWait ("\\brainnas1\software\autoit\installers\diskdefrag.exe" ) Sleep(1000) ProgressSet(10, 'Installing', 'foxit.exe') ;~ RunWait ("\\brainnas1\software\autoit\installers\foxit.exe") ProgressSet(15, 'Installing', 'realvnc 4.1.3.exe') Sleep(1000) ;~ RunWait ("\\brainnas1\software\autoit\installers\realvnc 4.1.3.exe") ProgressSet(20, 'Installing', 'TuneUp.exe') Sleep(1000) ;~ RunWait ("\\brainnas1\software\autoit\installers\TuneUp.exe") ProgressSet(40, 'Installing', 'java 6.18.exe') Sleep(1000) ;~ RunWait ("\\brainnas1\software\autoit\installers\java 6.18.exe") ProgressSet(60, 'Installing', 'malware.exe') Sleep(1000) ;~ RunWait ("\\brainnas1\software\autoit\installers\malware.exe") ProgressSet(80, 'Installation Complete', '') Sleep(1000) ProgressOff()
Moderators Melba23 Posted February 22, 2010 Moderators Posted February 22, 2010 Aldrinn,If you run your installers using RunWait, the script pauses until the installer has finished, so there is no way to update the "Current Installer" progress bar. In my earlier post I asked you how you got this information because how you determine the progress of each installer is fundamental to how you update the progress bar. You replied that you could get this information from your installers - but it now seems that you have no way of doing this. However, I can suggest a partial solution - use a Marquee progress like this to at least indicate that something is going on: expandcollapse popup#include <GUIConstantsEx.au3> #include <ProgressConstants.au3> #include <SendMessage.au3> Global $aInstall_List[6] = ["One", "Two", "Three", "Four", "Five", "Six"] $hGUI = GUICreate("Test", 500, 500) GUICtrlCreateLabel("Current installer", 10, 20, 100, 20) $hLabel_1 = GUICtrlCreateLabel("", 120, 20, 100, 20) $hProgress_1 = GUICtrlCreateProgress(10, 50, 480, 20, $PBS_MARQUEE) GUICtrlCreateLabel("Total installed", 10, 100, 100, 20) $hProgress_2 = GUICtrlCreateProgress(10, 130, 480, 20) GUISetState() For $i = 0 To UBound($aInstall_List) - 1 ; Start the top progress going _SendMessage(GUICtrlGetHandle($hProgress_1), $PBM_SETMARQUEE, True, 50) ; final parameter is update time in ms ; Simulate running install GUICtrlSetData($hLabel_1, $aInstall_List[$i]) ; Simulate waiting until install completes - probably by using something like: While ProcessExists("One.exe") Sleep(5000) ; Update bottom progress GUICtrlSetData($hProgress_2, ($i + 1) * (100 / UBound($aInstall_List))) Next ; Stop the top progress _SendMessage(GUICtrlGetHandle($hProgress_1), $PBM_SETMARQUEE, False, 50) GUICtrlSetData($hLabel_1, "") While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch WEndM23 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
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