mIRC Home    About    Download    Register    News    Help

Print Thread
#257181 19/03/16 10:06 AM
Joined: Sep 2005
Posts: 116
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2005
Posts: 116
Hello.
$sfile in beta edition won't work the same way as in 7.43.
Code:
//noop $sfile(*)
Entering a filename, then click "Open" button. It returns "File not found".

Regards.


when no one watching us
we are invisible
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
I tested and i cannot reproduce this situation, can you please post your code or an example? because the '/noop' example does not really helps so we can reproduce the bug.

If you can share a screenshot/video it would be much better.

Edit: If you enter a name into the field and this name does not exist into the active direction then the error message is normal.

- Thanks!


Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Sep 2005
Posts: 116
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2005
Posts: 116
It is simple. Good old method returns the name of the file, even if it did not exist. Then you can use eg. /savebuf / loadbuf, etc. And it is great.


when no one watching us
we are invisible
Joined: Dec 2008
Posts: 1,515
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2008
Posts: 1,515
Aha ok confirmed and it's true, in 7.43 stable either the file did not exist the warning error input did not appeared in order to continue returns the entered name in the dialog.

The strange is that in the changelog (beta) there is nothing about $sfile mentioned.

Maybe this change effect it:

33. Updated all file dialogs, including the send file dialog, to use modern file dialogs.

Last edited by westor; 19/03/16 01:48 PM.

Need Online mIRC help or an mIRC Scripting Freelancer? -> https://irc.chathub.org <-
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks, this issue has been fixed for the next version.

Joined: Sep 2005
Posts: 116
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2005
Posts: 116
Hello again.

There is still problem with $sfile. It won't work like in mIRC 6.35.
Also if we use:
Code:
//noop $sfile($mircdir Deam I'm good.mrc,Title Text,Button Text)
It won't fill file name box with custom text/filename.

There also is problem with $sdir.
Code:
//noop $sdir($mircdir,Title Text,Button Text)
Works fine, but:
Code:
//noop $sdir($mircdir*,Title Text,Button Text)
opens old classic window (example, if we use the extension (by mistake)).
Now we have two windows for $sdir?
In mirc.chm should be added for: $sdir(dir,title,button text) becouse in the new window now we can change button text.

mIRC 7.44.54 (beta), Windows 10
Regards.


when no one watching us
we are invisible
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Quote:
It won't fill file name box with custom text/filename.

Thanks this issue has been fixed for the next version.

Quote:
Now we have two windows for $sdir?

This has always been the case. mIRC attempts to use several types of file dialogs and if one type is not available (depending on the Windows version), mIRC tries an older type. In this case, the new file dialog fails to initiate because of the invalid path name, so mIRC assumes it is not available and defers to an older type, which appears to ignore the bad path name and allows you to make a folder selection.

Update: I have found a way of getting around this issue - if the new file dialog fails due to a path error, mIRC will retry the dialog with an empty path (which appears to be what older dialogs do by default).

Last edited by Khaled; 12/04/16 03:54 PM.
Joined: Sep 2005
Posts: 116
Vogon poet
OP Offline
Vogon poet
Joined: Sep 2005
Posts: 116
Solved in mIRC version 7.44.198 beta.

Regards.


when no one watching us
we are invisible
Joined: Jul 2006
Posts: 4,149
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,149
It looks like there is still an issue with $sdir.
If passing a wildcard expression is supposed to do anything, it's not working for me:
Code:
//noop $sdir($mircdir*,Title Text,Button Text)
This puts me in 'Computer' while $mircdir is C:\mIRC\

Tested on 7.51 (no beta) and win7


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
Joined: Dec 2002
Posts: 5,420
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,420
Thanks for your bug report. Using wildcards is actually no longer valid in a parameter to $sdir(). This is because mIRC was updated to use the standard directory selection dialogs, which do not support wildcards. Before mIRC was updated, it was using a file dialog, which supported wildcards. The wildcard mention for $sdir() in the help file will be removed in the next version.


Link Copied to Clipboard