1. Dashboard
  2. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  3. Forenregeln
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Alles
  • Alles
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
  1. AutoIt.de - Das deutschsprachige Forum.
  2. Mitglieder
  3. UEZ

Beiträge von UEZ

  • GDI+ Visualization: Analog Meter

    • UEZ
    • 11. März 2009 um 10:30
    Zitat von K1773R

    Line Out ^^
    also all des was du hörst.

    Was alles die BASS.DLL + Derivate kann, habe ich mir im Detail nicht angeschaut. Vielleicht ist es auch möglich den I/O der Sound Karte abzuzweigen und mit dem Visualisierer darzustellen.
    Momentan spielt es nur Audio Dateien ab, aber du kannst ja gerne den Code umschreiben, so dass es direkt den I/O Stream darstellt ;)
    Ich weiss nicht, ob ich die Zeit dafür haben werde...


    Gruß,
    UEZ

  • GDI+ Visualization: Analog Meter

    • UEZ
    • 10. März 2009 um 12:00
    Zitat von K1773R

    Gefällt mir sehr =)
    Wäre es möglich die gesamte Ton-aus/eingabe anzeigen lassen?

    Danke, für das Feedback.

    Was genau meinst du mit "gesamte Ton-aus/eingabe anzeigen lassen"?

    UEZ

  • GDI+ Visualization: Analog Meter

    • UEZ
    • 9. März 2009 um 20:28
    Zitat von GtaSpider

    Hallo

    Jup, war aber positiv gemeint :D

    Das ist richtig, aber du musst die BassConstants.au3 ja mitliefern, da deine Bass.au3 ja keines Falls kompeliert o.ä. wurde ;)

    C
    D:\..\Bass.au3(4,10) : ERROR: can't open include file <BassConstants.au3>
    #include <BassConstants.au3>

    Mfg Spider

    Ups, stimmt. Ich habe die bass*.au3's in mein include Verzeichnis, und deshalb ist es mir nicht aufgefallen!

    Werde die Downloads gleich mal updaten!!!

    DANKE für den Hinweis! :thumbup:

    UEZ

  • GDI+ Visualization: Analog Meter

    • UEZ
    • 9. März 2009 um 19:33
    Zitat von GtaSpider

    Hallo

    Ein Typisches UEZ Produkt. Sieht wirklich gut aus, respekt ;)
    Könntest du vlt noch die BassConstants hinzufügen?

    Mfg spider

    Danke für das Feedback :)

    So, mein GDI+ Zeug ist also typisch für mich :P

    Die BassConstants wird in der Bass.au3 geladen ;)

    UEZ

  • GDI+ Visualization: Analog Meter

    • UEZ
    • 9. März 2009 um 13:21

    Click Me Link korrigiert! :whistling:

    Sorry,
    UEZ

  • GDI+ Visualization: Analog Meter

    • UEZ
    • 9. März 2009 um 13:13

    Hab' ein GDI+ Visualizer geschrieben:

    Der Inhalt kann nicht angezeigt werden, da er nicht mehr verfügbar ist.

    Spoiler anzeigen
    [autoit]


    ;code by UEZ 2009
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=n
    ;~ #AutoIt3Wrapper_Run_After=upx.exe --best "%out%"
    #AutoIt3Wrapper_Run_After=upx.exe --ultra-brute "%out%"
    #AutoIt3Wrapper_Run_After=del /f /q "Visualizer_Analog Meter_Obfuscated.au3"
    #include <GUIConstantsEx.au3>
    #include <GDIplus.au3>
    #include <Memory.au3>
    #include <Misc.au3>
    #include <WindowsConstants.au3>
    #include "Bass.au3" ;thanks to BrettF and ProgAndy
    Opt("GUIOnEventMode", 1)

    [/autoit] [autoit][/autoit] [autoit]

    #Region load image files
    Global $dll = DllOpen("user32.dll")
    _GDIPlus_Startup()
    Global $bitmap_from_file
    $bitmap_from_file = Load_BMP_From_Mem(VU_Image()) ;thanks to AIMP2 player ;)

    [/autoit] [autoit][/autoit] [autoit]

    Global $bitmap_from_file2
    $bitmap_from_file2 = Load_BMP_From_Mem(VU_Fragement_Image())

    [/autoit] [autoit][/autoit] [autoit]

    Global Const $iX = _GDIPlus_ImageGetWidth($bitmap_from_file)
    Global Const $iY = _GDIPlus_ImageGetHeight($bitmap_from_file)
    Global Const $width = $iX * 2
    Global Const $height = $iY
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region initialize sound and load MP3
    Global $levels, $LeftChLvl, $RightChLvl, $l_x2, $l_y2, $r_x2, $r_y2, $r, $current
    Global $ChLevel = 0x1000
    Global $volume_error = 0
    Global $ve
    Global $volume_boost_level = 2
    Global $needle_decrease_speed = 0.0275
    Global $no_load = 0
    Global Const $bass_dll = _BASS_Startup(@ScriptDir & "\BASS.dll")
    If @error = -1 Then
    MsgBox(16, "ERROR!", "Could not load BASS.dll" & @CR & "Terminating... ")
    Exit
    EndIf
    Global $file = FileOpenDialog("Select MP3...", "", "MP3 Files (*.mp3)");
    If @error Then
    $no_load = 1
    MsgBox(16, "Error", "Could not load audio file!" & @CRLF & @CRLF & "At main screen you can press O to open file open dialog window" & @CRLF & "or you can drag'n'drop a mp3 file to window!", 20)
    EndIf
    Global $filename = StringMid($file, StringInStr($file, "\", 0, -1) + 1, StringLen($file) - StringInStr($file, "\", 0, -1) - 4) ;get the filename only
    Global $file_suffix
    _BASS_Init($BASS_DEVICE_CPSPEAKERS)
    Global $MusicHandle = _BASS_StreamCreateFile(False, $file, 0, 0, 0)
    Global $song_length = _BASS_ChannelGetLength($MusicHandle, $BASS_POS_BYTE)
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region GUI
    Global Const $WM_DROPFILES = 0x0233
    Global $hwnd = GUICreate("", $width, $height, -1, -1, Default, BitOR($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW, $WS_EX_ACCEPTFILES))
    GUISetOnEvent($GUI_EVENT_CLOSE, "Close")
    GUISetOnEvent($GUI_EVENT_PRIMARYDOWN, "Move") ;move main window when lmb pressed and hold on main window
    GUISetState()
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region initialize GDI+
    Global $graphics = _GDIPlus_GraphicsCreateFromHWND($hwnd)
    Global $bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics)
    Global $backbuffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($backbuffer, 4)
    Global Const $pen_size = 2
    Global $pen = _GDIPlus_PenCreate(0, $pen_size)
    Global $brush_l = _GDIPlus_BrushCreateSolid()
    Global $brush_r = _GDIPlus_BrushCreateSolid()
    _GDIPlus_GraphicsDrawImage($backbuffer, $bitmap_from_file, 0, 0)
    _GDIPlus_GraphicsDrawImage($backbuffer, $bitmap_from_file, $iX, 0)
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region constants
    Global Const $pi = 4 * ATan(1)
    Global Const $pi_div_180 = $pi / 180
    Global Const $max_amplitude = 450
    Global Const $min_x = 25
    Global Const $max_x = 160
    Global Const $pointer_ini_point_y = 80 ;less is longer
    Global Const $pointer_start_y = 93
    Global Const $pointer_length = 65
    Global Const $ellipse_size = 8
    Global Const $ellipse_size_half = $ellipse_size / 2
    Global Const $width_div_4 = $width / 4
    Global Const $width_div_2 = $width / 2
    Global Const $sleep = 30
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region play audio
    _BASS_ChannelPlay($MusicHandle, 1)
    $volume = _BASS_GetVolume()
    If @error Or $volume = 1 Then ;check whether _BASS_GetVolume() returns 1
    $volume_error = 1
    $ve = "YES! Volume controlled peak disabled!"
    Else
    $ve = "NO!"
    EndIf
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region initialize title in window
    Dim $title[25] = ["º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø,¸¸,ø¤º°`", _
    " GDI+ Visualization: Analog Meter", _
    " Playing: " & $filename, _
    " Get volume error: " & $ve, _
    " Press P to pause current song", _
    " Press C to continue after P was pressed", _
    " Press O to open another song", _
    " Press ESC to exit program", _
    " Credits:", _
    " Main coding by: UEZ 2009", _
    " Bass UDF: BrettF (modified by ProgAndy)", _
    " Bass DLL: http://www.un4seen.com", _
    " Image: AIMP Player", _
    " And of course", _
    " AutoIt developers ;-)", _
    "•*´¯`*•.¸ .. ¥ .. ¸.•*´¯`*•*´¯`*•.¸ .. ¥ .. ¸.•*´¯`*•*´¯`*•.¸ .. ¥ .. ¸.•*´¯`*.¸ .. ¥ .. ¸.•*´¯", _
    " Greetings to: ", _
    " All members from", _
    " http://www.autoitscript.com / http://www.autoit.de", _
    " Richie for the good ideas to improve Analog Meter", _
    " Christos", _
    " and", _
    " DrSchulz (http://www.drschulz-music.de/) ;-)", _
    " ", _
    " Restarting text..."]
    Global $c = 0 ;counter for sleep
    Global $i = 1 ;for character
    Global $j = 0 ;for array
    Global $k = UBound($title) - 1
    Global $s = 150 ;sleep time
    Global $in = True
    Global $effect = Random(1, 2, 1)
    Global $g = 0x00
    Global $b = 0x00
    Global $pause = 0
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    #Region additional GUI functions
    GUIRegisterMsg($WM_DROPFILES, "WM_DROPFILES") ;enable drag'n'drop
    GUIRegisterMsg($WM_TIMER, "Draw") ;$WM_TIMER = 0x0113
    DllCall("User32.dll", "int", "SetTimer", "hwnd", $hwnd, "int", 0, "int", $sleep, "int", 0) ;set GUIRegisterMsg($WM_TIMER, "Draw") timer
    #EndRegion

    [/autoit] [autoit][/autoit] [autoit]

    Do
    Until False * Not Sleep(100000) ;do nothing, just sleep

    [/autoit] [autoit][/autoit] [autoit]

    Func Draw()
    If WinGetState($hwnd) = 15 Then ;only activate keys when window is active
    If _IsPressed("50", $dll) Then ;P pressed (pause)
    _BASS_Pause()
    $pause = 1
    ElseIf _IsPressed("43", $dll) Then ;C pressed (continue after pause)
    _BASS_Start()
    $pause = 0
    ElseIf _IsPressed("4F", $dll) Then ;O pressed (open file dialoge)
    $file = FileOpenDialog("Select MP3...", "", "MP3 Files (*.mp3)")
    If Not @error Then
    $file_suffix = StringRight($file, 3)
    If StringLower($file_suffix) = "mp3" Then
    $filename = StringMid($file, StringInStr($file, "\", 0, -1) + 1, StringLen($file) - StringInStr($file, "\", 0, -1) - 4) ;get the filename only
    $title[2] = "Music: " & $filename
    _BASS_ChannelStop($MusicHandle)
    $MusicHandle = _BASS_StreamCreateFile(False, $file, 0, 0, 0)
    $song_length = _BASS_ChannelGetLength($MusicHandle, $BASS_POS_BYTE)
    _BASS_ChannelStop($MusicHandle)
    _BASS_ChannelPlay($MusicHandle, 1)
    EndIf
    EndIf
    EndIf
    EndIf
    $levels = _BASS_ChannelGetLevel($MusicHandle) ;get 16-bit level for l/r
    If $no_load Then $levels = 0x00000000
    $l_w = _HiWord($levels) ;get volume level from left (15-8 bit)
    $r_w = _LoWord($levels) ;get volume level from right (7-0 bit)
    If $l_w < 0 Then $l_w = ($l_w + 1) * - 1 ;invert value to positive value (a bug in bass.dll?)
    If $r_w < 0 Then $r_w = ($r_w + 1) * - 1
    If $volume_error = 1 And $pause = 0 Then
    $volume = 0.33333
    Else
    If $pause = 0 Then $volume = _BASS_GetVolume() * $volume_boost_level
    EndIf
    If $pause = 1 Then ;if pause then move needle to position 0
    If $volume >= 0 Then $volume -= $needle_decrease_speed
    EndIf
    $LeftChLvl = 1 + Round($l_w * 135 / $ChLevel * $volume, 0) ; 135 = $max_x - $min_x
    $RightChLvl = 1 + Round($r_w * 135 / $ChLevel * $volume, 0)
    $l_x2 = $min_x + $max_x * ($LeftChLvl / $max_amplitude) ;set x/y coordinate of needle
    If $l_x2 >= $max_x Then $l_x2 = $max_x ;avoid exceeding right limit of needle
    If $l_x2 < $min_x Then $l_x2 = $min_x ;avoid exceeding left limit of needle
    $l_y2 = $pointer_ini_point_y - Sin($l_x2 * $pi_div_180) * $pointer_length ;calculate length of left needle (radius) depending and new x/y coordinate
    $r_x2 = $min_x + $max_x * ($RightChLvl / $max_amplitude)
    If $r_x2 >= $max_x Then $r_x2 = $max_x
    If $r_x2 < $min_x Then $r_x2 = $min_x
    $r_y2 = $pointer_ini_point_y - Sin($r_x2 * $pi_div_180) * $pointer_length
    _GDIPlus_PenSetColor($pen, 0xCF111111)
    _GDIPlus_GraphicsDrawLine($backbuffer, $width_div_4 - 1, $pointer_start_y, $l_x2, $l_y2, $pen) ;draw left needle
    _GDIPlus_GraphicsDrawLine($backbuffer, $width - $width_div_4 - 1, $pointer_start_y, $width_div_2 + $r_x2, $r_y2, $pen) ;draw right needle
    _GDIPlus_GraphicsDrawImageRect($backbuffer, $bitmap_from_file2, 68, 76, 53, 30)
    _GDIPlus_GraphicsDrawImageRect($backbuffer, $bitmap_from_file2, $iX + 68, 76, 53, 30)
    $r = $LeftChLvl * ($LeftChLvl / 0xFF)
    _GDIPlus_BrushSetSolidColor($brush_l, "0xFF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
    _GDIPlus_GraphicsFillEllipse($backbuffer, $width_div_4 - $ellipse_size_half - 1, $pointer_start_y - $ellipse_size_half, $ellipse_size, $ellipse_size, $brush_l)
    $r = $RightChLvl * ($RightChLvl / 0xFF)
    _GDIPlus_BrushSetSolidColor($brush_r, "0xFF" & Hex($r, 2) & Hex($g, 2) & Hex($b, 2))
    _GDIPlus_GraphicsFillEllipse($backbuffer, $width - $width_div_4 - $ellipse_size_half - 1, $pointer_start_y - $ellipse_size_half, $ellipse_size, $ellipse_size, $brush_r)
    _GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height)
    _GDIPlus_GraphicsDrawImage($backbuffer, $bitmap_from_file, 0, 0) ;clear screen by overwritting screen with bmp (left)
    _GDIPlus_GraphicsDrawImage($backbuffer, $bitmap_from_file, $iX, 0) ;clear screen by overwritting screen with bmp (right)
    $current = _BASS_ChannelGetPosition($MusicHandle, $BASS_POS_BYTE) ;get current song position
    If $current >= $song_length Then _BASS_ChannelPlay($MusicHandle, 1) ;replay song when it is finished
    Display_Info() ;display win title info
    EndFunc ;==>Draw

    [/autoit] [autoit][/autoit] [autoit]

    Func Move() ;move whole window when pressed lmb and hold continuing drawing of window content
    DllCall("user32.dll", "int", "SendMessage", "hWnd", $hwnd, "int", 0x00A1, "int", 2, "int", 0) ;$WM_NCLBUTTONDOWN = 0x00A1
    EndFunc ;==>Move

    [/autoit] [autoit][/autoit] [autoit]

    Func WM_DROPFILES($hwnd, $msg, $wParam, $lParam) ;drag'n'drop function - I don't know who made this
    Local $tBuffer = DllStructCreate("char[256]")
    Local $iString
    ;Get dropped items count
    Local $aRet = DllCall("shell32.dll", "int", "DragQueryFile", "int", $wParam, "int", -1, "ptr", 0, "int", 0)
    ;Getting name only from 1st dropped item
    DllCall("shell32.dll", "int", "DragQueryFile", "int", $wParam, "int", 0, "ptr", DllStructGetPtr($tBuffer), "int", DllStructGetSize($tBuffer))
    $iString = DllStructGetData($tBuffer, 1)
    DllCall("shell32.dll", "none", "DragFinish", "int", $wParam)
    $file = $iString
    $filename = StringMid($file, StringInStr($file, "\", 0, -1) + 1, StringLen($file) - StringInStr($file, "\", 0, -1) - 4) ;get the filename only
    $file_suffix = StringRight($file, 3)
    If StringLower($file_suffix) = "mp3" Then
    _BASS_ChannelStop($MusicHandle)
    $title[2] = "Music: " & $filename
    $MusicHandle = _BASS_StreamCreateFile(False, $file, 0, 0, 0)
    $song_length = _BASS_ChannelGetLength($MusicHandle, $BASS_POS_BYTE)
    _BASS_ChannelStop($MusicHandle)
    _BASS_ChannelPlay($MusicHandle, 1)
    EndIf
    Return $GUI_RUNDEFMSG
    EndFunc ;==>WM_DROPFILES

    [/autoit] [autoit][/autoit] [autoit]

    Func Display_Info()
    If $in Then
    If $i <> StringLen($title[$j]) + 1 Then
    If $effect = 1 Then
    WinSetTitle($hwnd, "", StringLeft($title[$j], $i)) ;effect 1a, 1 by 1
    Else
    WinSetTitle($hwnd, "", StringRight($title[$j], $i)) ;effect 2a, scroll to right
    EndIf
    $i += 1
    Else
    If $c = $s Then
    $i = 1
    $in = False
    $c = 0
    $effect = Random(1, 2, 1)
    Else
    $c += 1
    EndIf
    EndIf
    Else
    If $i <> StringLen($title[$j]) + 1 Then
    If $effect = 1 Then
    WinSetTitle($hwnd, "", StringLeft($title[$j], StringLen($title[$j]) - $i)) ;effect 1b, 1 by 1
    Else
    WinSetTitle($hwnd, "", StringRight($title[$j], StringLen($title[$j]) - $i)) ;effect 2b, scroll to left
    EndIf
    $i += 1
    Else
    $i = 1
    $in = True
    $effect = Random(1, 2, 1)
    If $j = $k Then
    $j = 0
    Else
    $j += 1
    EndIf
    EndIf
    EndIf
    EndFunc ;==>Display_Info

    [/autoit] [autoit][/autoit] [autoit]

    Func Close()
    _BASS_Stop()
    _BASS_Free()
    DllClose(@ScriptDir & "\BASS.dll")
    GUIRegisterMsg($WM_DROPFILES, "")
    GUIRegisterMsg($WM_TIMER, "")
    DllClose($dll)
    _GDIPlus_PenDispose($pen)
    _GDIPlus_BrushDispose($brush_l)
    _GDIPlus_BrushDispose($brush_r)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_GraphicsDispose($graphics)
    _GDIPlus_GraphicsDispose($backbuffer)
    _GDIPlus_Shutdown()
    GUIDelete($hwnd)
    Exit
    EndFunc ;==>Close

    [/autoit] [autoit][/autoit] [autoit]

    Func Load_BMP_From_Mem($pic) ;coded by UEZ. Thanks to ProgAndy for mem allocation lines
    Local $memBitmap, $len, $tMem, $hImage, $hData, $pData, $hStream, $hBitmapFromStream
    $memBitmap = Binary($pic) ;load image saved in variable (memory) and convert it to binary
    $len = BinaryLen($memBitmap) ;get length of image

    [/autoit] [autoit][/autoit] [autoit]

    $hData = _MemGlobalAlloc($len, 0x0002) ;allocates movable memory ($GMEM_MOVEABLE = 0x0002)
    $pData = _MemGlobalLock($hData) ;translate the handle into a pointer
    $tMem = DllStructCreate("byte[" & $len & "]", $pData) ;create struct
    DllStructSetData($tMem, 1, $memBitmap) ;fill struct with image data
    _MemGlobalUnlock($hData) ;decrements the lock count associated with a memory object that was allocated with GMEM_MOVEABLE

    [/autoit] [autoit][/autoit] [autoit]

    $hStream = _WinAPI_CreateStreamOnHGlobal($pData) ;Creates a stream object that uses an HGLOBAL memory handle to store the stream contents
    $hBitmapFromStream = _GDIPlus_BitmapCreateFromStream($hStream) ;Creates a Bitmap object based on an IStream COM interface
    $tMem = ""
    Return $hBitmapFromStream
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _WinAPI_CreateStreamOnHGlobal($hGlobal = 0, $fDeleteOnRelease = True)
    Local $aResult = DllCall("ole32.dll", "int", "CreateStreamOnHGlobal", "hwnd", $hGlobal, "int", $fDeleteOnRelease, "ptr*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[3]
    EndFunc ;==>_WinAPI_CreateStreamOnHGlobal

    [/autoit] [autoit][/autoit] [autoit]

    Func _GDIPlus_BitmapCreateFromStream($pStream)
    Local $aResult = DllCall($ghGDIPDll, "uint", "GdipCreateBitmapFromStream", "ptr", $pStream, "int*", 0)
    If @error Then Return SetError(@error, @extended, 0)
    Return $aResult[2]
    EndFunc ;==>_GDIPlus_BitmapCreateFromStream

    [/autoit] [autoit][/autoit] [autoit]

    Func VU_Image()
    Local $VU = '0x89504E470D0A1A0A0000000D49484452000000BE0000006B0803000000FE59C833000002A6504C5445000000FFFFFF282828707070B8B8B8484848D8D8D8F8F8F8808080A0A0A0181818E0E8E0F0F0'
    $VU &= 'E8E8F0E8C8D0D0E8F0F0F0F8F0D8E0D8809088586868909898E0E8E8F0F8F8607068707878B0B8B8F8F8F098A0A0D0D8D880888898A8A0D8E0E0C0C8C8C0C0C0687070C0C8C0C0C0B8E0E0D8788080B8'
    $VU &= 'C0C0D0D0D0585858787878888888D0D8D0B0B8B0F8F0F0606060909090A8B0B0A0A8A850605868686860686898A098808880708078A8B0A8485858889090A0A8A0F0F0F8989898707880788078788888'
    $VU &= '7078709898A0788880506860D0D0D8F8F0F8808890687878909890B8C0B8A0A098806040A08080D04838D0C8C888908890A098808078B84030D04038C03828C86050E0C0A0B8B8B0C8C8D0C03830C840'
    $VU &= '30C83830C04840505858B8C8C0C84038E08080889898D03830A08060888880B06058E8E0D8586860F0E8E8687068F8F0E8384840789088907068C8D0C8C83828986858C83028202020C83020D8D8D098'
    $VU &= '7870B0B0B8708080586060485050B0B0A8606860687870B06860C02020787070806060A87060404020787870806868A8A8A03838380404042C2C2C4C4C4CDCDCDCFCFCFC8484840C0C0CA4A4A4B4B4B4'
    $VU &= '1C1C1CF4F4F4F8FCF8C4C4C4FCFCF8D4D4D4CCCCCC7C7C7C8C8C8C545454F8FCFC6464645C5C5CFCF8F8FCF8FC6C6C6C9C9C9CF8F8FCFCE0E084807CBCC4C07C88848C7C7CB06458A4ACA87884809C6C'
    $VU &= '60D0D0CC808C88A47C7C8C94949C808098A09C90746CC44038D4D4D0807C7CA04C4074807C787C7CBC4838CCD0CCB8BCB8A46C58C8CCC8E4E8E0F0FCF8E4E8E4B0B4B0ACB4AC748080B05044BCC0BCC0'
    $VU &= 'C4C0F4F8F4808C8CAC5848DCE0DCB4B8B4E0E4E0909C98D0D4D0D4D8D4ECECEC080808F0F0F0E0E0E0C8C8C8303030BCBCBC343434747474ACACAC404040A8A8A8505050101010E8E8E8E4E4E4B0B0B0'
    $VU &= '3C24B1380000138849444154785ED4CE091180400C03C0F87797F4BBE3C70903A8E82A58BC7474849F726E773FCBD0B75FCB78B29FD80520CBDCAF861803D0E443ADB930B7719D67386F84D997A82060'
    $VU &= '652F69620196209902AC094004AAD0A201B156DA38159D984E2A516A493111CBDED354AEABA497B4EEC56D33196D860A964B8E02696123AD5BB95737BD5A7553A9357BA1EBB0D80DC71C3687FC27DD3D'
    $VU &= '806C6A466401096CC9678667170B70F6392FBFF3EDC10C9D1A0D1C380CA736F45F1FF8CE86A8E140521357BFFA81EFCCD70C1C488C5AE0173DFD927130FD8D52E040A75F6AA48FB6E31CC6DEB357FA22'
    $VU &= '14728E8450E748588908F8080121F6505F2E02431E1E663D1C518F3EF2A8D6D9059F4EEDB1EEA80A494844F040348CA4DE5EA71FD2118DC57B34C227FEDD22DADD0B807A88899EB0B977E9F7AD01A50D'
    $VU &= '6761CDC0421F9A4357750BDBA06532A422D11F40973310F8D0F7805A52585043AA8ADE4753780F9D6CD6735D0194AD55EFC02D07C67DF50D6CDD58C5D2D7C45007E0FD34533FA44EA66320F4BB524A2A'
    $VU &= 'E366E1F6C748E1284A08D1FE30542015CD887832FEBE3C84D394BF01BE7B0DB8F678ED6B6BA8DDE8DB517FF55800C31D181A028687D0042455DF3452D675BC87A0A320D7EF200B8FFCF7A5CA5D001871'
    $VU &= '10EDE9B47097D4F10FE755B329FFABD76BA5EB7DF4D46BD777D28781A1AFF0F8163AEAFABB87AF53922502FD230901E23D4CA49F489E182565ED3FF664774E9E9188152296BC4C20FCE14C6F320AB009'
    $VU &= '7D71C31D3C56ABFD6FFA7DC7D78F8BBBE9EFE84F50272801A114F3C998BAFD5DC089C6EB5E3C12118A68E8331FA54D13365861ACA08A421ECDF1956BC3D7BCE258D85DBF74E8C63030FFF26AE9DDE19D'
    $VU &= 'D3274DA88E0EB24267204D22DC93C6364894554AE76D156E9327BB4C0B0D0A39A4BBB74F7AB7F8176E78EAA543631CFCDEC19DF46120F8DF2EB0F9EEF5EB87941DF4E913C93DF9FD11E8603CA550A4C3'
    $VU &= '85C23DD5439B03B948432B11149010423969120D466227B5A7EAD77D5801B9A37EEDE543252070ECF8B1E1D28EFA40CD316080CA620D3BCBC32968A74E45EA45444BCD7CC4B76705EF41B845D1388B6A'
    $VU &= '114854247E60DB2C7B7FF0A38FF40220558064D689606736053CC4E215DF6FF7C79621871DED492190D3BAC04A850DBABA68DB3621314984F375531BB9BBEB8288E655E8044CF94A3D2A7D093DE924C9'
    $VU &= 'D050E1E1F73CF2FCFE2D9F55BB629A204174697992B0E9A1EB48F8B224984F80F223F13147EA5B9E3EC146E3C9D1A2457F3B6143282C37AEC73F12054432B6FBB6418EC6036DD958A75CB56942B821B5'
    $VU &= '90A387D437758487D2204DBFA0E5822694B1A7C10A6095F3BE3E818F21A20560EBE8D504BAC0BC1629AB000826A3C948249F74F66AC749CB22510F9E69D781D3110525302D1D915886202DA40A521570'
    $VU &= 'F2E1C6C76377D387A3C96BD11FAAB20BCE232964650400A943391100F746DFAE5A047B3BCBA46DA942B72052BDB2724CAABA45223712814EA2B7A0420D09E5E94CFFA9DC482C56D062FDA7F3F95C34E5'
    $VU &= 'C6D54041E61BCB43253ED4A180A00DD3247572645CBD579F6D4CDF632C291337CD323D0027206B2097024FC22D2800184AF7C7A2C1582C968FA61289703C1E5794DEDE703811CDE563B16477F019D771'
    $VU &= '4E2920F9F14F3C3BF15CD6A2C8DA242D1E15F00F68C036EAD3041249D5E9C8F9FEB42AB009F1C91448331A3B821022B154281D0D6ADAA772036941DC0F5528CF8C7E4A3BF1643E1D81F8E1336727CF9C'
    $VU &= '3BFF231B02A4CD4E15A4499F0AC0066D4A5FA4B23F7A8A08271DE866D52ED326311013C8C2D1126059F4F4C7F2195789C0476ADC7F3F4CA124F29A96FFE427A62626A62FCC7833C85A3A5CAD57CE8226'
    $VU &= 'A9FA7D1440B94DFA44E2D31A92792FE3005456099A20C4480A24735A3CA515728DCCEBC38E7FFABA917AF833E3E3E3335317272626CE5E3C37FBF5C88FE5A47DC53449FA7DD419D204DAA4AFB2B33FEA'
    $VU &= 'F41773DD0A74BB6C9BA64D12294D806AFEA33DB9B0DA48AB19480B80353EFEFB2FCE5C9C3B3B71616AF6C77FE20828A990F0FBA813CD6B026D4A9F88F73FAD16C7C22069B2EC8F1FAB44F21925373E7A'
    $VU &= 'D404CA680D822C0FBC7AFA0FFFE8E2F4D9B3D39333B33FC5B2CE3A2AE1913971B43DFA10AE8354FF610032A00A65F7815AF8692D2500130F46B5BA7AF3B527FEF8CCE4F4C4D9A999D99F0149DBAC10A1'
    $VU &= 'B49BEFF8D9F6741E42A41412AE83CE9C03B242593AA194968F13241E0276FDC99F9EFE337F15CC5D3877FEB3A00FC4899F2BA69C87D4679D0A850049942DE6345297F26AB49077F0F090D6DB7F7EFA2F'
    $VU &= '6626A7CF5E983A77DE2E93EC82F8DCE7BA2AF0301F589FA41C6D0296491F44623950273850C81F0688366093B5D86B7FF90DAF0D5DF09600988513E9FA8C83874A9F84C86404C8B269DB264DD324E1F8'
    $VU &= 'CFAAEA252DE8A07D50D7F5D74F3FFB8DE727262ECE9CCFE2E9EEF4FBB9930FA24FA2735CD39E4883B42C5AA6E51F88818288C4B430DA0D3B0BA77FE1F939AF82669F4BA6409D2024BBE97F7517FD4041'
    $VU &= '20DA110749D3F2C3B74D12D17ECD55B117FC55CF5FFFCDF4C4DCF499675966B5AE4FAAA4BE5BFA1BF7D3A74D284303508341153449D3362D9270C63501624FE0CADFFEFC0B73D35E0FCD8255D3040824'
    $VU &= '334901ABB5E2D121B47191EA4E9C8C8D8440DB96954F0B033DA9965A258956587DE4EFFEFEC2D90B93E7BE5EF66F4AEA0825C723B8F4CC11E84DA62FED0BB958B2F352F244410169D9F4ED11098E09E8'
    $VU &= '2D1895DE192CA115AA6BAFFDC3E485B9CBE73E0FFA37B5993C9C1418481655B4A0AF0C29C20B5AA443A054B76DC2D146D50A4DAB697FBEB9B47489065AE11F4F7F61F2F9B91766CE83FC266DD2AE300B'
    $VU &= 'E5291746B3FA34D5742892FFA5A80BD8A44E1FB88530C88A65A3490C717BD3B92D5AD387FECF43FFE2F94F9DB7A99BD411D714B5E7576291E6D3A76E9AB432BF9A14A12F5E828C9E88161C90AC12CD52'
    $VU &= '5A1E14627099688D7FFDB79E7F7F61EEF2D4AC6D67AB44FCB18CF36B79902D148FEA3A883EA58099A40BFAE462219036596D3A7CE796B3BAEAAC6C1A680DFEE7AB3F7979FAF9C9D9ACAD1348FCFAA7B5'
    $VU &= '93660BB56FAAA930784485AE23D19D4296EA5891205931D134A59545E1F1CEAD125A83E5FC6B9EFFE5C9D9CF96F99C4BA11064F3FA74D2042D929E7FF8A91C446194F56F8855340BBFB5EC080FE7AD2B'
    $VU &= '2DC66F92B95F7EF1F2DC0BBF316BE77ED32D1326C9E6FB3E6952A243B8914B3DB142942069A3798CDAA8227C36176F975AF3376DF2D68917A7E6E6667ECB2B6055A507764ABF761FFD063A39F2443CFF'
    $VU &= '6800244DA205F8C682B32971FEE01DA225E89138FDDB53675EFA9D23C8D29655D0D2A6017568E95FECE8CF116415AD60883B8AA72FF9D6E86A6BF1DB0079E9D5DF7DE9F7AAD469FBFE6821FDED58F028'
    $VU &= '93680D2E2FF9F61267E04DB65AFDE8FAE6958F3F53A66ED307BBEAB71BC3787B4571DE43B9D3F4B3CBB2D0802C83ACCF053BE87FF01E7D03BB0336AB5F5A59BA5237F7872BEE328D66F56D34A8EE94FA'
    $VU &= 'DEA7AFDCAA7B2FAE2CCA49DC7EBB597DC084846017EA34917EFB904D7349B9E2B1B8B2BCE29F28EE4AA9F5BB10FF3FFA7CE32D69AF2CBFB99A7115390FA54D77D97B7D63757450DABB999AE1DC5EF4CE'
    $VU &= '14F74ECD300E84BEC1E5BE45C563E9CEDB86FF6270707069616B900742DF30366F0FFAF683B73C6303B595A24730B87240F44B2B0B8B3ECB8DAD6669B5E653327020F4959525DF7EB0CF91D6F7D2CE59'
    $VU &= 'B4BFEFCBA6B93028F503C5E03DBCFEFAC848B0F816DB9AFE77ADB7579F6FDC1A6CE02EF479ACADC9211008DC2EDE743789F6E9AF79FAED4DDF58BDB920DD975C692FF1DC57EE146F29B5120DB453BFDD'
    $VU &= 'E91B1C58715D571A37B8BA75F5F6CDD137376B256F0D1BD8BFFAB269DEDC0A5CBDBAE5E31FD6D7B746FDD8595B5596B78A77560D633FEB9756E6D7EFB2B1B1BE5E1C75FFA944C360A6589C9FDF985FE3'
    $VU &= 'BED6BF321F9CDFD8D898F71ACDC64631A0D4287D0D2E8FCC7B048BFF61ECDBA56B18A59BAF78E2AF8C0537FC26E3C7FE5E3B9DF7DF098E8D960C639FA66F70F095316D2C381F5C91B11BDB67B6383236'
    $VU &= 'F6CAD8D8C81BDCB7FAA53B63C1EDB16FD72FDD1996AC97DAA7DFD7567DD46E66646F6FC8DFEB2FAE06D63C166A86B15F97AE54DFB1B4EA18D8AFE963D7FF9C37EA603FE9B7CEC1D037600077D3360E98'
    $VU &= 'BE0189D4971807465FAAD694BEE1C70FBDEC71E8F1E13EA5262FFFDFEA1BA55A8D0F225F5A1A3EFEA56F7FF9830DBEFCED2F1DBBE6961E6402945F321F40DF40EDCAC2FAD6924318ADC9AFFE0FE756B4'
    $VU &= '9CAA0E451B0C89F8DC1FC81BC5077CE099AFF223A88285320CA8A333FA4734092844217F7283B6A770CFB9BDED592A387BEFC9ACACBDB3639C41EE3C45F974F2DE713AA9A978B668C00F87C26D262BE2'
    $VU &= 'D3BF519FA6EE78B359877EFCA3277CB0DC2F34C5FDC6FE763B75E892B1AD6817F16DC4BEB036B3F1CCA43FA5AF683077255C578CC336F88168E85C2CEEDCEBA57D50C53F72F67A7D9FC862E1643FE95C'
    $VU &= '8D1C2B06E166E36310FC507D9A8C67B6BD77662B137F3FDBF052D41D3CDDB6D68AF9656B3BE7B565D7DECD5CE8F2FB8D02A3A93BDADBF66C55D29FFD685029A672B5BD6CB74B7B45E877E9C7E272D93F'
    $VU &= 'EDB7B53EB20E975ABBBEBCBDBD5DE7F565B43EE8F593725D9647FADD64C6C96AB7DC2AACC59F8B2E268BFFA00F024AB6A75AE16467F49BECA9B01D6B3CB67567BDAF4FDAF57ADA1F0EF669729D9FF4DD'
    $VU &= '5A99C7E3B563BBF91F98F41FD6FBD82BE26CE779B74C7614DF5FBD384007F48788D176A12AD6D30E2CFE865C41C77EEF8CA7D6E562ED54B1CF5F74C1681C53269F147FAF76ACE576BD1A1F9EDCFC7BFA'
    $VU &= 'E3C6D2BA55B4D0BBB5FBFFEA078332CEA5A71585B62479F02DED71B577A6B391EE5875A1D84FC68CD25881D276367FF5BC6269D9FA79361DED8DDFD2C97C9A6293509A99D8375384EF7AF0AD62B03819'
    $VU &= '79B7741B1FA828EA339435C0CFF0803E2B4D24A1292346A20C71151E53E8E8CB11A7F8361DC263D8CA469A304A7104E3DF562DB1157B5BB7EC42B1D726B3B6C9E91D4D7B7C55FA178573D69DD9D4D947'
    $VU &= 'C34E1200689023811C9A5102AB2811F71325A699B5D46D99E37B0C95CC4D8E5042112722EB174F208F50D06CC65925431395DDF01853C628C6F74419A2A9D80CBABCAA2066B21D663308D0C1DECC2EDB'
    $VU &= '753DEFB6A9898358F30B0C9D275D3B9D2FD797A7D9C676CC000C90B8C72A444026666CC8924777F79D418E6FEC73C335210B8F4722650628CC07EABBC7B26A1237415292368D62FC71C008EEFA64EE91'
    $VU &= '54CC758D44701A10180CE50BE8E66935D577A3422B14B44594B24FB4293CCD6F76CFDA2F67D3A771D32FFF001021A5292547426611E161692A639F41009228A92225AE2C230C7068B41DFDE2437D9EF9'
    $VU &= '4C121F96392F3306617B5FE41F00BC61256F13D34C4D00A82CF3BEFA2AA0DC9F2D7D64CFB562B15814AF76827CE4BF0321C40FAF3787A61D0EFAD47A92C346D82D119033809B1C505575AD1A7E70FA09'
    $VU &= '020A00A53856A04110E44D7C57FFF58B8DE4071BA465DB97F572A2DD50BC8E93B40733E59B7971F74D9EACE5C839B04E9D1FE1F778A5FE07FD28C349D4B028C13C0E383139565E96519E129E91848280'
    $VU &= 'F332C10043642698247858F972BF7CB28A8936BF61319F1233EBC1248F0BEDEED4AEF5FAB2DD8741BF78D2927342987AA3D2447E9A22546256129F93B4F33765C21100698609E50941CAC500A0BFE807'
    $VU &= '3E521643B491297320A06B6060CECCF298F26329239182401866C90197A282992958BF76036AD53B4BBBCEDF51CC57900F006785F6E19D14EBBD3E6AFAE5534A3FEA3A4AC488E0A812A1846E6A4A1855'
    $VU &= 'D2ECEA0755709A005C1938314A215126A3B2AF7E809BC8C4C710101EE581806685B198C15619248255B76BCBB0C94A40122138427050F940D62367727D9DBC2AA86BA15932213D2472AC151FEEF9757E'
    $VU &= '3E7812F4F813E9C34AF8823724EA9A4F65548F9257A12F09BAD137D47000B98F6960E41561A608D9A078046CA22A35AB889651023188202C194424C8222E1AAE3480308214E48240C9C22807BDCD4EE8'
    $VU &= 'D6F67A9D7CE05A68F611963D40C3D18AC967C075775E42F079904C18200D2F21411C26314C9128591931A406C97010048803BF22D24C212E6954A61CA181FA00DF3FF4D6AD06CFFD759DEBCE15BF5FB0'
    $VU &= '0A093E0B379E2EC7F5DBB5074DAB570246BF00ABA9AE69FD88B7E55A7F049F12BC1FEC3106EF8DF2C33858220A7D6AB46B9C77FAACEB9C7E0310F35BD098AC6D6966A6A8F1E9FF7503D3B6ADC5F3B58F'
    $VU &= '89A7EDA6B2AA6487EEBE71346F320879F6C6DB03FBE2F8759F448B529421C69A386D1105BE99372CE54C997D1074F40B49BB6956D3A31186110E8D48C67C631C1FB399EB0A1E31107C79B872F5F3EEE5'
    $VU &= 'F96580B745713A4C8508C51D9B9157146F6F839887D7D161293A79BF1227095DE91A86A8905B4559136EB898B91B28852131A0C47BA85D8AD5182D6A106369DCE48C05D467CCCFD5451963107CA10FDF'
    $VU &= '6DC7FAC3F3DB10CF2FF5C2B32D5709628486BBDED55A7DFD77D0C3F3657D19A12FFF97034DAB94677E9BB64DE3D3B84554D1F4D5F79BFA86FE503BE8AFF7ADD45A9E47AF0F7FC0B52E4E17FBBC9A4E57'
    $VU &= '67FBE22DEAC99FA2E6D66139F5C15F82B2D1E5A1D8594DFC4F2B75B0E2200C840178BAD968C95BECB173E9250F995457E9D18ABE532D4A24CC40DFA4B1746F6D6060BFF39F7F0602534AFDA6D73FA887'
    $VU &= '2EC27B1CC357889A4847770AD1C07B5577ACF673B9DD0BB16B333AF076B4DF452D34DF9B03D9AE6FE1933644B79C364E07864F78DC0F74BC9CE7A29652A3F200AC5435588994A6CAAEA8197278894F4B'
    $VU &= '3E660857AB69AB156E81E6F583889D00A6B8A205003CE4B1310C597EAB08B43E4B45B06FFFE6FB49C6C3BFF39314240FFB2BE73850E508D20000000049454E44AE426082'
    Return $VU
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func VU_Fragement_Image()
    Local $VU_Fragment = '0x89504E470D0A1A0A0000000D49484452000000350000001E0803000000BB53A6B7000000AE504C54450000003030302828281010104040404848485050507878786060606868683838381818182C2C'
    $VU_Fragment &= '2C343434202020080808A8A8A88888889090907070705858588080807474744C4C4C7C7C7C5C5C5C6C6C6CB8B8B8B0B0B0646464D8D8D8F0F0F0E0E0E0ACACACC0C0C08484840C0C0CA4A4A41C1C1C8C'
    $VU_Fragment &= '8C8C545454040404A0A0A0E8E8E8E4E4E4D4D4D4C4C4C4D0D0D0C8C8C8B4B4B49898989C9C9CBCBCBCDCDCDCF4F4F4CCCCCCECECEC909898AA04C38C0000000174524E530040E6D8660000025D494441'
    $VU_Fragment &= '54785EC5D2D772DB381480611EF4CEDE49F52E773BC9EEFBBF58204AB1A954E52ADF053183C37F301C30F8E716094F1B2FE5C9E2C624910A0CBA30A0C4F68F49D72B64C05A75612D18A444F4DBA636C8'
    $VU_Fragment &= '2743342CF644F97037FF6554803927A4148DFFB054D6949C7B63E4CF9B9601395154F0CA076C2764517141143901FAB32862ACCEEA1DA1296F1841781586217684A5554349E647AC7CFD311292E7B9A0'
    $VU_Fragment &= 'B2AA894518DBBA6984D5D859DA577E3BCF2B295EBE8F6A99C79C31DE13A5DC8A46B3E9E7CFD35997F94C11C9CB5DB5CC9BEC3A9BD7324E522A39011FE97C36F591CFA67789DB28052517B448E2B43E8C'
    $VU_Fragment &= 'A285F091A05C808F904EEE8EFF4DCF8E77AF1B6715802CA84C62593F7F548DD8266C5711A7AC052D27B3E3BBD9A4D0A7FB7065C5B2642BE47BB4CD9631ED5340E021F37C3FFB7077DF5A37EC2B5E9749'
    $VU_Fragment &= '9CE597E8AD2E384D8543608C818D78987C9A7CBA984C264FCD661820D43434E65977AEB810AC2A351AC0267FB81F79BC7FDA3A40039DF13295CDE5E72B330E1AB98171F1E2F1CBC8E3E27F83CE438449'
    $VU_Fragment &= 'C576F57A388AF41C6177016ED93E5D691340EE424355D3F4E88F22A9D478A3379E7F02E2DDC362E4A1CB117C1B3BEC8A46754144F90E63FD0D06245EDBB791F62011E87718F74519943909F108426419'
    $VU_Fragment &= 'B5CFEFDA794C11C223615905DCECF19856A88FBBF9BC1BF8752B91D2786CAF82D57E752534609B388AD6D1D936550061B81A0B827D786DBF224609FE7258AF0FEBC34BD51344F0F72F053FC2042C13C5'
    $VU_Fragment &= '328E978560CA101DDC02138B2CA18C51A28CF5D16D56962830278A5A1CDC0C0319000EFE0ED6FA97C957E7B64B82E69A2ACC0000000049454E44AE426082'
    Return $VU_Fragment
    EndFunc

    [/autoit]

    Quellcode alleine läuft nicht, deshalb komplettes Paket hier herunterladen inkl. Exe Dateien: <CLICK ME > oder einfach den Link unten benutzen. :P

    Viel Spaß

    UEZ

    PS: ist noch im ßeta Stadium Finale Version

    Dateien

    Visualizer_Analog Meter+.7z 548,04 kB – 1.063 Downloads
  • GDI+ Beispiele

    • UEZ
    • 30. Januar 2009 um 22:22

    Habe ein weiteres Beispiel hinzugefügt: #06 - Sinus Laufschrift

    Guckst du Beitrag 1 ;)


    UEZ

  • Sin, Cos, Tan funktionieren nicht richtig

    • UEZ
    • 28. Januar 2009 um 19:14
    Zitat von FireFlyer

    UEZ also bei mir war das 9. Klasse ^^...

    Ich kann mich nicht mehr so richtig erinnern, aber angenommen, es war auch bei mir in der Neunten, dann was das 1985!

    UEZ

  • Sin, Cos, Tan funktionieren nicht richtig

    • UEZ
    • 28. Januar 2009 um 16:05

    AutoIt rechnet intern in Bogenmaß und dein Taschenrechner in Grad.

    Grad: 0° - 360°
    Bogenmaß: 0 - 2*Pi

    Es ist schon verdammt lang her, wo ich den Stoff in der Schule pauken musste :D

    Daraus folgt:
    Bogenmaß = Grad * PI / 180
    Grad = Bogenmaß * 180 / PI

    Gruß,
    UEZ

  • Prozess zu Pfad

    • UEZ
    • 28. Januar 2009 um 12:07
    Zitat von progandy

    Ja:

    [autoit]


    MsgBox(0, '', _ProcessGetLocation(@AutoItPID))

    [/autoit] [autoit][/autoit] [autoit]

    Func _ProcessGetLocation($iPID)
    ; SmOke_N, Larry
    ; GetModuleFileNameExW
    Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID)
    If $aProc[0] = 0 Then Return SetError(1, 0, '')
    Local $vStruct = DllStructCreate('int[1024]')
    DllCall('psapi.dll', 'int', 'EnumProcessModules', 'hwnd', $aProc[0], 'ptr', DllStructGetPtr($vStruct), 'int', DllStructGetSize($vStruct), 'int_ptr', 0)
    Local $aReturn = DllCall('psapi.dll', 'int', 'GetModuleFileNameExW', 'hwnd', $aProc[0], 'int', DllStructGetData($vStruct, 1), 'wstr', '', 'int', 2048)
    If $aReturn[0] = 0 Then Return SetError(2, 0, '')
    Return $aReturn[3]
    EndFunc

    [/autoit]

    Parameter des Programs: http://www.autoitscript.com/forum/index.php?showtopic=88214&hl=_GetCommandLineFromPID

    Alles anzeigen


    Und was ist denn mit deinem Beitrag hier: http://www.autoitscript.com/forum/index.php?showtopic=76919&view=findpost&p=557243? ^^

    UEZ

  • StringRegExp vorletzte Zeile

    • UEZ
    • 24. Januar 2009 um 22:17

    Mit meinem Code funktioniert's 8)

    UEZ

  • StringRegExp vorletzte Zeile

    • UEZ
    • 24. Januar 2009 um 00:37

    Hier was von mir:

    [autoit]

    #Include <File.au3>
    $found = "Nicht gefunden"
    $lines = _FileCountLines("Test.txt")
    $file = FileOpen("test.txt", 0)
    While $lines > 0
    $line = FileReadLine($file, $lines)
    If StringInStr($line, "abcd=") > 0 And StringInStr($line, "xyz=") > 0 Then
    $tmp = StringSplit(StringStripWS($line, 7), " ")
    If $tmp[UBound($tmp) -1] <> "xyz=" Then
    $found = $tmp[2]
    ExitLoop
    EndIf
    EndIf
    $lines -= 1
    Wend
    FileClose($file)
    MsgBox(0, "Test", $found)

    [/autoit]

    Wobei Test.txt die Datei ist.

    Ich hoffe, dass passt!

    Gruß,
    UEZ

  • cmdline? mit befehlen für batch arbeiten

    • UEZ
    • 23. Januar 2009 um 21:39

    Hier ein richtiges CMD Beispiel, wie z.B. der LAME Encoder oder xcopy:

    [autoit]

    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Change2CUI=y
    #AutoIt3Wrapper_Run_After=upx.exe --best --compress-resources=1 "%out%"

    [/autoit][autoit][/autoit][autoit]

    If $CmdLine[0] = 0 Then
    ConsoleWrite(@CRLF & "Keine Parameter angegeben! Commandline /? fuer mehr Info" & @CRLF & @CRLF)
    Exit
    EndIf
    $p = 0
    For $x = 1 To $CmdLine[0]
    If StringLower($CmdLine[$x]) = StringLower("-?") Or _
    StringLower($CmdLine[$x]) = StringLower("/?") Or _
    StringLower($CmdLine[$x]) = StringLower("-h") Or _
    StringLower($CmdLine[$x]) = StringLower("/h") Then
    ConsoleWrite(@CRLF & "Commandline.exe ist ein CMD Tool geschrieben mit AutoIt" & @CRLF & @CRLF & _
    @TAB & "Commandline.exe -h gibt diese Info wieder" & @CRLF & _
    @TAB & "Commandline.exe -e gibt die eulersche Zahl zurueck" & @CRLF & _
    @TAB & "Commandline.exe -p gibt PI zurueck" & @CRLF & @CRLF)
    Exit
    EndIf
    If StringLower($CmdLine[$x]) = StringLower("-p") Then
    ConsoleWrite(@CRLF & "Pi lautet: 3,14..."& @CRLF & @CRLF)
    EndIf
    If StringLower($CmdLine[$x]) = StringLower("-e") Then
    ConsoleWrite(@CRLF & "e lautet: 2,71..."& @CRLF & @CRLF)
    EndIf
    Next
    Exit

    [/autoit]

    Voraussetzung ist, dass der AutoIt3Wrapper installiert ist, da es ansonsten nicht funkioniert!

    Einfach kompilieren und in der CMD Box Commandline.exe eingeben oder wie immer das Programm dann heißt.

    Gruß,
    UEZ

  • GDI+ Beispiele

    • UEZ
    • 23. Januar 2009 um 13:38

    Probiere's doch mal so: den Code kompilieren, die Exe umbenennen in z.B. Qudrate.scr und nach C:\Windows\System32 kopieren, falls dies der Pfad sein sollte. Dann in der Systemsteuerung den Bildschirmschoner aussuchen.

    Dass /P aus der CMD nicht funktioniert liegt daran, dass $CmdLine[2] nicht definiert ist. /P wird intern aufgerufen!


    Ich habe auch den Code angepasst, dass /P nicht aus der CMD gestartet werden kann!

    UEZ

  • GDI+ Beispiele

    • UEZ
    • 23. Januar 2009 um 13:15
    Zitat von team2way

    hi uez,

    erst mal nice jop [Blockierte Grafik: http://www.autoit.de/wcf/images/smilies/thumbup.png]

    hab deinen screensaver grad mal getestet. bei mir geht leider die vorschau noch nicht.

    [autoit]

    ElseIf $CommandLine = "/p" Then Preview_SS()

    [/autoit]

    folgender fehler wird bei mir angezeigt:

    Line-1:
    Error: Array variable has incorrect number of subscripts or subscript dimension range execeeded.
    ...

    Alles anzeigen

    Danke für das Lob :D

    Was meinst du mit Vorschau? Wenn du einen Bildschirmschoner aussuchst (in dem kleinen Vorschaufenster) oder erst wenn du auf den Vorschau Knopf drückst?

    Ich habe auf folgenden Systemen den Bildschirmschoner getestet und konnte keine Fehlermeldung sehen:
    Vista Enterprise x32
    Windows Server2003 x32
    Windows Server 2008 x32
    WindowsXP x32

    UEZ

  • GDI+ Beispiele

    • UEZ
    • 22. Januar 2009 um 23:46

    Hier der Code für ein Screensaver 8)

    Spoiler anzeigen

    ;coded by UEZ 2009-01-22
    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>
    Opt('MustDeclareVars', 1)
    If WinExists("ScrnSav:" & @ScriptFullPath) Then WinKill("ScrnSav:" & @ScriptFullPath)
    AutoItWinSetTitle("ScrnSav:" & @ScriptFullPath)

    Const $appname = "Mesmerizing Squares Screensaver"
    Const $ver = "0.75"
    Const $build = "2009-01-22"
    Const $Pi = 3.1415926535897932384626
    Global $hGUI, $hWnd, $hGraphic, $Bitmap, $GDI_Buffer, $Pen
    Global $i, $j, $k, $xcoord, $ycoord, $red, $green, $blue
    Global $x1, $x2, $x3, $x4, $y1, $y2, $y3, $y4, $x, $y
    Global $VirtualDesktopHeight, $VirtualDesktopWidth, $VirtualDesktopX, $VirtualDesktopY
    Global $width, $height, $new, $last, $user32, $parent_PID, $child_PID
    Global $CommandLine

    $width = @DesktopWidth
    $height = @DesktopHeight

    $VirtualDesktopWidth = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 78);sm_virtualwidth
    $VirtualDesktopWidth = $VirtualDesktopWidth[0]
    $VirtualDesktopHeight = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 79);sm_virtualheight
    $VirtualDesktopHeight = $VirtualDesktopHeight[0]
    $VirtualDesktopX = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 76);sm_xvirtualscreen
    $VirtualDesktopX = $VirtualDesktopX[0]
    $VirtualDesktopY = DLLCall("user32.dll", "int", "GetSystemMetrics", "int", 77);sm_yvirtualscreen
    $VirtualDesktopY = $VirtualDesktopY[0]


    If $CmdLine[0] > 0 Then
    $CommandLine = StringLeft($CmdLine[1], 2)
    Else
    $CommandLine = "/s"
    EndIf


    If $CommandLine = "/c" Then
    MsgBox(64, "Information", "Nothing to configure yet, maybe later ;-)" & @CRLF & @CRLF & _
    "(c) UEZ " & $build, 15)
    Exit
    ElseIf $CommandLine = "/p" Then
    If UBound($CmdLine) < 3 Then
    MsgBox(16, "ERROR!", "Program was called wrongly!")
    Exit
    EndIf
    Preview_SS()
    ElseIf $CommandLine = "/s" Then
    Start_SS()
    EndIf
    Exit

    Func Preview_SS()
    $width = 152
    $height = 112
    $hGUI = GUICreate($appname, $width, $height, 0, 0, 0x80000000)
    $hWnd = WinGetHandle($hGUI)
    $user32 = DllOpen("user32.dll")
    DllCall($user32, "int", "SetParent", "hwnd", $hGUI, "hwnd", HWnd($CmdLine[2])) ;set preview window
    DllClose($user32)
    GUISetState()
    Ini_GDI()
    $VirtualDesktopX = 0
    $VirtualDesktopY = 0
    $x = $width
    $y = $height
    $parent_PID = _ProcessGetParent(@AutoItPID)
    While 1
    If Not WinExists($hWnd) Then _Exit()
    $child_PID = _ProcessGetChildren($parent_PID)
    If $child_PID[0] > 1 Then _Exit() ;if another screensaver is selected in ComboBox close ss
    Draw(16)
    Sleep(30)
    WEnd
    _Exit()
    EndFunc

    Func Start_SS()
    $hGUI = GUICreate($appname, $VirtualDesktopWidth, $VirtualDesktopHeight, $VirtualDesktopX, $VirtualDesktopY, $WS_POPUP, BitOr($WS_EX_TOPMOST, $WS_EX_TOOLWINDOW))
    $hWnd = WinGetHandle($hGUI)
    GUISetState()
    GUISetCursor(16, 1) ; hide mouse cursor
    $width = $VirtualDesktopWidth
    $height = $VirtualDesktopHeight
    $x = @DesktopWidth
    $y = @DesktopHeight
    Ini_GDI()
    $k = 0
    $i = 1
    While 1
    $new = _IdleTicks()
    If $new < $last Then
    ExitLoop
    EndIf
    $last = $new
    Draw(28)
    WEnd
    _Exit()
    EndFunc

    Func Ini_GDI()
    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd) ;create graphic
    $Bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic) ;create bitmap
    $GDI_Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap) ;create buffer
    $Pen = _GDIPlus_PenCreate(0, 1)
    _GDIPlus_GraphicsSetSmoothingMode($GDI_Buffer, 4)
    _GDIPlus_GraphicsClear($GDI_Buffer)
    EndFunc

    Func Draw($density)
    _GDIPlus_GraphicsClear($GDI_Buffer) ;clear buffer
    If $k <= 3 * $x / 7 Then $k += 1
    For $j = 8 To $k Step $density + Sin($i * $Pi / 60) * 8
    $red = ((Sin(2^0 * ($j - $i) / 2^5) + 1) / 2) * 256
    $green = ((Sin(2^0 * ($j - $i) / 2^7) + 1) / 2) * 256
    $blue = ((Sin(2^0 * ($j - $i) / 2^9) + 1) / 2) * 256
    _GDIPlus_PenSetColor($Pen, "0xEF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2)) ;Set the pen color
    $xcoord = $j
    $ycoord = $j
    Square($xcoord, $ycoord, $j * Cos($i / $k * $Pi))
    Next
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $Bitmap, 0, 0, $width, $height) ;copy to bitmap
    $i += 1.5
    Sleep(30)
    EndFunc

    Func _Exit()
    _GDIPlus_PenDispose($Pen)
    _GDIPlus_BitmapDispose($Bitmap)
    _GDIPlus_GraphicsDispose($GDI_Buffer)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()
    Exit
    EndFunc

    Func Square($xx1, $yy1, $i)
    Local $degree
    $degree = 45
    $x1 = $xx1 * Cos(($i + $degree + 0) * $Pi / 180) + $x / 2 + Abs($VirtualDesktopX)
    $y1 = $yy1 * Sin(($i + $degree + 0) * $Pi / 180) + $y / 2 + Abs($VirtualDesktopY)
    $x2 = $xx1 * Cos(($i + $degree + 90) * $Pi / 180) + $x / 2 + Abs($VirtualDesktopX)
    $y2 = $yy1 * Sin(($i + $degree + 90) * $Pi / 180) + $y / 2 + Abs($VirtualDesktopY)
    $x3 = $xx1 * Cos(($i + $degree + 180) * $Pi / 180) + $x / 2 + Abs($VirtualDesktopX)
    $y3 = $yy1 * Sin(($i + $degree + 180) * $Pi / 180) + $y / 2 + Abs($VirtualDesktopY)
    $x4 = $xx1 * Cos(($i + $degree + 270) * $Pi / 180) + $x / 2 + Abs($VirtualDesktopX)
    $y4 = $yy1 * Sin(($i + $degree + 270) * $Pi / 180) + $y / 2 + Abs($VirtualDesktopY)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x1, $y1, $x2, $y2, $Pen)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x2, $y2, $x3, $y3, $Pen)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x3, $y3, $x4, $y4, $Pen)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x4, $y4, $x1, $y1, $Pen)
    EndFunc

    Func _IdleTicks() ; thanks to erifash for the routine
    Local $aTSB = DllCall("kernel32.dll", "long", "GetTickCount")
    Local $ticksSinceBoot = $aTSB[0]
    Local $struct = DllStructCreate("uint;dword")
    DllStructSetData($struct, 1, DllStructGetSize($struct))
    DllCall("user32.dll", "int", "GetLastInputInfo", "ptr", DllStructGetPtr($struct))
    Local $ticksSinceIdle = DllStructGetData($struct, 2)
    Return ($ticksSinceBoot - $ticksSinceIdle)
    EndFunc ;==>_IdleTicks

    Func _ProcessGetParent($i_pid) ;get PID from parent process done by SmOke_N
    Local $TH32CS_SNAPPROCESS = 0x00000002

    Local $a_tool_help = DllCall("Kernel32.dll", "long", "CreateToolhelp32Snapshot", "int", $TH32CS_SNAPPROCESS, "int", 0)
    If IsArray($a_tool_help) = 0 Or $a_tool_help[0] = -1 Then Return SetError(1, 0, $i_pid)

    Local $tagPROCESSENTRY32 = _
    DllStructCreate ( _
    "dword dwsize;" & _
    "dword cntUsage;" & _
    "dword th32ProcessID;" & _
    "uint th32DefaultHeapID;" & _
    "dword th32ModuleID;" & _
    "dword cntThreads;" & _
    "dword th32ParentProcessID;" & _
    "long pcPriClassBase;" & _
    "dword dwFlags;" & _
    "char szExeFile[260]" _
    )
    DllStructSetData($tagPROCESSENTRY32, 1, DllStructGetSize($tagPROCESSENTRY32))

    Local $p_PROCESSENTRY32 = DllStructGetPtr($tagPROCESSENTRY32)

    Local $a_pfirst = DllCall("Kernel32.dll", "int", "Process32First", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pfirst) = 0 Then Return SetError(2, 0, $i_pid)

    Local $a_pnext, $i_return = 0
    If DllStructGetData($tagPROCESSENTRY32, "th32ProcessID") = $i_pid Then
    $i_return = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    DllCall("Kernel32.dll", "int", "CloseHandle", "long", $a_tool_help[0])
    If $i_return Then Return $i_return
    Return $i_pid
    EndIf

    While @error = 0
    $a_pnext = DLLCall("Kernel32.dll", "int", "Process32Next", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If DllStructGetData($tagPROCESSENTRY32, "th32ProcessID") = $i_pid Then
    $i_return = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_return Then ExitLoop
    $i_return = $i_pid
    ExitLoop
    EndIf
    WEnd

    DllCall("Kernel32.dll", "int", "CloseHandle", "long", $a_tool_help[0])
    Return $i_return
    EndFunc

    Func _ProcessGetChildren($i_pid) ; First level children processes only done by SmOke_N
    Local Const $TH32CS_SNAPPROCESS = 0x00000002

    Local $a_tool_help = DllCall("Kernel32.dll", "long", "CreateToolhelp32Snapshot", "int", $TH32CS_SNAPPROCESS, "int", 0)
    If IsArray($a_tool_help) = 0 Or $a_tool_help[0] = -1 Then Return SetError(1, 0, $i_pid)

    Local $tagPROCESSENTRY32 = _
    DllStructCreate _
    ( _
    "dword dwsize;" & _
    "dword cntUsage;" & _
    "dword th32ProcessID;" & _
    "uint th32DefaultHeapID;" & _
    "dword th32ModuleID;" & _
    "dword cntThreads;" & _
    "dword th32ParentProcessID;" & _
    "long pcPriClassBase;" & _
    "dword dwFlags;" & _
    "char szExeFile[260]" _
    )
    DllStructSetData($tagPROCESSENTRY32, 1, DllStructGetSize($tagPROCESSENTRY32))

    Local $p_PROCESSENTRY32 = DllStructGetPtr($tagPROCESSENTRY32)

    Local $a_pfirst = DllCall("Kernel32.dll", "int", "Process32First", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pfirst) = 0 Then Return SetError(2, 0, $i_pid)

    Local $a_pnext, $a_children[11] = [10], $i_child_pid, $i_parent_pid, $i_add = 0
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    $i_add += 1
    $a_children[$i_add] = $i_child_pid
    EndIf
    EndIf

    While 1
    $a_pnext = DLLCall("Kernel32.dll", "int", "Process32Next", "long", $a_tool_help[0], "ptr", $p_PROCESSENTRY32)
    If IsArray($a_pnext) And $a_pnext[0] = 0 Then ExitLoop
    $i_child_pid = DllStructGetData($tagPROCESSENTRY32, "th32ProcessID")
    If $i_child_pid <> $i_pid Then
    $i_parent_pid = DllStructGetData($tagPROCESSENTRY32, "th32ParentProcessID")
    If $i_parent_pid = $i_pid Then
    If $i_add = $a_children[0] Then
    ReDim $a_children[$a_children[0] + 10]
    $a_children[0] = $a_children[0] + 10
    EndIf
    $i_add += 1
    $a_children[$i_add] = $i_child_pid
    EndIf
    EndIf
    WEnd

    If $i_add <> 0 Then
    ReDim $a_children[$i_add + 1]
    $a_children[0] = $i_add
    EndIf

    DllCall("Kernel32.dll", "int", "CloseHandle", "long", $a_tool_help[0])
    If $i_add Then Return $a_children
    Return SetError(3, 0, 0)
    EndFunc

    Einfach kompilieren, in .scr umbennen (oder hier herunterladen ) und ab ins System32 Verzeichnis! Dann einfach den SS auswählen :rock:

    Zur Zeit ohne Einstellmöglichkeiten.

    UEZ

    2009-01-23: kein richtiger Multi Monitor Support -> sollte jetzt funzen!

  • GDI+ Beispiele

    • UEZ
    • 20. Januar 2009 um 15:53
    Zitat von GtaSpider

    Hallo

    Hab dich und deine Projekte ja schon etwas länger im englischen Forum verfolgt ;)
    Also erstmal herzlich Willkommen hier im Deutschen AutoIt Forum!

    Die GDI+ Examples sind sehr hübsch, weiter so :thumbup:

    Mfg Spider

    Danke :D

    So riesen Projekte habe ich eigentlich nicht laufen. Vielleicht das SIC2 Projekt...

    UEZ :rock:

  • GDI+ Beispiele

    • UEZ
    • 20. Januar 2009 um 13:06

    Dass das geht ist klar, aber ein Screensaver im klassischen Sinn ist das nicht (Full Screen, Multimonitor Support, Konfiguration, etc.).

    UEZ

  • GDI+ Beispiele

    • UEZ
    • 20. Januar 2009 um 08:57

    Natürlich kann man die Beispiele als Bildschirmschoner programmieren! Nur kann man nicht einfach die exe in scr umbenennen und das war's.

    Wenn ich Zeit habe, kann ich das mal machen... Ansonsten kann man sich im englischen Forum umsehen. Dort gibt es sehr gute Beispiele, wie man einen Bildschirmschoner bastelt ! 8)


    Gruß,
    UEZ

  • GDI+ Beispiele

    • UEZ
    • 19. Januar 2009 um 22:19

    Hallo,

    hier ein paar GDI+ Beispiele, die ich programmiert habe, um ein bißchen mehr über GDI+ zu lernen.
    Es ist nichts bombastisches, aber vielleicht gefällt's euch ja ;)

    Codes wurden mit AutoIt v3.3.0.0 erstellt:

    #01 - Fliegende Perlenkette:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2009-01-09 - thanks to smashly for _GDIPlus_BrushSetSolidColor() function :)
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Run_After=upx.exe --best "%out%"
    #AutoIt3Wrapper_Run_After=del "Flying Pearl Necklaces_Obfuscated.au3"

    [/autoit] [autoit][/autoit] [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>
    Opt('MustDeclareVars', 1)
    Global Const $Pi = 4 * ATan(1)
    Global Const $width = 400
    Global Const $height = $width
    Global $hGUI, $Graphic, $ParticleBitmap, $ParticleBuffer, $Brush1, $Brush2
    Global $starting_point, $i, $j, $k, $l, $xcoord1, $ycoord1, $xcoord2, $ycoord2, $size, $red, $green, $blue, $min_size

    [/autoit] [autoit][/autoit] [autoit]

    $hGUI = GUICreate("GDI+: Flying Pearl Necklaces by UEZ 2009", $width, $height)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup ()
    $Graphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI) ;create graphic
    $ParticleBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $Graphic) ;create bitmap
    $ParticleBuffer = _GDIPlus_ImageGetGraphicsContext($ParticleBitmap) ;create buffer
    _GDIPlus_GraphicsSetSmoothingMode($ParticleBuffer, 4) ;Antialiasing
    _GDIPlus_GraphicsClear($ParticleBuffer) ;clear buffer
    $Brush1 = _GDIPlus_BrushCreateSolid(0)
    $Brush2 = _GDIPlus_BrushCreateSolid(0)

    [/autoit] [autoit][/autoit] [autoit]

    $i = -650
    $l = $i
    $starting_point = 0
    $min_size = 10
    Do
    _GDIPlus_GraphicsClear($ParticleBuffer, 0xFFFFFFFF) ;clear buffer
    $k = 2^12
    $starting_point -= 0.05
    For $j = 0 To $k Step 32
    $red = ((Sin(2^1 * ($i + $j) / 2^10) + 1) / 2) * 256
    $green = ((Sin(2^2 * ($i + $j) / 2^9) + 1) / 2) * 256
    $blue = ((Sin(2^3 * ($i + $j) / 2^8) + 1) / 2) * 256
    _GDIPlus_BrushSetSolidColor($Brush1, "0xCF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2))
    _GDIPlus_BrushSetSolidColor($Brush2, "0xCF" & Hex($blue, 2) & Hex($red, 2) & Hex($green, 2))
    $size = $i - $j
    $xcoord1 = $width / 2 - (($i - $j) / 2) + Sin($starting_point) * -Sin(($i - $j) * $Pi / 90) * 64
    $ycoord1 = $height / 2 - (($i - $j) / 2) + -Cos($starting_point) * Cos(($i - $j) * $Pi / 90) * 32
    _GDIPlus_GraphicsFillEllipse($ParticleBuffer, $xcoord1, $ycoord1, $size / 6, $size / 6, $Brush1)
    $xcoord2 = $width / 2 - (-($i - $j) / -1.75) - Sin($starting_point) * Sin(($i - $j) * $Pi / 120) * 32
    $ycoord2 = $height / 2 - (($i - $j) / -1.75) - Cos($starting_point) * Cos(($i - $j) * $Pi / 75) * 16
    _GDIPlus_GraphicsFillEllipse($ParticleBuffer, $xcoord2, $ycoord2, $size / 8 , $size / 8, $Brush2)
    Next
    _GDIPlus_GraphicsDrawImageRect($Graphic, $ParticleBitmap, 0, 0, $width, $height) ;copy to bitmap
    $i += 3
    If $i > $k + Abs($l) Then $i = $l
    Sleep(20)
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    [/autoit] [autoit][/autoit] [autoit]

    ; Clean up resources
    _GDIPlus_BrushDispose($Brush1)
    _GDIPlus_BrushDispose($Brush2)
    _GDIPlus_GraphicsDispose ($Graphic)
    _GDIPlus_BitmapDispose($ParticleBitmap)
    _GDIPlus_GraphicsDispose($ParticleBuffer)
    _GDIPlus_Shutdown ()
    Exit

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# ====================================================================
    ; Name...........: _GDIPlus_BrushSetSolidColor
    ; Description ...: Set the color of a Solid Brush object
    ; Syntax.........: _GDIPlus_BrushSetSolidColor($hBrush, [$iARGB = 0xFF000000])
    ; Parameters ....: $hBrush - Handle to a Brush object
    ; $iARGB - Alpha, Red, Green and Blue components of brush
    ; Return values .: Success - True
    ; Failure - False
    ; Author ........:
    ; Modified.......: smashly
    ; Remarks .......:
    ; Related .......:
    ; Link ..........; @@MsdnLink@@ GdipSetSolidFillColor
    ; Example .......; Yes
    ; ================================================================================
    Func _GDIPlus_BrushSetSolidColor($hBrush, $iARGB = 0xFF000000)
    Local $aResult

    [/autoit] [autoit][/autoit] [autoit]

    $aResult = DllCall($ghGDIPDll, "int", "GdipSetSolidFillColor", "hwnd", $hBrush, "int", $iARGB)
    If @error Then Return SetError(@error, @extended, 0)
    Return SetError($aResult[0], 0, $aResult[0] = 0)
    EndFunc ;==>_GDIPlus_BrushSetSolidColor

    [/autoit]

    #02 - Fliegende Quadrate:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2009-01-08
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Run_After=upx.exe --best "%out%"
    #AutoIt3Wrapper_Run_After=del "Flying Squares_Obfuscated.au3"

    [/autoit] [autoit][/autoit] [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>
    Opt("MustDeclareVars", 1)
    Opt("GUIOnEventMode", 1)
    Global Const $Pi = 4 * ATan(1)
    Global Const $width = 400
    Global Const $height = 400
    Global $hGUI, $hWnd, $hGraphic, $ParticleBitmap, $ParticleBuffer, $hBrush0, $Brush, $hBrush2, $Pen
    Global $frequenz, $i, $j, $k, $xcoord, $ycoord, $size, $red, $green, $blue, $start

    [/autoit] [autoit][/autoit] [autoit]

    ; Create GUI
    $hGUI = GUICreate("GDI+: Flying Squares by UEZ 2009", $width, $height)
    $hWnd = WinGetHandle($hGUI)
    GUISetState()

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hWnd) ;create graphic
    $ParticleBitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic) ;create bitmap
    $ParticleBuffer = _GDIPlus_ImageGetGraphicsContext($ParticleBitmap) ;create buffer
    ;~ $Brush = _GDIPlus_BrushCreateSolid(0xAF777777)
    $Pen = _GDIPlus_PenCreate(0, 1)
    _GDIPlus_GraphicsClear($ParticleBuffer) ;clear buffer
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")
    $start = -64
    $i = $start
    $frequenz = 0
    ; Loop until user exits
    Do
    _GDIPlus_GraphicsClear($ParticleBuffer, 0xCF000000) ;clear buffer
    $k = 768 ;amount of squares
    $frequenz -= 0.025 ;smaller value = less frequency
    For $j = $k To 0 Step -32
    $red = ((Sin(2 ^ 0 * ($j - $i) / 2 ^ 5) + 1) / 2) * 256
    $green = ((Sin(2 ^ 0 * ($j - $i) / 2 ^ 7) + 1) / 2) * 256
    $blue = ((Sin(2 ^ 0 * ($j - $i) / 2 ^ 9) + 1) / 2) * 256
    ;~ $Brush = _GDIPlus_BrushCreateSolid("0x0F" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2))
    _GDIPlus_PenSetColor($Pen, "0xEF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2))
    $size = $i - $j
    $xcoord = $width / 2 - (($i - $j) / 2) + Sin($frequenz) * -Sin(($i - $j) * $Pi / 180) * 64
    $ycoord = $height / 2 - (($i - $j) / 2) + -Cos($frequenz) * Cos(($i - $j) * $Pi / 150) * 32
    If $size <= 2 * $width + 4 And $size <= 2 * $height Then _GDIPlus_GraphicsDrawRect($ParticleBuffer, $xcoord, $ycoord, $size, $size, $Pen)
    ;~ _GDIPlus_GraphicsFillRect($ParticleBuffer, $xcoord, $ycoord, $size, $size, $Brush);filled squares
    Next
    ;~_GDIPlus_BrushDispose($Brush)
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $ParticleBitmap, 0, 0, $width, $height) ;copy to bitmap
    $i += 3
    If $i > $k + 2^9 Then $i = $start
    Until Not Sleep(20)

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    ; Clean up resources
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_BitmapDispose($ParticleBitmap)
    _GDIPlus_GraphicsDispose($ParticleBuffer)
    ;~ _GDIPlus_BrushDispose($Brush)
    _GDIPlus_Shutdown ()
    Exit
    EndFunc

    [/autoit]

    #03 - Rotierende Quadrate:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2009-01-12
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=n
    #AutoIt3Wrapper_Run_After=upx.exe --best "%out%"
    #AutoIt3Wrapper_Run_After=del /f /q "Rotating Squares_Obfuscated.au3"

    [/autoit] [autoit][/autoit] [autoit]

    #include <GuiConstantsEx.au3>
    #include <GDIPlus.au3>
    Opt('MustDeclareVars', 1)
    Global Const $Pi = 4 * ATan(1)
    Global Const $width = @DesktopWidth / 2
    Global Const $height = @DesktopHeight / 2
    Global $hGUI, $hGraphic, $Bitmap, $GDI_Buffer, $Pen, $Brush, $ellipse_size, $ellipse_size_double
    Global $i, $j, $k, $xcoord, $ycoord, $red, $green, $blue
    Global $x1, $x2, $x3, $x4, $y1, $y2, $y3, $y4

    [/autoit] [autoit][/autoit] [autoit]

    $hGUI = GUICreate("GDI+: Rotating Squares by UEZ 2009", $width, $height)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI) ;create graphic
    $Bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $hGraphic) ;create bitmap
    $GDI_Buffer = _GDIPlus_ImageGetGraphicsContext($Bitmap) ;create buffer
    $Pen = _GDIPlus_PenCreate(0, 2)
    $Brush = _GDIPlus_BrushCreateSolid(0xFF000000)
    _GDIPlus_GraphicsSetSmoothingMode($GDI_Buffer, 4)

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsClear($GDI_Buffer)
    $ellipse_size = 1.025
    $ellipse_size_double = $ellipse_size * 2
    $i = 1
    Do
    ;~ _GDIPlus_GraphicsClear($GDI_Buffer) ;clear buffer
    _GDIPlus_GraphicsFillEllipse($GDI_Buffer, $width / 2 - $ellipse_size * $k, $height / 2 - $ellipse_size* $k, $ellipse_size_double * $k, $ellipse_size_double * $k, $Brush) ;clear only area where the squares are drawn
    If $k <= 3 * $width / 7 Then $k += 1
    For $j = 8 To $k Step 24 + Cos($i * $Pi / 60) * 12
    $red = ((Sin(2^0 * ($j - $i) / 2^5) + 1) / 2) * 256
    $green = ((Sin(2^0 * ($j - $i) / 2^7) + 1) / 2) * 256
    $blue = ((Sin(2^0 * ($j - $i) / 2^9) + 1) / 2) * 256
    _GDIPlus_PenSetColor($Pen, "0xEF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2)) ;Set the pen color
    $xcoord = $j ;+ Sin($i * $Pi / 60) * 8
    $ycoord = $j ;+ Cos($i * $Pi / 60) * 8
    Square($xcoord, $ycoord, $j * Sin($i / $k * $Pi * 4) * 2 / 3)
    Next
    _GDIPlus_GraphicsDrawImageRect($hGraphic, $Bitmap, 0, 0, $width, $height) ;copy to bitmap
    $i += 1.5
    Sleep(30)
    Until GUIGetMsg() = $GUI_EVENT_CLOSE

    [/autoit] [autoit][/autoit] [autoit]

    ; Clean up resources
    _GDIPlus_PenDispose($Pen)
    _GDIPlus_BitmapDispose($Bitmap)
    _GDIPlus_GraphicsDispose($GDI_Buffer)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_Shutdown ()

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    Func Square($xx1, $yy1, $i) ;coded by UEZ
    Local $degree = 45
    Local Const $pi_Div_180 = 4 * ATan(1) / 180
    $x1 = $xx1 * Cos(($i + $degree + 0) * $pi_Div_180) + $width / 2
    $y1 = $yy1 * Sin(($i + $degree + 0) * $pi_Div_180) + $height / 2
    $x2 = $xx1 * Cos(($i + $degree + 90) * $pi_Div_180) + $width / 2
    $y2 = $yy1 * Sin(($i + $degree + 90) * $pi_Div_180) + $height / 2
    $x3 = $xx1 * Cos(($i + $degree + 180) * $pi_Div_180) + $width / 2
    $y3 = $yy1 * Sin(($i + $degree + 180) * $pi_Div_180) + $height / 2
    $x4 = $xx1 * Cos(($i + $degree + 270) * $pi_Div_180) + $width / 2
    $y4 = $yy1 * Sin(($i + $degree + 270) * $pi_Div_180) + $height / 2
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x1, $y1, $x2, $y2, $Pen)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x2, $y2, $x3, $y3, $Pen)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x3, $y3, $x4, $y4, $Pen)
    _GDIPlus_GraphicsDrawLine($GDI_Buffer, $x4, $y4, $x1, $y1, $Pen)
    EndFunc

    [/autoit]

    #05 - L-System Fraktale:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2009-01-17 -=> recursion is very slow with AutoIt !!! :(
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=n
    ;~ #AutoIt3Wrapper_Run_After=upx.exe --best "%out%"
    #AutoIt3Wrapper_Run_After=upx.exe --ultra-brute "%out%"
    #AutoIt3Wrapper_Run_After=del "L-System Fractals_Obfuscated.au3"

    [/autoit] [autoit][/autoit] [autoit]

    #include <Array.au3>
    #include <GDIPlus.au3>
    #Include <Misc.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt('MustDeclareVars', 1)
    Opt("GUIOnEventMode", 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global $dll = DllOpen("user32.dll")
    Global Const $Pi = 4 * ATan(1)
    Global Const $Pi_Div_180 = $Pi / 180
    Global Const $width = 800
    Global Const $height = 600
    Global $hGUI, $hWnd, $hGraphic, $Bitmap, $Pen
    Global $angle = 0, $x1, $y1, $x2, $y2, $random
    Global $length, $depth, $dir, $degree, $dist_rel
    Global $font_size, $String_Format, $Font_Family, $Font, $Text_Layout, $Brush, $text

    [/autoit] [autoit][/autoit] [autoit]

    $hGUI = GUICreate("GDI+: L-System Fractals by UEZ 2009 (press F9 to save current image)", $width, $height)
    GUISetState(@SW_SHOW)

    [/autoit] [autoit][/autoit] [autoit]

    GUISetOnEvent(-3, "_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup ()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND ($hGUI)
    $Pen = _GDIPlus_PenCreate(0, 1)
    _GDIPlus_GraphicsSetSmoothingMode($hGraphic, 4) ; AntiAlias

    [/autoit] [autoit][/autoit] [autoit]

    $font_size = 7
    $String_Format = _GDIPlus_StringFormatCreate ()
    $Font_Family = _GDIPlus_FontFamilyCreate ("Arial")
    $Font = _GDIPlus_FontCreate ($Font_Family, $font_size, 2)
    $Brush = _GDIPlus_BrushCreateSolid (0xDF000000) ;text color

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)

    [/autoit] [autoit][/autoit] [autoit]

    $random = Random(1, 11, 1)

    [/autoit] [autoit][/autoit] [autoit]

    AdlibEnable("Save_PIC", 50)

    [/autoit] [autoit][/autoit] [autoit]

    While 1
    Switch $random
    Case 1 ;Dragon Curve
    $x1 = $width / 4.2
    $y1 = $height / 2.8
    $length = 500
    $depth = Random(6, 18, 1)
    $dir = 1
    $angle = 0
    $text = "Dragon Curve, Recursion Depth = " & $depth
    Draw_Text()
    Dragon($length, $depth, $dir)
    Case 2 ;Levy-C Curve
    $x1 = $width / 3.65
    $y1 = $height / 2.875
    $length = 475
    $depth = Random(6, 18, 1)
    $dir = 1
    $angle = 0
    $text = "Levy-C Curve, Recursion Depth = " & $depth
    Draw_Text()
    Levy_C($length, $depth, $dir)
    Case 3 ;Koch Curve
    $x1 = $width / 5.3
    $y1 = $height / 1.35
    $x2 = ""
    $y2 = ""
    $length = 500
    $depth = Random(2, 8, 1)
    $dir = 1
    $angle = 0
    $text = "Koch Curve, Recursion Depth = " & $depth
    Draw_Text()
    Koch($length, $depth, $dir) ;F
    Turn(-$dir * 2 * $degree) ;--
    Koch($length, $depth, $dir) ;F
    Turn(-$dir * 2 * $degree) ;--
    Koch($length, $depth, $dir) ;F
    Case 4 ;Peano Curve
    $x1 = $width / 8
    $y1 = $height / 2
    $length = 600
    $depth = Random(2, 5, 1)
    $dir = 1
    $angle = 0
    $text = "Peano Curve, Recursion Depth = " & $depth
    Draw_Text()
    Peano($length, $depth, $dir)
    Case 5 ;Triangle
    $x1 = $width / 10.8
    $y1 = $height / 1.03
    $length = 1300
    $depth = Random(2, 10, 1)
    $dir = 1
    $angle = 0
    $text = "Triangle, Recursion Depth = " & $depth
    Draw_Text()
    Triangle($length, $depth, $dir)
    Case 6 ;Arrowhead Curve
    $x1 = $width / 10.80
    $y1 = $height / 1.05
    $length = 650
    $depth = Random(3, 9, 1)
    $dir = 1
    $angle = 0
    $text = "Arrowhead Curve, Recursion Depth = " & $depth
    Draw_Text()
    Arrowhead_R($length, $depth, $dir) ;R
    Case 7 ;Penta Plexity
    $x1 = $width / 3.55
    $y1 = $height / 15
    $length = 350
    $depth = Random(1, 6, 1)
    $dir = 1
    $angle = 0
    $text = "Penta Plexity, Recursion Depth = " & $depth
    Draw_Text()
    ;F++F++F++F++F
    Penta_Plexity($length, $depth, $dir) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length, $depth, $dir) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length, $depth, $dir) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length, $depth, $dir) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length, $depth, $dir) ;F
    Case 8 ;Sierpinski Carpet
    $x1 = $width / 8
    $y1 = $height / 2
    $length = 600
    $depth = Random(2, 6, 1)
    $dir = 1
    $angle = 0
    $text = "Sierpinski Carpet, Recursion Depth = " & $depth
    Draw_Text()
    Sierpinski_Carpet($length, $depth, $dir) ;F
    Case 9 ;Gosper Curve
    $depth = Random(4, 6, 1)
    $x1 = $width / 1.45
    $y1 = $height / 7 - $depth
    $length = 480
    $dir = 1
    $angle = 0
    $text = "Gosper Curve, Recursion Depth = " & $depth
    Draw_Text()
    Gosper_R($length, $depth, $dir) ;R
    Case 10 ;Sierpinski Triangle
    $x1 = $width / 10.666
    $y1 = $height / 1.05
    $length = 325
    $depth = Random(2, 9, 1)
    $dir = 1
    $angle = 0
    $text = "Sierpinski Triangle, Recursion Depth = " & $depth
    Draw_Text()
    ;FXF--FF--FF
    Sierpinski_F($length, $depth, $dir) ;F
    Sierpinski_X($length, $depth, $dir) ;X
    Sierpinski_F($length, $depth, $dir) ;F
    Turn(-$dir * 2 * $degree) ;--
    Sierpinski_F($length, $depth, $dir) ;F
    Sierpinski_F($length, $depth, $dir) ;F
    Turn(-$dir * 2 * $degree) ;--
    Sierpinski_F($length, $depth, $dir) ;F
    Sierpinski_F($length, $depth, $dir) ;F
    Case 11 ;Pythagoras Tree
    $x1 = $width / 2
    $y1 = $height / 1.1
    $length = 110
    $depth = Random(5, 15, 1)
    $dir = 1
    $angle = 5
    $text = "Pythagoras Tree, Recursion Depth = " & $depth
    Draw_Text()
    Pythagoras($length, $depth, $dir)
    EndSwitch
    $random += 1
    If $random = 12 Then $random = 1
    Sleep(4000)
    _GDIPlus_GraphicsClear($hGraphic, 0xFFFFFFFF)
    Wend

    [/autoit] [autoit][/autoit] [autoit]

    Func Pythagoras($length, $split, $dir)

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Pythagoras_Square($length)
    Else
    $dist_rel = Sqrt(3) / 2
    $degree = 30
    Pythagoras_Square($length)
    Forward_Only($length)
    Turn(-$dir * 1 * $degree)
    Pythagoras($length * $dist_rel, $split - 1, 1)
    Turn($dir * 3 * $degree)
    Forward_Only($length * $dist_rel)
    Pythagoras($length / 2, $split - 1, 1)
    Forward_Only(-$length * $dist_rel)
    Turn(-$dir * 2 * $degree)
    Forward_Only(-$length)
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Pythagoras_Square($length)
    Local $i
    For $i = 1 To 4
    Draw_and_Forward($length)
    Turn($dir * 90)
    Next
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Sierpinski_X($length, $split, $dir)
    ;FXF--FF--FF
    ;X -> --FXF++FXF++FXF--
    ;F -> FF

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    ;~ Draw_and_Forward($length)
    Else
    $dist_rel = 2
    $degree = 60
    Turn(-$dir * 2 * $degree) ;--
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Sierpinski_X($length / $dist_rel, $split - 1, 1) ;X
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 2 * $degree) ;++
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Sierpinski_X($length / $dist_rel, $split - 1, 1) ;X
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 2 * $degree) ;++
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Sierpinski_X($length / $dist_rel, $split - 1, 1) ;X
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 2 * $degree) ;--
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Sierpinski_F($length, $split, $dir)
    ;FXF--FF--FF
    ;X -> --FXF++FXF++FXF--
    ;F -> FF

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 2
    $degree = 60
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    Sierpinski_F($length / $dist_rel, $split - 1, 1) ;F
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Gosper_R($length, $split, $dir)
    ;F -> R or F -> L
    ;R -> R+L++L-R--RR-L+
    ;L -> -R+LL++L+R--R-L

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = Sqrt(7)
    $degree = 60
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Turn($dir * 1 * $degree) ;+
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    Turn($dir * 2 * $degree) ;++
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    Turn(-$dir * 1 * $degree) ;-
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Turn(-$dir * 2 * $degree) ;--
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Turn(-$dir * 1 * $degree) ;-
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    Turn($dir * 1 * $degree) ;+
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Gosper_L($length, $split, $dir)
    ;F -> R or F -> L
    ;R -> R+L++L-R--RR-L+
    ;L -> -R+LL++L+R--R-L

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = Sqrt(7)
    $degree = 60
    Turn(-$dir * 1 * $degree) ;-
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Turn($dir * 1 * $degree) ;+
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    Turn($dir * 2 * $degree) ;++
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    Turn($dir * 1 * $degree) ;+
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Turn(-$dir * 2 * $degree) ;--
    Gosper_R($length / $dist_rel, $split - 1, 1) ;R
    Turn(-$dir * 1 * $degree) ;-
    Gosper_L($length / $dist_rel, $split - 1, 1) ;L
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Sierpinski_Carpet($length, $split, $dir)
    ;F
    ;F -> F+F-F-FF-F-F-fF
    ;f -> fff

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 3
    $degree = 90
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 1 * $degree) ;+
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 1 * $degree) ;-
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 1 * $degree) ;-
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 1 * $degree) ;-
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 1 * $degree) ;-
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 1 * $degree) ;-
    Sierpinski_Carpet_Forward_Only($length / $dist_rel, $split - 1, 1) ;f
    Sierpinski_Carpet($length / $dist_rel, $split - 1, 1) ;F
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Sierpinski_Carpet_Forward_Only($length, $split, $dir) ;f
    ;F
    ;F -> F+F-F-FF-F-F-fF
    ;f -> fff
    Forward_Only($length / $dist_rel) ;f
    Forward_Only($length / $dist_rel) ;f
    Forward_Only($length / $dist_rel) ;f
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Penta_Plexity($length, $split, $dir)
    ;F++F++F++F++F
    ;F -> F++F++F|F-F++F

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = ((Sqrt(5) + 1) / 2)^2
    $degree = 36
    Penta_Plexity($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 5 * $degree) ;180°
    Penta_Plexity($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 1 * $degree) ;-
    Penta_Plexity($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * 2 * $degree) ;++
    Penta_Plexity($length / $dist_rel, $split - 1, 1) ;F
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Arrowhead_R($length, $split, $dir)
    ;F -> R oder F -> L
    ;R -> -L+R+L-
    ;L -> +R-L-R+

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 2
    $degree = 60
    Turn(-$dir * 1 * $degree) ;-
    Arrowhead_L($length / $dist_rel, $split - 1, 1) ;L
    Turn($dir * 1 * $degree) ;+
    Arrowhead_R($length / $dist_rel, $split - 1, 1) ;R
    Turn($dir * 1 * $degree) ;+
    Arrowhead_L($length / $dist_rel, $split - 1, 1) ;L
    Turn(-$dir * 1 * $degree) ;--
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Arrowhead_L($length, $split, $dir)
    ;F -> R oder F -> L
    ;R -> -L+R+L-
    ;L -> +R-L-R+

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 2
    $degree = 60
    Turn($dir * 1 * $degree) ;+
    Arrowhead_R($length / $dist_rel, $split - 1, 1) ;R
    Turn(-$dir * 1 * $degree) ;-
    Arrowhead_L($length / $dist_rel, $split - 1, 1) ;L
    Turn(-$dir * 1 * $degree) ;-
    Arrowhead_R($length / $dist_rel, $split - 1, 1) ;R
    Turn($dir * 1 * $degree) ;+
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Triangle($length, $split, $dir)
    ;F--F--F
    ;F -> F--F--F--ff
    ;ff -> ff

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 2
    $degree = 60
    Triangle($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 2 * $degree) ;--
    Triangle($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 2 * $degree) ;--
    Triangle($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 2 * $degree) ;--
    Forward_Only($length / $dist_rel) ;f
    Forward_Only($length / $dist_rel) ;f
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Dragon($length, $split, $dir)
    ;F -> R
    ;R -> +R--L+
    ;L -> -R++L-

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $degree = 45
    $dist_rel = Sqrt(2)
    Turn($dir * $degree) ;+
    Dragon($length / $dist_rel, $split - 1, 1) ;R
    Turn(-$dir * 2 * $degree) ;--
    Dragon($length / $dist_rel, $split - 1, -1) ;L
    Turn($dir * $degree) ;+
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Levy_C($length, $split, $dir)
    ;F
    ;F -> +F--F+

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $degree = 45
    $dist_rel = 1.45
    Turn($dir * $degree) ;+
    Levy_C($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 2 * $degree) ;--
    Levy_C($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Koch($length, $split, $dir)
    ;F--F--F
    ;F -> F+F--F+F

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 3
    $degree = 60
    Koch($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    Koch($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * 2 * $degree) ;--
    Koch($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    Koch($length / $dist_rel, $split - 1, 1) ;F
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Peano($length, $split, $dir)
    ;F
    ;F -> F-F+F+F+F-F-F-F+F

    [/autoit] [autoit][/autoit] [autoit]

    If _IsPressed("20", $dll) Then ;hold pressed spacebar to abort current drawing
    $split = 0
    $dir = 0
    $length = 0
    EndIf
    If $split = 0 Then
    Draw_and_Forward($length)
    Else
    $dist_rel = 3
    $degree = 90
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * $degree) ;-
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * $degree) ;-
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * $degree) ;-
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn(-$dir * $degree) ;-
    Peano($length / $dist_rel, $split - 1, 1) ;F
    Turn($dir * $degree) ;+
    Peano($length / $dist_rel, $split - 1, 1) ;F
    EndIf
    ;Sleep(0)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Turn ($degrees)
    $angle = $angle + ($degrees * $Pi_Div_180)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Draw_and_Forward($length)
    $x2 = $x1 + Cos($angle) * $length
    $y2 = $y1 + Sin($angle) * $length
    ;~ Local $red = 0 ;((Cos(1 * $x1 / 2^6) + 1) / 2) * 256
    ;~ Local $green = 0;((Cos(1.25 * $y2 / 2^6) + 1) / 2) * 256
    ;~ Local $blue = 0;((Cos(1.5 * $x2 / 2^6) + 1) / 2) * 256
    ;~ _GDIPlus_PenSetColor($Pen, "0xEF" & Hex($red, 2) & Hex($green, 2) & Hex($blue, 2)) ;Set the pen color
    _GDIPlus_PenSetColor($Pen, "0x60000000") ;Set the pen color
    _GDIPlus_GraphicsDrawLine($hGraphic, $x1, $y1, $x2, $y2, $Pen)
    $x1 = $x2
    $y1 = $y2
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Forward_Only($length)
    $x2 = $x1 + Cos($angle) * $length
    $y2 = $y1 + Sin($angle) * $length
    $x1 = $x2
    $y1 = $y2
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Draw_Text()
    Local $Text_Layout2
    Local $text_info = "UEZ 2009 ;-)"
    $Text_Layout = _GDIPlus_RectFCreate (0, $height - 1.75 * $font_size, 0, 0)
    $Text_Layout2 = _GDIPlus_RectFCreate ($width - StringLen($text_info) * $font_size * 0.67, $height - 1.75 * $font_size, 0, 0)
    _GDIPlus_GraphicsDrawStringEx ($hGraphic, $text, $Font, $Text_Layout, $String_Format, $Brush)
    _GDIPlus_GraphicsDrawStringEx ($hGraphic, $text_info, $Font, $Text_Layout2, $String_Format, $Brush)
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func Save_PIC()
    If _IsPressed("78", $dll) Then
    _GDIPlus_Save_to_Image(@ScriptDir & "\L-SF-Screenshot_" & @YEAR & @MON & @MDAY & "_" & @HOUR & @MIN & @SEC, $hGUI)
    If @error Then MsgBox(16, "ERROR", "Image was not saved!", 10)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    ; #FUNCTION# =============================================================================
    ; Name...........: _GDIPlus_Save_to_Image
    ; Description ...: INTERNAL FUNCTION - save drawn image to file
    ; Syntax.........: _GraphGDIPlus_Reference_Pixel($file, $hWnd)
    ; Parameters ....: $file - filename
    ; $hWnd - handle to GUI
    ; Autor .........: ptrex, ProgAndy, UEZ
    ; =========================================================================================
    Func _GDIPlus_Save_to_Image($file, $hWnd, $CLSID = "PNG")
    Local $hDC, $memBmp, $memDC, $hImage, $w, $h, $size, $sCLSID
    If $file <> "" Or $hWnd <> "" Then
    $size = WinGetClientSize($hWnd)
    $w = $size[0]
    $h = $size[1]
    $hDC = _WinAPI_GetDC($hWnd)
    $memDC = _WinAPI_CreateCompatibleDC($hDC)
    $memBmp = _WinAPI_CreateCompatibleBitmap($hDC, $w, $h)
    _WinAPI_SelectObject ($memDC, $memBmp)
    _WinAPI_BitBlt($memDC, 0, 0, $w, $h, $hDC, 0, 0, 0x00CC0020) ; 0x00CC0020 = $SRCCOPY
    $hImage = _GDIPlus_BitmapCreateFromHBITMAP ($memBmp)
    $sCLSID = _GDIPlus_EncodersGetCLSID ($CLSID)
    ;~ _GDIPlus_ImageSaveToFile($hImage, $file)
    _GDIPlus_ImageSaveToFileEx ($hImage, $file & "." & StringLower($CLSID), $sCLSID)
    If @error Then
    Return SetError(1, 0, 0)
    Else
    Return SetError(0, 0, 0)
    EndIf
    _GDIPlus_ImageDispose ($hImage)
    _WinAPI_ReleaseDC($hWnd, $hDC)
    _WinAPI_DeleteDC($memDC)
    _WinAPI_DeleteObject ($memBmp)
    Else
    Return SetError(1, 0, 0)
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    AdlibDisable()
    ; Clean up resources
    _GDIPlus_PenDispose($Pen)
    _GDIPlus_GraphicsDispose ($hGraphic)
    _GDIPlus_FontDispose ($Font)
    _GDIPlus_FontFamilyDispose ($Font_Family)
    _GDIPlus_StringFormatDispose ($String_Format)
    _GDIPlus_BrushDispose($Brush)
    _GDIPlus_Shutdown ()
    DllClose($dll)
    Exit
    EndFunc

    [/autoit]

    #06 - Sinus Laufschrift:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2009-01-29
    #AutoIt3Wrapper_Run_Obfuscator=y
    #Obfuscator_Parameters=/sf /sv /om /cs=0 /cn=0
    #AutoIt3Wrapper_UseUpx=n
    ;~ #AutoIt3Wrapper_Run_After=upx.exe --best "%out%"
    #AutoIt3Wrapper_Run_After=upx.exe --ultra-brute "%out%"
    #AutoIt3Wrapper_Run_After=del /f /q "Sinus Scroller_Obfuscated.au3"

    [/autoit] [autoit][/autoit] [autoit]

    #include <GUIConstantsEx.au3>
    #include <GDIplus.au3>

    [/autoit] [autoit][/autoit] [autoit]

    Opt("GUIOnEventMode", 1)
    Opt('MustDeclareVars', 1)

    [/autoit] [autoit][/autoit] [autoit]

    Global Const $width = Int(@DesktopWidth * (@DesktopHeight / @DesktopWidth) * 0.666)
    Global Const $height = Int(@DesktopHeight * (@DesktopHeight / @DesktopWidth) * 0.666)
    Global Const $pi = 4 * ATan(1)
    Global Const $pi_div_m170 = $pi / - 270
    Global Const $pi_div_10 = $pi / 10
    Global Const $pi_div_180 = $pi / 180
    Global Const $height_div_2 = $height / 2
    Global Const $width_div_2 = $width / 2
    Global Const $font_size = Int(($width + $height) / 16)
    Global Const $font_size2 = Int(($width + $height) / 32)

    [/autoit] [autoit][/autoit] [autoit]

    Global $hGUI, $graphics, $bitmap, $GDI_Buffer
    Global $hBrush, $hFormat, $hFamily, $hFont, $hFont2, $text_color, $text_sin, $text_scroller, $tLayout, $pen, $brush
    Global $i, $j, $k, $l
    Global $m, $n, $x, $y, $z, $color
    Global $arr_text_sin, $letter_distance, $x, $y, $lenght, $end, $scroller_length
    Global $dc, $ScreenDc, $gdibitmap
    Global $title = "GDI+: Sinus Scroller by UEZ 2009"

    [/autoit] [autoit][/autoit] [autoit][/autoit] [autoit]

    $hGUI = GUICreate($title, $width, $height)
    GUISetState(@SW_SHOW)
    GUISetOnEvent($GUI_EVENT_CLOSE, "_Exit")

    [/autoit] [autoit][/autoit] [autoit]

    _GDIPlus_Startup()
    $graphics = _GDIPlus_GraphicsCreateFromHWND($hGUI)
    $bitmap = _GDIPlus_BitmapCreateFromGraphics($width, $height, $graphics)
    $GDI_Buffer = _GDIPlus_ImageGetGraphicsContext($bitmap)
    _GDIPlus_GraphicsSetSmoothingMode($GDI_Buffer, 4)

    [/autoit] [autoit][/autoit] [autoit]

    $ScreenDc = _WinAPI_GetDC($hGUI)
    $text_color = 0xEFD0D0FF
    $hBrush = _GDIPlus_BrushCreateSolid($text_color)
    $hFormat = _GDIPlus_StringFormatCreate()
    $hFamily = _GDIPlus_FontFamilyCreate("Arial")
    $hFont = _GDIPlus_FontCreate($hFamily, $font_size, 2)
    $hFont2 = _GDIPlus_FontCreate($hFamily, $font_size2, 2)
    $pen = _GDIPlus_PenCreate(0)
    $brush = _GDIPlus_BrushCreateSolid(0)

    [/autoit] [autoit][/autoit] [autoit]

    $text_scroller = "YES, another GDI+ example, SINUS SCROLLER, by UEZ in 01/2009! :) Let's start... "
    $text_sin = "I was inspired by the old good intro school on C64 when I was 15 and did some assembler intros :-). "
    $text_sin &= "Greetings to all forum members at http://www.autoitscript.com and http://www.autoit.de. I hope you like it! ;) The END."
    $arr_text_sin = StringSplit($text_sin, "")

    [/autoit] [autoit][/autoit] [autoit]

    Global $stars = 128
    Dim $arr_stars_x[$stars]
    Dim $arr_stars_y[$stars]
    Dim $aFont_Sized[Int($height / 4)]
    Global Const $min_size = 4
    Global Const $max_size = UBound($aFont_Sized) - 1

    [/autoit] [autoit][/autoit] [autoit]

    For $n = 0 To UBound($aFont_Sized) - 1
    $aFont_Sized[$n] = _GDIPlus_FontCreate($hFamily, $n + $min_size, 0)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    For $n = 0 To UBound($arr_stars_y) - 1
    $arr_stars_y[$n] = Random(1, $height - 1, 1)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    For $n = 0 To UBound($arr_stars_x) - 1
    $arr_stars_x[$n] = Random(-$width * 1.5, -1, 1)
    Next

    [/autoit] [autoit][/autoit] [autoit]

    Dim $arr_star_speed[8]
    $arr_star_speed[0] = 1.00
    $arr_star_speed[1] = 1.33
    $arr_star_speed[2] = 1.66
    $arr_star_speed[3] = 2.00
    $arr_star_speed[4] = 2.33
    $arr_star_speed[5] = 2.66
    $arr_star_speed[6] = 3.33
    $arr_star_speed[7] = 4.50
    _GDIPlus_GraphicsSetSmoothingMode($GDI_Buffer, 2)

    [/autoit] [autoit][/autoit] [autoit]

    $tLayout = _GDIPlus_RectFCreate(0, 0)

    [/autoit] [autoit][/autoit] [autoit]

    Scroller_Ini()

    [/autoit] [autoit][/autoit] [autoit]

    Do
    Sinus_Scroller()
    Until False

    [/autoit] [autoit][/autoit] [autoit]

    Func Stars()
    $m = 0
    For $n = 0 To UBound($arr_stars_x) - 1
    Switch $arr_star_speed[$m]
    Case 1.00
    $color = 0xAF888888
    Case 1.33
    $color = 0xBF999999
    Case 1.66
    $color = 0xCFAAAAAA
    Case 2.00
    $color = 0xCFBBBBBB
    Case 2.33
    $color = 0xDFCCCCCC
    Case 2.66
    $color = 0xDFDDDDDD
    Case 3.33
    $color = 0xEFEEEEEE
    Case 4.50
    $color = 0xEFFFFFFF
    EndSwitch
    ;~ If $arr_stars_x[$n] >= 0 And $arr_stars_x[$n] <= $width Then Set_Pixel($arr_stars_x[$n], $arr_stars_y[$n], $color)
    If $arr_stars_x[$n] >= 0 And $arr_stars_x[$n] <= $width Then _GDIPlus_BitmapSetPixel($bitmap, $arr_stars_x[$n], $arr_stars_y[$n], $color)
    $arr_stars_x[$n] += $arr_star_speed[$m]
    $m += 1
    If $m = UBound($arr_star_speed) - 1 Then $m = 0
    If $arr_stars_x[$n] >= $width Then
    $arr_stars_y[$n] = Random(1, $height - 1, 1)
    $arr_stars_x[$n] = 0
    EndIf
    Next
    Sleep(5)
    EndFunc ;==>Stars

    [/autoit] [autoit][/autoit] [autoit]

    Func Sinus_Scroller()
    $letter_distance = 32
    $l = 0
    For $k = $width To 0 - (StringLen($text_sin) * $letter_distance * 1.1) Step -1.5
    _GDIPlus_GraphicsClear($GDI_Buffer, 0xFF000000)
    For $i = 1 To UBound($arr_text_sin) - 1
    $x = $k + ($i * $letter_distance) + ($width_div_2 * Cos($l - ($i * $pi / ATan($i * $pi_div_m170) * - 0.25))) * 0.4
    $y = ($height_div_2 - 1.666 * $font_size2) + ($height * Sin($l - ($i * $pi_div_10))) * 0.35
    $l += 0.00025
    If $x > -$max_size And $x <= $width Then
    DllStructSetData($tLayout, "x", $x)
    DllStructSetData($tLayout, "y", $y)
    $z = Sin(($y * 0.25) * $pi_div_180) * $max_size
    If $z < 0 Then Abs($z)
    _GDIPlus_GraphicsDrawStringEx($GDI_Buffer, $arr_text_sin[$i], $aFont_Sized[$z], $tLayout, $hFormat, $hBrush)
    EndIf
    Next
    Sleep(5)
    Stars()
    ;~ _GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height)
    $gdibitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($bitmap)
    $dc = _WinAPI_CreateCompatibleDC($ScreenDc)
    _WinAPI_SelectObject($dc, $gdibitmap)
    _WinAPI_DeleteObject($gdibitmap)
    _WinAPI_BitBlt($ScreenDc, 0, 0, $Width, $Height, $dc, 0, 0, 0x00CC0020) ; 0x00CC0020 = $SRCCOPY
    _WinAPI_DeleteDC($dc)
    Next
    EndFunc ;==>Sinus_Scroller

    [/autoit] [autoit][/autoit] [autoit]

    Func Scroller_Ini() ;very simple scroller
    $letter_distance = $font_size
    $lenght = $font_size * 1.666 * 0.36
    $k = $width
    $end = 0
    $scroller_length = StringLen($text_scroller) * $lenght
    $y = -($font_size * 0.2) + ($height_div_2 - $font_size * 0.5) ;center scroller
    AdlibEnable("Scroller", 15)
    While Not $end
    Sleep(10)
    WEnd
    EndFunc ;==>Scroller

    [/autoit] [autoit][/autoit] [autoit]

    Func Scroller()
    _GDIPlus_GraphicsClear($GDI_Buffer, 0xFF000000)
    $x = $k + $letter_distance
    DllStructSetData($tLayout, "x", $x)
    DllStructSetData($tLayout, "y", $y)
    _GDIPlus_GraphicsDrawStringEx($GDI_Buffer, $text_scroller, $hFont, $tLayout, $hFormat, $hBrush)
    _GDIPlus_GraphicsDrawImageRect($graphics, $bitmap, 0, 0, $width, $height)
    $k -= 2
    If -$scroller_length >= $k Then
    $end = 1
    AdlibDisable()
    EndIf
    EndFunc

    [/autoit] [autoit][/autoit] [autoit]

    Func _GDIPlus_BitmapSetPixel($hBitmap, $iX, $iY, $iARGB = 0xFF000000)
    Local $aRet
    $aRet = DllCall($ghGDIPDll, "int", "GdipBitmapSetPixel", "hwnd", $hBitmap, "int", $iX, "int", $iY, "dword", $iARGB)
    Return
    EndFunc ;==>_GDIPlus_BitmapSetPixel

    [/autoit] [autoit][/autoit] [autoit]

    ;~ Func _GDIPlus_BrushSetSolidColor($hBrush, $iARGB = 0xFF000000)
    ;~ Local $aResult
    ;~ $aResult = DllCall($ghGDIPDll, "int", "GdipSetSolidFillColor", "hwnd", $hBrush, "int", $iARGB)
    ;~ If @error Then Return SetError(@error, @extended, 0)
    ;~ Return SetError($aResult[0], 0, $aResult[0] = 0)
    ;~ EndFunc ;==>_GDIPlus_BrushSetSolidColor

    [/autoit] [autoit][/autoit] [autoit]

    Func _Exit()
    _WinAPI_ReleaseDC($hGUI, $ScreenDc)
    _WinAPI_DeleteObject ($gdibitmap)
    For $n = 0 To UBound($aFont_Sized) - 1
    _GDIPlus_FontDispose($aFont_Sized[$n])
    Next
    _GDIPlus_PenDispose($pen)
    _GDIPlus_BrushDispose($hBrush)
    _GDIPlus_BrushDispose($brush)
    _GDIPlus_FontDispose($hFont)
    _GDIPlus_FontDispose($hFont2)
    _GDIPlus_FontFamilyDispose($hFamily)
    _GDIPlus_StringFormatDispose($hFormat)
    _GDIPlus_GraphicsDispose($GDI_Buffer)
    _GDIPlus_BitmapDispose($bitmap)
    _GDIPlus_GraphicsDispose($graphics)
    _GDIPlus_Shutdown()
    Exit
    EndFunc ;==>_Exit

    [/autoit]


    AiO Download Link (kompilierte Exes + Quellcode)


    Was gefällt euch von den GDI+ Beispielen am besten?

    Gruß,
    UEZ;-)

    PS: viel mehr Beispiele im engl. Forum!

    2009-01-23: Perspektive im Code von Fliegende Quadrate korrigiert. Nun zeichnet es von hinten nach vorne!
    2009-01-30: Sinus Laufschrift hunzugefügt
    2009-02-02: #01 - Fliegende Perlenkette modifiziert (seperate Farbe für jede Kugel)
    2009-02-05: Dreick und Pfeilspitze in #05 - L-System Fraktale hinzugefügt
    2009-02-06: Sierpinski Dreieck, Gosper Kurve, Sierpinski Teppich und Penta Plexity in #05 - L-System Fraktale (10 Module nun) hinzugefügt
    2009-02-07: Pythagoras Baum in #05 - L-System Fraktale (11 Module nun) hinzugefügt
    2009-02-08: Sterne Scrolling in #06 - Sinus Laufschrift hinzugefügt
    2009-03-03: AiO Link hinzugefügt
    2009-11-14: #01 - #06 aktualisiert
    2009-11-23: Screenshot (F9) in #05 - L-System Fraktale hinzugefügt

Spenden

Jeder Euro hilft uns, Euch zu helfen.

Download

AutoIt Tutorial
AutoIt Buch
Onlinehilfe
AutoIt Entwickler
  1. Datenschutzerklärung
  2. Impressum
  3. Shoutbox-Archiv
Community-Software: WoltLab Suite™