 |
Rappy Wanderer
Joined: 15 Jul 2005 Posts: 96
|
Posted: Thu May 22, 2008 11:39 pm
directory listing |
I checked the help files in and out and can't seem to find a #COMMAND that gives you a directory listing.
Currently I am using #PICK to show a list of selected files, but that can turn out to be HUGE and eventually I would have to use multiple #PICKs depending on the amount of files I would be using.
Did I miss a #COMMAND somewhere? or is there a way I could call a windows thread or CMD directory and return it to zMUD? Not sure if #DDE would help as I am not sure if there are any windows 'programs' that I could use that with.
Basically I am looking for a %function or #COMMAND that will allow me to return a file name from a directory list.
-Rappy |
|
_________________ Windows 11 Pro,
cMUD 3.34 |
|
|
 |
Fang Xianfu GURU

Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Fri May 23, 2008 12:43 am |
Doesn't exist. You could try using JScript, VBScript or COM to do this - I'm not sure how you'd go about it, but I assume it's possible.
|
|
|
|
 |
Dharkael Enchanter

Joined: 05 Mar 2003 Posts: 593 Location: Canada
|
Posted: Fri May 23, 2008 6:48 pm |
If you're using XP or Vista then probably something like this.
| Code: |
#VAR DLG %comcreate("UserAccounts.CommonDialog")
Dlg.InitialDir = "C:\SomeValidDirectory"
#VAR FileName {}
#IF (@Dlg.ShowOpen()) {#VAR FileName @Dlg.FileName}
#NO do something with FileName here |
EDIT: not sure if that works on Vista, I tried a JScript equivalent on XP. |
|
_________________ -Dharkael-
"No matter how subtle the wizard, a knife between the shoulder blades will seriously cramp his style." |
|
|
 |
Rappy Wanderer
Joined: 15 Jul 2005 Posts: 96
|
Posted: Sat May 24, 2008 1:12 am |
Awesome, that's exactly what I am looking for. Is there anyway to put in a filetype, like *.txt, or *.exe with that?
-Rappy |
|
_________________ Windows 11 Pro,
cMUD 3.34 |
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Sat May 24, 2008 9:59 am |
I guess something like
| Code: |
...
Dlg.InitialDir = "C:\SomeValidDirectory"
Dlg.Filter = "Text Files|*.txt|All Files|*.*"
...
|
Entries in .Filter are
-A text description for you to read when dialog will pop up (Text Files).
-The pipe separator (|)
-The actual filter itself (*.txt)
Add as many file types to the filter as you want |
|
|
|
 |
Rappy Wanderer
Joined: 15 Jul 2005 Posts: 96
|
Posted: Sat May 24, 2008 4:34 pm |
Thanks, awesome job guys.
-Rappy |
|
_________________ Windows 11 Pro,
cMUD 3.34 |
|
|
 |
|
|
|