mIRC Home    About    Download    Register    News    Help

Print Thread
#140665 28/01/06 12:23 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
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

#140666 29/01/06 03:03 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
anyone? :S

#140667 29/01/06 05:17 AM
Joined: Aug 2005
Posts: 24
D
Ameglian cow
Offline
Ameglian cow
D
Joined: Aug 2005
Posts: 24
Try debugging remove the dot so you can see what it's doing
Code:
 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 smile


TeeJay
#140668 29/01/06 12:49 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
thanks but i wouldnt be able to see since i trigger the exit event by closing mirc

#140669 29/01/06 08:17 PM
Joined: Oct 2005
Posts: 1,741
G
Hoopy frood
Offline
Hoopy frood
G
Joined: Oct 2005
Posts: 1,741
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

#140670 29/01/06 09:39 PM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
nope it doesnt show anything in status log, and still doesnt work on exit

(but it works from the command line) :S

Last edited by pouncer; 29/01/06 09:39 PM.
#140671 30/01/06 04:28 AM
Joined: Jan 2006
Posts: 2
H
Bowl of petunias
Offline
Bowl of petunias
H
Joined: Jan 2006
Posts: 2
on 1:EXIT: {
.dll Test.dll testWrite $scriptdir
}

It will work smile use 1: not *:

#140672 30/01/06 03:31 PM
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
*: works fine.

#140673 04/02/06 12:05 AM
Joined: Jan 2006
Posts: 2
H
Bowl of petunias
Offline
Bowl of petunias
H
Joined: Jan 2006
Posts: 2
for me *: = not working

1: = working

idk why i got latest mirc.

#140674 04/02/06 01:01 AM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
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.


Gone.
#140675 05/02/06 12:35 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
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

#140676 05/02/06 12:42 AM
Joined: Oct 2005
Posts: 827
P
pouncer Offline OP
Hoopy frood
OP Offline
Hoopy frood
P
Joined: Oct 2005
Posts: 827
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

Last edited by pouncer; 05/02/06 12:50 AM.
#140677 15/02/06 11:27 PM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
Quote:
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...
Code:
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...


NaquadaBomb
www.mirc-dll.com
#140678 17/02/06 01:31 AM
Joined: Dec 2002
Posts: 580
N
Fjord artisan
Offline
Fjord artisan
N
Joined: Dec 2002
Posts: 580
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)


NaquadaBomb
www.mirc-dll.com

Link Copied to Clipboard