Jump to content

Follow the white rabbit


JRSmile
 Share

Recommended Posts

Here is a matrix with not only numbers [0 and 1] but other letters too. and a message!

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

#NoTrayIcon

Global $label[500][300]
HotKeySet("{SPACE}", "call_exit")
$gui    = GUICreate     ("MatrixScreenSaver", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))
        GUISetBkColor   (0x000000)
$r      = Round(@DesktopHeight / 15, 0)
$d      = Round(@DesktopWidth / 12, 0)
$fade   = 1
$col    = 0
$top    = 8
$mes = 0
$f  = 1
$letters = "ABGHYTJKLPS1234567890£¥žšŸƒ€ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö "
$letcount = StringLen($letters)
$letters = StringSplit($letters,"")
$thanks = "THÁNKÝÕÛƒÒRWÅTCHÏNG"
$thanks = StringSplit($thanks,"")
For $h = 0 To $r
    For $w = 0 To $d

$label[$w][$h]  = GUICtrlCreateLabel($letters[Random(1,$letcount-1,1)], $w*30, $h*17, 12, 17,  $SS_CENTER)
                GUICtrlSetColor     (-1, "0x00" & Random(Dec("11"),Dec("FF"),1) & "00")
                GUICtrlSetBkColor   (-1, 0x000000)
                GUICtrlSetFont      (-1, 12, 700, 0, "Lucida Console")
    Next
Next
GUISetState()

While 1
    If $mes = 1 Then
        
        For $u = 18 To 18 Step 1
            For $t = 15 To 34 Step 1
                GUICtrlSetData($label[$t][$u], $thanks[$f])
                GUICtrlSetColor($label[$t][$u], "0x0000" & Random(Dec("DD"),Dec("FF"),1))
                $f += 1
                If $f = 20 Then ExitLoop
            Next
        Next
            $mes += 1
    ElseIf $mes = 2 Then
            For $t = 0 To UBound($label) -1 Step 1
        For $u = 0 To UBound($label,2) -1 Step Random(1,3,1)
                GUICtrlSetData($label[$t][$u], $letters[Random(1,$letcount-1,1)])
                GUICtrlSetColor($label[$t][$u], "0x00" & Random(Dec("11"),Dec("FF"),1) & "00")
            Next
        Next
            $mes += 1
    Else
            For $t = 0 To UBound($label) -1 Step Random(1,6,1)
        For $u = 0 To UBound($label,2) -1 Step Random(1,6,1)
                GUICtrlSetData($label[$t][$u], $letters[Random(1,$letcount-1,1)])
                GUICtrlSetColor($label[$t][$u], "0x00" & Random(Dec("11"),Dec("FF"),1) & "00")
            Next
        Next
            $mes += 1
    EndIf
WEnd

Func call_exit()
    Exit
EndFunc ;==>call_exit
Edited by billthecreator

[font=Microsoft Sans Serif]My Scripts: From Most recent to least.[/font]Countdown GUI | QLOCK TWO | FlipClock | Slot Machine My UDF:_GenerateRandomNoRepeat | _GuiSnap

Link to comment
Share on other sites

Here is a matrix with not only numbers [0 and 1] but other letters too. and a message!

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

#NoTrayIcon

Global $label[500][300]
HotKeySet("{SPACE}", "call_exit")
$gui    = GUICreate     ("MatrixScreenSaver", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))
        GUISetBkColor   (0x000000)
$r      = Round(@DesktopHeight / 15, 0)
$d      = Round(@DesktopWidth / 12, 0)
$fade   = 1
$col    = 0
$top    = 8
$mes = 0
$f  = 1
$letters = "ABGHYTJKLPS1234567890£¥žšŸƒ€ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö "
$letcount = StringLen($letters)
$letters = StringSplit($letters,"")
$thanks = "THÁNKÝÕÛƒÒRWÅTCHÏNG"
$thanks = StringSplit($thanks,"")
For $h = 0 To $r
    For $w = 0 To $d

$label[$w][$h]  = GUICtrlCreateLabel($letters[Random(1,$letcount-1,1)], $w*30, $h*17, 12, 17,  $SS_CENTER)
                GUICtrlSetColor     (-1, "0x00" & Random(Dec("11"),Dec("FF"),1) & "00")
                GUICtrlSetBkColor   (-1, 0x000000)
                GUICtrlSetFont      (-1, 12, 700, 0, "Lucida Console")
    Next
Next
GUISetState()

While 1
    If $mes = 1 Then
        
        For $u = 18 To 18 Step 1
            For $t = 15 To 34 Step 1
                GUICtrlSetData($label[$t][$u], $thanks[$f])
                GUICtrlSetColor($label[$t][$u], "0x0000" & Random(Dec("DD"),Dec("FF"),1))
                $f += 1
                If $f = 20 Then ExitLoop
            Next
        Next
            $mes += 1
    ElseIf $mes = 2 Then
        For $u = 0 To UBound($label,2) -1 Step 1
            For $t = 0 To UBound($label) -1 Step Random(1,2,1)
                GUICtrlSetData($label[$t][$u], $letters[Random(1,$letcount-1,1)])
                GUICtrlSetColor($label[$t][$u], "0x00" & Random(Dec("11"),Dec("FF"),1) & "00")
            Next
        Next
            $mes += 1
    Else
        For $u = 0 To UBound($label,2) -1 Step Random(1,5,1)
            For $t = 0 To UBound($label) -1 Step Random(1,5,1)
                GUICtrlSetData($label[$t][$u], $letters[Random(1,$letcount-1,1)])
                GUICtrlSetColor($label[$t][$u], "0x00" & Random(Dec("11"),Dec("FF"),1) & "00")
            Next
        Next
            $mes += 1
    EndIf
WEnd

Func call_exit()
    Exit
EndFunc ;==>call_exit

Sexy, no blinking, therefore, no seizure for me :)

alittlle quicker and it would look perfect.

Edit - -

now the hard part...make it move lol

Edited by ReaImDown
[u][font="Century Gothic"]~я α и d γ ĵ . ċ . ѕ қ ϊ и и ε я~- My Programs -auto shutdownSleep funcdisallow programs[/font][/u]
Link to comment
Share on other sites

Alright well since everyone's doing it now (peer pressure is a b****) here's my version, most of you will remember this scene from the movie i'm sure.

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>

#NoTrayIcon
HotKeySet("{SPACE}", "call_exit")
$gui = GUICreate("", @DesktopWidth, @DesktopHeight, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))
GUISetBkColor(0x000000)
$label = GUICtrlCreateLabel("", 0, 0, @DesktopWidth, @DesktopHeight, $SS_LEFT)
GUICtrlSetColor($label, 0x00FF00)
GUICtrlSetBkColor($label, 0x000000)
GUICtrlSetFont($label, 12, 700, 0, "Lucida Console")
GUISetState()

$str = string("Wake up, Neo...")
$str2 = string("The Matrix has you...")
$str3 = string("Follow the white rabbit.")
$str4 = string("Knock, knock, Neo.")

While 1
    For $i = 0 To StringLen($str)
        $data = StringRight(StringTrimRight($str, StringLen($str) - $i), 2000)
        GUICtrlSetData($label, $data)
        If StringMid($str, $i, 1) = "." Then Sleep(500)
        Sleep(Random(150, 200, 150))
    Next
    Sleep(1000 * 5)
    For $i = 0 To StringLen($str2)
        $data = StringRight(StringTrimRight($str2, StringLen($str2) - $i), 2000)
        GUICtrlSetData($label, $data)
        If StringMid($str2, $i, 1) = "." Then Sleep(500)
        Sleep(Random(150, 200, 150))
    Next
    Sleep(1000 * 5)
        For $i = 0 To StringLen($str3)
        $data = StringRight(StringTrimRight($str3, StringLen($str3) - $i), 2000)
        GUICtrlSetData($label, $data)
        Sleep(Random(150, 200, 150))
    Next
    Sleep(1000 * 5)
        For $i = 0 To StringLen($str4)
        $data = StringRight(StringTrimRight($str4, StringLen($str4) - $i), 2000)
        GUICtrlSetData($label, $data)
        Sleep(Random(150, 200, 150))
    Next
    Sleep(2000 * 5)
WEnd

Func call_exit()
    Exit
EndFunc ;==>call_exit

:)

Edited by b1naryatr0phy
Link to comment
Share on other sites

This script has taken over my life. Thank you OP...

Any who... I made this first version on Friday (I actually stayed late at work with it. Yeah, thanks again.)

FYI changed the exit key to "q". Don't get stuck in it. :)

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <File.au3>
#include <Array.au3>

$width = @DesktopWidth * 2
$height = @DesktopHeight
$path = @ScriptDir
$type = "*.au3"
HotKeySet("q", "_exit")

$gui = GUICreate("", $width, $height, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))
GUISetBkColor(0x000000)
GUISetFont(10, 700, 0, "Lucida Console")
GUISetCursor(16, 1, $gui)
GUISetState()

FileChangeDir( $path )

While 1
    Local $files = _FileListToArray($path, $type)
    If @error Then MsgBox(4096, @ScriptName, @error & ": Problem opening path.")
    Local $fileCount = 1
    For $fileCount = 1 to $files[0]
        $string = $files[$fileCount] & @CRLF & "-----" & @CRLF & FileRead($files[$fileCount])
        _PrintToScreen($string)
        FileClose($files[$fileCount])
    Next
    
    Sleep(500)
Wend

Func _PrintToScreen($str)
    Local $yPos = 0, $xPos = -1, $aCtrl[1], $lineHeight = 24, $i = 0
    
;~  $str = @ScriptName & @CRLF & @CRLF & $str
    
    For $i = 0 To StringLen($str)
        $data = StringMid($str,$i,1)
        If ( $data = @LF ) Then
            $yPos += 1
            If (($yPos * $lineHeight)+ $lineHeight) > $height Then
                While Ubound($aCtrl)
                    GUICtrlDelete(_ArrayPop($aCtrl))
                WEnd
                Local $aCtrl[1]
                $yPos = 0
            EndIf
            $xPos = 0
        Else
            _ArrayAdd($aCtrl, GUICtrlCreateLabel($data, 20 + ($xPos * 10), 20 + ($yPos * $lineHeight)))
            GUICtrlSetColor(-1, 0x00FF00)
           
            If $data = "," Then Sleep(50)
            If $data = "." Then Sleep(60)
            If $data = @CR Then Sleep(60)
            $xPos += 1
        EndIf
        Sleep(Random(1, 50, 1))
    Next
    Sleep(1000 * 5)
    While Ubound($aCtrl)
        GUICtrlDelete(_ArrayPop($aCtrl))
    WEnd
EndFunc


Func _exit()
    Exit
EndFunc ;==>call_exitoÝ÷ Ø­¶§#§µçm¢Úò¶ê'zØZ¶Ç+¢Y^vêhÇ¢¶·r¶¢Ûh*q©º"¶aÆî¶Ø^­è¬jzb¢ë%Ê«u¹bG¯z¼­g¢¶Èb~Û(y«(ØZµ«­¢+Ø¥¹±Õ±ÐíU%
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí]¥¹½ÝÍ
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±ÐíMÑÑ¥
½¹ÍѹÑ̹ÔÌÐì(¥¹±Õ±Ðí¥±¹ÔÌÐì(¥¹±Õ±ÐíÉÉä¹ÔÌÐì()Õѽ¥ÑMÑ=ÁÑ¥½¸ ÅÕ½ÐíU%IÍ¥é5½ÅÕ½Ðì°ÔÐÔ¤((ÀÌØíÝ¥Ñ ôͭѽÁ]¥Ñ ¨È(ÀÌØí¡¥¡ÐôͭѽÁ!¥¡Ð(ÀÌØíÁÑ ôMÉ¥ÁÑ¥È(ÀÌØíÑåÁôÅÕ½Ð쨹ÔÌÅÕ½Ðì)!½Ñ-åMÐ ÅÕ½ÐíÄÅÕ½Ðì°ÅÕ½Ðí}á¥ÐÅÕ½Ðì¤((ÀÌØíÕ¤ôU%
ÉÑ ÅÕ½ÐìÅÕ½Ðì°ÀÌØíÝ¥Ñ °ÀÌØí¡¥¡Ð°À°À°  ¥Ñ=H ÀÌØí]M}a}Q=A5=MP°ÀÌØí]M}A=AU@¤¤)U%MÑ ­
½±½È ÁàÀÀÀÀÀÀ¤)U%Mѽ¹Ð ÄÀ°ÜÀÀ°À°ÅÕ½Ðí1Õ¥
½¹Í½±ÅÕ½Ðì¤)U%MÑ
ÕÉÍ½È ÄØ°Ä°ÀÌØíÕ¤¤)U%MÑMÑÑ ¤()¥±
¡¹¥È ÀÌØíÁÑ ¤()]¡¥±Ä(%1½°ÀÌØí¥±Ìô}¥±1¥ÍÑQ½ÉÉä ÀÌØíÁÑ °ÀÌØíÑåÁ¤(%1½°ÀÌØí¥±
½Õ¹ÐôÄ(%½ÈÀÌØí¥±
½Õ¹ÐôÄѼÀÌØí¥±ÍlÁt($$ÀÌØíÍÑÉ¥¹ôÀÌØí¥±ÍlÀÌØí¥±
½Õ¹ÑtµÀì
I1µÀìÅÕ½Ðì´´´´´ÅÕ½ÐìµÀì
I1µÀ쥱I ÀÌØí¥±ÍlÀÌØí¥±
½Õ¹Ñt¤($%}AÉ¥¹ÑQ½Mɸ ÀÌØíÍÑÉ¥¹¤($%¥±
±½Í ÀÌØí¥±ÍlÀÌØí¥±
½Õ¹Ñt¤(%9áÐ($(%M±À ÔÀÀ¤)]¹()Õ¹}AÉ¥¹ÑQ½Mɸ ÀÌØíÍÑȤ(%1½°ÀÌØíåA½ÌôÀ°ÀÌØíáA½Ìô´Ä°ÀÌØí
ÑɱlÅt°ÀÌØí±¥¹!¥¡ÐôÈаÀÌØí¤ôÀ($(%½ÈÀÌØí¤ôÀQ¼MÑÉ¥¹1¸ ÀÌØíÍÑȤ($$ÀÌØíÑôMÑÉ¥¹5¥ ÀÌØíÍÑÈ°ÀÌØí¤°Ä¤($%% ÀÌØíÑô1¤Q¡¸($$$ÀÌØíåA½Ì¬ôÄ($$%%  ÀÌØíåA½Ì¨ÀÌØí±¥¹!¥¡Ð¤¬ÀÌØí±¥¹!¥¡Ð¤ÐìÀÌØí¡¥¡ÐQ¡¸($$$%1½°ÀÌØíÕ¥Á½Ìô]¥¹ÑA½Ì ÀÌØíÕ¤¤($$$%]¥¹5½Ù ÀÌØíÕ¤°ÅÕ½ÐìÅÕ½Ðì°ÀÌØíÕ¥Á½ÍlÁt°ÀÌØíÕ¥Á½ÍlÅt´ÀÌØí±¥¹!¥¡Ð°ÀÌØíÕ¥Á½ÍlÉt°ÀÌØíÕ¥Á½ÍlÍt¬ÀÌØí±¥¹!¥¡Ð¤($$%¹%($$$ÀÌØíáA½ÌôÀ($%±Í($$%}ÉÉå ÀÌØí
ÑÉ°°U%
Ñɱ
ÉÑ1° ÀÌØíÑ°ÈÀ¬ ÀÌØíáA½Ì¨ÄÀ¤°ÈÀ¬ ÀÌØíåA½Ì¨ÀÌØí±¥¹!¥¡Ð¤¤¤($$%U%
ÑɱMÑ
½±½È ´Ä°ÁàÀÁÀÀ¤($$($$%%ÀÌØíÑôÅÕ½Ðì°ÅÕ½ÐìQ¡¸M±À ÔÀ¤($$%%ÀÌØíÑôÅÕ½Ðì¸ÅÕ½ÐìQ¡¸M±À ØÀ¤($$%%ÀÌØíÑô
HQ¡¸M±À ØÀ¤($$$ÀÌØíáA½Ì¬ôÄ($%¹%($%M±À¡I¹½´ Ä°ÔÀ°Ä¤¤(%9áÐ(%M±À ÄÀÀÀ¨Ô¤(%]¡¥±U½Õ¹ ÀÌØí
ÑÉ°¤($%U%
Ñɱ±Ñ¡}ÉÉåA½À ÀÌØí
ÑÉ°¤¤(%]¹(%]¥¹5½Ù ÀÌØíÕ¤°ÅÕ½ÐìÅÕ½Ðì°À°À°ÀÌØíÝ¥Ñ °ÀÌØí¡¥¡Ð¤)¹Õ¹(()Õ¹}á¥Ð ¤(á¥Ð)¹Õ¹ìôôÐí±±}á¥Ð
Link to comment
Share on other sites

Here's my contribution.

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <String.au3>
HotKeySet("{SPACE}", "close")

global $frozen = "";
global $search = "follow the rabbit"
global $svada = "123456789qwertyuiopasdfghjklzxcvbnm "
global $wait = 4000
global $wait_timer = 0;
global $ant_labels = 35
global $labelwidth = 20
global $offsetT = 10


$string = stringsplit($svada,"")
if stringlen($search)>$ant_labels then $ant_labels = stringlen($search)+5
$width = (@DesktopWidth/2)-(($labelwidth*$ant_labels)/2)-$labelwidth
$start = floor($ant_labels/2 - stringlen($search)/2)
$search = stringsplit($search,"")

$gui = GUICreate("", @DesktopWidth , @DesktopHeight, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))
GUISetBkColor(0x000000)

global $label[$ant_labels+1]
for $i = 1 to $ant_labels
    $label[$i] = GUICtrlCreateLabel("", $width+($labelwidth*$i), 0, 25, @DesktopHeight, $SS_Center)
    GUICtrlSetColor(-1, 0x00FF00)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")
    GUICtrlSetCursor    (-1, 16)
next
GUISetCursor(16)
GUISetState()


$wait_timer = timerinit()
while 1
    sleep(random(0,1,1))
    
    if timerdiff($wait_timer) > $wait then 
        sjekk()
    endif
    
    while 1
        $this_ = random(1,$ant_labels,1)
        if not StringInStr($frozen,"|"&$this_&"|") then exitloop
    wend
    
    
    $thislabel = $label[$this_]
    $readthis = guictrlread($thislabel)
    if $readthis == "" or stringlen($readthis) > 300 then 
        guictrlsetdata($thislabel,$string[random(1,$string[0],1)])
        GUICtrlSetColor($thislabel, "0x00"&hex(Random(dec("44"),dec("EE"),1),2)&"00")
    Else
        if stringinstr($frozen,"|",1,$search[0]*2)  then 
            skli("",$thislabel)
            $frozen &= "|"&$this_&"|"
            
        Else
            draw($readthis,$thislabel)
        endif
    endif
    
    if StringInStr($frozen,"|",1,$ant_labels*2) then restart()
wend

func draw($a,$this)
    $len = stringlen($a)
    $ret = ""
    for $i = 1 to random(1,3,1)
    $ra  = $string[random(1,$string[0],1)] 
        if $len < 275 then 
        $ret &= $ra&@crlf
        Else
        $ret &= " "&@crlf
        EndIf
    next
    guictrlsetdata($this,$ret&$a)
EndFunc

func skli($letter,$this)
    $text = guictrlread($this)
    $ro = _StringRepeat(" "&@crlf, 10)&$letter&@crlf;
    guictrlsetdata($this,$text)
    GUICtrlSetFont($this, 14, 400, 4+8, "Lucida Console")
    $i = 100
    while 1
        if isint($i/2) then 
            sleep(1)
        endif
        $ro  = $ro & " " & @crlf
        guictrlsetdata($this,$ro&@CRLF&$text)
        GUICtrlSetColor($this, "0x"&hex($i,2)&hex($i,2)&"00")
        $i += 1
        if $i >= 155 then ExitLoop
    wend
    GUICtrlSetColor($this, "0xffff00")
    GUICtrlSetFont($this, 14, 400, 0, "Lucida Console")
    guictrlsetdata($this,_StringRepeat(@crlf, $offsetT)&$letter)
endfunc

func sjekk()
    $lu = 1
    for $o = $start to $start+$search[0]-1
        if not stringinstr($frozen,"|"&$o&"|") then 
            $se = stringsplit(guictrlread($label[$o]),"")
            if $se[0]>=$offsetT then 
                if $se[$offsetT]== $search[$lu] then 
                    $frozen &= "|"&$o&"|"
                    skli($search[$lu],$label[$o])
                endif
            endif
        endif
    $lu += 1
    next
endfunc 

func restart()
    sleep(2000)
    for $o = $start to $start+$search[0]-1
        GUICtrlSetColor($label[$o], "0x00ff00")
        sleep(45)
        GUICtrlSetColor($label[$o], "0xffff00")
    next
    sleep(1000)
    for $i = 255 to 1 step -10
        sleep(5)
        for $o = $start to $start+$search[0]-1
            GUICtrlSetColor($label[$o], "0x00"&hex($i,2)&"00")
        next
    next
    for $o = 1 to $ant_labels
        guictrlsetdata($label[$o],"")
        GUICtrlSetColor($label[$o], "0x00"&hex(Random(dec("44"),dec("EE"),1),2)&"00")
    next
    sleep(2000)
    $wait_timer = TimerInit()
    $frozen = ""
endfunc 

Func close()
    exit
EndFunc
Link to comment
Share on other sites

This is mine, it's slow and the colour is normally blue, but that's due to how Random() works.

CODE

#include <GUIConstants.au3>

#include <WindowsConstants.au3>

Dim $arrHex[17] = ["a", "b", "c", "d", "e", "f", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Dim $arrCommon[45] = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", _

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "@", "#", "~", "!", "$", "%", "^", "&", "*"]

Dim $lblSize = 20

Dim $x = @DesktopWidth / $lblSize, $y = @DesktopHeight / $lblSize ; How many labels will fit into the screen

Dim $arrLabels[$x + $y]

HotKeySet("{SPACE}", "_Exit")

$hWnd = GUICreate("", @DesktopWidth + 10, @DesktopHeight + 10)

GUISetBkColor(0x000000)

GUISetState(@SW_SHOW)

While 1

_DoSeq()

Sleep(250)

WEnd

Func _DoSeq()

For $yHeight = 0 To $y

For $xWidth = 0 To $x

$hexColor = _GenColor()

$arrLabels[$x] = GUICtrlCreateLabel(_GenChar(), ($xWidth * $lblSize) + 20, ($yHeight * $lblSize) + 20, $lblSize)

GUICtrlSetFont(-1, 14)

GUICtrlSetColor(-1, $hexColor)

Next

Next

For $i = 0 To UBound($arrLabels) - 1

GUICtrlSetData($arrLabels[$i], _GenChar())

GUICtrlSetColor(-1, _GenColor())

Next

EndFunc

Func _GenColor()

Dim $hexCode

For $c = 0 To 6

$rndHex = Random(0, 17)

$hexCode = $hexCode & $arrHex[$rndHex]

Next

Return $hexCode

EndFunc

Func _GenChar()

Dim $chrCode

$rndHex = Random(0, 45)

$chrCode = $chrCode & $arrCommon[$rndHex]

Return $chrCode

EndFunc

Func _Exit()

Exit 1

EndFunc

Array.au3 isn't needed :)

Edited by JamesBrooks
Link to comment
Share on other sites

Faster generation, hidden cursor and changed font :)

CODE

#include <GUIConstants.au3>

#include <WindowsConstants.au3>

Dim $arrHex[17] = ["a", "b", "c", "d", "e", "f", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Dim $arrCommon[45] = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", _

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "@", "#", "~", "!", "$", "%", "^", "&", "*"]

Dim $lblSize = 20

Dim $x = @DesktopWidth / $lblSize, $y = @DesktopHeight / $lblSize ; How many labels will fit into the screen

Dim $arrLabels[Round($x + $y)]

HotKeySet("{SPACE}", "_Exit")

$hWnd = GUICreate("", @DesktopWidth + 10, @DesktopHeight + 10)

For $yHeight = 0 To $y

For $xWidth = 0 To $x

$arrLabels[$x] = GUICtrlCreateLabel(_GenChar(), ($xWidth * $lblSize) + 20, ($yHeight * $lblSize) + 20, $lblSize)

GUICtrlSetColor(-1, _GenColor())

GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")

GUICtrlSetCursor(-1, 16)

Next

Next

GUISetBkColor(0x000000)

GUISetState(@SW_SHOW)

While 1

_DoSeq()

WEnd

Func _DoSeq()

For $yHeight = 0 To $y

For $xWidth = 0 To $x

$arrLabels[$x] = GUICtrlCreateLabel(_GenChar(), ($xWidth * $lblSize) + 20, ($yHeight * $lblSize) + 20, $lblSize)

GUICtrlSetColor(-1, _GenColor())

GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")

GUICtrlSetCursor(-1, 16)

Next

Next

For $i = 0 To UBound($arrLabels) - 1

GUICtrlSetData($arrLabels[$i], _GenChar())

GUICtrlSetColor(-1, _GenColor())

Next

EndFunc ;==>_DoSeq

Func _GenColor()

Dim $hexCode

For $c = 0 To 6

$rndHex = Random(0, 17)

$hexCode = $hexCode & $arrHex[$rndHex]

Next

Return $hexCode

EndFunc ;==>_GenColor

Func _GenChar()

Dim $chrCode

$rndHex = Random(0, 45)

$chrCode = $chrCode & $arrCommon[$rndHex]

Return $chrCode

EndFunc ;==>_GenChar

Func _Exit()

Exit 1

EndFunc ;==>_Exit

Link to comment
Share on other sites

Faster generation, hidden cursor and changed font :)

CODE

#include <GUIConstants.au3>

#include <WindowsConstants.au3>

Dim $arrHex[17] = ["a", "b", "c", "d", "e", "f", 0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Dim $arrCommon[45] = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", _

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "@", "#", "~", "!", "$", "%", "^", "&", "*"]

Dim $lblSize = 20

Dim $x = @DesktopWidth / $lblSize, $y = @DesktopHeight / $lblSize ; How many labels will fit into the screen

Dim $arrLabels[Round($x + $y)]

HotKeySet("{SPACE}", "_Exit")

$hWnd = GUICreate("", @DesktopWidth + 10, @DesktopHeight + 10)

For $yHeight = 0 To $y

For $xWidth = 0 To $x

$arrLabels[$x] = GUICtrlCreateLabel(_GenChar(), ($xWidth * $lblSize) + 20, ($yHeight * $lblSize) + 20, $lblSize)

GUICtrlSetColor(-1, _GenColor())

GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")

GUICtrlSetCursor(-1, 16)

Next

Next

GUISetBkColor(0x000000)

GUISetState(@SW_SHOW)

While 1

_DoSeq()

WEnd

Func _DoSeq()

For $yHeight = 0 To $y

For $xWidth = 0 To $x

$arrLabels[$x] = GUICtrlCreateLabel(_GenChar(), ($xWidth * $lblSize) + 20, ($yHeight * $lblSize) + 20, $lblSize)

GUICtrlSetColor(-1, _GenColor())

GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")

GUICtrlSetCursor(-1, 16)

Next

Next

For $i = 0 To UBound($arrLabels) - 1

GUICtrlSetData($arrLabels[$i], _GenChar())

GUICtrlSetColor(-1, _GenColor())

Next

EndFunc ;==>_DoSeq

Func _GenColor()

Dim $hexCode

For $c = 0 To 6

$rndHex = Random(0, 17)

$hexCode = $hexCode & $arrHex[$rndHex]

Next

Return $hexCode

EndFunc ;==>_GenColor

Func _GenChar()

Dim $chrCode

$rndHex = Random(0, 45)

$chrCode = $chrCode & $arrCommon[$rndHex]

Return $chrCode

EndFunc ;==>_GenChar

Func _Exit()

Exit 1

EndFunc ;==>_Exit

I was also making random colored lines in mine and got pretty good variation with:

$color = Random(255, 16777215)
GUICtrlSetColor($lbl, $color)
Link to comment
Share on other sites

Here's my contribution.

#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <StaticConstants.au3>
#include <String.au3>
HotKeySet("{SPACE}", "close")

global $frozen = "";
global $search = "follow the rabbit"
global $svada = "123456789qwertyuiopasdfghjklzxcvbnm "
global $wait = 4000
global $wait_timer = 0;
global $ant_labels = 35
global $labelwidth = 20
global $offsetT = 10


$string = stringsplit($svada,"")
if stringlen($search)>$ant_labels then $ant_labels = stringlen($search)+5
$width = (@DesktopWidth/2)-(($labelwidth*$ant_labels)/2)-$labelwidth
$start = floor($ant_labels/2 - stringlen($search)/2)
$search = stringsplit($search,"")

$gui = GUICreate("", @DesktopWidth , @DesktopHeight, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))
GUISetBkColor(0x000000)

global $label[$ant_labels+1]
for $i = 1 to $ant_labels
    $label[$i] = GUICtrlCreateLabel("", $width+($labelwidth*$i), 0, 25, @DesktopHeight, $SS_Center)
    GUICtrlSetColor(-1, 0x00FF00)
    GUICtrlSetBkColor(-1, 0x000000)
    GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")
    GUICtrlSetCursor    (-1, 16)
next
GUISetCursor(16)
GUISetState()


$wait_timer = timerinit()
while 1
    sleep(random(0,1,1))
    
    if timerdiff($wait_timer) > $wait then 
        sjekk()
    endif
    
    while 1
        $this_ = random(1,$ant_labels,1)
        if not StringInStr($frozen,"|"&$this_&"|") then exitloop
    wend
    
    
    $thislabel = $label[$this_]
    $readthis = guictrlread($thislabel)
    if $readthis == "" or stringlen($readthis) > 300 then 
        guictrlsetdata($thislabel,$string[random(1,$string[0],1)])
        GUICtrlSetColor($thislabel, "0x00"&hex(Random(dec("44"),dec("EE"),1),2)&"00")
    Else
        if stringinstr($frozen,"|",1,$search[0]*2)  then 
            skli("",$thislabel)
            $frozen &= "|"&$this_&"|"
            
        Else
            draw($readthis,$thislabel)
        endif
    endif
    
    if StringInStr($frozen,"|",1,$ant_labels*2) then restart()
wend

func draw($a,$this)
    $len = stringlen($a)
    $ret = ""
    for $i = 1 to random(1,3,1)
    $ra  = $string[random(1,$string[0],1)] 
        if $len < 275 then 
        $ret &= $ra&@crlf
        Else
        $ret &= " "&@crlf
        EndIf
    next
    guictrlsetdata($this,$ret&$a)
EndFunc

func skli($letter,$this)
    $text = guictrlread($this)
    $ro = _StringRepeat(" "&@crlf, 10)&$letter&@crlf;
    guictrlsetdata($this,$text)
    GUICtrlSetFont($this, 14, 400, 4+8, "Lucida Console")
    $i = 100
    while 1
        if isint($i/2) then 
            sleep(1)
        endif
        $ro  = $ro & " " & @crlf
        guictrlsetdata($this,$ro&@CRLF&$text)
        GUICtrlSetColor($this, "0x"&hex($i,2)&hex($i,2)&"00")
        $i += 1
        if $i >= 155 then ExitLoop
    wend
    GUICtrlSetColor($this, "0xffff00")
    GUICtrlSetFont($this, 14, 400, 0, "Lucida Console")
    guictrlsetdata($this,_StringRepeat(@crlf, $offsetT)&$letter)
endfunc

func sjekk()
    $lu = 1
    for $o = $start to $start+$search[0]-1
        if not stringinstr($frozen,"|"&$o&"|") then 
            $se = stringsplit(guictrlread($label[$o]),"")
            if $se[0]>=$offsetT then 
                if $se[$offsetT]== $search[$lu] then 
                    $frozen &= "|"&$o&"|"
                    skli($search[$lu],$label[$o])
                endif
            endif
        endif
    $lu += 1
    next
endfunc 

func restart()
    sleep(2000)
    for $o = $start to $start+$search[0]-1
        GUICtrlSetColor($label[$o], "0x00ff00")
        sleep(45)
        GUICtrlSetColor($label[$o], "0xffff00")
    next
    sleep(1000)
    for $i = 255 to 1 step -10
        sleep(5)
        for $o = $start to $start+$search[0]-1
            GUICtrlSetColor($label[$o], "0x00"&hex($i,2)&"00")
        next
    next
    for $o = 1 to $ant_labels
        guictrlsetdata($label[$o],"")
        GUICtrlSetColor($label[$o], "0x00"&hex(Random(dec("44"),dec("EE"),1),2)&"00")
    next
    sleep(2000)
    $wait_timer = TimerInit()
    $frozen = ""
endfunc 

Func close()
    exit
EndFunc
Ah very nice work yxrkt :) this is the best one i've seen so far
Link to comment
Share on other sites

  • 2 weeks later...

Not sure if this helps but if you compile the program.

Change .exe extention to .scr

add "ss" to the front of the program name. (for example: my program was screensaver.exe change to ssscreensaver.scr)

place file in c:\windows\system32\

you can select it from windows screensavers and it will run like a normal screensaver.

However this is for XP ONLY and it will act a little funny when setting up the screensaver.

cheers,

Negative1

What are we going to do tonight Brain?Same thing we do every night Pinky try to automate the world.

Link to comment
Share on other sites

Not sure if this helps but if you compile the program.

Change .exe extention to .scr

add "ss" to the front of the program name. (for example: my program was screensaver.exe change to ssscreensaver.scr)

place file in c:\windows\system32\

you can select it from windows screensavers and it will run like a normal screensaver.

However this is for XP ONLY and it will act a little funny when setting up the screensaver.

cheers,

Negative1

To create a screensaver just look here. It is not just easy as you have described :P

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Here's my contribution.

Here be my addition to it:

CODE
#include <GUIConstants.au3>

#include <WindowsConstants.au3>

#include <StaticConstants.au3>

#include <String.au3>

#include <Array.au3>

HotKeySet("{SPACE}", "close")

global $frozen = "";

global $search, $tag[5], $random

$tag[1] = "Follow the White Rabbit"

$tag[2] = "Wake up, Neo..."

$tag[3] = "The Matrix has you..."

$tag[4] = "Knock, knock, Neo."

global $svada

global $wait = 4000

global $wait_timer = 0;

global $ant_labels = 84

global $labelwidth = 20

global $offsetT = 10

$start = random(random(1,10,1),floor($ant_labels/2 - stringlen($search)/2),1)

_phrase()

func _phrase()

$random = random(1,4,1)

$search = $tag[$random]

for $count = 1 to 256

$ascii = chr($count)

$svada = $svada & $ascii

next

EndFunc

$string = stringsplit($svada,"")

if stringlen($search)>$ant_labels then $ant_labels = stringlen($search)+5

$width = (@DesktopWidth/2)-(($labelwidth*$ant_labels)/2)-$labelwidth

$search = stringsplit($search,"")

$gui = GUICreate("", @DesktopWidth , @DesktopHeight, 0, 0, BitOR($WS_EX_TOPMOST, $WS_POPUP))

GUISetBkColor(0x000000)

global $label[$ant_labels+1]

for $i = 1 to $ant_labels

$label[$i] = GUICtrlCreateLabel("", $width+($labelwidth*$i), 0, 25, @DesktopHeight, $SS_Center)

GUICtrlSetColor(-1, 0x00FF00)

GUICtrlSetBkColor(-1, 0x000000)

GUICtrlSetFont(-1, 14, 400, 0, "Lucida Console")

GUICtrlSetCursor (-1, 16)

next

GUISetCursor(16)

GUISetState()

$wait_timer = timerinit()

while 1

sleep(random(0,1,1))

if timerdiff($wait_timer) > $wait then

sjekk()

endif

while 1

$this_ = random(1,$ant_labels,1)

if not StringInStr($frozen,"|"&$this_&"|") then exitloop

wend

$thislabel = $label[$this_]

$readthis = guictrlread($thislabel)

if $readthis == "" or stringlen($readthis) > 300 then

guictrlsetdata($thislabel,$string[random(1,$string[0],1)])

GUICtrlSetColor($thislabel, "0x00"&hex(Random(dec("44"),dec("EE"),1),2)&"00")

Else

if stringinstr($frozen,"|",1,$search[0]*2) then

skli("",$thislabel)

$frozen &= "|"&$this_&"|"

Else

draw($readthis,$thislabel)

endif

endif

if StringInStr($frozen,"|",1,$ant_labels*2) then restart()

wend

func draw($a,$this)

$len = stringlen($a)

$ret = ""

for $i = 1 to random(1,3,1)

$ra = $string[random(1,$string[0],1)]

if $len < 275 then

$ret &= $ra&@crlf

Else

$ret &= " "&@crlf

EndIf

next

guictrlsetdata($this,$ret&$a)

EndFunc

func skli($letter,$this)

$text = guictrlread($this)

$ro = _StringRepeat(" "&@crlf, 10)&$letter&@crlf;

guictrlsetdata($this,$text)

GUICtrlSetFont($this, 14, 400, 4+8, "Lucida Console")

$i = 100

while 1

if isint($i/2) then

sleep(1)

endif

$ro = $ro & " " & @crlf

guictrlsetdata($this,$ro&@CRLF&$text)

GUICtrlSetColor($this, "0x"&hex($i,2)&hex($i,2)&"00")

$i += 1

if $i >= 155 then ExitLoop

wend

GUICtrlSetColor($this, "0xffff00")

GUICtrlSetFont($this, 14, 400, 0, "Lucida Console")

guictrlsetdata($this,_StringRepeat(@crlf, $offsetT)&$letter)

endfunc

func sjekk()

$lu = 1

for $o = $start to $start+$search[0]-1

if not stringinstr($frozen,"|"&$o&"|") then

$se = stringsplit(guictrlread($label[$o]),"")

if $se[0]>=$offsetT then

if $se[$offsetT]== $search[$lu] then

$frozen &= "|"&$o&"|"

skli($search[$lu],$label[$o])

endif

endif

endif

$lu += 1

next

endfunc

func restart()

_phrase()

sleep(2000)

for $o = $start to $start+$search[0]-1

GUICtrlSetColor($label[$o], "0x00ff00")

sleep(45)

GUICtrlSetColor($label[$o], "0xffff00")

next

sleep(1000)

for $i = 255 to 1 step -10

sleep(5)

for $o = $start to $start+$search[0]-1

GUICtrlSetColor($label[$o], "0x00"&hex($i,2)&"00")

next

next

for $o = 1 to $ant_labels

guictrlsetdata($label[$o],"")

GUICtrlSetColor($label[$o], "0x00"&hex(Random(dec("44"),dec("EE"),1),2)&"00")

next

sleep(2000)

$wait_timer = TimerInit()

$frozen = ""

endfunc

Func close()

exit

EndFunc

Somehow I fail at making a random offset for the messages :unsure:

Also, it's a ton slower than the original one (since its using a wider range of ascii for the looks), but it doesn't matter to me, since its going to be a screensaver anyways. Once I figure out that offset bit.

Anyways, It's my first post here. I hope it was a worthy one :P

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...