Sign in to follow this  
Followers 0
Skrip

Scrolling Banner

11 posts in this topic

#1 ·  Posted (edited)

Check it out..

Dim $test
Dim $set

Banner("Thank you for using our program.", 500, 17, @DesktopWidth / 2 - 250, @DesktopHeight / 2 + 222, 1, 0.075, 1)
Banner("Written by Firestorm, with AutoIt", 500, 17, @DesktopWidth / 2 - 250, @DesktopHeight / 2 + 222, 1, 0.075, 0)

Func Banner($text, $w, $h, $posx, $posy, $opt, $wait = 0.075, $unscroll = 1)
    $set = 0
    $stop = 0
    Do
        $set = $set + 1
        $string = StringLeft($text, $set)
        SplashTextOn("", $string, $w, $h, $posx, $posy, $opt)
        Sleep($wait * 1000)
        If $string = $text Then
            Sleep(750)
            $stop = 1
        EndIf
    Until $stop = 1
    $stop = 0
    If $unscroll = 1 Then
        Do
            $set = $set - 1
            $string = StringLeft($text, $set)
            SplashTextOn("", $string, $w, $h, $posx, $posy, $opt)
            Sleep($wait * 1000 / 2)
            If $string = "" Then
                $stop = 1
            EndIf
        Until $stop = 1
    EndIf
    SplashOff()
EndFunc ;==>Banner
Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites



Cool, nice concept. But it flickers.

Share this post


Link to post
Share on other sites

Same here, really nice, but flickers

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

I'm not getting a flicker here...lol.

EDIT: Well, the text does flicker a bit. Not too noticable on my PC though.

Edited by Firestorm

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

The whole GUI looks like its going through various shades of gray each time it adds/deletes a letter.

Share this post


Link to post
Share on other sites

Hmm...Well, AFAIK can't fix that in autoit.


[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

I get the flicker too but I suspect that it's hardware related. Monitor refresh rate perhaps?


George

Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.

Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.***

The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.

Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else.

"Old age and treachery will always overcome youth and skill!"

Share this post


Link to post
Share on other sites

i've always fixed flickering by playing with wm_paint, but each time its hard to do.


-- Arck System _ Soon -- Ideas make everything

"La critique est facile, l'art est difficile"

Projects :

[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list]

Share this post


Link to post
Share on other sites

#10 ·  Posted (edited)

Nice work but ... it flickers here too :D

EDIT: After playing a little with the code i managed to eliminate the flicker :D

Dim $test
Dim $set

_Banner("Thank you for using our program.", 500, 17, @DesktopWidth / 2 - 250, @DesktopHeight / 2 + 222, 1, 0.075, 1)
_Banner("Written by Firestorm & Updated by L|M|TER", 500, 17, @DesktopWidth / 2 - 250, @DesktopHeight / 2 + 222, 1, 0.075, 0)

Func _Banner($text, $w, $h, $posx, $posy, $opt, $wait = 0.075, $unscroll = 1)
    $set = 0
    $stop = 0
 SplashTextOn("L|M|TER Banner", "", $w, $h, $posx, $posy, $opt)
    Do
        $set = $set + 1
        $string = StringLeft($text, $set)
        ControlSetText("L|M|TER Banner", "", "Static1", $string)
        Sleep($wait * 1000)
        If $string = $text Then
            Sleep(750)
            $stop = 1
        EndIf
  Sleep(20)
    Until $stop = 1
 $stop = 0
    If $unscroll = 1 Then
        Do
            $set = $set - 1
            $string = StringLeft($text, $set)
            ControlSetText("L|M|TER Banner", "", "Static1", $string)
            Sleep($wait * 1000 / 2)
            If $string = "" Then
                $stop = 1
            EndIf
   Sleep(10)
        Until $stop = 1
    EndIf
    SplashOff()
EndFunc
Edited by LIMITER

Share this post


Link to post
Share on other sites

Nice work but ... it flickers here too :D

EDIT: After playing a little with the code i managed to eliminate the flicker :D

Dim $test
Dim $set

_Banner("Thank you for using our program.", 500, 17, @DesktopWidth / 2 - 250, @DesktopHeight / 2 + 222, 1, 0.075, 1)
_Banner("Written by Firestorm & Updated by L|M|TER", 500, 17, @DesktopWidth / 2 - 250, @DesktopHeight / 2 + 222, 1, 0.075, 0)

Func _Banner($text, $w, $h, $posx, $posy, $opt, $wait = 0.075, $unscroll = 1)
    $set = 0
    $stop = 0
 SplashTextOn("L|M|TER Banner", "", $w, $h, $posx, $posy, $opt)
    Do
        $set = $set + 1
        $string = StringLeft($text, $set)
        ControlSetText("L|M|TER Banner", "", "Static1", $string)
        Sleep($wait * 1000)
        If $string = $text Then
            Sleep(750)
            $stop = 1
        EndIf
  Sleep(20)
    Until $stop = 1
 $stop = 0
    If $unscroll = 1 Then
        Do
            $set = $set - 1
            $string = StringLeft($text, $set)
            ControlSetText("L|M|TER Banner", "", "Static1", $string)
            Sleep($wait * 1000 / 2)
            If $string = "" Then
                $stop = 1
            EndIf
   Sleep(10)
        Until $stop = 1
    EndIf
    SplashOff()
EndFunc
Ah ha! Very nice (I think..I don't get the flicker) I do not see any flicker here, or on my version, but if this works better..by all means! :)

[left][sub]We're trapped in the belly of this horrible machine.[/sub][sup]And the machine is bleeding to death...[/sup][sup][/sup][/left]

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0