//wallpaper 壁纸 import win.reg; namespace sys.wallpaper; getHistory = function(){ var reg = ..win.reg("HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers"); if(!reg) return {}; var history = {}; for(name,value,t in reg.eachValue()) { var idx = ..string.match(name,"BackgroundHistoryPath(\d+)"); if(idx && t == 1/*_REG_SZ*/){ ..table.push(history,{value,tonumber(idx) }) } } reg.close(); if(!#history){ return { getCurrent() } } ..table.sort(history,lambda(v) owner[2]