myspacee Posted March 28, 2009 Share Posted March 28, 2009 hello, try now BGinfo good piece of program, that display as desktop wallpaper, lot infos about your computer. Incrediblebut miss external IP. (return only network card IP) Exist anything Autoit can do for this task ? m. Link to comment Share on other sites More sharing options...
Mat Posted March 28, 2009 Share Posted March 28, 2009 (edited) I may not be fully right, but BGinfo works by taking the current background, adding the info to the picture, and saving it.You can tell this becouse if you go onto display properties, BGinfo shows up as a background.To do this in autoit, you need to:a) find the current background edit it to show the infoc) change background to the edited one.http://www.autoitscript.com/forum/index.ph...mp;hl=Wallpaper is an example script written bydantay9 that changes the wallpaper, Have a look.for the others, it's probably a matter of searching the forums, editing images is something i'm sure is possible, but I don't know how - Probably something in GDI+ - but you'll have to ask someone who knows what they're talking about.MDiesel Edited March 28, 2009 by mdiesel AutoIt Project Listing Link to comment Share on other sites More sharing options...
myspacee Posted March 30, 2009 Author Share Posted March 30, 2009 (edited) ghetto solution: expandcollapse popup#include <GDIPlus.au3> #include <ScreenCapture.au3> #Include <ScreenCapture.au3> $image = "C:\WINDOWS\mydesktop.bmp" _Main() TimeStampScreenshot($image,@IPAddress1 & @CRLF & @IPAddress2 & @CRLF & @IPAddress3 & @CRLF & @IPAddress4 ) ;~ sleep(1000) ChangeWallpaper($image) Func ChangeWallpaper($FileLong, $State = 3) Local $String = $FileLong, $SPI_SETDESKWALLPAPER = 20, $SPIF_UPDATEINIFILE = 1, $SPIF_SENDCHANGE = 2 Do $FileLong = $String $String = StringReplace($FileLong, "/", "\") Until @extended = 0 If Not FileExists($FileLong) Then SetError(-1) Return 0 EndIf If StringRight($FileLong, 3) <> "bmp" Then SetError(-2) Return 0 EndIf Local $WDir = RegRead('HKLM\Software\Microsoft\Windows\CurrentVersion', 'WallPaperDir') $FileShort = StringSplit($FileLong, "\") $FileShort = $FileShort[$FileShort[0]] If StringInStr($WDir, @WindowsDir) <> 0 Then $WDir = StringTrimLeft($WDir, 12) $WDir = @WindowsDir & $WDir EndIf FileCopy($FileLong, $WDir, 1); make wallpaper available in desktop properties window FileCopy($FileLong, @UserProfileDir & '\Local Settings\Application Data\Microsoft\Wallpaper1.bmp', 1) RegWrite('HKCU\Control Panel\Desktop', 'Wallpaper', 'reg_sz', @UserProfileDir & '\Local Settings\Application Data\Microsoft\Wallpaper1.bmp') RegWrite('HKCU\Control Panel\Desktop', 'ConvertedWallpaper', 'reg_sz', $WDir & "\" & $FileShort) Switch $State Case 1; centered RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '0') RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0') Case 2; tiled RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '1') RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '0') Case 3; stretched RegWrite('HKCU\Control Panel\Desktop', 'TileWallpaper', 'reg_sz', '0') RegWrite('HKCU\Control Panel\Desktop', 'WallpaperStyle', 'reg_sz', '2') Case Else EndSwitch $Dll = DllCall("user32.dll", "int", "SystemParametersInfo", _ "int", $SPI_SETDESKWALLPAPER, _ "int", 0, _ "str", $FileLong, _ "int", BitOR($SPIF_UPDATEINIFILE, $SPIF_SENDCHANGE)) EndFunc;==>ChangeWallpaper Func TimeStampScreenshot($image,$timestamp) If Not FileExists($image) Then Return 0 $sString = $timestamp _GDIPlus_StartUp() $hImage = _GDIPlus_ImageLoadFromFile($image) $hGraphic = _GDIPlus_ImageGetGraphicsContext($hImage) $hFamily = _GDIPlus_FontFamilyCreate("Arial") $hFont = _GDIPlus_FontCreate($hFamily, 16, 1) $tLayout = _GDIPlus_RectFCreate(0, 0) $hFormat = _GDIPlus_StringFormatCreate(0) $hBrush1 = _GDIPlus_BrushCreateSolid(0xA2FFFFFF) $hBrush2 = _GDIPlus_BrushCreateSolid(0xC4FF0000) $hPen = _GDIPlus_PenCreate(0xC4000000, 2) $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sString, $hFont, $tLayout, $hFormat) $iWidth = DllStructGetData($aInfo[0], "Width" ) $iHeight = DllStructGetData($aInfo[0], "Height") _GDIPlus_GraphicsFillRect($hGraphic, 0, 0, $iWidth, $iHeight, $hBrush1) _GDIPlus_GraphicsDrawRect($hGraphic, 1, 1, $iWidth, $iHeight, $hPen ) _GDIPlus_GraphicsDrawStringEx($hGraphic, $sString, $hFont, $aInfo[0], $hFormat, $hBrush2) ; Save image _GDIPlus_ImageSaveToFile($hImage, $image & ".bmp") ; Free resources _GDIPlus_PenDispose ($hPen ) _GDIPlus_BrushDispose ($hBrush1 ) _GDIPlus_BrushDispose ($hBrush2 ) _GDIPlus_StringFormatDispose($hFormat ) _GDIPlus_FontDispose ($hFont ) _GDIPlus_FontFamilyDispose ($hFamily ) _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_ImageDispose ($hImage ) _GDIPlus_ShutDown() FileMove($image & ".bmp",$image,1) Return 1 EndFunc Func _Main() Local $hBitmap, $hClone, $hImage, $iX, $iY ; Initialize GDI+ library _GDIPlus_StartUp () ; Capture 32 bit bitmap $hBitmap = _ScreenCapture_Capture ("") $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($hBitmap) ; Create 24 bit bitmap clone $iX = _GDIPlus_ImageGetWidth ($hImage) $iY = _GDIPlus_ImageGetHeight ($hImage) $hClone = _GDIPlus_BitmapCloneArea ($hImage, 0, 0, $iX, $iY, $GDIP_PXF24RGB) ; Save bitmap to file _GDIPlus_ImageSaveToFile ($hClone, $image) ; Clean up resources _GDIPlus_ImageDispose ($hClone) _GDIPlus_ImageDispose ($hImage) _WinAPI_DeleteObject ($hBitmap) ; Shut down GDI+ library _GDIPlus_ShutDown () EndFunc ;==>_Main Now snapshot your desktop and add IP. I need to create 24bit black image (1024x768) then add IP. Anyone can help ? m. Edited March 30, 2009 by myspacee Link to comment Share on other sites More sharing options...
myspacee Posted March 30, 2009 Author Share Posted March 30, 2009 anyone try it ? anyone can adjut it, or teach me how create BMP (clean) so I can add it to script ? m. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 30, 2009 Developers Share Posted March 30, 2009 (edited) Why not simply write the public IP address to a txt file and use that to show it via BGINFO? Edited March 30, 2009 by Jos SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
myspacee Posted March 31, 2009 Author Share Posted March 31, 2009 Don't know is possible. But it's so hard create a new bmp file ? (see clone, GDI 'paste', but nothing for 'new' one) m. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2009 Developers Share Posted March 31, 2009 Don't know is possible.I know it is possible and pretty easy to do with an AutoIt3script and BGINFO.But it's so hard create a new bmp file ?(see clone, GDI 'paste', but nothing for 'new' one)m... but if you want to reinvent the wheel then be my guest..... SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
myspacee Posted March 31, 2009 Author Share Posted March 31, 2009 Don't know is possible, for me don't want to reinvent the wheel but I want to learn. GDI is hard but not impossible to understand. Don't want to reinvent GBinfo (standard IT tool), i'm not so good m. Link to comment Share on other sites More sharing options...
myspacee Posted March 31, 2009 Author Share Posted March 31, 2009 sorry for bagging again, but try command line BGinfo and it use only its standard (.bgi files) Not standart RTF file, so how i can inflate other information than BGinfo gives ? m. Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2009 Developers Share Posted March 31, 2009 Open BGINFO and load your .bgi file you want to use. Then create a Custom field for the External IP address and have it load from a textfile. JOs SciTE4AutoIt3 Full installer Download page  - Beta files    Read before posting   How to post scriptsource   Forum etiquette Forum Rules  Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ResNullius Posted March 31, 2009 Share Posted March 31, 2009 monoceres already started reinventing the wheel.See this post http://www.autoitscript.com/forum/index.ph...st&p=605261in a similar thread. Link to comment Share on other sites More sharing options...
NeoFoX Posted April 1, 2009 Share Posted April 1, 2009 I'm using Samurize for several years now.. have a look at that It can even show winamp, rss, weather on your desktop Neo [center][font="Arial"]--- The Neo and Only --- [/font][font="Arial"]--Projects---[/font]Image to Text converterText to ASCII converter[/center] Link to comment Share on other sites More sharing options...
myspacee Posted April 1, 2009 Author Share Posted April 1, 2009 I know that this task is possible. monoceres script do exactly thing I need thank you all for your time. m. 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