mIRC Home    About    Download    Register    News    Help

Print Thread
#179972 01/07/07 01:05 PM
Joined: Jul 2004
Posts: 59
L
Babel fish
OP Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
Below are two attempts to get the Dir List of the Settings dir. The second is closer to what I am attempting to do however returns an Error. What I need is to list the directories so that I am able to add them in a dialog--
IE: $finddir($mircdirModules\Settings,*.*,0, did -a search 3 $1-)
Only I dont want the full dir name just the actual dir IE: a, b, c, Nor do I want the error message. Thanks for any help

testing //echo $finddir($mircdirModules\Settings,*.*,0,echo $1-)

Produces

C:\IRC\Modules\Settings\a
C:\IRC\Modules\Settings\b
C:\IRC\Modules\Settings\c
C:\IRC\Modules\Settings\d
C:\IRC\Modules\Settings\e
C:\IRC\Modules\Settings\f
-
* /echo: insufficient parameters (line 5, aliases.ini)
-

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
The error is because /echo's first parameter is a colour, and you're returning a number, so /echo assumes you're trying to echo nothing, in the colour in returned by $finddir. Use /echo -a:

Code:
echo -a $finddir($mircdirModules\Settings\,*,0,echo $remove($1-,$mircdirModules\Settings\))


Or if you don't want to do anything with the value returned by $finddir, then use /noop:

Code:
noop $finddir($mircdirModules\Settings\,*,0,echo $remove($1-,$mircdirModules\Settings\))

Joined: Jul 2004
Posts: 59
L
Babel fish
OP Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
hixxy,

your code examples didnt show could you post them again.

Thanks

Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
echo -a $finddir($mircdirModules\Settings\,*,0,echo $remove($1-,$mircdirModules\Settings\))

noop $finddir($mircdirModules\Settings\,*,0,echo $remove($1-,$mircdirModules\Settings\))

Joined: Jul 2004
Posts: 59
L
Babel fish
OP Offline
Babel fish
L
Joined: Jul 2004
Posts: 59
hixxy
the /noop is exactly what I needed the dialog fills perfectly now.


Thank you for your time.

LittleJohn


Link Copied to Clipboard