This has been bothering the hell out of me as of late. I've been using two list boxes. One to load up a directory list, and the other to load a files list.
The directory list contains brackets before and after each folder name and won't allow me to open new directories automatically.
I've zipped an example with the Browser2 and File extensions. I'm not asking anyone to fix it for me and send it back. I just think this might help someone in suggesting a solve to my dilema.
I'm thinking I should use the String Parser 2 extension, but I haven't the first clue on HOW to use it to remove the brackets and pass the folder path back into the directory list box.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
I don't think I explained this well enough.
Here's the problem I'm running into:
The Directory Listbox displays directories like this:
[..]
[PROGRAM FILES]
[WINDOWS]
I can get the file list from the initial directory by loading a file list with the command here:
appdrive$ + appdir$ + "*.*"
and I have it set up so in "theory", when I double-click a directory in the Directory Listbox, both the Directory Listbox and the File Listbox refresh themselves. The Directory Listbox is supposed to display any folders from within the newly selected file path, and the File Listbox is supposed to show any files contained within the newly selected file path.
Unfortunately both the Directory Listbox AND the File Listbox go blank because TGF includes the brackets in the directory path when a new directory is selected.
Instead of navigating to "c:\WINDOWS" for instance , TGF will try to navigate to "c:\[WINDOWS]". With the brackets included, "c:\[WINDOWS]" obviously isn't a valid directory.
I'm just trying to find a way to remove those damn brackets. I suppose String Parser 2 will work, but I don't have the foggiest clue on how to use the damn thing. Any help?
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
There is a function for getting directory names from Lists, alteast in MMF but it should be in TGF also
Instead of List Select$( "List" ) or whatever it is, use List SelDir$( "List" )
In the expression editor it says Get current line (Directory)
There is the same thing for drives too
You ever have those moments where you smack yourself in the forehead for overlooking something that should have been easily noticable? Well, this is one of those moments for me. Thank you, thank you, thank you! You've been a real help.
-Grim
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
In MMF you could have used the Mid$ function, but you'll have to use String Parser in TGF. I only have String Parser 2, but if SP1 is anything like SP2, it should go like this:
(Let's assume you store the current path in a string called "path")
Thanks, Axel. Since I really had no idea how to use String Parser, your post provides a quick, understandable run down, but Werbad is right. I didn't really need it (thankfully). Thanks to you two, the file browser is close to complete. I'd insist on putting your names in the credits, but I'm throwing together some pirated warez compilations, and I doubt either of you two want your handles floating around the net on a peice of software like this.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
If I ever find any legal use for a file browser, though, your names will go in the credits. Thanks a million.
ChrisD> Employer: Say, wanna see a magic trick?
ChrisD> Employee: Uhh… sure, boss.
ChrisD> Employer: Your job! It just disappeared! Pack your things and leave! Pretty good trick, huh?
DaVince This fool just HAD to have a custom rating
Registered 04/09/2004
Points 7998
23rd August, 2006 at 14:01:54 -
Darn it, I got the same thing when I was making Easy Site Editor 1! Thanks a bunch for this!