peter123 Posted July 10, 2007 Share Posted July 10, 2007 (edited) hello everyone, i have got the next problem: I can't get any pictures from the internet when I want them to be my desktop background. I use these two codes I need to add these two codes, which won't work... $destination = @Systemdir & "\oobe\images\mslogo.jpg" SplashImageOn("Splash Screen", $destination,250,50) Sleep(3000) SplashOff() and: $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET","http://127.0.0.1/test.php") $oHTTP.Send() $HTMLSource = $oHTTP.Responsetext MsgBox(0, "Info", $HTMLSource ) for example when I want to put the google image as my desktop background: $oHTTP = ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET","http://www.google.nl/intl/nl_nl/images/logo.gif") $oHTTP.Send() I receive the image now but how can I show it? $destination = $oHTTP.image?? SplashImageOn("Splash Screen", $destination,250,50) Sleep(3000) SplashOff() Thnx Peter Edited July 10, 2007 by peter123 Link to comment Share on other sites More sharing options...
Zedna Posted July 10, 2007 Share Posted July 10, 2007 Look at InetGet() function. Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
peter123 Posted July 13, 2007 Author Share Posted July 13, 2007 (edited) ok, nice it works but, how can I set a Backgroundimage I found the code GUISetBkcolor, but not a code to set a background image. I want this: //if open program create the background image in the director dir: DirCreate("dir") InetGet("http://www.google.nl/intl/nl_nl/images/logo.gif", "dir/logo.gif", 1, 1) //then I must get the image in the background.... //when the program closed then remove I the director with the image. DirRemove("dir", 1) Edited July 13, 2007 by peter123 Link to comment Share on other sites More sharing options...
ChrisL Posted July 13, 2007 Share Posted July 13, 2007 Have a look here http://www.autoitscript.com/forum/index.php?showtopic=5798 at ezzetabi's wallpaper changer [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire Link to comment Share on other sites More sharing options...
Vaner Posted July 13, 2007 Share Posted July 13, 2007 i do this to update wallpaper must be a .bmp , Dim $picture Dim $err $picture = (@ScriptDir & '\d.bmp') $err = RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "WallpaperStyle", "REG_SZ", "2" ) $err = RegWrite( "HKEY_CURRENT_USER\Control Panel\Desktop", "TileWallpaper", "REG_SZ", "0" ) $err = DllCall( "User32.dll", "int", "SystemParametersInfo", "int", 20, "int", 0, "string", $picture, "int", 0x02 ) Link to comment Share on other sites More sharing options...
peter123 Posted July 13, 2007 Author Share Posted July 13, 2007 (edited) ehh, sorry. what I was mean with background was not the desktop-background. what I was mean was the Background of a program. this is a example code of a Background color. #include <GUIConstants.au3> GUICreate("Program") GUISetState (@SW_SHOW) GUISetBkColor(0x00E0FFFF) GUISetFont(9, 300) While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend this code gives the background COLOR and what I want is the Background IMAGE. Can anybody help me?? Edited July 13, 2007 by peter123 Link to comment Share on other sites More sharing options...
Vaner Posted July 13, 2007 Share Posted July 13, 2007 my bad , but i dont know any ctrl to do this , If as was u , u should try with "GUICtrlCreatePic" then just put the other control over it. gonna look like that $gui = GUICreate("My GUI picture",350,300,-1,-1,$WS_SIZEBOX+$WS_SYSMENU) ; will create a dialog box that when displayed is centered $ParentWin_Pos = WinGetPos($gui, "") $x = $ParentWin_Pos[0] $y = $ParentWin_Pos[1] GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic(@Systemdir & "\oobe\images\mslogo.jpg",$ParentWin_Pos[0],$ParentWin_Pos[1]) GUISetState () ; Run the GUI until the dialog is closed GUISetState () ; resize the control $n=GUICtrlSetPos($n,50,50,200,100) ; Run the GUI until the dialog is closed While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Wend Link to comment Share on other sites More sharing options...
peter123 Posted July 13, 2007 Author Share Posted July 13, 2007 yess, thnx. it works this is the code DirCreate("dir") InetGet("http://www.google.nl/intl/nl_nl/images/logo.gif", "dir/logo.gif", 1, 1) $gui = GUICreate("My GUI picture",350,300,-1,-1) $ParentWin_Pos = WinGetPos($gui, "") $x = $ParentWin_Pos[0] $y = $ParentWin_Pos[1] GUISetBkColor (0xE0FFFF) $n=GUICtrlCreatePic("dir/logo.gif",$ParentWin_Pos[0],$ParentWin_Pos[1]) GUISetState () $n=GUICtrlSetPos($n,50,50,200,100) While 1 $msg = GUIGetMsg() Wend But the program can`t shut down :S if the shut down works can i remove the dir if the program closed Link to comment Share on other sites More sharing options...
peter123 Posted July 16, 2007 Author Share Posted July 16, 2007 wel I was wondered. can i not direct opened this image in the background without i downloaded this file? Link to comment Share on other sites More sharing options...
DW1 Posted July 16, 2007 Share Posted July 16, 2007 you can embed IE or just download the way you are, but to the temp folder, and delete on exit AutoIt3 Online Help Link to comment Share on other sites More sharing options...
PornoRalle Posted July 17, 2007 Share Posted July 17, 2007 why does the picture lay over the buttons , is it possible to set it as backround? 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