Hi all,
i wrote a script and got an error on this small snippet:
//hadd -m test 1 1 | hsave test global.hash
* /hsave: unable to open 'F:\mirc\global.hash'
same on:
/write global.hash test
* /write: unable to open file
'global.hash.txt' is allowed.
any reason for that?
edit: tested on Mirc 6.2-6.34
r00tb0y
and why does /hsave|/hload test global.hash.txt work?
write global.hash.txt doesn't.
They both work here with the .txt extension because there is a program associated with the .txt extension, but there is no program associated with .hash.
you didn't read what i wrote:
works: hsave test global.hash.txt
doesn't: write global.hash.txt test
doesn't: echo $isfile(global.hash.txt)
i'm not sure why /write'ing to global.hash.txt would fail, unless "global.hash" is a device name for you. I was able to /write to that filename ok. mIRC is treating everything after the final period as the extension, not everything after the first period, so it sees the filename as global.hash.extension not global.extension.
I did read what you wrote, and I responded "They both work here"
It created and wrote to the file here, but $isfile and $read seem to be the ones failing rather than the /write command.
mIRC 6.34 on XP Pro
global.hash.txt works fine here, because the filename is 'global.hash' and not 'global' - not sure why it doesn't work on your end.
didnt work for me either. mirc 6.34, xp home sp2 etc.
//hadd -m test 1 1 | hsave test global.hash
* /hsave: unable to open file 'E:\PortableApps\mIRC\global.hash'
-
/write global.hash test
* /write: unable to open file
-
i think part of the strangeness that rootboy's referring to is that, while it is true that mirc won't /write to global.any_extension - if you do:
/write global.hash.txt test
you can go out to win-explorer and see that the file actually *DID* get created. However 6.34 tells you that
//echo -a $isfile(global.hash.txt)
is $false instead of $true
Perhaps $isfile is parsing the filename differently than /write is.
In case it helps track down the peculiarity, 6.32, 6.33 and 6.34 all allow writing to global.hash.txt, but 6.33 incorrectly gave a false message that it failed to write to the file, even though all 3 versions can.
by typing these commands, it WILL write on my machine: (Notice the FILE name)
//hadd -m test 1 1 | hsave test global.hash.
/write global.hash. test
it will actually write "global.hash" and NOT "global.hash."