Last active
January 17, 2024 18:27
-
-
Save raveren/ab475336cc69879a378b to your computer and use it in GitHub Desktop.
Open current wallpaper in windows8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set Shell = CreateObject("WScript.Shell") | |
' change to TranscodedImageCache_001 for second monitor and so on | |
openWallpaper("HKCU\Control Panel\Desktop\TranscodedImageCache_000") | |
function openWallpaper(regKey) | |
arr = Shell.RegRead(regKey) | |
a=arr | |
fullPath = "" | |
consequtiveZeroes = 0 | |
For I = 24 To Ubound(arr) | |
if consequtiveZeroes > 1 then | |
exit for | |
end if | |
a(I) = Cint(arr(I)) | |
if a(I) > 1 then | |
fullPath = fullPath & Chr(a(I)) | |
consequtiveZeroes = 0 | |
else | |
consequtiveZeroes = consequtiveZeroes + 1 | |
end if | |
Next | |
Shell.run Chr(34) & fullPath & Chr(34) | |
end function | |
Wscript.Quit |
Please feel free to use my slightly different wallpaper script. This one opens the folder and highlights the image.
What are the odds this was exactly what i was looking for and you just posted it 19 days ago?
Thank you!
The odds are 100%. :)
Same line of thought reused in this Autohotkey script:
https://gist.github.com/raveren/bac5196d2063665d2154
look for WIN+W
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What are the odds this was exactly what i was looking for and you just posted it 19 days ago?
Thank you!