Default action for folder elements in xPopup? Thread last updated on 2005-12-14 21:38:39

Posted by member 51749 on 2005-12-13 00:58:55

hey,

id like to be able to have a folder in a popup list its contents, but when i click on one of them, make it do something other than open the file. is this doable dynamically, ie, so that i dont have to edit the popup.rc every time something new is added to the folder?

Posted by member 51749 on 2005-12-13 01:02:28 link

i should elaborate.. id like to display a folder full of desktop backgrounds, and be able to just click on them to change the said wallpaper.. all without having to include a referance to each and every image file in the folder.

Posted by member 248213 on 2005-12-13 04:22:16 link

you can do this with a file scanning module, and a textediting module,

I think scandir and xTextedit should work.

You need scandir to use xTextedit to write *Popup lines for all your wallpapers.

Posted by member 51749 on 2005-12-13 04:47:02 link

cheers, might try that.

btw, thanks for dark.space... used it for over a year :)

Posted by member 212670 on 2005-12-13 05:20:27 link

Actually, no xTextEdit necessary, but you do need a wallpaper module. ScanDir will write to the file for you.

I liked this question, so I put it together. Here's how:
*NetLoadModule scandir-0.3
*NetLoadModule lswchanger-1.2

ScanDirs Test

TestPath $themedir$test\
TestFiles *.*
TestOutputFile $ConfigDir$test.rc
TestFileOutputFormat *Popup "[filename]" !wallpaper .stretch "$ThemeDir$test\[filename]"


Then, in a popup, you would add:
*Popup "Wall Papers" Folder
include "$ConfigDir$test.rc"
*Popup ~Folder


TestPath points to the folder containing the walls, and TestOutputFile points to the file to write to, which you will "include" in to the popup. Oddly, both Path and OutputFile didn't like quotes around the path.

Think I'll do something like this for a theme... With comdlgls-0.7 some cool file and folder selecting would be easy enough, too. =)

(This would be a handy reference thread for the Code forum, imo.)

Posted by member 5575 on 2005-12-13 09:44:51 link

I did the same sort of thing with xpopup and a vbscript, and tossed in a "random wallpaper" feature as well.

Posted by member 248213 on 2005-12-13 20:34:56 link

ahhh, cool! that would be a good instalerless theme switcher too!

ps: DarkSPace did rock eh...

Posted by member 51749 on 2005-12-14 15:24:19 link

wow! thanks xcal, worked a treat!

Posted by member 290891 on 2005-12-14 21:38:39 link

Check out lsplus, it has wallpaper and theme changing via right click menu.