Jump to content

Progress bar...


Paradox
 Share

Recommended Posts

Hey guys,

First of all, I want to tell all of you that have EVER replied to ANY of my messages how grateful I am for your assitance. It has been a wonderful (and at some times nerve racking) experience working on my still-on-going project. Thank you all for your help!

Now that the niceties are out of the way, down to business... ;)

1. I want to utilize a progress bar. Simple, huh? Here's the complicated part... The way I'm working my script, I have a series of images that are shown (full screen, always on top) and I want the progress bar to appear ON TOP of them... The reason my images are defined as "always on top" is because we (as a company) don't want the end user to really see any of the background stuff going on... They change periodically during the course of the scripts execution.

2. If it can be done, what would be a good way of gauging my progress according to my script??

My script is 599 lines long, so I'm not just going to include it into this message, however I've attached it to this post so that it can be reviewed. I've also include one of the images that's used during the execution of the script. It wouldn't be any use of anyone to attempt to run the script though because of the amount of included files (in excess of 200 meg), so like I said, it's only attached so that it can be reviewed...

Any ideas or suggestions?

DB_Server_Install.au3

Link to comment
Share on other sites

How about this

WinSetOnTop("Installer", "", 0)

While

WinSetOnTop("Progress", "", 1)

Wend

WinSetOnTop("Installer", "", 1)

************** not what your looking for... maybe

anyway... your screen reminds me of a windows install screen and they have a progress bar built-into the GUI

that would look nice on yours

just ideas

8)

Edited by Valuater

NEWHeader1.png

Link to comment
Share on other sites

How about this

WinSetOnTop("Installer", "", 0)

While

WinSetOnTop("Progress", "", 1)

Wend

WinSetOnTop("Installer", "", 1)

************** not what your looking for... maybe

anyway... your screen reminds me of a windows install screen and they have a progress bar built-into the GUI

that would look nice on yours

just ideas

8)

I was just toying around with it a little bit ago and was using (almost verbatim) the example code from the AutoIT Help file... If you look at my source, before the second set of FileInstall() lines, I had it looking something like this:

;Turn on first splash image.
SplashImageOn("Docubase Install", $splash0, @desktopwidth, @desktopheight, -1, -1, 1)

ProgressOn("", "Uncompression", "0 %", (@desktopwidth - 300), (@desktopheight - 100), 1)
    progressset(10, "10% Complete")

$destination=$dbtemp & "\rar.exe"
fileinstall("d:\dbinstall\rar.exe", $destination, 1)
 progressset(20, "20% Complete")

Wound up taking that up to 100% for the FileInstall() lines, and had the image on top of my splash (figured out that the splash screen needs to be called BEFORE the progress bar is rendered). There's 2 things that I don't like about it though...

1. The size of the progress bar. And from what I've found, I can't do anything about the size of it either.. Ideally, I'd like it to be on the left side of the screen, above the "Leave No Paper Trail" logo...

2. The grey color of the progress window. If I WERE able to resize the window, I'd like it to be the same color (or at least something to compliment the baby blue).

About it reminding you of a Windows install screen... hehe... I was going for something like that when I started drawing it all up. Wanted something simple, yet to the point. As far as the radio buttons, they ARE from a Windows XP install... Found an install screen capture online, copied them out of the image, and touched them up some. Photoshop CS2 kicks ass! ;)

Link to comment
Share on other sites

try this example...

#include <GUIConstants.au3>

$MainGUI = GUICreate("",@DesktopWidth,@DesktopHeight,0,0,$WS_POPUP,$WS_EX_TOPMOST)
$pic = GUICtrlCreatePic(".\Install_Screen.jpg",0,0,@DesktopWidth,@DesktopHeight)
GUISetState()
$ProgressGUI = GUICreate("",Int((7*@DesktopWidth)/40), _
        Int(@DesktopHeight/30), _
        Int(@DesktopWidth/40), _
        Int((5*@DesktopHeight)/6), _
        $WS_POPUP,$WS_EX_TOPMOST)

$progress = GUICtrlCreateProgress(0,0,Int((7*@DesktopWidth)/40),Int(@DesktopHeight/30))
GUISetState()

$n = 0
While 1
    $n = $n + 1
    Sleep(100)
    GUICtrlSetData($progress,$n)
    If $n = 100 Then ExitLoop
WEnd

Sleep(1000)
Larry....

You're great! Has anyone told you that lately?? That's soooo more than perfect! Thank you so very much!

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...