anosen Posted July 16, 2008 Share Posted July 16, 2008 Hey guys, I'm fairly new to AutoIt. Really enjoy writing scripts with it so far. Has helped a lot with automating installs on the several computers I see a day. Anyways on to the questions... I've written a program that lets you chose from several different programs to auto install, AVG, spybot, adobe reader, and so on. I have a progress bar that shows how far along in the overall install the user is, but I was wondering if it was possible to get a progress bar that will show the progress of just the avg install or just the adobe install. Is this possible? As it is now those installs are completely silent with no interface showing. My other question was how do I copy an image to the computer and then set it as my desktop background. Is there a special macro or function for this? Or do I need to do it manually? Thanks!! Anosen Link to comment Share on other sites More sharing options...
rasim Posted July 17, 2008 Share Posted July 17, 2008 anosen how do I copy an image to the computer and then set it as my desktop background[HKEY_CURRENT_USER\Control Panel\Desktop] "ConvertedWallpaper"="d:\\Wallpaper\\New\\QsVistaReflections1.jpg" Link to comment Share on other sites More sharing options...
JFee Posted July 18, 2008 Share Posted July 18, 2008 I was wondering if it was possible to get a progress bar that will show the progress of just the avg install or just the adobe install. Is this possible?Well, it might be possible to use ControlGetText to find out the percentage that the other installer has in its progressbar... not positive how to go about it though. This is assuming the installer is just @SW_HIDE Regards,Josh Link to comment Share on other sites More sharing options...
anosen Posted July 21, 2008 Author Share Posted July 21, 2008 Hey guys thanks for the responses. [HKEY_CURRENT_USER\Control Panel\Desktop] "ConvertedWallpaper"="d:\\Wallpaper\\New\\QsVistaReflections1.jpg" rasim what do i name this new entry? or do i replace the Wallpaper one? I have tried using RegWrite to manipulate value of Wallpaper, it replaces the value with my picture but never changes the background. Here's a little snippet of my code.. FileCopy("*thankyou.jpg", "C:\WINDOWS\Web\Wallpaper", 1) FileCopy("*Wallpaper1.bmp", @UserProfileDir &"\Local Settings\Application Data\Microsoft", 1) ;$var = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop\", "WallPaper") sleep(1000) RegWrite("HKEY_CURRENT_USER\Control Panel\Desktop\", "Wallpaper", "REG_SZ", @UserProfileDir &"\Local Settings\Application Data\Microsoft\Wallpaper1.bmp") Also Jfee thanks for the reply I'll give that a try and see where it gets me. Link to comment Share on other sites More sharing options...
Cha0sBG Posted July 21, 2008 Share Posted July 21, 2008 "ConvertedWallpaper"="d:\\Wallpaper\\New\\QsVistaReflections1.jpg" this line is for the directory the image you want to set as desctop background. hes just giving an example directory and u can change it muttley Have Questions About GUI (Graphical User Interface) ? Post Them Here :GUI Help And Support ForumHave Questions About General AutoIt ? Post Them Here : General Help And Support ForumNew To AutoIt ? Be Shure To Check Out The FaQ's (Frequently Asked Questions) Or FaQ ¹ There You May Find Great Help That Will Guide You True The Wonderful Programming Language AutoItOthere Good Place To Get Some Knolage Of AutoIt Is The Example Script ForumNotice A Bug ? Please Go And Report it At Bug Report Section And Help The Devolepers Of AutoIt Update And Fix The Programming LanguageWant To Thank The People For This Great Forum And Programming Language ? Then DonateWhen You Found The Answer Your Looking For Please Add [Resolved] To The Thread's Name That Will Show Otheres That You Have Found What Your Looking For And They Whount Have To Enter The Thread. Link to comment Share on other sites More sharing options...
rasim Posted July 21, 2008 Share Posted July 21, 2008 anosenOk, try this:Global Const $SPI_SETDESKTOPWALLPAPER = 20 Global Const $SPIF_SENDWININICHANGE = 2 Global Const $SPIF_UPDATEINIFILE = 1 $Result = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_SETDESKTOPWALLPAPER, _ "int", 0, "str", @ScriptDir & "\test.bmp", _ "int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDWININICHANGE))Works only with *.bmp images. Link to comment Share on other sites More sharing options...
anosen Posted July 21, 2008 Author Share Posted July 21, 2008 (edited) Rasim thanks a lot! That works beautifully. I figured there was some DLL call that needed done, when I replaced it in the registry and checked the display and desktop screen it showed up there, but never showed up on the actual desktop. When I restarted though it showed up fine. Anyways thanks for the help! Oh yeah forgot that AVG didn't like the calls for the DLL file, wouldn't let me compile it while Resident Scanner was active. Disabled it and it worked great. Just a little heads up for anyone else that might be trying the same thing. Edited July 21, 2008 by anosen Link to comment Share on other sites More sharing options...
wraithdu Posted July 21, 2008 Share Posted July 21, 2008 PS - the wallpaper DllCall will work with JPGs under Vista. Otherwise, you can use GDI+ to convert the images to BMPs first (if you really need to). Link to comment Share on other sites More sharing options...
rasim Posted July 22, 2008 Share Posted July 22, 2008 PS - the wallpaper DllCall will work with JPGs under Vista. Otherwise, you can use GDI+ to convert the images to BMPs first (if you really need to).Yes, i know. muttley 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