mIRC Home    About    Download    Register    News    Help

Print Thread
#138493 01/01/06 04:25 PM
Joined: Oct 2004
Posts: 72
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
If I use:

$sdir(C:\my documents, title, ok)

then I get the directory selection dialog starting at C:\my documents.

If I use:

$sfile(C:\my documents\*.*, title, ok)

then I get the file selection dialog, starting at desktop.

What is wrong?

#138494 01/01/06 07:05 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
You tell us...

Your first example uses $sdir (select directory)

Your second uses $sfile (select file)

From the mIRC help file
Quote:
$sdir(dir,title)
Displays the select folder dialog and returns the selected folder. Title is optional.

$sfile(dir,title,oktext)
Displays the select file dialog and returns the selected filename. Title and oktext are optional.

#138495 01/01/06 08:07 PM
Joined: Oct 2004
Posts: 72
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
Well, I expected that $sfile would start in C:\my documents instead of desktop. When I use C:\program files it does start in that directory. So why can't it find my documents. And yes it is an existing directory.

#138496 01/01/06 10:48 PM
Joined: Oct 2004
Posts: 72
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
By the way, the mirc help file says:

$sfile(dir,title,oktext)

What is the use of filling in "dir" if that part doesn't show up?

#138497 01/01/06 11:28 PM
Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
I just did a few tests of this, and using a format similar to $sfile(c:\program files\) worked just fine

Please note that the ending \ is required, also the My Documents folder in Windows XP, is NOT located at c:\my documents, but at c:\documents and settings\<user name>\my documents

I don't know if this makes a difference for you or not, but thought I'd mention it.

#138498 01/01/06 11:48 PM
Joined: Oct 2004
Posts: 72
C
Babel fish
OP Offline
Babel fish
C
Joined: Oct 2004
Posts: 72
Thanks for testing RusselB. I think you are right that My Documents is actually located in another directory, but that doesn't explain why $sfile can't find it since, for instance, /splay with mp3 files located in My Documents using the full path will play the required files. I still think there is a bug in $sfile. By the way, I use the Dutch version of Windows Me. In there it is called C:\Mijn documenten.

Last edited by captain_comic; 01/01/06 11:50 PM.

Link Copied to Clipboard