Annonce

Réduire
Aucune annonce.

Script Triangle en AutoIT

Réduire
X
 
  • Filtre
  • Heure
  • Afficher
Tout nettoyer
nouveaux messages

  • Script Triangle en AutoIT

    Code:
    #include <GUIConstantsEx.au3>
    #include <GDIplus.au3>
    
    Global Const $Largeur = 800
    Global Const $Longueur = 600
    Global Const $pi = 3.14159265358979323
    Global $Titre = "Triangle GDI  By Mantra :D"
    Global $Coord_Point[4][2]
    Opt("GUIOnEventMode", 1)
    $hwnd = GUICreate($Titre, $Largeur, $Longueur)
    GUISetOnEvent($GUI_EVENT_CLOSE, "close")
    GUISetState()
    _GDIPlus_Startup()
    Global $Graphique = _GDIPlus_GraphicsCreateFromHWND($hwnd)
    Global $bitmap = _GDIPlus_BitmapCreateFromGraphics($Largeur, $Longueur, $Graphique)
    Global $handle_Graph  = _GDIPlus_ImageGetGraphicsContext($bitmap)
    Global $Couleur_Trans_Triangle = _GDIPlus_BrushCreateSolid(0x1A000000)
    Global $Couleur_Texte1 = _GDIPlus_BrushCreateSolid (0x7F46ec4d)
    Global $Couleur_Texte2 = _GDIPlus_BrushCreateSolid (0x7F0e9314)
    Global $Couleur_Texte3 = _GDIPlus_BrushCreateSolid (0x7F194286)
    Global $Couleur_Texte4 = _GDIPlus_BrushCreateSolid (0x7Fa417b4)
    Global $Couleur_Texte5 = _GDIPlus_BrushCreateSolid (0x7F4f0b58)
    Global $Format = _GDIPlus_StringFormatCreate ()
    Global $Font_texte = _GDIPlus_FontCreate (_GDIPlus_FontFamilyCreate ("Arial"),32, 2)
    
    Global $text1 = "Coded by Mantra"
    Global $text2 = @LF & "Triangle coded with GDI +"
    Global $text3 = @LF & @LF & @LF & "Thanks to:"
    Global $text4 = @LF & @LF & @LF & @LF & "       THC CREW"
    Global $text5 = @LF & @LF & @LF & @LF & @LF & "       http://thehackademy.fr"
    
    
    Global $j = $Longueur / 4
    
    _AntiAlias($handle_Graph , 4)
    $Decalage_triangle = 0
    
    Global $Taille_Polygone = Random(80, 100, 1)
    Global $Polygone_X = Random(0, $Largeur - $Taille_Polygone, 1)
    Global $Polygone_Y = Random(0, $Longueur - $Taille_Polygone, 1)
    
    Global $Polygone_ir = 1
    Global $Polygone_Ydir = 1
    
    Global $X1, $X2, $X3, $Y1, $Y2, $Y3
    
    Global $Polygone_Vitesse = 2
    
    _GDIPlus_GraphicsClear($handle_Graph )
    Do
    
        $Decalage_triangle += 0.02
        _GDIPlus_GraphicsFillRect($handle_Graph , 0, 0, $Largeur, $Longueur, $Couleur_Trans_Triangle)
    
        $Polygone_X += $Polygone_ir
        $Polygone_Y += $Polygone_Ydir
    
        $Taille_Polygone = 2.5 * (Tan($Decalage_triangle / 1.5) / Cos($Decalage_triangle * $pi / 180) + 1) * 50 -50
        $Rouge = ((Cos(1 * $Decalage_triangle / 1) + 1) / 2) * 256
        $Verts = ((Cos(2 * $Decalage_triangle / 1) + 1) / 2) * 256
        $Bleu = ((Cos(3 * $Decalage_triangle / 1) + 1) / 2) * 256
    
        $Trace = _GDIPlus_PenCreate("0x7F" & Hex($Rouge, 2) & Hex($Verts, 2) & Hex($Bleu, 2), 6) ;pen format and size
        $X1 = Cos($Decalage_triangle * $Polygone_Vitesse) * $Taille_Polygone + $Polygone_X
        $Y1 = Sin($Decalage_triangle * $Polygone_Vitesse) * $Taille_Polygone + $Polygone_Y
    
        $X2 = Cos($Decalage_triangle * $Polygone_Vitesse + 2 * $pi / 3) * $Taille_Polygone + $Polygone_X
        $Y2 = Sin($Decalage_triangle * $Polygone_Vitesse + 2 * $pi / 3) * $Taille_Polygone + $Polygone_Y
    
        $X3 = Cos($Decalage_triangle * $Polygone_Vitesse + 4 * $pi / 3) * $Taille_Polygone + $Polygone_X
        $Y3 = Sin($Decalage_triangle * $Polygone_Vitesse + 4 * $pi / 3) * $Taille_Polygone + $Polygone_Y
    
        $Coord_Point[0][0] = 3
        $Coord_Point[1][0] = $X1
        $Coord_Point[1][1] = $Y1
        $Coord_Point[2][0] = $X2
        $Coord_Point[2][1] = $Y2
        $Coord_Point[3][0] = $X3
        $Coord_Point[3][1] = $Y3
    
        For $i = 1 To $Coord_Point[0][0]
            If $Coord_Point[$i][1] >= $Longueur Then
                $Polygone_Ydir = -1
            ElseIf $Coord_Point[$i][1] <= 0 Then
                $Polygone_Ydir = 1
            EndIf
            If $Coord_Point[$i][0] >= $Largeur Then
                $Polygone_ir = -1
            ElseIf $Coord_Point[$i][0] <= 0 Then
                $Polygone_ir = 1
            EndIf
        Next
    
        _GDIPlus_GraphicsDrawPolygon($handle_Graph , $Coord_Point, $Trace)
    
        $Zone_Texte = _GDIPlus_RectFCreate (1 / $Largeur, $Longueur + $j, 0, 0)
    
        _GDIPlus_GraphicsDrawStringEx ($handle_Graph , $text1, $Font_texte, $Zone_Texte, $Format, $Couleur_Texte1)
        _GDIPlus_GraphicsDrawStringEx ($handle_Graph , $text2, $Font_texte, $Zone_Texte, $Format, $Couleur_Texte2)
        _GDIPlus_GraphicsDrawStringEx ($handle_Graph , $text3, $Font_texte, $Zone_Texte, $Format, $Couleur_Texte3)
        _GDIPlus_GraphicsDrawStringEx ($handle_Graph , $text4, $Font_texte, $Zone_Texte, $Format, $Couleur_Texte5)
        _GDIPlus_GraphicsDrawStringEx ($handle_Graph , $text5, $Font_texte, $Zone_Texte, $Format, $Couleur_Texte4)
        $j -= 0.75
    
        If $Longueur + $j < 0 - (StringLen($text1) * 5) Then $j = $Longueur / 4
    
    
        _GDIPlus_GraphicsDrawImageRect($Graphique, $bitmap, 0, 0, $Largeur, $Longueur)
        _GDIPlus_PenDispose($Trace)
        Sleep(1)
    Until False
    
    Func close()
        _GDIPlus_FontDispose ($Font_texte)
        _GDIPlus_StringFormatDispose ($Format)
        _GDIPlus_BrushDispose($Couleur_Trans_Triangle)
        _GDIPlus_GraphicsDispose($handle_Graph )
        _GDIPlus_BitmapDispose($bitmap)
        _GDIPlus_GraphicsDispose($Graphique)
        _GDIPlus_Shutdown()
        Exit
    EndFunc ;==>close
    
    Func _AntiAlias($hGraphics, $mode)
        Local $aResult
        $aResult = DllCall($ghGDIPDll, "int", "GdipSetSmoothingMode", "hwnd", $hGraphics, "int", $mode)
        If @error Then Return SetError(@error, @extended, False)
        Return SetError($aResult[0], 0, $aResult[0] = 0)
    EndFunc
    " Une teuf sans drogue c'est comme une levrette sans fessé, c'est quand même rare. "

    †|
Chargement...
X