ComDLGLs problems. Thread last updated on 2003-07-09 09:50:11

Posted by member 602 on 2003-07-06 12:04:49

Does anyone have experiance with ComDLGLs? I can't get it to work properly. This is what I want to do. Have IconDesk show desktop icons from some folder defined in themepopup. One of the options are "Custom" where a "select folder" dialog should appear. This is the script code for that:

*Script Bang !SetIconCustom
*Script exec !ReloadMoodule "$ModulesDir$comdlgls.dll"
*Script exec !ComDLGFolder !VarSet IconFolder "^@dp^"
*Script exec !Recycle
*Script ~Bang


I've tried not loading it dynamically, putting !VarSet... in quotes, Putting !VarSet... on a separate line etc. When I get the dialog to appear it seems to be working correctly. The problem that occurs is that I can get the dialog to appear once, but never again until maybe when I 've restarted my comp. !ComDLGFile appear almost everytime. Non of the others have ever worked. And after a unsuccessfull time that part of the popup where the !SetIconCustom is doesn't react to mouse over anymore. And if I try to many times LS will stop reacting altogether and eventually crash. Strang problem this. Any help welcome...

Update!! I've tried this some more now and it appears that I can get it to work more than once. Actually just as long as I don't select a folder with spaces in it's path. Might not be a problem with ComDLGLs after all...I'll report when I find the cause..

Posted by member 37809 on 2003-07-06 12:26:34 link

I have had similar problems to yours before, though I did not thoroughly investigate to correct the problems; I only looked for alternative solutions.

I found that using !reloadmodule (and !unloadmodule) with comdlgls would not work with my scripts; I had to always have it loaded. Seems the sequence or timing is off?

I think recent versions of mzscript do not support spaces in variables' values to be saved anymore, like older versions could. You'll notice there are no quotes in varfiles. mzscript can hold variables including spaces while in memory, but saving to a varfile will only result in the first word being written.

I suggest you downgrade mzscript (only if your scripts still work), or use textedit instead, since it can write spaces. Also, if a recycle isn't required, you might want to try !reload'ing (with the textedit'd file include'd), and then !reloadmodule icondesk and whatever else needed.

Posted by member 6021 on 2003-07-06 18:58:12 link

I really don't know what that module is, however I get the same effect you're looking for using mzscript and text edit2 by doing this...

*script bang !SetDesktopIconsDrives
*script exec !textreplace "$ConfigDir$themevars.rc" "IconDeskDesktopFolder" "IconDeskDesktopFolder \#drives\#"
*script exec !Recycle
*script ~bang

*script bang !SetDesktopIconsDesktop
*script exec !textreplace "$ConfigDir$themevars.rc" "IconDeskDesktopFolder" "IconDeskDesktopFolder .desktop"
*script exec !Recycle
*script ~bang

*script bang !SetDesktopIconsPersonal
*script exec !textreplace "$ConfigDir$themevars.rc" "IconDeskDesktopFolder" "IconDeskDesktopFolder \#ShortcutFolder\#"
*script exec !Recycle
*script ~bang

I'm sure you know how that works in theme popup. Out of curiousity, what do you think is better about the comdlgls.dll and exactly what the hell is it?

Posted by member 602 on 2003-07-07 04:04:49 link

Ok thanks everyone(two). The thing about mzScript not saving variables with spaces is known, however for me it saves the entire path. It just leaves out the quotes so LS can't read it. I posted about it here: http://www.litestep.net/index.php?section=4&action=view&catId=3&id=1400

I couldn't solve that problem without textedit. I have this thing about not loading more modules than absolutly neccessary but that doesn't matter anymore because now it looks like this:
*Script Bang !SetIconCustom
*Script exec !ReloadMoodule "$ModulesDir$comdlgls.dll"
*Script exec !ReloadMoodule "$ModulesDir$textedit2.dll"
*Script exec !ComDLGFolder !Textreplace "$VarFile$" "IconFolder" "& \=^@dp^\="
*Script exec !Recycle
*Script ~Bang

So now textedit is lost right after the command. And it puts quotes around the path (\=). So now it works like a charm. Even when I use dynamic loading, but I mst remember to let people test that before I release the theme.

Johnny, I use the same method as you plus this command I posted above. ComDLGLs gives the ability to show Common DiaLoGs in LS ("Select folder", "Select file", "Select font" and "Select color"). So what happends is that a "select folder" dialog appears and you can select which folder you want to display on your desktop. Neat.

The only questionmark left is that EVERYTHING else work the old way even if I select a path with spaces (icons won't show of course but litestep keeps running). But if I load the dialog once it crashes EVERYTHING. So I can't see any other possibility right now (but I've been blind lots before) other than there's some bug with comdlgls. Can't figure out what it could be though and how the **** it could matter to it what mzScript does to it's varfile.

Posted by member 37809 on 2003-07-07 07:11:18 link

You are aware you have typoed '!ReloadModule' more than once now? :)

Posted by member 1783 on 2003-07-07 11:09:11 link

i hope you didn't write !ReloadMoodule in your script.rc ;)

Posted by member 99 on 2003-07-07 19:01:04 link

? So when does it crash? I don't understand what you mean by "if I load the dialog once" if you're getting the string out of the dialog...

The next version of comdlgls will let you get the short name of the folder with !comdlgfolder !varset IconFolder {(short)} I expect that this would probably help here.

Posted by member 602 on 2003-07-08 06:11:33 link

Yeah! sorry about the typo ;) Copy & paste.

Rabid, I will look even more at the bug and see if I can narrow it down a little. I will mail you as soon as I find more. Got some questions about your VWM also.

Update! Seems like I was wrong all along. I completly tore my theme apart and in the end I found that it was a bug with IconDesk that I thought was long gone. With that in mind I better tear it down again to see if it's really RabidVWM.dll that causes my problems with !Refresh, before I go posting anything here. Sorry for any inconveniance.

Posted by member 99 on 2003-07-08 12:06:50 link

Ah, ok. It's always nice to hear that a bug isn't your fault :D

Posted by member 602 on 2003-07-09 09:50:11 link

Yeah, but unfortunaly I haven't been able to shake of that VWM bug and it happens in other themes with rabidVWM as well, like for instance glaze. If I do a !Refresh the theme locks up and will only respond to the emergency menu. And the funny thing is that when I from LSCP quit ls it not only quits but also restarts it. It's like LS want's to refresh but rabidvwm stops it from doing so. And when Ls is told to quit it quits but still remembers to refresh. That's a little strange way to put it but I hope you understand. Might only happend to me.