mrmacadamia Posted October 15, 2009 Share Posted October 15, 2009 I want to create an installer for my program and I want to create installer like ATI installer or NVIDIA installer which they create a full maximize background GUI and the installer progress on top of it. #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> Global $iStyle = BitOR($WS_CAPTION, $WS_EX_TOPMOST) Opt('MustDeclareVars', 1) Example2() Func Example2() Local $gui, $background, $pic, $basti_stay, $msg Local $sFile = @mydocuments & "\background.jpg" Local $resX = @DesktopWidth Local $resY = @DesktopHeight $gui = GUICreate("Background", $resX, $resY, -1, -1, $iStyle) ; background picture $background = GUICtrlCreatePic($sFile, -1, -1, $resX, $resY) GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example2 Above is just the test code and I only managed to create the background GUI but my installer won't begin until I exit the GUI. All I wanna do is that, when run my installer, a background GUI(like ATI&NVIDIA installer) came up and just a progress bar. And other installation stuff will run behind the background GUI. thanks Link to comment Share on other sites More sharing options...
rliiack Posted October 15, 2009 Share Posted October 15, 2009 Like this?? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> Global $iStyle = BitOR($WS_CAPTION, $WS_EX_TOPMOST) Opt('MustDeclareVars', 1) Example2() Func Example2() Local $gui, $ProgressBar, $iProgress, $background, $pic, $basti_stay, $msg Local $sFile = @MyDocumentsDir & "\background.jpg" Local $resX = @DesktopWidth Local $resY = @DesktopHeight $gui = GUICreate("Background", $resX, $resY, -1, -1, $iStyle) ; background picture $background = GUICtrlCreatePic($sFile, -1, -1, $resX, $resY) $ProgressBar = GUICtrlCreateProgress(64, 56, 729, 81) $iProgress=80 ;Progress Percentage GUICtrlSetData($ProgressBar,$iProgress) GUISetState(@SW_SHOW) Do $msg = GUIGetMsg() Until $msg = $GUI_EVENT_CLOSE EndFunc ;==>Example2 I only add the progress bar. My Projects:Smart Icons Link to comment Share on other sites More sharing options...
Zedna Posted October 15, 2009 Share Posted October 15, 2009 Maybe something like this #include <GUIConstantsEx.au3>#include <WindowsConstants.au3> #include <GUIConstants.au3> $iStyle = BitOR($WS_CAPTION, $WS_EX_TOPMOST) $sFile = @MyDocumentsDir & "\background.jpg" $resX = @DesktopWidth $resY = @DesktopHeight $gui = GUICreate("Background", $resX, $resY, -1, -1, $iStyle) $background = GUICtrlCreatePic($sFile, -1, -1, $resX, $resY) ; background picture $ProgressBar = GUICtrlCreateProgress(64, 56, 729, 81) GUISetState(@SW_SHOW) RunWait('some path to exe') GUICtrlSetData($ProgressBar,50) RunWait('some path to another exe') GUICtrlSetData($ProgressBar,100) ; end of install GUIDelete($gui) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mrmacadamia Posted October 15, 2009 Author Share Posted October 15, 2009 Maybe something like this #include <GUIConstantsEx.au3>#include <WindowsConstants.au3> #include <GUIConstants.au3> $iStyle = BitOR($WS_CAPTION, $WS_EX_TOPMOST) $sFile = @MyDocumentsDir & "\background.jpg" $resX = @DesktopWidth $resY = @DesktopHeight $gui = GUICreate("Background", $resX, $resY, -1, -1, $iStyle) $background = GUICtrlCreatePic($sFile, -1, -1, $resX, $resY) ; background picture $ProgressBar = GUICtrlCreateProgress(64, 56, 729, 81) GUISetState(@SW_SHOW) RunWait('some path to exe') GUICtrlSetData($ProgressBar,50) RunWait('some path to another exe') GUICtrlSetData($ProgressBar,100) ; end of install GUIDelete($gui) LOL!! What a big progress bar there you've made for me! Kind of exactly what I need but even I've set the gui with $WS_EX_TOPMOST, it's not always on top because there's still program ran on top of it. Anyway, thanks for the idea though and how can I show percentage progress in the bar? Link to comment Share on other sites More sharing options...
Zedna Posted October 15, 2009 Share Posted October 15, 2009 LOL!! What a big progress bar there you've made for me! Kind of exactly what I need but even I've set the gui with $WS_EX_TOPMOST, it's not always on top because there's still program ran on top of it. Try to run your programs using @SW_HIDE in RunWait() Anyway, thanks for the idea though and how can I show percentage progress in the bar? Did you look at my code?!? GUICtrlSetData($ProgressBar,50) Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mrmacadamia Posted October 15, 2009 Author Share Posted October 15, 2009 GUICtrlSetData($ProgressBar,50) Yes, i've looked the code but it just show the progress bar, not with the text like "50%, 100%". Anyway, I haven't try runwait with @SW_HIDE. I'll reply later if it's work. thanks. Link to comment Share on other sites More sharing options...
mrmacadamia Posted October 15, 2009 Author Share Posted October 15, 2009 GUICtrlSetData($ProgressBar,50) Yes, i've looked the code but it just show the progress bar, not with the text like "50%, 100%". Anyway, I haven't try runwait with @SW_HIDE. I'll reply later if it's work. thanks. I asked too much. I'll figure it out myself then. Sorry and thanks! Link to comment Share on other sites More sharing options...
Zedna Posted October 15, 2009 Share Posted October 15, 2009 GUICtrlSetData($ProgressBar,50) Yes, i've looked the code but it just show the progress bar, not with the text like "50%, 100%". Use label control and GUICtrlSetData() for updating its text. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
mrmacadamia Posted October 16, 2009 Author Share Posted October 16, 2009 Use label control and GUICtrlSetData() for updating its text. Thanks! I've already figure it out. I just add like this. $LabelInstall = GUICtrlCreateLabel('0%', $resX , $resY, 500, 30, $SS_CENTER) GUICtrlSetData($LabelInstall, '30%') 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