smashly Posted February 26, 2008 Posted February 26, 2008 Hi, boredom made me do itexpandcollapse popup#include <GUIConstants.au3> #include <GDIPlus.au3> #include <Misc.au3> Global $GuiSize = 500, $LastGrid $hWnd = GUICreate("GDI Star", $GuiSize, $GuiSize) GUISetBkColor(0x0) GUISetState() While (Not _IsPressed("1B")) $sColor = Random(0xff000000, 0xffffff00, 1) $sSpeed = Random(1, 5, 1) $WGCS = WinGetClientSize($hWnd) Do Global $sGrid = Random(3, Round($WGCS[1] / 4), 1) Until (Not Mod($WGCS[1] / 2, $sGrid) And $sGrid <> $LastGrid) $LastGrid = $sGrid $iDirection = Random(1, 2, 1) GDIPlus_Star($hWnd, $sGrid, $sSpeed, $sColor, $iDirection) Sleep(50) Wend Func GDIPlus_Star($hWnd, $sGrid = 10, $sSpeed = 0, $sColor = 0xFF00FF00, $iDirection = 1) Local $WGCS = WinGetClientSize($hWnd) Local $hGraphic, $hPen, $sy = 0, $ex = ($WGCS[1] / 2), $ds = 1 _GDIPlus_Startup () $hPen = _GDIPlus_PenCreate($sColor) $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd) While ($ds <> 0) If _IsPressed("1B") Or GUIGetMsg() = -3 Then Exit Sleep($sSpeed) _GDIPlus_GraphicsDrawLine ($hGraphic, $WGCS[1] / 2, $sy, $ex, $WGCS[1] / 2, $hPen) If $ds < 3 Then $sy += $sGrid If $ds > 2 Then $sy -= $sGrid Switch $ds Case 1 If $sy = ($WGCS[1] / 2) Then $ds = 2 If $iDirection = 1 Then $ex += $sGrid If $iDirection = 2 Then $ex -= $sGrid Case 2 If $sy = $WGCS[1] Then $ds = 3 If $iDirection = 2 Then $ex += $sGrid If $iDirection = 1 Then $ex -= $sGrid Case 3 If $sy = ($WGCS[1] / 2) Then $ds = 4 If $iDirection = 2 Then $ex += $sGrid If $iDirection = 1 Then $ex -= $sGrid Case 4 If $sy = 0 Then $ds = 0 If $iDirection = 1 Then $ex += $sGrid If $iDirection = 2 Then $ex -= $sGrid EndSwitch Wend _GDIPlus_PenDispose ($hPen) _GDIPlus_GraphicsDispose ($hGraphic) _GDIPlus_Shutdown () EndFunc Cheers
rasim Posted February 26, 2008 Posted February 26, 2008 (edited) I shocked! Excellent! Very nice! Thank you for this super example, I did not know this Edited February 26, 2008 by rasim
Xenobiologist Posted February 26, 2008 Posted February 26, 2008 Hi, yeah looks good. Took a while to get the maths working, I guess. Mega Scripts & functions Organize Includes Let Scite organize the include files Yahtzee The game "Yahtzee" (Kniffel, DiceLion) LoginWrapper Secure scripts by adding a query (authentication) _RunOnlyOnThis UDF Make sure that a script can only be executed on ... (Windows / HD / ...) Internet-Café Server/Client Application Open CD, Start Browser, Lock remote client, etc. MultipleFuncsWithOneHotkey Start different funcs by hitting one hotkey different times
monoceres Posted February 26, 2008 Posted February 26, 2008 Really nice work! Going to use this as my screensaver Broken link? PM me and I'll send you the file!
WolfWorld Posted February 26, 2008 Posted February 26, 2008 It all about math Nice job should be put as a example in the help file Main project - Eat Spaghetti - Obfuscate and Optimize your script. The most advance add-on.Website more of GadGets!
lsakizada Posted February 26, 2008 Posted February 26, 2008 Like the all other responses, IT IS COOL!!! Be Green Now or Never (BGNN)!
GtaSpider Posted February 26, 2008 Posted February 26, 2008 Wonderfull star, wooooow =) nice work, respekt! Mfg Spider www.AutoIt.de - Moderator of the German AutoIt Forum
weaponx Posted February 26, 2008 Posted February 26, 2008 That was actually pretty cool. Not what I was expecting.
Toady Posted February 26, 2008 Posted February 26, 2008 Thats pretty damn cool, good job! www.itoady.com A* (A-star) Searching Algorithm - A.I. Artificial Intelligence bot path finding
XxXFaNtA Posted February 26, 2008 Posted February 26, 2008 very nice! more of these please /[center][/center]
Tomb Posted February 26, 2008 Posted February 26, 2008 very impressive. its soo pretty i can't take my eyes away from it. i have to cut my post short, i need to go look at it some more
Achilles Posted February 27, 2008 Posted February 27, 2008 Nice work! I'll have to look at the math when I have some free time.. My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]
Malkey Posted February 27, 2008 Posted February 27, 2008 Believe it or not , I did get tired of watching it. So I grabbed another window on my desktop and continued to drag the window up and down in front of the display. It's quite mesmerizing.
jpam Posted February 27, 2008 Posted February 27, 2008 brings me memory's above from the early computer times ! very well done !!
BrettF Posted February 27, 2008 Posted February 27, 2008 Sweet! Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version!
ptrex Posted February 27, 2008 Posted February 27, 2008 @smashly Fine piece of art !! Regards ptrex Contributions :Firewall Log Analyzer for XP - Creating COM objects without a need of DLL's - UPnP support in AU3Crystal Reports Viewer - PDFCreator in AutoIT - Duplicate File FinderSQLite3 Database functionality - USB Monitoring - Reading Excel using SQLRun Au3 as a Windows Service - File Monitor - Embedded Flash PlayerDynamic Functions - Control Panel Applets - Digital Signing Code - Excel Grid In AutoIT - Constants for Special Folders in WindowsRead data from Any Windows Edit Control - SOAP and Web Services in AutoIT - Barcode Printing Using PS - AU3 on LightTD WebserverMS LogParser SQL Engine in AutoIT - ImageMagick Image Processing - Converter @ Dec - Hex - Bin -Email Address Encoder - MSI Editor - SNMP - MIB ProtocolFinancial Functions UDF - Set ACL Permissions - Syntax HighLighter for AU3ADOR.RecordSet approach - Real OCR - HTTP Disk - PDF Reader Personal Worldclock - MS Indexing Engine - Printing ControlsGuiListView - Navigation (break the 4000 Limit barrier) - Registration Free COM DLL Distribution - Update - WinRM SMART Analysis - COM Object Browser - Excel PivotTable Object - VLC Media Player - Windows LogOnOff Gui -Extract Data from Outlook to Word & Excel - Analyze Event ID 4226 - DotNet Compiler Wrapper - Powershell_COM - New
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