mIRC Homepage

creating a window and close it after 2 secs ??

Posted By: TRABEL

creating a window and close it after 2 secs ?? - 31/05/05 12:27 AM

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....
Posted By: clutz1572

Re: creating a window and close it after 2 secs ?? - 31/05/05 02:29 AM

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..
Posted By: TRABEL

Re: creating a window and close it after 2 secs ?? - 31/05/05 07:21 AM

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]
Posted By: clutz1572

Re: creating a window and close it after 2 secs ?? - 31/05/05 04:28 PM

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
Posted By: TRABEL

Re: creating a window and close it after 2 secs ?? - 31/05/05 05:11 PM

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
Posted By: DaveC

Re: creating a window and close it after 2 secs ?? - 01/06/05 12:39 AM

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.
© 2020 mIRC Discussion Forums