topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 4:17 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: DONE: copy my wallpaper's full title  (Read 27234 times)

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
DONE: copy my wallpaper's full title
« on: October 10, 2018, 10:16 AM »
The wallpaper changer in Windows 10 (PC desktop version) is so good that I have stopped using any thing else. Sadly, it doesn't display any information! I really miss knowing the title / filename, so I know what to search for if anything should be changed. When would I know that? Yes, when I see the picture.

I am hoping for one or two features only. Maybe a keyboard shortcut, that will copy the address and filename of the relevant wallpaper "now". Or maybe an icon (in the tray) with a pop-up message when mouse pointed at.

 :tellme:
« Last Edit: October 15, 2018, 07:33 AM by Curt »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #1 on: October 10, 2018, 10:50 AM »
Do you mean a traybar icon thats able to show registry value of "Computer\HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper" ?

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #2 on: October 10, 2018, 11:22 AM »
apparently not, for my RegEdit doesn't know of such address... I can follow you to HKEY_CURRENT_USER\Control Panel\Desktop, but none of the available choices include a picture filename.


As far as I can see, or can't see, Windows doesn't care about the filename, like in the old days when every wallpaper first was renamed to wallpaper.bmp, because the first action now is to rename and transcode the wallpaper: TranscodedWallpaper

C:\Users\%User%\AppData\Roaming\Microsoft\Windows\Themes\CachedFiles

But nowhere did I find the actual file name.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #3 on: October 10, 2018, 11:45 AM »
please beta test this Demo App

i cannot attach/upload here, connection interrupts.
tell me if it does what you want.
absolut alpha version, no extras, just application function test.

if the line has nothing to show, please try run app as administrator.


regards,

KodeZwerg

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #4 on: October 10, 2018, 06:25 PM »
eh, Yes, it does what I asked for, if it can do what it is suggesting... So far this demo does what I said it would do, it gives me the path to the TranscodedWallpaper. But we don't want that, because nobody knows what filename that has in real life, and here it is merely "TranscodedWallpaper". Are you saying you can make the finished app "translate" the word TranscodedWallpaper into the actual file name?

Remember that the TranscodedWallpaper file is a transcoded copy of one of the many picture files in the system folder Pictures. The answer to my request will include a filename from that folder.
In fact, the answer to my request will be a filename from that folder.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #5 on: October 10, 2018, 09:46 PM »
Does this help?

How to Find the Current Wallpaper File Name and Path in Windows 8 and 10

There's PoSh and VBa scripts in a zip file, don't know how good they'll be for Bing downloaded images.

If the PoSh script does what you want then I can try and make it more like you originally wanted.

Or @KodeZwerg may be able to use it to work up an executable.
« Last Edit: October 11, 2018, 03:07 AM by 4wd »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #6 on: October 11, 2018, 03:15 AM »
i watched the scripts, they are good.
if you can try this Demo App again, would be great.
on my Windows 10 x64 (1803) it gives me back the filename as result.

for the programmers, i do it like that:
var
  wpFName: array [0..MAX_PATH] of Char;
begin
  if SystemParametersInfo(SPI_GETDESKWALLPAPER, MAX_PATH, @wpFName, 0)
    then Result := String(wpFName)
    else Result := '';
end;

if this works for you, and you wish that to be a hotkey driven system-tray application, tell me.


regards,

KodeZwerg


Ps: if you like me to finalize, final app would have no window at all, just a trayicon with popup menu entry to copy to clipboard.
hotkey is also possible, i than need your combination, no configuration possible.
« Last Edit: October 11, 2018, 05:25 AM by KodeZwerg »

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #7 on: October 11, 2018, 11:22 AM »
it gives you what back?

...\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper
-Demo App

Are your pictures from the default system pictures THEME, maybe?
 :-\

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #8 on: October 11, 2018, 11:51 AM »
it gives you what back?
on my Windows 10 x64 (1803) it gives me back the filename as result.

hey, i am just using what microsoft offers, if it dont fit i am sorry.
feel free to visit microsoft and search for SPI_GETDESKWALLPAPER.
Description says:
Retrieves the full path of the bitmap file for the desktop wallpaper. The pvParam parameter must point to a buffer to receive the null-terminated path string. Set the uiParam parameter to the size, in characters, of the pvParam buffer. The returned string will not exceed MAX_PATH characters. If there is no desktop wallpaper, the returned string is empty.
additional i have tested with Win8.1 and Win10 1809 (Build 17763.55) with correct result.

BTW does the scripts work? (that would be interesting for me to figure out how to translate that binary registry into a readable text.)

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #9 on: October 11, 2018, 04:33 PM »
sorry, if I sounded rude / too hasty, I was in the halftime of my fav' clubs' game.

Win 10 no longer uses bitmap, but transcoding. I guess your bitmap test was successful because Win 8 / 8.1 used to be installed; those ones used bmp. Mine has never had any thing younger older than Win 10, so "transcoding" is all that is needed here.

I am sorry this has become a problem. I was hoping it all would be be as easy as the Underscore project some hours ago.
« Last Edit: October 11, 2018, 05:35 PM by Curt »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: copy my wallpaper's full title
« Reply #10 on: October 11, 2018, 04:48 PM »
Curt,

I think I found the answer to your problem at https://www.winhelpo...ile-path-windows-10/.  Note the link there to https://www.winhelpo..._Curr_Image_Name.zip

KodeZwerg,

hey, i am just using what microsoft offers, if it dont fit i am sorry.

As you've seen, it doesn't work in windows 10.  You can check for OS version.  If windows 10, you can check the following:

%AppData%\Microsoft\Windows\Themes\CachedFiles or %AppData%\Microsoft\Windows\Themes\TranscodedWallpaper

Appdata should be a special folder you can get from winapi call.

You can also check the registry under HKEY_CURRENT_USER\Control Panel\Desktop\TranscodedImageCache or HKEY_CURRENT_USER\Control Panel\Desktop\Wallpaper.

The transcodedimagecache is actually the binary representation of the filename- it apparently might be multiple ones; I guess if there are multiple screens.

Hope that helps one or both of you!


KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #11 on: October 11, 2018, 05:17 PM »
as soon as he write that script is working for him, that would be also my solution just for educational purposes.
how i do then same thing with delphi is another story :-)
i have just a little time atm to figure out how i correctly copy filename from the binary key (that was used in script i tested)
(...atm it show alot of UNICODE garbage but a real path\filename is also stored in there/visible to me...)
or how i reproduce that my registry show me just a foldername.
when i tell windows that it now should use this or that image, whatsever major format (bmp jpg png), it'll accept and my sample .exe's resolved me filename.

i admit, i havent got any knowings about any special used folder since for me (with virgin win10, no prior installed OS), both of my example worked well.
first one was raw registry reading.
second was api from microsoft.
lets see wich third method is needed to succeed :)

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #12 on: October 11, 2018, 05:25 PM »
Sorry, 4wd, I missed to see your post.  :-[
Of course you had the proper solution. Thank you!  :up:

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #13 on: October 11, 2018, 06:18 PM »
just to proof that i learned from it, last Demo App

ps: i have no idea how my app react on non-Windows8orHigher. this is just a custom raw build suitable to windows from Curt. neither i have any idea what you get in return if multi monitor with different wallpapers are used or how to seperate them correct, script doesnt show.
« Last Edit: October 11, 2018, 06:34 PM by KodeZwerg »

wraith808

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 11,190
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #14 on: October 11, 2018, 10:29 PM »
Sorry, 4wd, I missed to see your post.  :-[
Of course you had the proper solution. Thank you!  :up:


Ah... I didn't see he had posted that before either.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #15 on: October 12, 2018, 12:55 AM »
just to proof that i learned from it, last Demo App

^ Yes!
Really well done, KodeZwerg! In fact, so well done that I now have removed the winhelp version.  :up:

Would you care to work even more on this application? Right now it is doing what I asked for, but not in a specially helpful way. I mean, now, I would first have to go search for the program, then answer if I want to copy, then go to actually find the picture.

Maybe it could be part of my desktop context menu (see screnshot)? and from there* simply offer to Copy Full Path or To Open the picture right away, as a new step one+two? 

*there = "Desktop Background File Location":
Desktop Background File Location.jpg

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #16 on: October 12, 2018, 01:39 AM »
Sorry, 4wd, I missed to see your post.  :-[
Of course you had the proper solution. Thank you!  :up:


Ah... I didn't see he had posted that before either.

Got to watch out for the quiet ones  ;)

Another alternative for displaying the name would be to have the text overlayed onto the current wallpaper and then set that as the background, a.l.a. DisplayFusion, which is what I do.

eg.
Monitor the modification time on the transcoded image.
Grab the original file/path
Overlay onto the transcoded image
Set that as the new wallpaper
Start over
« Last Edit: October 12, 2018, 03:46 AM by 4wd »

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #17 on: October 12, 2018, 04:33 AM »
just to proof that i learned from it, last Demo App

^ Yes!
Really well done, KodeZwerg! In fact, so well done that I now have removed the winhelp version.  :up:

Would you care to work even more on this application? Right now it is doing what I asked for, but not in a specially helpful way. I mean, now, I would first have to go search for the program, then answer if I want to copy, then go to actually find the picture.

Maybe it could be part of my desktop context menu (see screnshot)? and from there* simply offer to Copy Full Path or To Open the picture right away, as a new step one+two? 

*there = "Desktop Background File Location":
[attach=#,msg424122][/attach]

sorry for the bumpy start, now that i know that it works for you i can change it as i like.
an entry in the context menu should certainly be feasible.
yes the demo app is called Demo App because it's only a demonstration hehe
this should only rudimentarily show you the possibilities and serves to check if it works at all.
this weekend i'm going to refine all that, maybe i'll include the idea of 4wd as well, somehow i like it.
as an option in the menu would be something like "show name" and "hide name" plus "copy name" plus "open in explorer" plus "open image". (that enough?)
@4wd i would add text direct on monitor/desktop surface, not with save image stuff
stroken text = just remembered, that i could only do if its a systray application, so 4wd was right with save/replace wallpaper   :Thmbsup:
i need to think about implementation, other features i can easy perform as commandlines
or i do with "show/hide name" as systray app.... let me suprise you :)
« Last Edit: October 12, 2018, 04:55 AM by KodeZwerg »

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #18 on: October 12, 2018, 05:44 AM »
... maybe i'll include the idea of 4wd as well, somehow i like it..

Some Powershell source that does the overlaying and updating: Set-Wallpaper.ps1

Function New-Wallpaper (line 360) and Update-Wallpaper (line 579), might help ... or not.

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #19 on: October 12, 2018, 06:58 AM »
it gives you what back?

...\AppData\Roaming\Microsoft\Windows\Themes\TranscodedWallpaper
-Demo App

Are your pictures from the default system pictures THEME, maybe?
 :-\
on further investigation on that, it was also correct or it might be even the only correct solution.
the path is ...\AppData\Roaming\Microsoft\Windows\Themes\ and there is a file called TranscodedWallpaper without extension.
it is a copy of original image that i found out. i think it has something to do with windows slideshow thing what i turned off.

anyway, i continue later with the script solution.

Curt

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 7,566
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #20 on: October 12, 2018, 08:00 AM »
, maybe i'll include the idea of 4wd as well,
.... let me suprise you :)

no, NO!  :o   :(   
I swear, I already have plenty of screen-savers and wallpaper-changers. Please at least keep keep such projects apart from "IDEA: copy my wallpaper's full title"!



KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #21 on: October 12, 2018, 12:57 PM »
if I focus on it now, it will be done very quickly.
of course, I respect your wishes.
after all, only you should be happy with it and no one else.
i still have a few problems how to create submenus, but otherwise the scaffolding already stands.
it is now a console application that performs a mini installation at the first start.
so you do not need to worry about it anymore.
if there are any wishes to consider, now would be the perfect moment to tell me this.

FYI / to clarify:
app will have no window/GUI
app will just driven by desktop context menu
menu will have "Copy Filename" "Open in Explorer" "Open Image" "Remove Menu" submenus that instant do its job without further clicks.
nothing more, nothing less.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #22 on: October 12, 2018, 12:58 PM »
Sounds like kodezwerg has another NANY 2019 entry..

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #23 on: October 12, 2018, 01:18 PM »
if you say so i will extend to a better/more to all compatible variant.
this build in here fully belong to "Re: IDEA: copy my wallpaper's full title" request  :Thmbsup:

KodeZwerg

  • Honorary Member
  • Joined in 2018
  • **
  • Posts: 718
    • View Profile
    • Donate to Member
Re: IDEA: copy my wallpaper's full title
« Reply #24 on: October 12, 2018, 02:42 PM »
@Curt
some bad news, by reading microsoft developer network how to create sub menus within a context menu, i would need to create a contextmenuhandler .dll file to realize.
my option to have it faster done, i will add either several main menus or i place them inside "Send To", i think there i can create submenus as simple folders.

so it is up to you wich way to go.
aslong you dont have choosen, i read for educational purposes more about contextmenuhandlers to be prepared :-)