Wallpaper changing popup Thread last updated on 2006-08-21 18:12:24

Posted by member 300459 on 2006-02-07 21:56:16

Apologies in advance as I can *guarantee* this has been covered somewhere, I just seem to be totally incapable of finding it... *Puts on his asbestos suit*

Basically Im trying to create an extra popup entry that allows a user to select the wallpaper they want from the menu.
Now Im fairly new (OK *very* new) to this but Ive grapsed I need to use the !dynamicfolder bang, what I need help with is the command to set the wallpaper thats been clicked on to the desktop.

Any takers?

Posted by member 212670 on 2006-02-07 22:16:12 link

I know there was another thread about this, but I can't find it either...

Here's a simplified version of what I'm currently doing. It requires the files paperjpg.rc, paperpng.rc, and paperbmp.rc in a Config directory (this of course is easy to modify to add other picture formats).

In my theme.rc:
*NetLoadModule scandir-0.3
*NetLoadModule lswchanger-1.2

ScanDirs Walljpg Wallbmp Wallpng

WalljpgPath $walldir$
WalljpgFiles *.jpg
WalljpgOutputFile $ConfigDir$paperjpg.rc
WalljpgFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$walldir$\[filename]"

WallbmpPath $walldir$
WallbmpFiles *.bmp
WallbmpOutputFile $ConfigDir$paperbmp.rc
WallbmpFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$walldir$\[filename]"

WallpngPath $walldir$
WallpngFiles *.png
WallpngOutputFile $ConfigDir$paperpng.rc
WallpngFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$walldir$\[filename]"


In my themevars.rc (example):
walldir "C:\wallpapers"


In my popup.rc
*Popup "Wallpapers" Folder
include "$ConfigDir$paperjpg.rc"
include "$ConfigDir$paperpng.rc"
include "$ConfigDir$paperbmp.rc"
*Popup ~Folder


Not shown, I've also added in options to set the walldir var (which is why I'm using a var for the path in the first place), and rescan/refresh the list, using comdlgls and a simple script.

Posted by member 300459 on 2006-02-07 23:00:08 link

Aww that was just what I needed!
Hope you dont mind if I poach some of that code (Im not making a theme of my own ...yet.)
And Ive altered it so that I have an extra 'personal' file (walls.rc) which contains a fiddled version of your theme.rc code which should enable me to use this in any theme, and that popup code changed to match my .rc locations.

On a side note I had to put the FileOutputFormat bit inside an !execute function to get it to work.
Thanks again man!

Posted by member 212670 on 2006-02-07 23:57:09 link

Ya, was a basic setup meant to be modified to your needs.

Hmm, an !execute shouldn't be needed. It should be writing to the paper*.rc (jpg for example) as:
*Popup "wallpapername.jpg" !wallpaper .stretch "C:\path\wallpapername.jpg"


But hey, whatever works for you.

And np.