on *:EXIT: {
.dll Test.dll testWrite $scriptdir
}
im just wandering why it never writes to the text file on the exit event (the testWrite function writes 'hello' to hello.txt in the scriptdir)
but when i do it manually like this
//.dll Test.dll testWrite $scriptdir
it works
Try debugging remove the dot so you can see what it's doing
on *:EXIT: {
dll Test.dll testWrite $scriptdir
}
After it works replace the dot.
Since it works from the command line I would guess you need to force an evaluation using $eval
Hope this helps
thanks but i wouldnt be able to see since i trigger the exit event by closing mirc
If the command echos to the status window, you should be able to view the message if you enable logging for the status window.
-genius_at_work
nope it doesnt show anything in status log, and still doesnt work on exit
(but it works from the command line) :S
on 1:EXIT: {
.dll Test.dll testWrite $scriptdir
}
It will work
use 1: not *:
for me *: = not working
1: = working
idk why i got latest mirc.
on *:exit: works just fine.
If it doesn't work on your mIRC, that means something else is interfering, or you are simply not doing things right in the on *:exit: event, because no one else has this problem. You should show what kind of code you put in the on *:exit event, and also, don't forget you can't have two on exit events in the same script file, only the first one will trigger.
hmm, nothing seems to work from the exit event :S
on *:EXIT: {
dll Test.dll Save $+($Scriptdir, test.txt)
}
$+($Scriptdir, test.txt) is..
C:\Documents and Settings\admin\My Documents\M\mIRC6.16\test.txt
that is what i pass to the dll, to put some text into!
it wors from command line, but not exit event :S
I think the problem is the spaces in that name, because i tried
on *:EXIT: {
;dll Test.dll Save $+($Scriptdir, test.txt)
dll Test.dll Save C:\test.txt
}
and it works :S
any ideas how to get around the space problem guys?
Edit* Actually NO, after testing everything it seems as though the $scriptdir identifier doesnt work in the exit event :S
Edit* Actually NO, after testing everything it seems as though the $scriptdir identifier doesnt work in the exit event :S
$scriptdir works fine for me...
on *:exit:{
echo $input($scriptdir, o, ScriptDir)
}
My guess is the problem comes from using DLL's in exit events. I just guessing here though...
See if using $dll instead of /dll fixes the problem. You can always ignore $dll's return value with a 'nop' alias...
alias nop { }
nop $dll(Test.dll, Save, C:\path with many spaces in it\test.txt)