MCT Posted December 8, 2005 Share Posted December 8, 2005 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 More sharing options...
JerryD Posted December 8, 2005 Share Posted December 8, 2005 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 More sharing options...
MCT Posted December 8, 2005 Author Share Posted December 8, 2005 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 More sharing options...
MHz Posted December 8, 2005 Share Posted December 8, 2005 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 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