Jump to content

configure splash text to show progress


MCT
 Share

Recommended Posts

im trying to make a script to delete files, but i wanna use splash text to display progress, only 1 prob..

i dont know how to easily lol

;windows Cleanup
SplashTextOn("Windows CleanUP", "Please Wait While Windows Configures Cleanup", 400, 75, -1, -1, 4, "", 24)
Sleep(3000)

$message = ""
SplashTextOn("Windows CleanUP", $message, 400, 75, -1, -1, 4, "")
For $x = 60 to 65
    $message = $message & $x & @LF
    ControlSetText("Windows CleanUP", "", "Static1", $message)
    sleep(100)
    Next

i wanna have it so it displays example :

Cleaned up Desktop

then run inbehind splashscreen while above text is still displayed

FileDelete(@DesktopDir & "\*.lnk")

FileDelete(@HomeDrive & "\Documents And Settings\All Users\Desktop\*.lnk")

Link to comment
Share on other sites

im trying to make a script to delete files, but i wanna use splash text to display progress, only 1 prob..

i dont know how to easily lol

;windows Cleanup
SplashTextOn("Windows CleanUP", "Please Wait While Windows Configures Cleanup", 400, 75, -1, -1, 4, "", 24)
Sleep(3000)
$message = ""
SplashTextOn("Windows CleanUP", $message, 400, 75, -1, -1, 4, "")
For $x = 60 to 65
    $message = $message & $x & @LF
    ControlSetText("Windows CleanUP", "", "Static1", $message)
    sleep(100)
    Next

i wanna have it so it displays example :

Cleaned up Desktop

then run inbehind splashscreen while above text is still displayed

FileDelete(@DesktopDir & "\*.lnk")

FileDelete(@HomeDrive & "\Documents And Settings\All Users\Desktop\*.lnk")

ControlSetText needs the text of the window, so you need to save and reference it like this:

;windows Cleanup
$message = "Please Wait While Windows Configures Cleanup"
$oldmessage = $message
SplashTextOn("Windows CleanUP", $message, 400, 75, -1, -1, 4, "")
Sleep(3000)
For $x = 60 to 65
    $newmessage = $message & @LF & $x
    ControlSetText("Windows CleanUP", $oldmessage, "Static1", $newmessage)
    $oldmessage = $newmessage
    sleep(3000)
Next

I'm not quite sure how you wanted this displayed, but you get the idea.

Link to comment
Share on other sites

ControlSetText needs the text of the window, so you need to save and reference it like this:

;windows Cleanup
$message = "Please Wait While Windows Configures Cleanup"
$oldmessage = $message
SplashTextOn("Windows CleanUP", $message, 400, 75, -1, -1, 4, "")
Sleep(3000)
For $x = 60 to 65
    $newmessage = $message & @LF & $x
    ControlSetText("Windows CleanUP", $oldmessage, "Static1", $newmessage)
    $oldmessage = $newmessage
    sleep(3000)
Next

I'm not quite sure how you wanted this displayed, but you get the idea.

k but that still doesnt 100% answer my question cuz i dont know how to invoke the actual cleanup command, i want it to perform about 20 different "cleanups" but let the user know every 1 see what i mean?

so it'd be like "cleanup 1"

user sees

cleanup2

user sees

Link to comment
Share on other sites

A simple display like this may suit your needs ?

$x = 1
_Cleanup('Cleanup this rubbish')
; action
_Cleanup('Cleanup that rubbish')
; action
_Cleanup('The rest can go too')
; action
_Cleanup('Cleanup finished')
_Cleanup('')

Func _Cleanup($message)
    If $message <> '' Then
        If WinExists("Windows CleanUP") Then
            ControlSetText("Windows CleanUP", "", "Static1", $message & @TAB & $x)
        Else
            SplashTextOn("Windows CleanUP", $message & @TAB & $x, 400, 75, -1, -1, 4, "")
        EndIf
    Else
        SplashOff()
    EndIf
    Sleep(2000)
    $x = $x + 1
EndFunc
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...