Jump to content
Sign in to follow this  
Tripredacus

A Please wait messagebox

Recommended Posts

Tripredacus

Hello again! I can work on this a little bit every now and then. They gave me more responsibilities at work and unfortunately takes me away from work on their software!

Anyways, I want to use a please wait msgbox while applications are being installed. Currently the apps will use a msgbox at the end saying the install is complete, but while it is installing (some can take awhile) there is nothing on the screen to say it is doing something. So I need a msgbox to open, then run whatever apps, then when it is done say it is and have an OK button.

I cannot determine how to do this, and progressbar code is confusing me.

Func PREAPP()
    If $x = 0 Then
        RunWait($chipset & "101GGCL, 102GG2C\5.10.1000.7\setup.exe")
        RunWait("\\server\Install\All Drivers\Sound\915G, 101GGCL, 102GG2C\5.10.0.5324\Setup.exe -s -fc2c:\101snd.log")
        RunWait("\\server\Install\All Drivers\Video\101GGCL, 102GG2C\Driver - 8.27.060616.035083\Setup.exe /s /f1 'setup.iss'")
        MsgBox(4096,"Intel 101GGCL","Setup has run")
                ElseIf//////

I just gave one example. I can easily put up a msgbox before the first RunWait line, but how to make it go away when the last msgbox opens? I am probably thinking about this the wrong way.

Some background for those who have not helped me on this program. There are currently 14 different "If $x = n" values. I would try not to add a lot of code to each ElseIf statement that is left.

Let me know if you can point me in the right direction!

EDIT: Or if possible to force the cursor to be an hourglass until the last msgbox comes up, it would also be a good example.

Edited by Tripredacus

Share this post


Link to post
Share on other sites
Kogmedia

I would use a progress bar and time the install, i.e like sleep

Another way is to set it manually would give a pausing progress bar but works.

ProgressOn("Progress Meter", "Increments every second", "0 percent")

    If $x = 0 Then
        RunWait($chipset & "101GGCL, 102GG2C\5.10.1000.7\setup.exe")
        ProgressSet( 35, 35 & " percent")
        RunWait("\\server\Install\All Drivers\Sound\915G, 101GGCL, 102GG2C\5.10.0.5324\Setup.exe -s -fc2c:\101snd.log")
        ProgressSet( 65, 65 & " percent")
        RunWait("\\server\Install\All Drivers\Video\101GGCL, 102GG2C\Driver - 8.27.060616.035083\Setup.exe /s /f1 'setup.iss'")
        ProgressSet( 100, 100 & " percent")
                ElseIf//////

ProgressSet(100 , "Done", "Complete")
sleep(500)
ProgressOff()
Edited by Kogmedia

[font="Verdana"]Keith (Kogmedia)[/font]My ScriptQuick Search - Internet / Hard Drive Search

Share this post


Link to post
Share on other sites
PsaltyDS

One of many options is SplashTextOn(), which by default is always on top. Here's a demo that shows calling your own function to update it:

Global $avTasks[6] = ["Initializing", "Task One", "Install Two", "Uninstall Three", "Re-install Four", "Logout Five"]

For $n = 1 To 5
    _SplashTextUpdate($avTasks[$n])
    Sleep(2000)
Next

Func _SplashTextUpdate($sText)
    If $sText = "" Then
        SplashOff()
    Else
        SplashTextOn("My Script Title", "Performing task: " & $sText, 400, 150, @DesktopWidth - 450, 50, 16 + 32)
    EndIf
EndFunc   ;==>_SplashTextUpdate

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
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
Sign in to follow this  

×