mIRC Home    About    Download    Register    News    Help

Print Thread
some bugs in mirc 7.x #226161 21/09/10 06:39 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
http://www.youtube.com/watch?v=HEAnlpGuGPw

see this video!

for test with the same script check on www.sagitt.altervista.org ...

the export bug exists on all version of mirc 7.x, the cnick bug only in the last 7.11 beta!

Last edited by sagitt; 21/09/10 10:57 PM.
Re: some bugs in mirc 7.x [Re: sagitt] #226162 21/09/10 07:15 PM
Joined: Jul 2006
Posts: 3,530
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,530
What are the bugs exactly ? we don't see anything on this video..
You're obviously using a script, can you reproduce these bugs on a completely clean install of mirc 7.11 ?


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: some bugs in mirc 7.x [Re: Wims] #226164 21/09/10 08:26 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
I'm the creator of script...

The cnick bug is that with "." before the command it show the alert

The $sfile bug is that if i select desktop the client change directory to computer..

Re: some bugs in mirc 7.x [Re: sagitt] #226171 21/09/10 11:53 PM
Joined: Jul 2006
Posts: 3,530
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,530
The /cnick bug is due a recent change (before, /cnick wasn't displaying anything).
As for the $sfile part, there's no bug, $sfile let you return a file name, not a folder name, clicking on open is opening the focused folder/file (which is always the 'computer' folder on your video).


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: some bugs in mirc 7.x [Re: Wims] #226178 22/09/10 10:18 AM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
check.. i deselected computer and it return to computer again! and i can't save on desktop!

Re: some bugs in mirc 7.x [Re: sagitt] #226179 22/09/10 11:01 AM
Joined: Dec 2002
Posts: 4,482
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,482
Thanks the /.cnick issue has been fixed for the next version. I was not able to reproduce an issue with $sfile() - as far as I can tell this is default behaviour for the Windows file dialog.

Re: some bugs in mirc 7.x [Re: sagitt] #226182 22/09/10 11:33 AM
Joined: Jul 2006
Posts: 3,530
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,530
Even if you're clicking away to deselect the folder, it is still focused by default, at least it seems to be.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: some bugs in mirc 7.x [Re: Wims] #226190 22/09/10 01:37 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
So how the user can save on the desktop?

With $sdir there is not this problem

Re: some bugs in mirc 7.x [Re: sagitt] #226191 22/09/10 01:44 PM
Joined: Jul 2006
Posts: 3,530
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,530
I don't see any problem, if you select a folder (or if a folder is in focus) in the dialog selection and you click the open button, the folder will open as expected, you have to select a file and click the open button to make $sfile returns something


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net
Re: some bugs in mirc 7.x [Re: Wims] #226192 22/09/10 02:06 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
You don't understand... I used the same system on my previous script with mIRC 6.35 and i have not this problem (with xp or vista, and i think on 7 too).

With 7 and mIRC 7.x (from the first beta) i can't save any file on the desktop with multiple system (export, backup and other) because if i select desktop without selecti any icon, it return EVER computer folder... I tried all method like using shortfn, $+(",dir,") but nothing...

Try it

Edit: for khaled.. I found a bug with gmt/ctime... Sone months ago... If i remember how to reproducing the bug i tell you

Last edited by sagitt; 22/09/10 02:09 PM.
Re: some bugs in mirc 7.x [Re: sagitt] #226193 22/09/10 02:37 PM
Joined: Dec 2002
Posts: 4,482
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,482
I cannot seem to reproduce an issue here. If I run mIRC v7.11 and then type "//echo $sfile(c:\)" into the Status window editbox and press the enter key, it displays the select file dialog. I click on "Desktop", type in a filename "test.txt" and press the "Open" button, and it displays "C:\Documents and Settings\UserName\Desktop\test.txt" in Windows XP and "C:\Users\UserName\Desktop\test.txt" in Windows 7. I also tested with v6.35 and it showed the same results.

Re: some bugs in mirc 7.x [Re: sagitt] #226194 22/09/10 02:56 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
I also don't see any issues with $sfile. Most likely, it's a problem in the script. Your script isn't the nicest thing to try and read for someone who isn't familiar with it, so I'm not going to try and troubleshoot it for you. Try your command on a clean copy of mIRC without any other scripts loaded... just the line that opens the $sfile dialog and then saves the file. If it isn't working by itself on a clean copy of mIRC, then display just that small section of code (should only be 1-3 lines at most) and we can test just that line.

As mentioned, doing something like:

//write $sfile(c:\) Testing...

will create a file named whatever you enter into that dialog and in the folder you have open and put "Testing..." into it. That works as expected.


Invision Support
#Invision on irc.irchighway.net
Re: some bugs in mirc 7.x [Re: Riamus2] #226195 22/09/10 03:18 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
I'm actually surfing with my iPhone... When i'm back to home i post the code

Re: some bugs in mirc 7.x [Re: sagitt] #226197 22/09/10 06:15 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
alias file_export {
var %k = $shortfn($logdir)
var %o = $+($chr(46),$time(yyyy),$time(mm),$time(dd),$chr(46),log)
var %m = .copy -o
if ($1 == export) {
if ($2) {
var %oo = $strip($2-)
var %t!1 = $shortfn($+(%k,%oo))
if (($exists(%t!1)) && ($lines(%t!1) > 0)) {
var %d!1 = $+(",$sfile($+(C:\,%oo),Export of log: %oo,Export),")
if (%d!1) { %m %t!1 %d!1 }
}
}
}
}


try with this code

use: /file_export export filename.log

(work only if the file exists in $logdir)

VIDEO: http://www.youtube.com/watch?v=SAWRfGePs3c

Last edited by sagitt; 22/09/10 06:42 PM.
Re: some bugs in mirc 7.x [Re: sagitt] #226198 22/09/10 06:21 PM
Joined: Oct 2004
Posts: 8,327
Riamus2 Offline
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,327
There's no %k and %oo set in that code.


Invision Support
#Invision on irc.irchighway.net
Re: some bugs in mirc 7.x [Re: sagitt] #226199 22/09/10 09:08 PM
Joined: Dec 2002
Posts: 4,482
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,482
Thanks I have been able to reproduce the issue. It appears to be a Windows 7 bug. I have implemented a workaround - so this should work as before in the next version of mIRC.

Re: some bugs in mirc 7.x [Re: Khaled] #226200 22/09/10 11:00 PM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
yeahhhhh!! laugh

I remember the problem is that mIRC return the incorrect GMT.. check it!

EDIT, USE THIS FOR TEST:

alias time_engine { if ($1) { .var %k = $calc($ctime - $ctime($1-)) | if ($calc($gmt(%k,m) - 1) > 0) { .var %o = %o $calc($gmt(%k,m) - 1) $iif($calc($gmt(%k,m) - 1) == 1,month,months) } | if ($calc($gmt(%k,d) - 1) > 0) { .var %o = %o $calc($gmt(%k,d) - 1) $iif($calc($gmt(%k,d) - 1) == 1,day,days) } | if ($gmt(%k,H) > 0) { .var %o = %o $gmt(%k,H) $iif($gmt(%k,H) == 1,hour,hours) } | if ($gmt(%k,n) > 0) { .var %o = %o $gmt(%k,n) $iif($gmt(%k,n) == 1,minut,minutes) } | if ($gmt(%k,s) > 0) { .var %o = %o $iif(%o,e $gmt(%k,s),$gmt(%k,s)) $iif($gmt(%k,s) == 1,second,seconds) } | .return %o } }

1: $time_engine($date $time)
2: $time_engine($asctime($file(FILENAME).mtime)))

It return incorrect value, or sometimes doesn't return any value! But only if the file was created long ago or the date and time values are old, it "work incorrectly" and return an incorrect value.

try to do: "/set %date $date" and "/set %time $time" and wait some minutes... try to do //echo -a $time_engine(%date %time) it return an error... edit manually the date and it return an incorrect value! But work very well on mIRC 6.35!!

For release my script with mIRC 7.x i "fixed" it using this code (without gmt method):

alias time_engine { if ($1) { .var %k = $calc($ctime - $ctime($1-)) | .var %n = $calc($asctime(%k,yyyy) - 1970) | if (%n > 0) { .var %o = %n $iif(%n == 1,year,years) } | .var %n = $calc($asctime(%k,m) - 1) | if (%n > 0) { .var %o = %o %n $iif(%n == 1,month,months) } | .var %n = $calc($asctime(%k,d) - 1) | if (%n > 0) { .var %o = %o %n $iif(%n == 1,day,days) } | .var %n = $asctime(%k,H) | if (%n > 1) { .var %o = %o %n $iif(%n == 1,hour,hours) } | .var %n = $asctime(%k,n) | if (%n > 0) { .var %o = %o %n $iif(%n == 1,minut,minutes) } | .var %n = $asctime(%k,s) | if (%n > 0) { .var %o = %o $iif(%o,e %n,%n) $iif(%n == 1,second,seconds) } | .return %o } }

and work very well again! (i added the years)

NB: I'm in italy... so i don't know if the gmt work right in other places!

I found another bug.. deleting files with a "while"... again if i remember how to reproduce it i'll tell you smile

Sorry for the reports XD!!

Last edited by sagitt; 22/09/10 11:32 PM.
Re: some bugs in mirc 7.x [Re: sagitt] #226209 23/09/10 09:01 AM
Joined: Dec 2002
Posts: 4,482
Khaled Offline
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 4,482
Thanks for your help - if you can, please try to keep your bug reports as simple as possible :-) For example, in your original bug report about $sfile(), it may have been easier to say:

"In Windows 7, using mIRC v7.11, if you use the command //echo $sfile(c:\test.txt) and then select "Desktop" in the places bar, and then press the Open button, it changes the folder location instead of returning the path/filename".

Regarding $gmt(), as far as I am aware this is working correctly in mIRC v7.11. I tested this by running mIRC under Windows 7 and then used the command //echo $gmt($ctime) while changing the timezone in the Windows Time dialog. mIRC displayed the correct GMT value regardless of the timezone I selected.

Re: some bugs in mirc 7.x [Re: Khaled] #226211 23/09/10 10:07 AM
Joined: Jul 2007
Posts: 17
S
sagitt Offline OP
Pikka bird
OP Offline
Pikka bird
S
Joined: Jul 2007
Posts: 17
sorry khaled for my bad dscription, but my english is so bad ^^

anyway when i reproduce the other bug, i'll tell you here