本帖最后由 A175178 于 2009-10-13 16:22 编辑
无聊时写了个小脚本来更改当前桌面墙纸,但只能一个一个向下换,不能倒回去,求解决方法。
附小脚本代码:
#noTrayIcon
$g_szVersion = "_WPCG"
If WinExists($g_szVersion) Then Exit
AutoItWinSetTitle($g_szVersion)
HotKeySet("^!{NUMPAD0}","Wpexit")
HotKeySet("^!{DOWN}","WPnext")
$search = FileFindFirstFile("G:\images\WallPaper\" & @DesktopWidth & "\*.bmp")
While 1
Sleep(500)
WEnd
Func Wpexit()
FileClose($search)
$sFile = 'G:\images\WallPaper\' & @year & @mon & '.bmp'
If FileExists($sFile) Then DllCall('user32','int','SystemParametersInfo','int',20,'int',0,'str',$sFile,'int',0)
Exit
EndFunc
Func Wpnext()
If $search = -1 Then Exit
$sFile = FileFindNextFile($search)
If @error Then
$search = FileFindFirstFile("G:\images\WallPaper\" & @DesktopWidth & "\*.bmp")
$sFile = FileFindNextFile($search)
EndIf
DllCall('user32','int','SystemParametersInfo','int',20,'int',0,'str','G:\images\WallPaper\' & @DesktopWidth & '\' & $sFile,'int',0);
EndFunc |