mIRC Home    About    Download    Register    News    Help

Print Thread
creating a window and close it after 2 secs ?? #121681 31/05/05 12:27 AM
Joined: May 2003
Posts: 21
T
TRABEL Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: May 2003
Posts: 21
hi
i want to creat a small window to pop on text saying , and i want this window to auto close after few secs
i tried window @name
and right after in alias window -c @name
but it closing the window way to fast to my macros to run when window turned on ....
i can use timer ... but wondered if there is any easyer way ..
and if we already here , if possible to fade it out till closing laugh
(to much ?? :tongue: )
thx

or ... in other way ... is ther eany way to pop on top a runing program from a command in mirc ?
program is runing in b/g i need to put it on top of everything when command is activated....

Last edited by TRABEL; 31/05/05 01:00 AM.
Re: creating a window and close it after 2 secs ?? #121682 31/05/05 02:29 AM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
Quote:
i want to creat a small window to pop on text saying , and i want this window to auto close after few secs
i tried window @name
and right after in alias window -c @name
but it closing the window way to fast to my macros to run when window turned on ....
i can use timer ... but wondered if there is any easyer way ..


the only way to do what you want, would be to use a timer (i believe). and it's not that hard either :tongue:
could be something like :
Code:
On *:TEXT:(words):#: {
  /window @test 
  /timerwclose 1 3 /window -c @test
} 
 


the above code is just an example of one way it could be done.
and as for the fading... you got me on that one.. perhaps someone else maybe able to help with that..

hope this helps ya some..

Re: creating a window and close it after 2 secs ?? #121683 31/05/05 07:21 AM
Joined: May 2003
Posts: 21
T
TRABEL Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: May 2003
Posts: 21
Quote:
when window turned on ....
i can use timer ... but wondered if there is any easyer way ..


the only way to do what you want, would be to use a timer (i believe). and it's not that hard either :tongue:
could be something like :
Code:
On *:TEXT:(words):#: {
  /window @test 
  /timerwclose 1 3 /window -c @test
} 
 


the above code is just an example of one way it could be done.
and as for the fading... you got me on that one.. perhaps someone else maybe able to help with that..

thx smile
my code already working with a timer .
i thought maybe there is something im missing and can be done without it ...
is there a code to add infornt of a code to wait few secs for the execute of it ? :P
and again , maybe there is a command to pop up a program that runing infront of everything without all this mess ?
thx

hope this helps ya some.. [/quote]

Re: creating a window and close it after 2 secs ?? #121684 31/05/05 04:28 PM
Joined: Aug 2004
Posts: 423
C
clutz1572 Offline
Fjord artisan
Offline
Fjord artisan
C
Joined: Aug 2004
Posts: 423
Quote:
is there a code to add infornt of a code to wait few secs for the execute of it ? :P


thats what the timer is doing. if your looking for like a actual pause command, to my knowledge there isn't one.
and as a side note with this you can also use a . in front of commands to keep them quiet, so you don't see their messages. example .timer 1 2 <commands>

Quote:
and again , maybe there is a command to pop up a program that runing infront of everything without all this mess ?


just a question... but have you tried going through the help file?? well, in anycase i'm not sure off the top of my head (sorry) shocked

Re: creating a window and close it after 2 secs ?? #121685 31/05/05 05:11 PM
Joined: May 2003
Posts: 21
T
TRABEL Offline OP
Ameglian cow
OP Offline
Ameglian cow
T
Joined: May 2003
Posts: 21
thx for the ( . ) :P
i'll use it to keep commands quite ....
and yes i did searched in help smile didnt find what im looking for (eccept timer) this is why im here
thx

Re: creating a window and close it after 2 secs ?? #121686 01/06/05 12:39 AM
Joined: Sep 2003
Posts: 4,230
D
DaveC Offline
Hoopy frood
Offline
Hoopy frood
D
Joined: Sep 2003
Posts: 4,230
Ill start with You dont want to pause a script for any length of time.
Howevwer this would pause it for 2 seconds...

var %ticks = $calc(2000 + $ticks) | while (%ticks > $ticks) { }

During those 2 seconds mIRC well do NOTHING else at all, wont see messages, wont maintain downloads or uploads etc, this is becuase mirc uses one thread to handle all of this, and your holding it up for 2 seconds.

This also means if your trying to delay a script for some mIRC type event to occur itrs not likely to happen since mIRC doesnt do anything at all during this delay.

This is the basic reason you use timers to continue processing at a later time.

This being said, there is a 3rd party dll called whilefix.dll which well allow mirc to some degree to continue processing during that loop
var %ticks = $calc(2000 + $ticks) | while (%ticks > $ticks) { if ($file(whilefix.dll)) { dll WhileFix.dll WhileFix } }

There are significant problems doing this, such as if certian things occur mirc stops anyway (never a good thing) use this sparingly if u must use it.

Cant remebr the link to get it, do a search for messages with it in one well have the link.