Another AutoIt PreProcessor

  • Ich habe mich mal an einer Art Preprocessor für Autoit versucht.

    Neue Version

    Diese Version läuft etwas langsamer als die alte, dafür ist die Statusanzeige vielfach schneller (GDI+ statt RichEdit)
    Zusätzlich wird auch noch ein LogFile erstellt.

    Aufruf via CMD-Line und Run_Before ist auch möglich.
    #AutoIt3Wrapper_Run_Before=""%autoitdir%\aapp.exe" "%in%""
    (es wird auch ein Backup erstellt)

    Der PreProcessor
    .) fügt alle Includes ein
    .) entfernt alle überflüssigen Funktionen
    .) ersetzt Global Const durch ihren Wert
    .) entfernt überflüssige Global Const
    .) benennt Funktionen und Variablen in ganz kurze Namen um
    .) berechnet einfache mathematische Ausdrücke
    .) kombiniert & _ geteilte Zeilen (außer die Zeilenlänge würde 4095 Zeichen übersteigen)
    .) kombiniert & geteilte Strings
    .) optimiert IF und CASE
    .) wandelt Zahlen in Hex um

    Einige Probleme hatte ich mit den Stringcalls, also Funktionen bzw. Variablen die via String aufgerufen werden.
    Wenn ein String erwartet wird, jedoch nur eine Variable gefunden wird:

    [autoit]

    $Str='_Func'
    Call($Str)

    [/autoit]


    dann wird in diesem Fall keine Funktion entfernt oder umbenannt, denn $Str könnte den Namen jeder Funktion enthalten!

    oft verwendet man Execute nur um 2 Strings zusammenzufügen oder sonst was, jedoch nicht um eine Funktion oder Variable aufzurufen.
    deshalb gibt es die Funktion Execute is used to call functions/variables
    z.B.: bei Unicalc Grafik von Ludwig kann man diese Optionen deaktivieren, da sonst keine Funktionen entfernt bzw. umbenannt werden würden...
    jedoch beim Hilfebeispiel _FTP_SetStatusCallback muß man diese Optionen aktiviert lassen, ansonsten ist das fertige Script nicht lauffähig


    ---

    Kann mir jemand helfen die englischen Sätze richtig und gut zu formulieren?!
    mein Englisch ist leider sehr bescheiden ;)
    thx

    lgE

  • Hab ich doch gesagt ;) :
    Die Funktionsaufrufe stimmen nicht mehr :)
    Es wird z.B. die Funktion _3 aufgerufen aber die Funktion heißt immernoch _Hallo und wurde nicht in _3 umbenannt ich hoffe er weiß was ich meine :P

  • Das Programm gefällt mir sehr gut - super Code! :thumbup:

    Kannst du noch eine Commandline mit einbauen, damit man den Pre-Prozessor aus SciTE aufrufen kann? Ein Button, um den "PreProcessed" Code zu Testzwecken auszuführen, wäre auch nett!

    Ach ja, diese Farben gefallem mir besser -> Global $iColorBk = 0xE0E0E0, $iColor1 = 0x198A00, $iColor2 = 0xCA7F00, $iColor3 = 0x1964EA, $iColor4 = 0x644B4B, $iColor5 = 0x1919FA


    Ich werde weiteren Code testen und bei Problemen mich wieder melden ;)

    Danke,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

    Einmal editiert, zuletzt von UEZ (7. Februar 2010 um 13:11)

  • Was meinst du denn mit "geteilte Strings zusammenfügen"? Fügst du Zeilen, die mit _ aufgeteilt sind zusammen? Dann solltest du auf folgendes achten:

    Zitat

    15th January, 2010 - v3.3.4.0
    * Added: AutoIt scripts using the line continuation character "_" are no longer limited to a combined line length of 4095 characters.

  • Dieser Code läuft nach dem "PreProcessed" nicht mehr:

    Spoiler anzeigen
    [autoit]


    ;coded by UEZ 2009-01-17 -=> this recursion code 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]

    AdlibRegister("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()
    AdlibUnRegister("Save_PIC")
    ; 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]

    Gruß,
    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • UEZ: Jo, das war ein Bug :whistling:
    Der Funktionsname Turn wurde mit einem Leerzeichen in das Scripting.Dictionary eingetragen...

    geänderte Version im ersten Post


    @progandy: geteilte Zeilen werden immer zusammengefügt, ist das schlecht?
    mit Strings zusammenfügen meine ich sowas:

    [autoit]

    "String1" & "String2"

    [/autoit]


    sowas kommt häufig bei Konstanten in Includes vor:

    [autoit]

    Global Const $tagNMHDR = "hwnd hWndFrom;uint_ptr IDFrom;INT Code"
    Global Const $tagNMCBEDRAGBEGIN = $tagNMHDR & ";int ItemID;ptr szText"

    [/autoit]


    $tagNMHDR wird durch seinen Wert ersetzt und schon hab ich einen geteilten String


    @nof@ker2: kannst du mir das entsprechende Script bitte zukommen lassen bzw. es reicht ein kurzes Testscript, bei dem der selbe Fehler auftritt...
    Edit: Probier doch bitte die geänderte Version aus dem ersten Post nochmal

    ---

    btw.: Die Variable $CmdLine darf natürlich nicht umbenannt werden!
    gibt es noch weitere solche Variablen, die von Autoit reserviert sind?

    lgE


  • @progandy: geteilte Zeilen werden immer zusammengefügt, ist das schlecht?


    An sich ist das gut. Nur bei Sonderfällen, bei denen die Zeile dann länger als 4095 Zeichen wird, bekommst man ein Problem. (z.B. könnte die aufgehobene Zeichenbeschränkung in Zukunft bei der SQLiteDLL.au3 ausgenutzt werden, um den String auf einmal zu definieren ohne &= ) Bish jetzt wird das aber noch nirgends verwendet ;)
    Edit: Beispiel:

    Spoiler anzeigen
    Code
    ; nicht erlaubt
    $s = "jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj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jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj"
  • Ja, und zwar alle Funktionen (wie auch Variablen), die als "stringcall" vorkommen wie zb.:

    [autoit]

    GUICtrlSetOnEvent(-1, "Check_Status")

    [/autoit]

    Das werd ich aber irgendwann mal einbauen...

    thxE

    Edit:
    Das hatte ich schon eingebaut, jedoch vorerst wieder rausgenommen, weil das dann schon zu kompliziert wurde.
    Ich habe mich zu sehr auf die Erkennung "nicht eindeutiger" Funktionsaufrufe konzentriert, z.B.:

    [autoit]

    GUICtrlSetOnEvent(-1 $sPre & "Function")
    ;Oder
    GUICtrlSetOnEvent(-1 "Function" & $sPost)

    [/autoit]


    obwohl sowas eher ganz selten vorkommt...

    btw.: gibt es noch weitere Möglichkeiten um Funtionen und Variablen als String aufzurufen, als diese hier?:

    Code
    GUISetOnEvent,GUICtrlSetOnEvent,GUIRegisterMsg,HotKeySet,Execute,Eval,Assign,IsDeclared,Call,TraySetOnEvent,
    TrayItemSetOnEvent,DllCallbackRegister,AdlibRegister,AdlibUnRegister,GUICtrlRegisterListViewSort,OnAutoItExitRegister,
    OnAutoItExitUnRegister,_FTP_ProgressDownload,_FTP_ProgressUpload,_FTP_SetStatusCallback,_SQLite_Exec,ObjEvent

    thx

  • Hiho Eukalyptus, hast mich endlich dazu gebracht mich hier auch anzumelden :). Vielen Dank für den netten PreProcessor, werd mal versuchen SMF mit ner vernünftigen Kombo an switches compiled zu bekommen. Ein kleiner Punkt ist mir bisher aufgefallen, $CmdLineRaw darf auch nicht umbenannt werden.

    Gruß nach Wien :)...

  • Hiho Eukalyptus, hast mich endlich dazu gebracht mich hier auch anzumelden :). Vielen Dank für den netten PreProcessor, werd mal versuchen SMF mit ner vernünftigen Kombo an switches compiled zu bekommen. Ein kleiner Punkt ist mir bisher aufgefallen, $CmdLineRaw darf auch nicht umbenannt werden.

    Gruß nach Wien :)...

    Herzlich Willkommen hier im Forum!
    Und Danke für $CmdLineRaw - kannte ich nocht nicht und hätte ich schon ein paar mal gebraucht. :thumbup:

    c.u.