mIRC Home    About    Download    Register    News    Help

Print Thread
#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.
Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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 ?


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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..

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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).


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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!

Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
Even if you're clicking away to deselect the folder, it is still focused by default, at least it seems to be.


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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

Joined: Jul 2006
Posts: 4,145
W
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 4,145
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


#mircscripting @ irc.swiftirc.net == the best mIRC help channel
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.
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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
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

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.
Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
There's no %k and %oo set in that code.


Invision Support
#Invision on irc.irchighway.net
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

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.
Joined: Dec 2002
Posts: 5,411
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,411
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.

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


Link Copied to Clipboard