mIRC Homepage
Posted By: 2big Alternative to Timers? (Script freezing) - 07/09/03 01:36 AM
I've written a script that uses many timers on start, (it's a picwin script) and it sort of takes a second to load, then it plays the end of what I want the animation of the picwin to be. Is there a different way to use timers to prevent that, or maybe a way to preload?
Posted By: sparta Re: Alternative to Timers? (Script freezing) - 07/09/03 01:53 AM
maybe try get the stuff you want to that win from a text file? thats how i made my picture windows..
Posted By: 2big Re: Alternative to Timers? (Script freezing) - 07/09/03 01:55 AM
How so? It also has to do with I have about 10 loops going at once...... @_@
Posted By: sparta Re: Alternative to Timers? (Script freezing) - 07/09/03 01:59 AM
window -l +s @Startup 200 150 315 51 Arial bold 18
window -a @Startup
rline @Startup 1 1,15         Loading removed!                                      
rline @Startup 2 14,15   1[14,15||||||                              1,15]14,15                           
rline @Startup 2 14,15   1[14,15||||||||||||                           1,15]14,15                           
rline @Startup 2 14,15   1[14,15||||||||||||||||||                      1,15]14,15                        
rline @Startup 2 14,15   1[14,15||||||||||||||||||||||||                 1,15]14,15                        
rline @Startup 1 4,15         Loading removed!                                      
rline @Startup 2 14,15   1[14,15||||||||||||||||||||||||||||||         1,15]14,15                        
rline @Startup 2 14,15   1[14,15||||||||||||||||||||||||||||||||||||        1,15]14,15                        
rline @Startup 2 14,15   1[14,15||||||||||||||||||||||||||||||||||||||||||            1,15]14,15                        
rline @Startup 2 14,15   1[14,15||||||||||||||||||||||||||||||||||||||||||||||||        1,15]14,15                        
rline @Startup 2 14,15   1[14,15||||||||||||||||||||||||||||||||||||||||||||||||||||||      1,15]14,15                        
rline @Startup 1 1,15         Loading removed!                                      

this is how i made it.. and that loads allot of lines.. you only see a fev of them here.. and thats done at startup.. maybe you can make somthing out of it? smile

i dont even have that file loaded, i load it when i start the script.. and unloading it when its done.. "load -rs file.mrc"
Posted By: Raccoon Re: Alternative to Timers? (Script freezing) - 07/09/03 08:07 AM
Can you consolidate your 10 different animation routines to a single timer, so that when 2 or more animations occur at the same time they can share the same draw (PAINT) routine?

If you're using /draw commands for your animation, use the -n flag up until the final /draw command used (you can also /drawdot @window with no other parameters). This significantly speeds up your routine as it only has to issue a single WM_PAINT (the command mIRC sends to Windows telling it to update the window).

I hope this makes some sense.

- Raccoon
Posted By: 2big Re: Alternative to Timers? (Script freezing) - 07/09/03 02:45 PM
Well, that isn't really possible in this case, because I'm running about 11 loops that make changes in 11 different places, along with 2 timers in each loop. The end of the loop is what causes it to change, so it's constantly changing. Thus, I can't have more than one draw command going in one loop.
Posted By: Iori Re: Alternative to Timers? (Script freezing) - 09/09/03 02:27 AM
Quote:
i dont even have that file loaded, i load it when i start the script.. and unloading it when its done.. "load -rs file.mrc"
Why not put all that into a startup.txt file and call /.play -sc startup.txt [color:red]0[/color] from "on start", adjust the timing (0) to suit.
© mIRC Discussion Forums