mIRC Home    About    Download    Register    News    Help

Print Thread
#21989 02/05/03 05:49 PM
Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
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
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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
Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
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
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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
Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
timeBeginPeriod(1); // request 1ms accuracy
int now = timeGetTime();
timeEndPeriod(1);

Ring a bell yet?

#21994 04/05/03 04:59 PM
Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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.

Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
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

Joined: May 2003
Posts: 2
K
Bowl of petunias
Offline
Bowl of petunias
K
Joined: May 2003
Posts: 2
Open mIRC options: IRC -> Options. Uncheck all the things under "Confirm exit if:"

Joined: Dec 2002
Posts: 2,809
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 2,809
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

Joined: Apr 2003
Posts: 7
M
Mashu Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Apr 2003
Posts: 7
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