petjez Posted January 11, 2012 Share Posted January 11, 2012 Hello, i like to create something like a silent install script with some status messages. In DOS i do it like this: @Echo off Echo Installing Program 1 program2.exe /silent >NUL Echo. Echo Installing Program 2 program2.exe /silent >NUL Echo. Echo Everything done, press a key... pauze >NUL In DOS this works wonderfull, the batch file waits until the program is installed and would move over to the second line. It wil display the status of the install with the DOS echo command. Can this be done in Autoit with a more graphical status screen? I've tried msgbox. This works, but shows a msgbox for every instaleld program. I like to see the status in 1 msgbox. Regards, Patrick Link to comment Share on other sites More sharing options...
willichan Posted January 11, 2012 Share Posted January 11, 2012 There are several ways you could go about it, but for a simple start, take a look at the SplashTextOn command in the help file.There are cleaner, nicer looking solutions, but this will be the simplest until you learn more about AutoIt scripting in general. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
Mikeman27294 Posted January 11, 2012 Share Posted January 11, 2012 What you would want to do is console write. It will work similarly to DOS and Batch files: ConsoleWrite("Installing Program 1") RunWait("program2.exe", "/silent") ConsoleWrite(@CRLF) ConsoleWrite("Installing Program 2") RunWait("program2.exe" "/silent") ConsoleWrite(@CRLF) ConsoleWrite("Everything done. Now exiting.") Exit There you go. If you compare that to your command line version, you will quickly realize how it works. Link to comment Share on other sites More sharing options...
willichan Posted January 11, 2012 Share Posted January 11, 2012 This works, and is easy. ConsoleWrite will not give you graphical output, however. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
petjez Posted January 11, 2012 Author Share Posted January 11, 2012 i don't think i get it. I want the use the SplashTextOn option. I've tried this: But the window is clearer and then the next message is displayed. I've also tried the ControlSetText option, but it doesn't show anything. SplashTextOn("Title", "Message goes here.", -1, -1, -1, -1, 4, "", 24) Sleep(2000) SplashOff() SplashTextOn("Titel", "bericht1", -1, -1, -1, -1, 4, "") ControlSetText("TitleFoo", "", "Static1", "message") sleep(2000) ControlSetText("TitleFoo", "", "Static1", "message2") sleep(2000) SplashOff() Any idea? Patrick Link to comment Share on other sites More sharing options...
BrewManNH Posted January 11, 2012 Share Posted January 11, 2012 Your ControlSetText wasn't written properly, try it this way. SplashTextOn("Title", "Message goes here.", -1, -1, -1, -1, 4, "", 24) Sleep(2000) SplashOff() SplashTextOn("Title", "bericht1", -1, -1, -1, -1, 4, "") Sleep(2000) ControlSetText("Title", "", "Static1", "message") sleep(2000) ControlSetText("Title", "", "Static1", "message2") sleep(2000) SplashOff() You had "TitleFoo" set for the window's title, when the window's title was set to "Title". Copy/Paste error from the example script on your part. If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
willichan Posted January 11, 2012 Share Posted January 11, 2012 The faster typist always beats me to it. My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
petjez Posted January 11, 2012 Author Share Posted January 11, 2012 Hey, thanks, but it is almost the way i want it. The window isn't closed now, but the text is not displayed underneath eachother. The text is sort of refreshed, i want al the text in 1 window, with some commands between (like the sleep command). Patrick Link to comment Share on other sites More sharing options...
willichan Posted January 11, 2012 Share Posted January 11, 2012 SplashTextOn("Title", "Message goes here.", -1, -1, -1, -1, 4, "", 24) Sleep(2000) SplashOff() $msg="bericht1" SplashTextOn("Titel", $msg, -1, -1, -1, -1, 4, "") $msg &= @CRLF & "message" ControlSetText("Titel", "", "Static1", $msg) sleep(2000) $msg &= @CRLF & "message2" ControlSetText("Titel", "", "Static1", $msg) sleep(2000) SplashOff() My UDFs: Barcode Libraries, Automate creation of any type of project folder, File Locking with Cooperative Semaphores, Inline binary files, Continue script after reboot, WinWaitMulti, Name Aggregator, Enigma, CornedBeef Hash Link to comment Share on other sites More sharing options...
petjez Posted January 11, 2012 Author Share Posted January 11, 2012 Briliant, this is exactly what i need. Thanks Old Geek. Patrick 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