Jump to content

Desktop Wallpaper Selecter version 1.20


ashley
 Share

Recommended Posts

OK Well im making a Wallpaper Changer.

It's not finsihed yet... If anybody know how to atchulay change the wallpaper then please tell me.

here is Screenshot of versio 1.20

http://www.mediafire.com/imageview.php?qui...tcs&thumb=4

Also contais one 18+ image and it's clearly shown that its for 18+ onlyt also a mesage box telling you when you open it, that you have agreed.

here is the Zip file. it has the script, and the images in the file.

Download

Edited by ashley
Link to comment
Share on other sites

OK Well im making a Wallpaper Changer.

It's not finsihed yet... If anybody know how to atchulay change the wallpaper then please tell me.

here is the Zip file. it has the script, and the images in the file.

You realy should start out in General Forum ashley. Seems to me like all your projects are either unfinished or not even started and you post them to Examples Forum asking how to make them. Also there's no ZipFile you mentioned.

My little company: Evotec (PL version: Evotec)

Link to comment
Share on other sites

Go on an English course. You annoy me and others with your English and you ARE English!

Here here


Time you enjoyed wasting is not wasted time ......T.S. Elliot
Suspense is worse than disappointment................Robert Burns
God help the man who won't help himself, because no-one else will...........My Grandmother

Link to comment
Share on other sites

ugly gui, useless idea, please discontinue it

check right click -> properties, windows has a nice wallpaper changer with preview and all

cheers

That's not a good reason to stop making a program... Lots of people make windows things like Notepad and Task manager's and sometimes they end up better (or at least easier to use) then the Windows default...\

EDIT: @Ashley, it doesn't look like there is a way to add items to the list from the image you posted...

Edited by Piano_Man
My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Link to comment
Share on other sites

That's not a good reason to stop making a program... Lots of people make windows things like Notepad and Task manager's and sometimes they end up better (or at least easier to use) then the Windows default...\

EDIT: @Ashley, it doesn't look like there is a way to add items to the list from the image you posted...

om added that to my todo list

Link to comment
Share on other sites

... If anybody know how to atchulay change the wallpaper then please tell me.

If I post the code to answer your question are going to pm me and ask me to remove it ?

(like last time when I posted a code answer in one of your threads)

If not then shall I post your code with the preview and set desktop wallpaper working without needing the IE include here in your thread?

(Using GDIPlus include instead)

Cheers

P.S. Your dl is 27MB .. hell my poor 56k modem took forever to download it.. maybe step on the images or maybe offer to dl the actual script on it's own without the images. Just a suggestion.

Link to comment
Share on other sites

If anybody know how to atchulay change the wallpaper then please tell me.

You can use this:

;HKCU/Control Panel/Desktop/Wallaper
#include <GUIConstants.au3>
#include <File.au3>
; =================================================================================================
; Global Constants
; =================================================================================================
Global Const $SPI_SETDESKWALLPAPER = 20
Global Const $SPIF_SENDCHANGE      = 2
Global $Allfiles="",$SearchDir = @WindowsDir&"\Web\Wallpaper\"

#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Wallpaper Rotater", 757, 251, 249, 356)
GUISetBkColor(0xD8E4F8)
$Pic1 = GUICtrlCreatePic("", 220, 56, 164, 148, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER), $WS_EX_STATICEDGE)
$Combo1 = GUICtrlCreateCombo("Picture 1", 24, 56, 185, 25)
$Input1 = GUICtrlCreateInput("10", 24, 160, 57, 27, BitOR($ES_CENTER,$ES_AUTOHSCROLL,$ES_NUMBER))
GUICtrlSetLimit($Input1, 2)
GUICtrlSetFont(-1, 12, 800, 0, "Rockwell")
$Button1 = GUICtrlCreateButton("Apply", 72, 200, 73, 33, 0)
$Label1 = GUICtrlCreateLabel("Wallpaper Rotater", 71, 8, 236, 38, $SS_CENTER)
GUICtrlSetFont(-1, 22, 800, 0, "ThereSignHead3")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0xD8E4F8)
$Combo2 = GUICtrlCreateCombo("Picture 2", 24, 88, 185, 25)
$Combo3 = GUICtrlCreateCombo("Picture 3", 24, 120, 185, 25)
$Pic2 = GUICtrlCreatePic("", 392, 56, 164, 148, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER), $WS_EX_STATICEDGE)
$Pic3 = GUICtrlCreatePic("", 565, 56, 164, 148, BitOR($SS_NOTIFY,$WS_GROUP,$WS_BORDER), $WS_EX_STATICEDGE)
GUICtrlCreateLabel("Integer Delay", 88, 160, 102, 26)
GUICtrlSetFont(-1, 12, 800, 0, "Trebuchet MS")
GUICtrlSetBkColor(-1, 0xD8E4F8)
GUICtrlCreateLabel("1", 289, 210, 13, 26)
GUICtrlSetFont(-1, 12, 800, 0, "Trebuchet MS")
GUICtrlSetBkColor(-1, 0xD8E4F8)
GUICtrlCreateLabel("2", 463, 210, 13, 26)
GUICtrlSetFont(-1, 12, 800, 0, "Trebuchet MS")
GUICtrlSetBkColor(-1, 0xD8E4F8)
GUICtrlCreateLabel("3", 644, 210, 13, 26)
GUICtrlSetFont(-1, 12, 800, 0, "Trebuchet MS")
GUICtrlSetBkColor(-1, 0xD8E4F8)
$Label2 = GUICtrlCreateLabel("Created By Paulie", 447, 8, 230, 38, $SS_CENTER)
GUICtrlSetFont(-1, 22, 800, 0, "ThereSignHead3")
GUICtrlSetColor(-1, 0x800000)
GUICtrlSetBkColor(-1, 0xD8E4F8)
$Files = _FileListToArray($SearchDir, "*.bmp",1)
For $int = 1 to $Files[0]
    $AllFiles = $AllFiles&"|"&$Files[$int]
Next
GUICtrlSetData($Combo1, $AllFiles)
GUICtrlSetData($Combo2, $AllFiles)
GUICtrlSetData($Combo3, $AllFiles)
$info1 = GUICtrlRead($Combo1)
$info2 = GUICtrlRead($Combo2)
$info3 = GUICtrlRead($Combo3)
GUISetState(@SW_SHOW)

#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()

    $img1 = GUICtrlRead($Combo1)
        If $img1 <> $Info1 then
            GUICtrlSetImage($Pic1, $SearchDir&$img1)
            $Info1 = $img1
        Endif
    $img2 = GUICtrlRead($Combo2)
        If $img2 <> $Info2 then
            GUICtrlSetImage($Pic2, $SearchDir&$img2)
            $Info2 = $img2
        EndIf
    $img3 = GUICtrlRead($Combo3)
        If $img3 <> $Info3 then
            GUICtrlSetImage($Pic3, $SearchDir&$img3)
            $Info3 = $img3
        Endif
   
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit
        Case $Button1
            GUICtrlSetState($Form1, @SW_HIDE)
            Accept($SearchDir&$img1, $SearchDir&$img2, $SearchDir&$img3, GUICtrlRead($Input1))
    EndSwitch
WEnd

Func Accept($i_image1, $i_image2, $i_image3, $s_delay)

While 1
    $msg2 = GUIGetMsg()
If $msg2 = $GUI_EVENT_CLOSE Then Exit

    _SetDesktopWallpaper($i_image1, True)
    Sleep($s_delay*1000)
    _SetDesktopWallpaper($i_image2, True)
    Sleep($s_delay*1000)
    _SetDesktopWallpaper($i_image3, True)
    Sleep($s_delay*1000)
WEnd
EndFunc

; =================================================================================================
; Description ..: Sets the desktop wallpaper to the BMP file passed in.
; Parameters ...: $sBMPFile     - Full path to the BMP file
;                 $bUpdate      - Specifies whether the user profile is to be updated. If True, the
;                   WM_SETTINGCHANGE message is broadcast to all top level windows to  notify  them
;                   of change.
; Return values : True
;                 False
; =================================================================================================
Func _SetDesktopWallpaper($sBMPFile, $bUpdate=True)
  Local $aResult
  Local $iWinIni = 0

  if $bUpdate then $iWinIni = $SPIF_SENDCHANGE
  $aResult = DllCall("user32.dll", "int", "SystemParametersInfo", "int", $SPI_SETDESKWALLPAPER, _
                     "int", 0, "str", $sBMPFile, "int", $iWinIni)
  Return $aResult[0] <> 0
EndFunc
Link to comment
Share on other sites

Nice Paulie , but his images are in *.jpg.

He needs his images as *.bmp before he can set it as wallpaper with the api call.

This basically loads a clicked image in the list as a desktop wallpaper.

It's set to ashley's native Wallpapers directory

#include <GUIConstants.au3>
#include <File.au3>
#include <GDIPlus.au3>

Global $apw = 200, $aph = 400, $Last
Global $wPath = @ScriptDir & "\Wallpapers", $pImage = @ScriptDir & "\Preview.bmp"
Global $Original = RegRead("HKEY_CURRENT_USER\Control Panel\Desktop", "Wallpaper")

$Gui = GUICreate("WallPapers", $apw, $aph, @DesktopWidth - ($apw + 5), -1)
$List = GUICtrlCreateList("", 10, 10, 180, 345)
GUICtrlSetData(-1, LoadList($wPath))
$Restore = GUICtrlCreateButton("Restore Original Wallpaper", 10, 365, 180, 25, 0)
$Pic1 = GUICtrlCreatePic($wPath & "\Vista Back.jpg", 0, 0, 200, 400, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
GUISetState(@SW_SHOW, $Gui)

_GDIPlus_Startup()

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            _GDIPlus_ShutDown()
            If FileExists($pImage) Then FileDelete($pImage)
            DllCall('User32.dll', 'int', 'SystemParametersInfo', 'int', 20, 'int', 0, 'string', $Original, 'int', 0)
            Exit
        Case $List
            If $Last <> GUICtrlRead($List) Then
                WinSetTitle($Gui, "", "Processing...")
                GUICtrlSetState($List, $GUI_DISABLE)
                Local $hImage, $CLSID
                $hImage = _GDIPlus_ImageLoadFromFile($wPath & "\" & GUICtrlRead($List) & ".jpg")
                $CLSID = _GDIPlus_EncodersGetCLSID ("BMP")
                _GDIPlus_ImageSaveToFileEx($hImage, $pImage, $CLSID)
                _GDIPlus_ImageDispose($hImage)
                DllCall('User32.dll', 'int', 'SystemParametersInfo', 'int', 20, 'int', 0, 'string', $pImage, 'int', 0)
                WinSetTitle($Gui, "", "WallPapers")
                GUICtrlSetState($List, $GUI_ENABLE)
                $Last = GUICtrlRead($List)
            EndIf
        Case $Restore
            DllCall('User32.dll', 'int', 'SystemParametersInfo', 'int', 20, 'int', 0, 'string', $Original, 'int', 0)
    EndSwitch
WEnd

Func LoadList($iPath)
    If Not FileExists($iPath) Then Return ""
    Local $sTemp
    Local $fList = _FileListToArray($iPath, "*.jpg", 1)
    If @error Then Return ""
    For $l = 1 To $fList[0]
        $sTemp &= StringTrimRight($fList[$l], 4) & "|"
    Next
    Return StringTrimRight($sTemp, 1)
EndFunc

Mind you this is only to preview the images set as wallpaper.

Basically if you don't set the reg entries as well then after reboot your original wallpaper used before the api call is loaded.

I made it so on exit it restores the original wallpaper, or you can manually set your original wallpaper by hitting the the button.

Cheers

Edited by smashly
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...