mIRC Home    About    Download    Register    News    Help

Print Thread
#21989 02/05/03 05:49 PM
M
Mashu
Mashu
M
I was just wondering if any of you would know how I can use my dll to tell mIRC to use 1ms timers like it did in the previous version (but was mysteriously taken back out due to problems) by using 'a', or a combination of winapi commands.

Thanks

#21990 02/05/03 07:46 PM
C
codemastr
codemastr
C
If you specify the -m or -h switch, this indicates that the interval delay is in milliseconds.

Why do you need a dll to do what /timer can already do?

#21991 02/05/03 10:45 PM
M
Mashu
Mashu
M
You got it all wrong. I wan't to change the Kernel timing for mIRC, not create a timer.

#21992 03/05/03 05:36 PM
C
codemastr
codemastr
C
I'm not really sure what you mean by changing the kernel timing, can you be more specific?

#21993 04/05/03 10:43 AM
M
Mashu
Mashu
M
timeBeginPeriod(1); // request 1ms accuracy
int now = timeGetTime();
timeEndPeriod(1);

Ring a bell yet?

#21994 04/05/03 04:59 PM
C
codemastr
codemastr
C
I know what that is, but it still doesn't tell me what you want to do. You want to get the systemtime that is accurate to milliseconds rather than seconds? If so, why are you asking us how to do it? The code you included does exactly what you want.

M
Mashu
Mashu
M
Ok, i've managed to do what I was on about, heres a completely differant question.

I have an updater for my script I have programmed (which of course works perfectly). But I need to quit mirc without it bring up a confirmation dialog. on ^*:EXIT....haldefhalt/halt didn't work so I was thinking that I could use 'OpenProcess' on mirc's process and issue a 'TerminateProcess', but I would need to forcefully terminate it (like when you click "end process" in the task manager). Do you have any idea how I can do this?

Ta

K
knightrage
knightrage
K
Open mIRC options: IRC -> Options. Uncheck all the things under "Confirm exit if:"

C
codemastr
codemastr
C
Well I would think (not sure if this will actually work) using SendMessage sending it a WM_DESTROY would be a more... graceful(?) way of doing it. I'm not sure if mIRC displays the stuff after receiving WM_CLOSE/WM_QUIT or if it does it in WM_DESTROY. I would think the former simply because I don't think you can "cancel" a WM_DESTROY. Meaning once that message is received, I'm pretty sure the window MUST die. And most likely, if you send a WM_DESTROY to the main mIRC window, that will end the program.

May not work, but if it does, it would be cleaner than using TerminateProcess. Especially since MS specifically says only use TerminateProcess in "extreme circumstances" :P

M
Mashu
Mashu
M
OK. I've used
Code:
SendMessage(mWnd,WM_DESTROY,0,0);
and it works perfectly with confirmations set to 'always' in mirc options. Thanks alot


Link Copied to Clipboard