Sinewave/Bouncing scroller

By knoeki on Jan 14, 2010

Image
Not much to say about this. Just a fun little picwin script that draws a couple of bouncing scrollers. Text, number of scrolls and window size are changable in the script, if you want.

If it runs really slow, try ajusting the amount of scrollers down. If it goes too fast, do the opposite ;_)

alias sinescroll {
    window -dak0pf @sine 1 1 640 480
    var %num 10
    var %text This is just a little script by Knoeki, written on the 14th of january, 2010... If you want, you can edit this text, and the amount of scrollers by changing the text and num variables at the start of the script.. also the width and height of the window are ajustable... have fun! :_)
    var %width = $window(@sine).w
    var %height = $window(@sine).h
    var %scroll = %width
    var %total = $calc($width(%text, fixedsys, 12) + %width)
    var %x = 1
    while (%x <= %num) {
        var %sin.count. [ $+ [ %x ] ] $rand(100, 1000)
        var %sin.colour. [ $+ [ %x ] ] $rgb($rand(0, 255), $rand(0, 255), $rand(0, 255))
        inc %x
    }
    var %count = 1, %count2 = 1
    while (%count <= %total) {
        drawrect -nf @sine 1 1 0 0 %width %height
        var %x = 1
        while (%x <= %num) {
            drawtext -nr @sine %sin.colour. [ $+ [ %x ] ] "fixedsys" 12 %scroll $calc(($sin(%sin.count. [ $+ [ %x ] ]).deg * (%height / 3)) + (%height / 2)) %text
            inc %sin.count. [ $+ [ %x ] ]
            inc %x
        }
        drawdot @sine
        dec %scroll 2
        inc %count
    }
}

Comments

Sign in to comment.
knoeki   -  Jan 19, 2010

Anyway, cool little picwin you've got there. I wish Hawkee had more of these, I love them.

I have a couple more of them, just look through my snippets tagged with 'picwin'.

 Respond  
SumWon   -  Jan 18, 2010

If it locks up your mIRC, press control+break.

Anyway, cool little picwin you've got there. I wish Hawkee had more of these, I love them.

 Respond  
knoeki   -  Jan 18, 2010

I like it :). 6, Would be an 8 if it didnt freeze your mirc at the end :@. The while loop.

it shouldn't freeze your mIRC. it's made to end when the scroller leaves the screen... so.. no idea what happens over there. :\

 Respond  
Ghost-writer   -  Jan 18, 2010

I like it :). 6, Would be an 8 if it didnt freeze your mirc at the end :@. The while loop.

 Respond  
[Plornt]   -  Jan 16, 2010

Oooh thanks FordLawnmower, ill look at that now, :D cant wait to actually be able to use stuff properly again ¬.o :)

 Respond  
FordLawnmower   -  Jan 15, 2010

@[Plornt] I've had the same problem with lots of mIRC scripts on Windows7.
I changed my properties to run in XP service pack II compatibility mode and I haven't had a problem since.

 Respond  
BlueThen   -  Jan 15, 2010

When I read the title, I imagined a dialog with scrollbars which bounce

 Respond  
knoeki   -  Jan 15, 2010

Knoeki i dont think it was your script in general that crashed my mirc, its because i rn 64 bit win 7 and dialogs/picwin mess up alot. And in some cases totally unuasble.

Ah, I see. still good to know, though :_)

 Respond  
[Plornt]   -  Jan 15, 2010

Knoeki i dont think it was your script in general that crashed my mirc, its because i rn 64 bit win 7 and dialogs/picwin mess up alot. And in some cases totally unuasble.

 Respond  
Jethro   -  Jan 14, 2010

I know there are lots of Dutch words similar to English's or look alike. :/ But the grammar and pronunciation are way different between these two languages.

 Respond  
knoeki   -  Jan 14, 2010

argh. I keep mixing up the dutch/english spellings of the names of the months, for some reason :<

fixed it now. ;_)

 Respond  
sunslayer   -  Jan 14, 2010

januariJanuary*

 Respond  
knoeki   -  Jan 14, 2010

it... crashed your mIRC? O.o

some more details would be welcome... I've had zero issues with it.

 Respond  
[Plornt]   -  Jan 14, 2010

It worked...

for like 5 seconds, then crashed my mirc, but pretty cool concept, mand it wasnt slow for me it was pretty fast.

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.