jokke Posted November 27, 2007 Share Posted November 27, 2007 (edited) As a Matrix fan, I have to point out that the Matrix effect had them in specifically lined columns, not random locations. As im a big fan of The Matrix myself, i made a new version of this great script where chars are inn collums. and goes all the way from top to bottom. If this script does not give the feeling of the starfield screen saver, then either inncrease $dots or decrease it until the feeling is right On my AMD 3200+ CPU, 120dots are about right using 1600x1050 resolution. expandcollapse popup#include <GUIConstants.au3> #include <Color.au3> Opt("GUIOnEventMode", 1) Dim $dots = 120 Dim $Width = @DesktopWidth Dim $Height = @DesktopHeight Dim $Color = StringSplit(Colors(),",") Dim $array[$dots][4] $GUI = GUICreate("Screensaver", $Width, $Height, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000) GUISetState (@SW_HIDE) GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "Quit") $array = loop1($array) WinSetTrans( $GUI, "", 0 ) GUISetState (@SW_SHOW) For $i = 25 To 255 Step 5 WinSetTrans( $GUI, "", $i ) Next While 1 $array = loop2($array) WEnd Func loop1($array) For $x = 0 To UBound($array,1) -1 If $array[$x][0] = "" Or $array[$x][0] = 0 Then $array[$x][0] = 1 $array[$x][1] = Random(0,$width/25,1) * 25 ;This is where collums are made :) $array[$x][2] = Random(0,$Height) $array[$x][3] = GUICtrlCreateLabel(chr(Random(33,255,1)),$array[$x][1],$array[$x][2]) GUICtrlSetColor(-1, $Color[Random(1, 50, 1)]) GUICtrlSetFont(-1,18) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) EndIf Next Return $array EndFunc Func loop2($array) For $x = 0 To UBound($array,1) -1 $array[$x][2] += Random(8,25,1) If $array[$x][2] > $Height Then GUICtrlSetColor($array[$x][3], $Color[Random(1, 50, 1)]);assign new color GUICtrlSetData($array[$x][3],chr(Random(33,255,1))) ;assign new chr. $array[$x][2] = 0 ;char back at top. $array[$x][1] = Random(0,$width/25,1) * 25 ;new row. EndIf GUICtrlSetPos($array[$x][3], $array[$x][1], $array[$x][2]) Next Return $array EndFunc Func Quit() For $i = 255 To 0 Step -5 WinSetTrans( $GUI, "", $i ) Next Exit EndFunc ;==>Quit Func Colors($nStartColor = 0x00FF00, $nEndColor = 0x000000) Local $color1R = _ColorGetRed($nStartColor) Local $color1G = _ColorGetGreen($nStartColor) Local $color1B = _ColorGetBlue($nStartColor) Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / 75 Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / 75 Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / 75 For $i = 1 To 50 $sColor = "0x" & StringFormat("%02X%02X%02X", $color1R + $nStepR * $i, $color1G + $nStepG * $i, $color1B + $nStepB * $i) If $i = 1 Then $Colors = $sColor Else $Colors &= "," & $sColor EndIf Next Return $Colors EndFunc ;==>Colors EDIT: more correct code. Now the true Matrix feeling. (Atleast on my AMD 3200+ CPU) Edited November 28, 2007 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
gseller Posted November 27, 2007 Share Posted November 27, 2007 SWEET!! Link to comment Share on other sites More sharing options...
MrCreatoR Posted November 28, 2007 Share Posted November 28, 2007 (edited) I liked the idea, so... i made a reall ScreenSaver from it Here it is: Matrix_ScreenSaver.zip - Check this topic Requierd "working" AutoIt (3.8.2.1)!To use it as reall screen saver, you need to press Compile to SCR button (you can select the path where you like to save the screensaver program, and the icon file for it - there is one already in the attached archive), and thats it!When you execute the compiled screen saver program, the screensaver will start, but if you press right mouse button on the file, and select Options item, then you will see the options dialog, like this one:Edit: Reuploaded the archive - Now when you install the screensaver, the button Preferences (Options) work! Edited November 28, 2007 by MsCreatoR  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
therks Posted November 28, 2007 Share Posted November 28, 2007 Not to crap on anybody's efforts (cus they're all cool!) but has nobody heard of this? http://zmatrix.sourceforge.net/ My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
MrCreatoR Posted November 28, 2007 Share Posted November 28, 2007 Saundershas nobody heard of this?As far as i know, it is not written on AutoIt So why we can't make our own stuff? even if they already exists... and there is much more "matrix stuffs" in the world then this project from the link that you gave And besides, it's a good practic for writing "system-dependently" application P.SUpdated my last post, now when you install the screensaver, the button Preferences (Options) work!  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
jaenster Posted November 28, 2007 Share Posted November 28, 2007 Coooooool grapic's in autoit ^^ -jaenster Link to comment Share on other sites More sharing options...
qaravi Posted November 28, 2007 Share Posted November 28, 2007 Cool Dude. I'm bored and created that script : $Screensaver = 1 ( Fullscreen and exit if mousemove ) $Screensaver = 0 ( 500x500 window size ) expandcollapse popup#include <Color.au3> #include <GUIConstants.au3> Global $Colors[51], $Color, $First = 1, $Oldtext, $Number[3], $Title $Screensaver = 0 Opt("GUIOnEventMode", 1) If $Screensaver = 1 Then $Width = @DesktopWidth $Height = @DesktopHeight $Form = GUICreate("Screensaver", $Width, $Height, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "Quit") Else $Width = 500 $Height = 500 $Form = GUICreate("", $Width, $Height) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") EndIf Global $Letter[$Width + 1] GUISetBkColor(0x000000) GUISetState() $Colors = Colors() $Color = StringSplit($Colors, ",", 1) $Letters = "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,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" $Let = StringSplit($Letters, ",", 1) If $Screensaver <> 1 Then Matrixtitle() While 1 Matrix() WEnd Func Matrixtitle() $Title = "Matrix" $Len = StringLen($Title) For $i = 1 To $Len $Left = StringLeft($Title, $i) If $i <> 1 Then $Left = StringTrimLeft($Left, $i - 1) For $z = 1 To 20 $Text = $Oldtext & $Let[Random(1, 62, 1)] WinSetTitle("", "", $Text) Sleep(25) Next WinSetTitle("", "", $Oldtext & $Left) $Oldtext &= $Left Next EndFunc ;==>Matrixtitle Func Matrix() For $i = 1 To $Width If $First = 0 Then If $i = $Width Then GUICtrlDelete($Letter[1]) Else GUICtrlDelete($Letter[$i + 1]) EndIf For $z = 1 To 2 $Number[$z] = $i + ($z * ($Width / 3)) If $Number[$z] > $Width Then $Number[$z] -= $Width $Pos = ControlGetPos($Title, "", $Letter[$Number[$z]]) GUICtrlSetPos($Letter[$Number[$z]], $Pos[0], $Pos[1] + 5) Next EndIf $Letter[$i] = GUICtrlCreateLabel($Let[Random(1, 62, 1)], Random(1, $Width, 1), Random(1, $Height, 1), 15, 15) GUICtrlSetColor(-1, $Color[Random(1, 50, 1)]) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Next $First = 0 EndFunc ;==>Matrix Func Colors($nStartColor = 0x00FF00, $nEndColor = 0x000000) Local $color1R = _ColorGetRed($nStartColor) Local $color1G = _ColorGetGreen($nStartColor) Local $color1B = _ColorGetBlue($nStartColor) Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / 75 Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / 75 Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / 75 For $i = 1 To 50 $sColor = "0x" & StringFormat("%02X%02X%02X", $color1R + $nStepR * $i, $color1G + $nStepG * $i, $color1B + $nStepB * $i) If $i = 1 Then $Colors = $sColor Else $Colors &= "," & $sColor EndIf Next Return $Colors EndFunc ;==>Colors Func Quit() Exit EndFunc ;==>Quit Link to comment Share on other sites More sharing options...
Jex Posted November 28, 2007 Author Share Posted November 28, 2007 I'm added in startup and exit, background gradient effects and transparency effects. My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
rambo3889 Posted November 28, 2007 Share Posted November 28, 2007 This is freaking cool , nice work My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youÂ’re the best in town Fight! Link to comment Share on other sites More sharing options...
weaponx Posted November 28, 2007 Share Posted November 28, 2007 Looks pretty good. My favorite one of all time is here http://elouai.com/the_matrix_screensaver.phpIts the only one I can find that isn't anti-aliased which gives it a much sharper terminal look. Link to comment Share on other sites More sharing options...
Jex Posted November 28, 2007 Author Share Posted November 28, 2007 (edited) New version with chars fading:Your char fading effect very cool but slowing script too much Edited November 28, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
thomaatje Posted November 28, 2007 Share Posted November 28, 2007 This 0wnz! nice work! Link to comment Share on other sites More sharing options...
Jex Posted November 28, 2007 Author Share Posted November 28, 2007 (edited) expandcollapse popup#include <Color.au3> #include <GUIConstants.au3> Global $Colors[51], $Color, $First = 1, $Oldtext, $Number[4] $Screensaver = 1 Opt("GUIOnEventMode", 1) If $Screensaver = 1 Then $Width = @DesktopWidth $Height = @DesktopHeight $Form = GUICreate("Screensaver", $Width, $Height, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "Quit") Else $Width = 500 $Height = 500 $Form = GUICreate("", $Width, $Height) GUISetOnEvent($GUI_EVENT_CLOSE, "Quit") EndIf Global $Letter[$Width + 1] GUISetBkColor(0x000000) GUISetState() For $i = 1 To 255 Step 2 WinSetTrans($Form, "", $i) Next $Color1 = Colors(0x00FF00, 0x000000) $Color2 = Colors(0xFF0000, 0x000000) $Color3 = Colors(0x0000FF, 0x000000) $Letters = "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,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" $Let = StringSplit($Letters, ",", 1) $Title = WinGetTitle("") If $Screensaver <> 1 Then Matrixtitle() GuiColor("0x000000", "0x11672E", 30) GuiColor("0x11672E", "0x000000", 30) While 1 Matrix() WEnd Func Matrixtitle() $Title = "Matrix" $Len = StringLen($Title) For $i = 1 To $Len $Left = StringLeft($Title, $i) If $i <> 1 Then $Left = StringTrimLeft($Left, $i - 1) For $z = 1 To 20 $Text = $Oldtext & $Let[Random(1, 62, 1)] WinSetTitle("", "", $Text) Sleep(25) Next WinSetTitle("", "", $Oldtext & $Left) $Oldtext &= $Left Next EndFunc ;==>Matrixtitle Func Matrix() For $i = 1 To $Width If $First = 0 Then If $i = $Width Then GUICtrlDelete($Letter[1]) Else GUICtrlDelete($Letter[$i + 1]) EndIf For $z = 1 To 3 $Number[$z] = $i + ($z * ($Width / 4)) If $Number[$z] > $Width Then $Number[$z] -= $Width $Pos = ControlGetPos($Title, "", $Letter[$Number[$z]]) $Direction = Random(1, 4, 1) If $Direction = 1 Then GUICtrlSetPos($Letter[$Number[$z]], $Pos[0] + Random(5, 20, 1), $Pos[1]) ElseIf $Direction = 2 Then GUICtrlSetPos($Letter[$Number[$z]], $Pos[0] - Random(5, 20, 1), $Pos[1]) ElseIf $Direction = 3 Then GUICtrlSetPos($Letter[$Number[$z]], $Pos[0], $Pos[1] + Random(5, 20, 1)) Else GUICtrlSetPos($Letter[$Number[$z]], $Pos[0], $Pos[1] - Random(5, 20, 1)) EndIf If $z = 1 Then GUICtrlSetColor($Letter[$Number[$z]], $Color2[Random(1, 50, 1)]) ElseIf $z = 2 Then GUICtrlSetColor($Letter[$Number[$z]], $Color3[Random(1, 50, 1)]) EndIf Next EndIf $Letter[$i] = GUICtrlCreateLabel($Let[Random(1, 62, 1)], Random(1, $Width, 1), Random(1, $Height, 1), 15, 15) GUICtrlSetColor(-1, $Color1[Random(1, 50, 1)]) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Next $First = 0 EndFunc ;==>Matrix Func Colors($nStartColor = 0x00FF00, $nEndColor = 0x000000) Local $color1R = _ColorGetRed($nStartColor) Local $color1G = _ColorGetGreen($nStartColor) Local $color1B = _ColorGetBlue($nStartColor) Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / 75 Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / 75 Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / 75 For $i = 1 To 50 $sColor = "0x" & StringFormat("%02X%02X%02X", $color1R + $nStepR * $i, $color1G + $nStepG * $i, $color1B + $nStepB * $i) If $i = 1 Then $Colors = $sColor Else $Colors &= "," & $sColor EndIf Next $Colors = StringSplit($Colors, ",", 1) Return $Colors EndFunc ;==>Colors Func GuiColor($Color1 = 0x000000, $Color2 = 0x00FF00, $Step = 50, $Delay = 15) Local $Colorr = _ColorGetRed($Color1) Local $ColorG = _ColorGetGreen($Color1) Local $ColorB = _ColorGetBlue($Color1) Local $StepR = (_ColorGetRed($Color2) - $Colorr) / $Step Local $StepG = (_ColorGetGreen($Color2) - $ColorG) / $Step Local $StepB = (_ColorGetBlue($Color2) - $ColorB) / $Step For $i = 0 To $Step $sColor = "0x" & StringFormat("%02X%02X%02X", $Colorr + $StepR * $i, $ColorG + $StepG * $i, $ColorB + $StepB * $i) GUISetBkColor($sColor) Sleep($Delay) Next EndFunc ;==>GuiColor Func Quit() For $i = 1 To $Width GUICtrlDelete($Letter[$i]) Next Sleep(10) GuiColor("0x000000", "0x11672E", 30) For $i = 255 To 1 Step - 2 WinSetTrans($Form, "", $i) Next Exit EndFunc ;==>Quit I'm added red, blue colors and move directions random now but i think that colors and effect not good. Edited November 28, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
MrCreatoR Posted November 29, 2007 Share Posted November 29, 2007 Check this out  Spoiler Using OS: Win 7 Professional, Using AutoIt Ver(s): 3.3.6.1 / 3.3.8.1  AutoIt Russian Community My Work... Spoiler Projects: ATT - Application Translate Tool {new}| BlockIt - Block files & folders {new}| SIP - Selected Image Preview {new}| SISCABMAN - SciTE Abbreviations Manager {new}| AutoIt Path Switcher | AutoIt Menu for Opera! | YouTube Download Center! | Desktop Icons Restorator | Math Tasks | KeyBoard & Mouse Cleaner | CaptureIt - Capture Images Utility | CheckFileSize ProgramUDFs: OnAutoItErrorRegister - Handle AutoIt critical errors {new}| AutoIt Syntax Highlight {new}| Opera Library! | Winamp Library | GetFolderToMenu | Custom_InputBox()! | _FileRun UDF | _CheckInput() UDF | _GUIInputSetOnlyNumbers() UDF | _FileGetValidName() UDF | _GUICtrlCreateRadioCBox UDF | _GuiCreateGrid() | _PathSplitByRegExp() | _GUICtrlListView_MoveItems - UDF | GUICtrlSetOnHover_UDF! | _ControlTab UDF! | _MouseSetOnEvent() UDF! | _ProcessListEx - UDF | GUICtrl_SetResizing - UDF! | Mod. for _IniString UDFs | _StringStripChars UDF | _ColorIsDarkShade UDF | _ColorConvertValue UDF | _GUICtrlTab_CoverBackground | CUI_App_UDF | _IncludeScripts UDF | _AutoIt3ExecuteCode | _DragList UDF | Mod. for _ListView_Progress | _ListView_SysLink | _GenerateRandomNumbers | _BlockInputEx | _IsPressedEx | OnAutoItExit Handler | _GUICtrlCreateTFLabel UDF | WinControlSetEvent UDF | Mod. for _DirGetSizeEx UDF Examples: ScreenSaver Demo - Matrix included | Gui Drag Without pause the script | _WinAttach()! | Turn Off/On Monitor | ComboBox Handler Example | Mod. for "Thinking Box" | Cool "About" Box | TasksBar Imitation Demo Like the Projects/UDFs/Examples? Please rate the topic (up-right corner of the post header: Rating ) * === My topics === * ================================================== ==================================================    AutoIt is simple, subtle, elegant. © AutoIt Team Link to comment Share on other sites More sharing options...
jokke Posted November 29, 2007 Share Posted November 29, 2007 (edited) Your char fading effect very cool but slowing script too much If you have problems with the speed, decrease the $dots value, on my AMD 3200+ CPU, 60 dots is about right on my secound version with the chars fading. Btw not only does it fade it changes to random char on every move. Abit more tidy code here: expandcollapse popup#include <GUIConstants.au3> #include <Color.au3> Opt("GUIOnEventMode", 1) Dim $dots = 60 Dim $Width = @DesktopWidth Dim $Height = @DesktopHeight Dim $color = colors() Dim $timer[2] = ["NOTSET",2000] Dim $array[$dots][11] MouseMove(0,$Height+10) $GUI = GUICreate("Screensaver", $Width, $Height, 0, 0, $WS_POPUP, $WS_EX_TOPMOST) GUISetBkColor(0x000000) GUISetState (@SW_HIDE) GUISetOnEvent($GUI_EVENT_MOUSEMOVE, "Quit") $array = loop1($array) WinSetTrans( $GUI, "", 0 ) GUISetState (@SW_SHOW) For $i = 25 To 255 Step 5 WinSetTrans( $GUI, "", $i ) Next While 1 $array = loop2($array) WEnd Func loop1($array) For $x = 0 To UBound($array,1) -1 If $array[$x][0] = "" Or $array[$x][0] = 0 Then $array[$x][0] = 1 $array[$x][1] = Random(0,$width/25,1) * 25 ;This is where collums are made :) $array[$x][2] = Random(0,$Height,1) $array[$x][3] = GUICtrlCreateLabel(chr(Random(33,255,1)),$array[$x][1],$array[$x][2]) GUICtrlSetColor(-1, $Color[1]) GUICtrlSetFont(-1,18) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) $array[$x][10] = Random(18,55,1) EndIf Next Return $array EndFunc Func loop2($array) For $x = 0 To UBound($array,1) -1 $array[$x][8] = $array[$x][6] If $array[$x][9] = "" or $array[$x][9] = 0 Then $array[$x][9] = GUICtrlCreateLabel(GUICtrlRead($array[$x][6]),$array[$x][1],$array[$x][6]) GUICtrlSetColor(-1, $Color[61]) GUICtrlSetFont(-1,18) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Else GUICtrlSetData($array[$x][9],GUICtrlRead($array[$x][7])) GUICtrlSetPos($array[$x][9],$array[$x][1],$array[$x][8]) GUICtrlSetColor($array[$x][9], $Color[61]) EndIf $array[$x][6] = $array[$x][4] If $array[$x][7] = "" or $array[$x][7] = 0 Then $array[$x][7] = GUICtrlCreateLabel(GUICtrlRead($array[$x][5]),$array[$x][1],$array[$x][6]) GUICtrlSetColor(-1, $Color[55]) GUICtrlSetFont(-1,18) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Else GUICtrlSetData($array[$x][7],GUICtrlRead($array[$x][5])) GUICtrlSetPos($array[$x][7],$array[$x][1],$array[$x][6]) GUICtrlSetColor($array[$x][7], $Color[55]) EndIf $array[$x][4] = $array[$x][2] If $array[$x][5] = "" Or $array[$x][5] = 0 Then $array[$x][5] = GUICtrlCreateLabel(GUICtrlRead($array[$x][3]),$array[$x][1],$array[$x][4]) GUICtrlSetColor(-1, $Color[40]) GUICtrlSetFont(-1,18) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) Else GUICtrlSetData($array[$x][5],GUICtrlRead($array[$x][3])) GUICtrlSetPos($array[$x][5],$array[$x][1],$array[$x][4]) GUICtrlSetColor($array[$x][5], $Color[40]) EndIf $array[$x][2] += $array[$x][10] If $array[$x][2] > $Height Then $array[$x][10] = Random(18,55,1) $array[$x][2] = 0 ;char back at top. $array[$x][1] = Random(0,$width/25,1) * 25 ;new row. Else GUICtrlSetData($array[$x][3],Chr(Random(33,255,1))) GUICtrlSetPos($array[$x][3], $array[$x][1], $array[$x][2]) EndIf Next Return $array EndFunc Func Quit() For $i = 255 To 0 Step -5 WinSetTrans( $GUI, "", $i ) Next Exit EndFunc ;==>Quit Func Colors($nStartColor = 0x00FF00, $nEndColor = 0x000000) Local $color1R = _ColorGetRed($nStartColor) Local $color1G = _ColorGetGreen($nStartColor) Local $color1B = _ColorGetBlue($nStartColor) Local $nStepR = (_ColorGetRed($nEndColor) - $color1R) / 75 Local $nStepG = (_ColorGetGreen($nEndColor) - $color1G) / 75 Local $nStepB = (_ColorGetBlue($nEndColor) - $color1B) / 75 Local $color[75] ;65+ green goes all black. For $i = 1 To 75 $color[$i-1] = "0x" & StringFormat("%02X%02X%02X", $color1R + $nStepR * $i, $color1G + $nStepG * $i, $color1B + $nStepB * $i) Next Return $color EndFunc ;==>Colors Edited November 29, 2007 by jokke UDF:Crypter a file encrypt / decrypt tool with no need to remember a password again. Based on Caesar cipher using entire ASCII Table.Script's: PixelSearch Helper, quick and simple way to create a PixelSeach.Chatserver - simplified, not so complicated multi-socket server.AutoIT - Firewall, simple example on howto create a firewall with AutoIt. Link to comment Share on other sites More sharing options...
therks Posted November 29, 2007 Share Posted November 29, 2007 So why we can't make our own stuff?Oh I wasn't trying to say that, sorry. By all means, I did one myself! expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> ;~ ============================================================== ;~ User Settings - Feel free to modify these values! ;~ ============================================================== Global $iSpaceHori = 15 ; The horizontal space (width) of each column Global $iSpaceVert = 20 ; The vertical space (height) of each row Global $sChars = '0123456789ABCDEF' ; The characters that will appear in the dropping text Global $sFontName = 'Westminster' ;~ ============================================================== ;~ Here there be dragons... ;~ ============================================================== Global $iWidth = @DesktopWidth, $iHeight = @DesktopHeight Global $iThreadCount = Round($iWidth / $iSpaceHori) Global $hFont, $hFamily, $hFormat, $hBrush, $hGraphic ;~ Set colours for the different font sizes (smaller = darker to give the impression of perspective.. or smth) Global $aColours[15] $aColours[08] = 0x003000 $aColours[09] = 0x005000 $aColours[10] = 0x007000 $aColours[11] = 0x009000 $aColours[12] = 0x00b000 $aColours[13] = 0x00d000 $aColours[14] = 0x00ff00 Global $aStrings = StringSplit($sChars, '') ; Split the character set Global $aThreads[$iThreadCount][5] ; Initiate threads $iThreadCount -= 1 ; Just to keep from having to -1 in every For loop (one less calculation = potential speed increase?) Global Enum $THR_DELAY, $THR_DELAYCOUNT, $THR_FONTSIZE, $THR_VERTPOS, $THR_LASTCHAR For $iThread = 0 To $iThreadCount ; Pre-set threads $aThreads[$iThread][$THR_DELAY] = Random(0, 10, 1) ; Delay, some threads descend slower $aThreads[$iThread][$THR_VERTPOS] = -Random(0, $iThreadCount, 1) * $iSpaceVert ; vertical position (random space above the screen) $aThreads[$iThread][$THR_FONTSIZE] = Random(8, 14, 1) ; Font size for first loop Next $gui = GUICreate('RobsMatrixThing', 1, 1, -1, -1, BitOR($WS_POPUP, $WS_MAXIMIZE), $WS_EX_TOPMOST) GUISetCursor(16, 1) GUISetBkColor(0) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($gui) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate($sFontName) ProcessSetPriority(@AutoItPID, 0) Sleep(1000) GUISetState() Global $i_LastActive = _LastActive() While 1 If $i_LastActive <> _LastActive() Then Exit For $iThread = 0 To $iThreadCount If $aThreads[$iThread][$THR_DELAY] > $aThreads[$iThread][$THR_DELAYCOUNT] Then $aThreads[$iThread][$THR_DELAYCOUNT] += 1 ContinueLoop EndIf $aThreads[$iThread][$THR_DELAYCOUNT] = 0 $iColumnPos = $iThread * $iSpaceHori $hFont = _GDIPlus_FontCreate($hFamily, $aThreads[$iThread][$THR_FONTSIZE], 0) ; Create the font object for the column $iRowPosOld = $aThreads[$iThread][$THR_VERTPOS] $aThreads[$iThread][$THR_VERTPOS] += $iSpaceVert $iRowPosNew = $aThreads[$iThread][$THR_VERTPOS] If $iRowPosNew < 0 Then ContinueLoop EndIf $sLetter = $aThreads[$iThread][$THR_LASTCHAR] If $iRowPosNew <= $iHeight Then $sLetter = $aStrings[Random(1, $aStrings[0], 1)] _DrawLetter($hGraphic, $hFont, 0x80ff80, _ $iColumnPos, $iRowPosNew, _ $iSpaceHori, $iSpaceVert, _ $sLetter) EndIf _DrawLetter($hGraphic, $hFont, $aColours[$aThreads[$iThread][$THR_FONTSIZE]], _ $iColumnPos, $iRowPosOld, _ $iSpaceHori, $iSpaceVert, _ $aThreads[$iThread][$THR_LASTCHAR]) If $iRowPosNew > $iHeight Then $aThreads[$iThread][$THR_DELAY] = Random(0, 10, 1) $aThreads[$iThread][$THR_VERTPOS] = -Random(0, $iThreadCount, 1) * $iSpaceVert $aThreads[$iThread][$THR_LASTCHAR] = $sLetter $aThreads[$iThread][$THR_FONTSIZE] = Random(8, 14, 1) $aThreads[$iThread][$THR_DELAYCOUNT] = 0 EndIf Next Sleep(10) WEnd Func _DrawLetter($hGraphic, $hFont, $iColor, $iPointX, $iPointY, $iSpaceHori, $iSpaceVert, $sText) Local $hBrush = _GDIPlus_BrushCreateSolid(0xff000000 + $iColor) Local $tLayout = _GDIPlus_RectFCreate($iPointX, $iPointY, 0, 0) Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sLetter, $hFont, $tLayout, $hFormat) _GDIPlus_GraphicsFillRect($hGraphic, $iPointX, $iPointY, $iSpaceHori, $iSpaceVert) _GDIPlus_GraphicsDrawStringEx($hGraphic, $sLetter, $hFont, $aInfo[0], $hFormat, $hBrush) EndFunc Func _LastActive($v_User32Dll = 'user32.dll') Local $str_LastInput = DllStructCreate('uint;dword') DllStructSetData($str_LastInput, 1, DllStructGetSize($str_LastInput)) DllCall($v_User32Dll, 'int', 'GetLastInputInfo', 'ptr', DllStructGetPtr($str_LastInput)) Return DllStructGetData($str_LastInput, 2) EndFunc I do believe I went a different route than most. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Jex Posted November 29, 2007 Author Share Posted November 29, 2007 (edited) Oh I wasn't trying to say that, sorry. By all means, I did one myself! expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> ;~ ============================================================== ;~ User Settings - Feel free to modify these values! ;~ ============================================================== Global $iSpaceHori = 15 ; The horizontal space (width) of each column Global $iSpaceVert = 20 ; The vertical space (height) of each row Global $sChars = '0123456789ABCDEF' ; The characters that will appear in the dropping text Global $sFontName = 'Westminster' ;~ ============================================================== ;~ Here there be dragons... ;~ ============================================================== Global $iWidth = @DesktopWidth, $iHeight = @DesktopHeight Global $iThreadCount = Round($iWidth / $iSpaceHori) Global $hFont, $hFamily, $hFormat, $hBrush, $hGraphic ;~ Set colours for the different font sizes (smaller = darker to give the impression of perspective.. or smth) Global $aColours[15] $aColours[08] = 0x003000 $aColours[09] = 0x005000 $aColours[10] = 0x007000 $aColours[11] = 0x009000 $aColours[12] = 0x00b000 $aColours[13] = 0x00d000 $aColours[14] = 0x00ff00 Global $aStrings = StringSplit($sChars, '') ; Split the character set Global $aThreads[$iThreadCount][5] ; Initiate threads $iThreadCount -= 1 ; Just to keep from having to -1 in every For loop (one less calculation = potential speed increase?) Global Enum $THR_DELAY, $THR_DELAYCOUNT, $THR_FONTSIZE, $THR_VERTPOS, $THR_LASTCHAR For $iThread = 0 To $iThreadCount ; Pre-set threads $aThreads[$iThread][$THR_DELAY] = Random(0, 10, 1) ; Delay, some threads descend slower $aThreads[$iThread][$THR_VERTPOS] = -Random(0, $iThreadCount, 1) * $iSpaceVert ; vertical position (random space above the screen) $aThreads[$iThread][$THR_FONTSIZE] = Random(8, 14, 1) ; Font size for first loop Next $gui = GUICreate('RobsMatrixThing', 1, 1, -1, -1, BitOR($WS_POPUP, $WS_MAXIMIZE), $WS_EX_TOPMOST) GUISetCursor(16, 1) GUISetBkColor(0) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($gui) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate($sFontName) ProcessSetPriority(@AutoItPID, 0) Sleep(1000) GUISetState() Global $i_LastActive = _LastActive() While 1 If $i_LastActive <> _LastActive() Then Exit For $iThread = 0 To $iThreadCount If $aThreads[$iThread][$THR_DELAY] > $aThreads[$iThread][$THR_DELAYCOUNT] Then $aThreads[$iThread][$THR_DELAYCOUNT] += 1 ContinueLoop EndIf $aThreads[$iThread][$THR_DELAYCOUNT] = 0 $iColumnPos = $iThread * $iSpaceHori $hFont = _GDIPlus_FontCreate($hFamily, $aThreads[$iThread][$THR_FONTSIZE], 0) ; Create the font object for the column $iRowPosOld = $aThreads[$iThread][$THR_VERTPOS] $aThreads[$iThread][$THR_VERTPOS] += $iSpaceVert $iRowPosNew = $aThreads[$iThread][$THR_VERTPOS] If $iRowPosNew < 0 Then ContinueLoop EndIf $sLetter = $aThreads[$iThread][$THR_LASTCHAR] If $iRowPosNew <= $iHeight Then $sLetter = $aStrings[Random(1, $aStrings[0], 1)] _DrawLetter($hGraphic, $hFont, 0x80ff80, _ $iColumnPos, $iRowPosNew, _ $iSpaceHori, $iSpaceVert, _ $sLetter) EndIf _DrawLetter($hGraphic, $hFont, $aColours[$aThreads[$iThread][$THR_FONTSIZE]], _ $iColumnPos, $iRowPosOld, _ $iSpaceHori, $iSpaceVert, _ $aThreads[$iThread][$THR_LASTCHAR]) If $iRowPosNew > $iHeight Then $aThreads[$iThread][$THR_DELAY] = Random(0, 10, 1) $aThreads[$iThread][$THR_VERTPOS] = -Random(0, $iThreadCount, 1) * $iSpaceVert $aThreads[$iThread][$THR_LASTCHAR] = $sLetter $aThreads[$iThread][$THR_FONTSIZE] = Random(8, 14, 1) $aThreads[$iThread][$THR_DELAYCOUNT] = 0 EndIf Next Sleep(10) WEnd Func _DrawLetter($hGraphic, $hFont, $iColor, $iPointX, $iPointY, $iSpaceHori, $iSpaceVert, $sText) Local $hBrush = _GDIPlus_BrushCreateSolid(0xff000000 + $iColor) Local $tLayout = _GDIPlus_RectFCreate($iPointX, $iPointY, 0, 0) Local $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sLetter, $hFont, $tLayout, $hFormat) _GDIPlus_GraphicsFillRect($hGraphic, $iPointX, $iPointY, $iSpaceHori, $iSpaceVert) _GDIPlus_GraphicsDrawStringEx($hGraphic, $sLetter, $hFont, $aInfo[0], $hFormat, $hBrush) EndFunc Func _LastActive($v_User32Dll = 'user32.dll') Local $str_LastInput = DllStructCreate('uint;dword') DllStructSetData($str_LastInput, 1, DllStructGetSize($str_LastInput)) DllCall($v_User32Dll, 'int', 'GetLastInputInfo', 'ptr', DllStructGetPtr($str_LastInput)) Return DllStructGetData($str_LastInput, 2) EndFunc I do believe I went a different route than most. That screensaver really very nice and fast. Edit : Possible to set letters background transparent? Edit2 : Westminster font = http://www.newfonts.net/index.php?pa=show_font&id=196 Edited November 29, 2007 by Jex My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
therks Posted November 29, 2007 Share Posted November 29, 2007 That screensaver really very nice and fast. Edit : Possible to set letters background transparent?Yes, but it actually looks quite bad. Just the following line in the _DrawLetter function. _GDIPlus_GraphicsFillRect($hGraphic, $iPointX, $iPointY, $iSpaceHori, $iSpaceVert) Edit2 : Westminster font = http://www.newfonts.net/index.php?pa=show_font&id=196Is it not a standard font? It's come with all my recent operating systems.. hmm. Also looks neat with the Matrix Code Font. My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Jex Posted November 29, 2007 Author Share Posted November 29, 2007 Westminster not default font for Windows XP i think. ( Atleast for my OS )http://img.dafont.com/download/?file=matrix_code_nfiGlobal $sChars = 'abcdefghijklmnopqrstuvwxyz'Global $sFontName = 'Matrix Code NFI'That font good too. My scripts : Immediate Window , My Web Browser , Travian , Text Effect , Characters & Words per minute or second , Image Editor (ImageMagick) , Matrix style background effect ( Screensaver ) , Mail Sender , Protectlinks decoder and Rapidshare links checker , Fonts Fetcher , Region determine , Compare pictures , Gradient color box , Mouse Coordinates, Colors, Pixel Search things , Encrypt/Decrypt and embeding file in jpeg thing , Hard disk space monitor , Reflex game , Multiplayer Tic Tac Toe , WLM ( MSN ) personal message changer Link to comment Share on other sites More sharing options...
therks Posted December 1, 2007 Share Posted December 1, 2007 I've been tinkering with it at work, this is what I have now. expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GDIPlus.au3> ;~ ============================================================== ;~ User Settings - Feel free to modify these values! ;~ ============================================================== Global $iSpaceHori = 25 ; The horizontal space (width) of each column Global $iSpaceVert = 25 ; The vertical space (height) of each row Global $sChars = '0123456789ABCDEFGHZYXWVUTSRQPONMLKJIabcd' ; The characters that will appear in the dropping text Global $sFontName = 'Matrix Code Font' Global $iFontSizeMax = 20 Global $iFontSizeMin = 8 ;~ ============================================================== ;~ Here there be dragons... ;~ ============================================================== Global $iWidth = @DesktopWidth, $iHeight = @DesktopHeight Global $iThreadCount = Ceiling($iWidth / $iSpaceHori) Global $hFont, $hFamily, $hFormat, $hBrush, $hGraphic Global $iFadeLength = 40 Global $iDelayMax = 5 Global $hUser32dll = DllOpen('user32.dll') ;~ Set colours for the different font sizes (smaller = darker to give the impression of perspective.. or smth) Global $aColours[$iFontSizeMax + 1] $aColours[08] = 0x003300 $aColours[09] = 0x004400 $aColours[10] = 0x005500 $aColours[11] = 0x006600 $aColours[12] = 0x007700 $aColours[13] = 0x008800 $aColours[14] = 0x009900 $aColours[15] = 0x00aa00 $aColours[16] = 0x00bb00 $aColours[17] = 0x00cc00 $aColours[18] = 0x00dd00 $aColours[19] = 0x00ee00 $aColours[20] = 0x00ff00 Global $aStrings = StringSplit($sChars, '') ; Split the character set Global $aThreads[$iThreadCount][5] ; Initiate threads $iThreadCount -= 1 ; Just to keep from having to -1 in every For loop (one less calculation = potential speed increase?) Global Enum $THR_DELAY, $THR_DELAYCOUNT, $THR_FONTSIZE, $THR_VERTPOS, $THR_HORIPOS For $iThread = 0 To $iThreadCount ; Pre-set threads $aThreads[$iThread][$THR_DELAY] = Random(0, $iDelayMax, 1) ; Delay - some threads descend slower $aThreads[$iThread][$THR_VERTPOS] = -Random(0, $iThreadCount, 1) * $iSpaceVert $aThreads[$iThread][$THR_FONTSIZE] = Random($iFontSizeMin, $iFontSizeMax, 1) $aThreads[$iThread][$THR_DELAY] = $iFontSizeMax - $aThreads[$iThread][$THR_FONTSIZE] Next $gui = GUICreate('RobsMatrixThing', 0,0,0,0, BitOR($WS_POPUP, $WS_MAXIMIZE), $WS_EX_TOPMOST) GUISetCursor(16, 1) GUISetBkColor(0) _GDIPlus_Startup() $hGraphic = _GDIPlus_GraphicsCreateFromHWND($gui) $hFormat = _GDIPlus_StringFormatCreate() $hFamily = _GDIPlus_FontFamilyCreate($sFontName) $hFaderBrush = _GDIPlus_BrushCreateSolid(0x20000000) $hHalfBrush = _GDIPlus_BrushCreateSolid(0x80000000) Global $aTextBrushes[$iFontSizeMax + 1] For $i = 0 To $iFontSizeMax $aTextBrushes[$i] = _GDIPlus_BrushCreateSolid(0xff000000 + $aColours[$i]) Next ProcessSetPriority(@AutoItPID, 0) Sleep(100) GUISetState() Global $i_LastActive = _LastActive($hUser32dll) Global $iTimer = TimerInit() While 1 If $i_LastActive <> _LastActive($hUser32dll) Then Exit For $iThread = 0 To $iThreadCount If $aThreads[$iThread][$THR_DELAY] > $aThreads[$iThread][$THR_DELAYCOUNT] Then $aThreads[$iThread][$THR_DELAYCOUNT] += 1 ContinueLoop EndIf $aThreads[$iThread][$THR_DELAYCOUNT] = 0 $iColumnPos = $aThreads[$iThread][$THR_HORIPOS] $iColumnPos = $iThread * $iSpaceHori $iRowPos = $aThreads[$iThread][$THR_VERTPOS] If Mod($iThread, 2) Then $iRowPos -= ($iSpaceVert / 2) EndIf $iColor = $aColours[$aThreads[$iThread][$THR_FONTSIZE]] $sLetter = $aStrings[Random(1, $aStrings[0], 1)] $hFont = _GDIPlus_FontCreate($hFamily, $aThreads[$iThread][$THR_FONTSIZE], 0) $hBrush = $aTextBrushes[$aThreads[$iThread][$THR_FONTSIZE]] $tLayout = _GDIPlus_RectFCreate($iColumnPos, $iRowPos, 0, 0) $aInfo = _GDIPlus_GraphicsMeasureString($hGraphic, $sLetter, $hFont, $tLayout, $hFormat) _GDIPlus_GraphicsDrawStringEx($hGraphic, $sLetter, $hFont, $aInfo[0], $hFormat, $hBrush) _GDIPlus_GraphicsFillRect($hGraphic, $iColumnPos, $iRowPos - $iSpaceVert, $iSpaceHori, $iSpaceVert, $hHalfBrush) _GDIPlus_GraphicsFillRect($hGraphic, $iColumnPos, $iRowPos - ($iSpaceVert * $iFadeLength), $iSpaceHori, $iSpaceVert * 10, $hFaderBrush) $aThreads[$iThread][$THR_VERTPOS] += $iSpaceVert If $aThreads[$iThread][$THR_VERTPOS] >= $iHeight + ($iSpaceVert * $iFadeLength) Then $aThreads[$iThread][$THR_DELAY] = Random(0, $iDelayMax, 1) $aThreads[$iThread][$THR_DELAYCOUNT] = 0 $aThreads[$iThread][$THR_VERTPOS] = -Random(0, $iThreadCount, 1) * $iSpaceVert $aThreads[$iThread][$THR_FONTSIZE] = Random($iFontSizeMin, $iFontSizeMax, 1) $aThreads[$iThread][$THR_DELAY] = $iFontSizeMax - $aThreads[$iThread][$THR_FONTSIZE] EndIf Next If TimerDiff($iTimer) > 1000 Then ; Just some random darkening $iTimer = TimerInit() For $i = 1 To 5 $iColumn = Random(0, $iThreadCount, 1) _GDIPlus_GraphicsFillRect($hGraphic, $iColumn * $iSpaceHori, 0, $iSpaceHori, $iHeight, $hFaderBrush) Next EndIf Sleep(10) ; Just a little sleep to cut the CPU down (still 20-40% on my system though) WEnd Func _LastActive($vUser32Dll = 'user32.dll') Local $tLastInput = DllStructCreate('uint;dword') DllStructSetData($tLastInput, 1, DllStructGetSize($tLastInput)) DllCall($vUser32Dll, 'int', 'GetLastInputInfo', 'ptr', DllStructGetPtr($tLastInput)) Return DllStructGetData($tLastInput, 2) EndFunc My AutoIt Stuff | My Github Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now