Destop-Teddybär

  • Naja, kann nicht sein. Ich rufe die Taskleisten funktion nur am Anfang auf. Was aber langsammer macht is das TrayMenü.
    PS. geh mit deiner Maus auf das TrayIcon...dann läuft die Figur schneller...keine Ahnung warum???

  • Damit er auch auf inaktiven Fenstern laufen kann, brauchst du also eine Funktion à la _WinTitleBarVisible()...
    Jemand ne Idee? isVisible gibts doch glaub ich, muss nur noch die Sichrbarkeit der Titelleiste ermittelt werden...

    Twitter: @L3viathan2142
    Benutze AutoIt persönlich nicht mehr, da ich keinen Windows-Rechner mehr besitze.

  • Sehr gut gemacht, kenne ein ähnliches Programm mit einem Schaf und hab mich gefragt wie das wohl programmiert ist, und jetzt gibts den quellcode frei haus :))

  • @ Freaky: Naja...genaugenommen läuft er immer verschieden. Wird halt mit "random" ausgelöst.
    schau:

    Spoiler anzeigen
    [autoit]

    func Walking_1()
    If $g[1] = 200 then ;bei Ende der Laufsequenz
    $g[1] = 0
    Switch Random(1,4,1);Zufallsauswahl:
    Case 0
    $g[0] = 0 ;links laufen
    Case 1
    $g[0] = 1 ;rechts laufen
    Case 2
    $g[0] = 2 ;links warten
    Case 3
    $g[0] = 3 ;rechts warten
    Case 4
    Switch Random(1,3,1) ;somit ist die Chance das er hüpft niedriger
    Case 1
    $g[0] = 5 ;links hüpfen
    Case 2
    Sleep(0)
    Case 3
    $g[0] = 4 ;rechts hüpfen
    EndSwitch
    EndSwitch
    endif

    Switch $g[0]
    Case 1 ;rechts laufen
    Move(2,0)
    $g[1] = $g[1] +1
    Case 0 ;links laufen
    Move(-2,0)
    $g[1] = $g[1] +1
    Case 2 ;warten rechts
    Move(0,0)
    $g[1] = $g[1] +2
    Case 3 ;warten rechts
    $g[1] = $g[1] +2
    Move(0,0)
    Case 4 ;hüpfen rechts
    $g[1] = $g[1] +200

    For $i = 10 To 1 Step -1
    Move(7+$i, -$i*2)
    Sleep(40)
    Next
    For $i = 1 To 10 Step 15
    Move(10-$i,$i*2)
    Sleep(40)
    Next
    Case 5 ;hüpfen links
    $g[1] = $g[1] +200

    For $i = 10 To 1 Step -1
    Move(-7-$i, -$i*2)
    Sleep(40)
    Next

    For $i = 1 To 10 Step 1
    Move(-10+$i,$i*2)
    Sleep(40)
    Next
    EndSwitch
    EndFunc

    [/autoit]
  • Job, stimmt. Das hab ich beim testen umgeändert und dann vergessen wieder zu korigieren.
    Danke an Oscar ;)

  • zum img ordner:

    wenn dus einfach so machst


    [autoit]

    ;========================================================

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

    ;=Autor:Faweyr=
    ;=Script:Destop-Teddybär=
    ;=Date:13.11.2009=
    ;=Last updade:15.11.2009=
    ;=Version:2.1=
    ;=Language:German=
    ;=Platform:Windows-XP=
    ;========================================================
    #NoTrayIcon
    #include <GDIPlus.au3>
    #include <WindowsConstants.au3>#include <GuiConstantsEx.au3>
    _GDIPlus_Startup()
    Opt("TrayMenuMode",1)
    _install();ganz unten hab ich die beispielfunktion reigegeben
    Global Const $AC_SRC_ALPHA = 1
    local $n, $varro, $varr, $varlo, $varl, $varlu, $varo, $varml, $varur, $f, $varul, $varmr, $varol, $varru,$vardie, $trans = 100
    dim $g[2]
    dim $volitem[101]
    ;===================================================================================================================================
    ;Sprite-List
    dim $die[4]
    $die[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\die_0.png")
    $die[1] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\die_1.png")
    $die[2] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\die_2.png")
    $die[3] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\die_3.png")

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

    dim $ru[1];rechts-unten
    dim $lu[1];links-unten

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

    dim $or[1];oben (Rechtsausrichtung)
    $or[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\jump_1_1.png")

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

    dim $ol[1];oben (Linksausrichtung)
    $ol[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\jump_0_0.png")

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

    dim $ro[1];rechts-oben
    $ro[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\jump_1_1.png")

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

    dim $lo[1];links-oben
    $lo[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\jump_0_0.png")

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

    dim $r[8];rechts
    $r[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_0.png")
    $r[1] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_1.png")
    $r[2] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_2.png")
    $r[3] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_3.png")
    $r[4] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_4.png")
    $r[5] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_5.png")
    $r[6] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_6.png")
    $r[7] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_1_7.png")

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

    dim $l[8];links
    $l[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_0.png")
    $l[1] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_1.png")
    $l[2] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_2.png")
    $l[3] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_3.png")
    $l[4] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_4.png")
    $l[5] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_5.png")
    $l[6] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_6.png")
    $l[7] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\move_0_7.png")

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

    dim $ul[1];unten (Linksausrichtung)
    $ul[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\jump_0_0.png")

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

    dim $ur[1];unten (Rechtsausrichtung)
    $ur[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\jump_1_1.png")

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

    dim $mr[5];keine Bewegung (Rechtsausrichtung)
    $mr[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_1_0.png")
    $mr[1] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_1_1.png")
    $mr[2] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_1_2.png")
    $mr[3] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_1_3.png")
    $mr[4] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_1_4.png")

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

    dim $ml[5];keine Bewegung (Linksausrichtung)
    $ml[0] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_0_0.png")
    $ml[1] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_0_1.png")
    $ml[2] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_0_2.png")
    $ml[3] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_0_3.png")
    $ml[4] = _GDIPlus_ImageLoadFromFile(@scriptdir & "\img\stand_0_4.png")

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

    $width = _GDIPlus_ImageGetWidth($r[0])
    $height = _GDIPlus_ImageGetHeight($r[0])
    ;===================================================================================================================================
    ;Bewegungsraum setzen
    $task = _GetTaskBarProps()
    Switch _GetTaskBarProps('align')
    Case 4;unten
    $x = 0
    $y = 0
    $h = $task[1]
    $w = @DesktopWidth
    Case 1;links
    $x = 0
    $y = 0
    $h = @desktopheight
    $w = @DesktopWidth
    Case 2;rechts
    $x = 0
    $y = 0
    $h = @desktopheight
    $w = @DesktopWidth
    Case 3;oben
    $x = 0
    $y = $task[3]
    $h = @desktopheight
    $w = @DesktopWidth
    EndSwitch
    ;===================================================================================================================================

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

    ; Create layered window
    $GUI1 = GUICreate("versuch", $width, $height, -1, -1, $WS_POPUP, BitOr( $WS_EX_LAYERED, $WS_EX_TOOLWINDOW))
    GUISetState(@SW_SHOW)
    WinSetOnTop($GUI1, "", 1)
    GUISetCursor ( 9, 1, $GUI1 )
    GUIRegisterMsg($WM_NCHITTEST, "WM_NCHITTEST")
    AdlibEnable ( "SpriteRun" ,170 )

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

    ;Tray-Menü

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

    $setitem = TrayCreateMenu("Transparens")
    For $i = 10 To 100 Step 10
    $volitem[$i] = TrayCreateItem($i & " %",$setitem,-1,1 )
    next
    $aboutitem = TrayCreateItem("About")
    TrayCreateItem("")
    $exititem = TrayCreateItem("Exit")

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

    TraySetState()
    ;===================================================================================================================================

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

    while 1
    Sleep(1)
    $posA = WinGetPos ($GUI1)
    $posB = WinGetPos (WinGetTitle(""))
    $msg = TrayGetMsg()
    HotKeySet("{Esc}", "_exit")
    Select
    Case $msg = $exititem
    _exit()
    Case $msg = $aboutitem
    TrayTip ( "About Destop-Teddybar", "Autor: FaweyrCopyright by: FaweyrVersion: 2.0Last updade: 15.11.09",10, 1 )
    EndSelect

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

    For $i = 10 To 100 Step 10
    If $volitem[$i] = $msg then $trans = $i
    next

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

    Bewegungsablauf_1()

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

    wend

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

    ;================================================================================================================================================
    ;=======================================================Bewegungs-Abläufe========================================================================
    ;================================================================================================================================================
    ;Bewegungsablauf_1
    ;Laufen-Fallen
    func Bewegungsablauf_1()
    ;Falling
    If $posA[1] + $posA[3] < $h then
    If $posA[1] + $posA[3] -15 < $posB[1] then
    If not _RectCollision($posA[0],$posA[1]+4,$posA[0]+$posA[2],$posA[1]+$posA[2]+4, $posB[0],$posB[1],$posB[0]+$posB[2],$posB[1]+$posB[3]) Then
    Move(0,4);down
    else
    Walking_1();above Solid -> Walking
    endif
    else
    Move(0,4);down
    endif
    Else
    Walking_1();above Solid -> Walking
    endif
    ;Spawn-Point -->An obere Destop-Kante setzen
    If $posA[0] > $w then
    WinMove ($GUI1,"", Random ( 0, $h-$width,1),0)
    $g[1] = 200;Letzte Sequenz beenden-->neuauswahl
    endif
    If $posA[0] + $posA[2] < $x then
    WinMove ($GUI1,"", Random ( 0, $h-$width,1),0)
    $g[1] = 200;Letzte Sequenz beenden-->neuauswahl
    endif
    EndFunc

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

    func Walking_1()
    If $g[1] = 200 then;bei Ende der Laufsequenz
    $g[1] = 0
    Switch Random(1,4,1);Zufallsauswahl:
    Case 0
    $g[0] = 0;links laufen
    Case 1
    $g[0] = 1;rechts laufen
    Case 2
    $g[0] = 2;links warten
    Case 3
    $g[0] = 3;rechts warten
    Case 4
    Switch Random(1,3,1);somit ist die Chance das er hüpft niedriger
    Case 1
    $g[0] = 5;links hüpfen
    Case 2
    Sleep(0)
    Case 3
    $g[0] = 4;rechts hüpfen
    EndSwitch
    EndSwitch
    endif
    Switch $g[0]
    Case 1;rechts laufen
    Move(2,0)
    $g[1] = $g[1] +1
    Case 0;links laufen
    Move(-2,0)
    $g[1] = $g[1] +1
    Case 2 ;warten rechts
    Move(0,0)
    $g[1] = $g[1] +2
    Case 3 ;warten rechts
    $g[1] = $g[1] +2
    Move(0,0)
    Case 4 ;hüpfen rechts
    $g[1] = $g[1] +200
    For $i = 10 To 1 Step -1
    Move(7+$i, -$i*2)
    Sleep(40)
    Next
    For $i = 1 To 10 Step 15
    Move(10-$i,$i*2)
    Sleep(40)
    Next
    Case 5 ;hüpfen links
    $g[1] = $g[1] +200
    For $i = 10 To 1 Step -1
    Move(-7-$i, -$i*2)
    Sleep(40)
    Next
    For $i = 1 To 10 Step 1
    Move(-10+$i,$i*2)
    Sleep(40)
    Next
    EndSwitch
    EndFunc
    ;================================================================================================================================================
    ;================================================================================================================================================
    ;================================================================================================================================================
    func _exit()
    WHILE 1
    $n = 10
    Sleep(50)
    wend
    EndFunc

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

    ;===============================================================================
    ; Function Name: _GetTaskBarProps($hProperty="")
    ; Description:: Ermittelt Taskbareigenschaften
    ; Parameter(s): $hProperty Eigenschaft, die zurückgegeben werden soll
    ; "" (Standard) gibt Rectanglposition als Array zurück [left,top,right,bottom]
    ; "TOP" - X1 obere Position
    ; "LEFT" - Y1 linke Position
    ; "HEIGHT" - Y2-Y1 Höhe der Taskleiste
    ; "WIDTH" - X2-X1 Breite der Taskleiste
    ; "ALIGN" - Anordnung: 1=links, 2=rechts, 3=oben, 4=unten
    ; Return Value(s): s. $hProperty
    ; Author(s): BugFix ([email='bugfix@autoit.de'][/email])
    ;===============================================================================
    Func _GetTaskBarProps($hProperty="")
    Local $tRect = DllStructCreate("long;long;long;long"), $hWnd, $ret
    $hProperty = StringUpper(StringStripWS($hProperty, 3))
    $ret = DllCall("user32.dll", 'long', "FindWindowA", 'str', "Shell_traywnd", 'str', "")
    $hWnd = $ret[0]
    DllCall("User32.dll", "int", "GetWindowRect", "hwnd", $hWnd, "ptr", DllStructGetPtr($tRect))
    Local $left = DllStructGetData($tRect, 1)
    Local $top = DllStructGetData($tRect, 2)
    Local $right = DllStructGetData($tRect, 3)
    Local $bottom = DllStructGetData($tRect, 4)
    If $hProperty = "" Then
    Local $aOut[4] = [$left, $top, $right, $bottom]
    Return $aOut
    EndIf
    Switch $hProperty
    Case "TOP"
    Return $top
    Case "LEFT"
    Return $left
    Case "HEIGHT"
    Return $bottom - $top
    Case "WIDTH"
    Return $right - $left
    Case "ALIGN"
    If $top < 1 Then
    If $left < 1 Then
    If $bottom > $right Then Return 1
    If $right > $bottom Then Return 3
    EndIf
    EndIf
    If $top < 1 Then
    If $left > 0 Then Return 2
    EndIf
    If $left < 1 Then
    If $top > 0 Then Return 4
    EndIf
    EndSwitch
    EndFunc ;==>_GetTaskBarProps

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

    Func _RectCollision($Rect1X1,$Rect1Y1,$Rect1X2,$Rect1Y2, $Rect2X1, $Rect2Y1, $Rect2X2, $Rect2Y2)
    ; Prog@ndy
    Local Const $tagRECT = "long;long;long;long"
    Local $1 = DllStructCreate($tagRECT)
    Local $2 = DllStructCreate($tagRECT)
    Local $3 = DllStructCreate($tagRECT)
    DllStructSetData($1,1,$Rect1X1)
    DllStructSetData($1,2,$Rect1Y1)
    DllStructSetData($1,3,$Rect1X2)
    DllStructSetData($1,4,$Rect1Y2)
    DllStructSetData($2,1,$Rect2X1)
    DllStructSetData($2,2,$Rect2Y1)
    DllStructSetData($2,3,$Rect2X2)
    DllStructSetData($2,4,$Rect2Y2)
    Local $r = DllCall("User32.dll", "int", "IntersectRect", "ptr", DllStructGetPtr($3), "ptr", DllStructGetPtr($1), "ptr", DllStructGetPtr($2))
    If @error Then Return SetError(1,0,0)
    Return $r[0]<>0
    EndFunc

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

    func Move($x,$y)
    $posA = WinGetPos ($GUI1)

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

    WinMove($GUI1, "", $posA[0] + $x, $posA[1] + $y)
    Select
    Case $x > 0 and $y < 0 ;rechts-oben
    $n = 7
    Case $x > 0 and $y = 0;rechts
    $n = 8
    $f = 1
    Case $x > 0 and $y > 0;rechts-unten
    $n = 9
    Case $x < 0 and $y < 0;links-oben
    $n = 1
    Case $x < 0and $y = 0;links
    $n = 2
    $f = 0
    Case $x < 0 and $y > 0;links-unten
    $n = 3
    Case $x = 0 and $y < 0;oben
    $n = 4
    Case $x = 0 and $y > 0;unten
    $n = 6
    Case $x = 0 and $y = 0;Mitte (stehen bleiben)
    $n = 5
    EndSelect
    EndFunc

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

    func SpriteRun()
    Switch $n
    Case 10 ;--> Die
    SetBitmap($GUI1, $die[$vardie], $trans*2.55)
    $vardie = $vardie + 1
    If $vardie = UBound($die) then exit
    Case 7
    SetBitmap($GUI1, $ro[$varro], $trans*2.55)
    $varro = $varro + 1
    If $varro = UBound($ro) then $varro = 0
    Case 8
    SetBitmap($GUI1, $r[$varr], $trans*2.55)
    $varr = $varr + 1
    If $varr = UBound($r) then $varr = 0
    Case 9
    SetBitmap($GUI1, $ru[$varru], $trans*2.55)
    $varru = $varru + 1
    If $varru = UBound($ru) then $varru = 0
    Case 1
    SetBitmap($GUI1, $lo[$varlo], $trans*2.55)
    $varlo = $varlo + 1
    If $varlo = UBound($lo) then $varlo = 0
    Case 2
    SetBitmap($GUI1, $l[$varl], $trans*2.55)
    $varl = $varl + 1
    If $varl = UBound($l) then $varl = 0
    Case 3
    SetBitmap($GUI1, $lu[$varlu], $trans*2.55)
    $varlu = $varlu + 1
    If $varlu = UBound($lu) then $varlu = 0
    Case 4
    If $f = 0 then
    SetBitmap($GUI1, $ol[$varol], $trans*2.55)
    $varol = $varol + 1
    If $varol = UBound($ol) then $varol = 0
    Else
    SetBitmap($GUI1, $or[$varor], $trans*2.55)
    $varor = $varor + 1
    If $varor = UBound($or) then $varor = 0
    endif
    Case 5
    If $f = 0 then
    SetBitmap($GUI1, $ml[$varml], $trans*2.55)
    $varml = $varml + 1
    If $varml = UBound($ml) then $varml = 0
    Else
    SetBitmap($GUI1, $mr[$varmr], $trans*2.55)
    $varmr = $varmr + 1
    If $varmr = UBound($mr) then $varmr = 0
    endif
    Case 6
    If $f = 0 then
    SetBitmap($GUI1, $ul[$varul], $trans*2.55)
    $varul = $varul + 1
    If $varul = UBound($ul) then $varul = 0
    else
    SetBitmap($GUI1, $ur[$varur], $trans*2.55)
    $varur = $varur + 1
    If $varur = UBound($ur) then $varur = 0

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

    endif
    EndSwitch
    endfunc

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

    Func WM_NCHITTEST($hWnd, $iMsg, $iwParam, $ilParam)
    If ($hWnd = $GUI1) And ($iMsg = $WM_NCHITTEST) Then Return $HTCAPTION
    EndFunc ;==>WM_NCHITTEST

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

    Func SetBitmap($hGUI, $hImage, $iOpacity)
    Local $hScrDC, $hMemDC, $hBitmap, $hOld, $pSize, $tSize, $pSource, $tSource, $pBlend, $tBlend
    $hScrDC = _WinAPI_GetDC(0)
    $hMemDC = _WinAPI_CreateCompatibleDC($hScrDC)
    $hBitmap = _GDIPlus_BitmapCreateHBITMAPFromBitmap($hImage)
    $hOld = _WinAPI_SelectObject($hMemDC, $hBitmap)
    $tSize = DllStructCreate($tagSIZE)
    $pSize = DllStructGetPtr($tSize)
    DllStructSetData($tSize, "X", _GDIPlus_ImageGetWidth($hImage))
    DllStructSetData($tSize, "Y", _GDIPlus_ImageGetHeight($hImage))
    $tSource = DllStructCreate($tagPOINT)
    $pSource = DllStructGetPtr($tSource)
    $tBlend = DllStructCreate($tagBLENDFUNCTION)
    $pBlend = DllStructGetPtr($tBlend)
    DllStructSetData($tBlend, "Alpha", $iOpacity)
    DllStructSetData($tBlend, "Format", $AC_SRC_ALPHA)
    _WinAPI_UpdateLayeredWindow($hGUI, $hScrDC, 0, $pSize, $hMemDC, $pSource, 0, $pBlend, $ULW_ALPHA)
    _WinAPI_ReleaseDC(0, $hScrDC)
    _WinAPI_SelectObject($hMemDC, $hOld)
    _WinAPI_DeleteObject($hBitmap)
    _WinAPI_DeleteDC($hMemDC)
    EndFunc ;==>SetBitmap

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

    Func _install()
    If FileExists (@scriptdir & "\img") = 0 Then
    DirCreate (@scriptdir & "\img")
    EndIf
    If FileExists (@Scriptdir & "\img\die_0.png") = 0 Then
    FileInstall ("C:\dettybar\die_0.png",@scriptdir & "\img\die_0.png")
    EndIf

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

    ;hier die FileInstall befehle mit den restlichen Bilder hin; hab jetzt keinen Bock drauf, alle anzugeben

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

    EndFunc

    [/autoit]


    compilierst und es hergibst?
    dann wäre das weitergeben des img. ordner net mehr notwendig, oder?

  • Danke, für deine Idee, aber ich habs so gemacht:
    Ein Script. Und eine gfx.bat-Datei in der Die Bitmaps der verschiedenen Tiere und derren Sprite-Daten gespeichert sind.
    Über ein Gui im Programm kann man die verschiedenen Tiere dann auswählen.
    Der Vorteil: Bei neuen Addons muss man nur noch die bat-Datei auswechseln. Und nicht das Script. Was auch das durchchecken nach unerwünschten *Sachen* eleminiert. :)

  • OT: dsgamer007, benutz doch bitte das

    Code
    [spoiler][autoit][/autoit][/spoiler]

    -Tag, anstatt nur

    Code
    [autoit][/autoit]

    . Sonst muss man immer scrollen.

    Lg, Arkaneus

  • Wirklich genial xD!

    Gibts da bald wieder ein Update? Finde die Idee super und da kannst du ja sicher noch so einiges verbessern :)...

    LG

  • Ich konnte es nicht ergoogeln... Und hier im Forum auch nichts... :( Hast du einen Link für mich^^?


    LG