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. Jam00

Beiträge von Jam00

  • In die richtige Richtung bewegen

    • Jam00
    • 24. März 2009 um 14:13

    Okay, das er in die richtige richtung geht hab ich jetzt hinbekommen, aber jetzt zeigt er das Bild nicht mehr richtig an! Also die Positon wo er es malen soll stimm! Aber er malt es nicht richtig!

    Das wo man erkennen kann das jetzt richtig läuft
    [autoit]

    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <WindowsConstants.au3>

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

    _GDIPlus_Startup()

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

    $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Data\1.png")
    $X = @DesktopWidth / 2 - _GDIPlus_ImageGetWidth($hImage)
    $Y = @DesktopHeight / 2 - _GDIPlus_ImageGetHeight($hImage)

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

    $hGui = GUICreate("Laufen", _GDIPlus_ImageGetWidth($hImage),_GDIPlus_ImageGetHeight($hImage),$X,$Y,$WS_POPUP)
    GUISetBkColor (0xFFFFFF)
    GUISetState()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
    $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Data\1.png")
    $iWidth = _GDIPlus_ImageGetWidth($hImage) * 96 / _GDIPlus_ImageGetVerticalResolution($hImage)
    $iHeight = _GDIPlus_ImageGetHeight($hImage) * 96 / _GDIPlus_ImageGetHorizontalResolution($hImage)
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, 0, 0)
    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    _GDIPlus_MatrixRotate($hMatrix, 0, False)
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage,- $iWidth /2 , - $iHeight /2)
    $Rotate = 0
    $Speed = 20
    While GUIGetMsg() <> -3
    ToolTip ($Rotate & "," & $X & "," & $Y)
    If $Rotate > 360 Then
    $Rotate -=360
    ElseIf $Rotate < 0 Then
    $Rotate +=360
    EndIf
    If _IsPressed ("27") Then
    $Rotate += 5
    _GDIPlus_MatrixRotate($hMatrix, 5, True)
    _Draw()
    ElseIf _IsPressed ("25") Then
    $Rotate -= 5
    _GDIPlus_MatrixRotate($hMatrix, -5, True)
    _Draw()
    EndIf
    If _IsPressed ("26") Then
    If $Rotate <= 90 Then
    $X1 = Round ($Speed / 100 * Round ($Rotate / 90 * 100,0),0)
    $X += $X1
    $Y -= ($Speed - $X1)
    ElseIf $Rotate <= 180 Then
    $Rotate1 = $Rotate - 90
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X += ($Speed - $X1)
    $Y += $X1
    ElseIf $Rotate <= 270 Then
    $Rotate1 = $Rotate - 180
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X -= $X1
    $Y += ($Speed - $X1)
    ElseIf $Rotate <= 360 Then
    $Rotate1 = $Rotate - 270
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X -= ($Speed - $X1)
    $Y -= $X1
    EndIf
    _Draw1()
    ElseIf _IsPressed ("28") Then
    If $Rotate <= 90 Then
    $X1 = Round ($Speed / 100 * Round ($Rotate / 90 * 100,0),0)
    $X -= $X1
    $Y += ($Speed - $X1)
    ElseIf $Rotate <= 180 Then
    $Rotate1 = $Rotate - 90
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X -= ($Speed - $X1)
    $Y -= $X1
    ElseIf $Rotate <= 270 Then
    $Rotate1 = $Rotate - 180
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X += $X1
    $Y -= ($Speed - $X1)
    ElseIf $Rotate <= 360 Then
    $Rotate1 = $Rotate - 270
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X += ($Speed - $X1)
    $Y += $X1
    EndIf
    _Draw1()
    EndIf
    Sleep(10)
    WEnd

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

    Func WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _GDIPlus_MatrixRotate($hMatrix, $Rotate, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage,- $iWidth /2 , - $iHeight /2)
    EndFunc ;==>WM_PAINT

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

    Func _Draw()
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage,- $iWidth /2 , - $iHeight /2)
    EndFunc
    Func _Draw1()
    WinMove ($hGui,"",$X,$Y)
    EndFunc

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

    [/autoit]
    Das wo er es Falsch zeichent
    [autoit]

    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <WindowsConstants.au3>

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

    _GDIPlus_Startup()

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

    $hGui = GUICreate("Test Rotate", @DesktopWidth,@DesktopHeight,0,0,$WS_POPUP)
    GUISetBkColor (0xFFFFFF)
    GUISetState()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
    $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Data\Gun\1.png")
    $iWidth = _GDIPlus_ImageGetWidth($hImage) * 96 / _GDIPlus_ImageGetVerticalResolution($hImage)
    $iHeight = _GDIPlus_ImageGetHeight($hImage) * 96 / _GDIPlus_ImageGetHorizontalResolution($hImage)
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, 500, 800)
    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    _GDIPlus_MatrixRotate($hMatrix, 0, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    $X = 500
    $Y = 800
    $Rotate = 0
    $Speed = 20
    While GUIGetMsg() <> -3
    ToolTip ($Rotate & "," & $X & "," & $Y)
    If $Rotate > 360 Then
    $Rotate -=360
    ElseIf $Rotate < 0 Then
    $Rotate +=360
    EndIf
    If _IsPressed ("27") Then
    $Rotate += 5
    _GDIPlus_MatrixRotate($hMatrix, 5, True)
    _Draw()
    ElseIf _IsPressed ("25") Then
    $Rotate -= 5
    _GDIPlus_MatrixRotate($hMatrix, -5, True)
    _Draw()
    EndIf
    If _IsPressed ("26") Then
    If $Rotate <= 90 Then
    $X1 = Round ($Speed / 100 * Round ($Rotate / 90 * 100,0),0)
    $X += $X1
    $Y -= ($Speed - $X1)
    ElseIf $Rotate <= 180 Then
    $Rotate1 = $Rotate - 90
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X += ($Speed - $X1)
    $Y += $X1
    ElseIf $Rotate <= 270 Then
    $Rotate1 = $Rotate - 180
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X -= $X1
    $Y += ($Speed - $X1)
    ElseIf $Rotate <= 360 Then
    $Rotate1 = $Rotate - 270
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X -= ($Speed - $X1)
    $Y -= $X1
    EndIf
    _Draw()
    ElseIf _IsPressed ("28") Then
    If $Rotate <= 90 Then
    $X1 = Round ($Speed / 100 * Round ($Rotate / 90 * 100,0),0)
    $X -= $X1
    $Y += ($Speed - $X1)
    ElseIf $Rotate <= 180 Then
    $Rotate1 = $Rotate - 90
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X -= ($Speed - $X1)
    $Y -= $X1
    ElseIf $Rotate <= 270 Then
    $Rotate1 = $Rotate - 180
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X += $X1
    $Y -= ($Speed - $X1)
    ElseIf $Rotate <= 360 Then
    $Rotate1 = $Rotate - 270
    $X1 = Round ($Speed / 100 * Round ($Rotate1 / 90 * 100,0),0)
    $X += ($Speed - $X1)
    $Y += $X1
    EndIf
    _Draw()
    EndIf
    Sleep(10)
    WEnd

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

    Func WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _GDIPlus_MatrixRotate($hMatrix, 0, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndFunc ;==>WM_PAINT

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

    Func _Draw()
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage,$X -$iWidth / 2,$Y -$iHeight / 2)
    EndFunc

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

    [/autoit]

    Bitte um hilfe, pleas

  • Problem bei einer kleinen Funktion.

    • Jam00
    • 24. März 2009 um 13:50
    Spoiler anzeigen
    [autoit]

    #include<guiconstantsex.au3>
    guicreate('')
    guisetstate()

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

    $Start= GUICtrlCreateButton("Start", 8, 112, 105, 25, 0)
    $Pause= GUICtrlCreateButton("Pause", 128, 112, 105, 25, 0)
    $Close= GUICtrlCreateButton("Close", 228, 112, 105, 25, 0)
    $Time = TimerInit()
    While 1
    _nMsg()
    Sleep (10)
    WEnd

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

    Func start()
    While 1
    _nMsg()
    If TimerDiff($Time) > 4000 Then
    $Time = TimerInit()
    ControlSend("Datei_x", "", "", "{ENTER}")
    EndIf
    WEnd
    EndFunc

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

    Func Pause()
    While 1
    _nMsg()
    sleep(100)
    WEnd
    EndFunc

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

    Func Close()
    Exit
    EndFunc
    Func _nMsg()
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Start
    start()
    Case $Pause
    Pause()
    Case $Close,-3
    Close()
    EndSwitch
    EndFunc

    [/autoit]
  • In die richtige Richtung bewegen

    • Jam00
    • 24. März 2009 um 13:46

    Weiß da keiner was?

  • Problem bei einer kleinen Funktion.

    • Jam00
    • 23. März 2009 um 22:02
    Spoiler anzeigen
    [autoit]

    #include<guiconstantsex.au3>
    guicreate('')
    guisetstate()

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

    $Start= GUICtrlCreateButton("Start", 8, 112, 105, 25, 0)
    $Pause= GUICtrlCreateButton("Pause", 128, 112, 105, 25, 0)
    $Close= GUICtrlCreateButton("Close", 228, 112, 105, 25, 0)
    $Time = TimerInit()
    While 1
    _nMsg()
    Sleep (10)
    WEnd

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

    Func start()
    While 1
    _nMsg()
    If TimerDiff($Time) > 4000 Then
    $Time = TimerInit()
    ControlSend("Datei_x", "", "", "{ENTER}")
    EndIf
    WEnd
    EndFunc

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

    Func Pause()
    While 1
    _nMsg()
    sleep(100)
    WEnd
    EndFunc

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

    Func Close()
    Exit
    EndFunc
    Func _nMsg()
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $Start
    start()
    Case $Pause
    Pause()
    Case $Close
    Close()
    EndSwitch
    EndFunc

    [/autoit]
  • TCP - IP Chat

    • Jam00
    • 23. März 2009 um 21:49

    Wenn du dir meinen Chat-Server mal angegckt hättest, währe dir aufgefallen das deiner Falsch ist!

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <Inet.au3>

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

    Example()

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

    Func Example()
    TCPStartup()
    $MainSocket = TCPListen(@ipaddress1,12,100)
    DO
    $ConnectedSocket = TCPAccept($MainSocket)
    Until $ConnectedSocket <> -1
    While 1
    $a = inputbox("Send","Senden")
    tcpsend($ConnectedSocket,$a)
    WEnd
    TCPShutdown()
    EndFunc

    [/autoit]


    Auserdem, so wie du deinen Client gemacht hast geht der Chat nur auf dem Pc wo auch der Server gestartet ist! Du musst die Ip-Adresse des Server beim Client angeben, anstad @IPAdress1, das geht nur wenn es auf dem Gleichen Pc ist, weil es dann den gleichen wert ha!

  • In die richtige Richtung bewegen

    • Jam00
    • 23. März 2009 um 21:03

    Klar kann man das nur einen mindestens einen Pixel verschieben! Ich glaub ich hab die Rechnunh jetzt auch richtig, aber ich glaube, wenn ich in der Matrix was bewege bewegt sich das bild nicht ganu dahin!
    Hier mal das Script wie es jetzt aussieht

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <WindowsConstants.au3>

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

    _GDIPlus_Startup()

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

    $X = 500
    $Y = 800

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

    $hGui = GUICreate("Laufen", @DesktopWidth,@DesktopHeight,0,0,$WS_POPUP)
    GUISetBkColor (0xFFFFFF)
    GUISetState()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)
    $hImage = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Data\1.png")
    $iWidth = _GDIPlus_ImageGetWidth($hImage) * 96 / _GDIPlus_ImageGetVerticalResolution($hImage)
    $iHeight = _GDIPlus_ImageGetHeight($hImage) * 96 / _GDIPlus_ImageGetHorizontalResolution($hImage)
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, $X, $Y)
    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    _GDIPlus_MatrixRotate($hMatrix, 0, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    $Rotate = 0
    $Speed = 20
    While GUIGetMsg() <> -3
    ToolTip ($Rotate & "," & $X & "," & $Y)
    If $Rotate > 360 Then
    $Rotate -=360
    ElseIf $Rotate < 0 Then
    $Rotate +=360
    EndIf
    If _IsPressed ("27") Then
    $Rotate += 5
    _GDIPlus_MatrixRotate($hMatrix, 5, "False")
    _Draw()
    ElseIf _IsPressed ("25") Then
    $Rotate -= 5
    _GDIPlus_MatrixRotate($hMatrix, -5, "False")
    _Draw()
    EndIf
    If _IsPressed ("26") Then
    If $Rotate <= 90 Then
    $X = $X + Round ($Speed / 100 * Round ($Rotate / 90 * 100,0),0)
    $Y = $Y - Round ($Speed - ($Speed / 100 * Round ($Rotate / 90 * 100,0)) ,0)
    ElseIf $Rotate <= 180 Then
    $X = $X + Round ($Speed / 100 * Round ($Rotate / 180 * 100,0),0)
    $Y = $Y + Round ($Speed - ($Speed / 100 * Round ($Rotate / 180 * 100,0)),0)
    ElseIf $Rotate <= 270 Then
    $X = $X - Round ($Speed / 100 * Round ($Rotate / 270 * 100,0),0)
    $Y = $Y - Round ($Speed - ($Speed / 100 * Round ($Rotate / 270 * 100,0)),0)
    ElseIf $Rotate <= 360 Then
    $X = $X - Round ($Speed / 100 * Round ($Rotate / 360 * 100,0),0)
    $Y = $Y + Round ($Speed - ($Speed / 100 * Round ($Rotate / 180 * 100,0)),0)
    EndIf
    _Draw2()
    ElseIf _IsPressed ("28") Then
    If $Rotate <= 90 Then
    $X = $X + Round ($Speed / 100 * Round ($Rotate / 90 * 100,0),0)
    $Y = $Y + Round ($Speed - ($Speed / 100 * Round ($Rotate / 90 * 100,0)),0)
    ElseIf $Rotate <= 180 Then
    $X = $X + Round ($Speed / 100 * Round ($Rotate / 180 * 100,0),0)
    $Y = $Y - Round ($Speed - ($Speed / 100 * Round ($Rotate / 180 * 100,0)),0)
    ElseIf $Rotate <= 270 Then
    $X = $X + Round ($Speed / 100 * Round ($Rotate / 270 * 100,0),0)
    $Y = $Y + Round ($Speed - ($Speed / 100 * Round ($Rotate / 270 * 100,0)),0)
    ElseIf $Rotate <= 360 Then
    $X = $X + Round ($Speed / 100 * Round ($Rotate / 360 * 100,0),0)
    $Y = $Y - Round ($Speed - ($Speed / 100 * Round ($Rotate / 180 * 100,0)),0)
    EndIf
    _Draw2()
    EndIf
    Sleep(10)
    WEnd

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

    Func WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _GDIPlus_MatrixRotate($hMatrix, 0, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndFunc ;==>WM_PAINT

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

    Func _Draw()
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic,0xFFFFFFFF)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndFunc
    Func _Draw2()
    _GDIPlus_MatrixDispose($hMatrix)
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixRotate($hMatrix,$Rotate, "False")
    _GDIPlus_MatrixTranslate($hMatrix, $X, $Y)
    _Draw()
    EndFunc

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

    [/autoit]


    EDIT:
    Hab es mal so Probiert:

    Spoiler anzeigen
    [autoit]

    #include <GUIConstantsEx.au3>
    #include <Inet.au3>

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

    Example()

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

    Func Example()
    TCPStartup()
    $MainSocket = TCPListen(@ipaddress1,12,100)
    DO
    $ConnectedSocket = TCPAccept($MainSocket)
    Until $ConnectedSocket <> -1
    While 1
    $a = inputbox("Send","Senden")
    tcpsend($ConnectedSocket,$a)
    WEnd
    TCPShutdown()
    EndFunc

    [/autoit]
  • Bilder in ein Video konvertieren

    • Jam00
    • 23. März 2009 um 19:09

    Du hast recht es gib Probleme, er macht einfach kein Video bei mir!

  • Wie kann ich CTRL's transparent machen?

    • Jam00
    • 23. März 2009 um 18:58

    Meinst du einfach das die nicht mehr sichtbar sind?
    Oder das der Hintergrund Trasparent ist z.B. bei einem Label, das nur die Schrift sichbra sein soll?
    Oder das es genau so ist wie bei WinSetTrans also ungefähr ControlSetTrans, also gibt es nicht, ob du sowas meinst?

  • Datei-Umbenner

    • Jam00
    • 23. März 2009 um 18:52

    Und was bewirkt das?

  • Bilder in ein Video konvertieren

    • Jam00
    • 23. März 2009 um 18:44

    Wer sagt denn das es mit AutoIt nicht geht? Also ich weiß nicht ob es geht, aber was du schreibst hört sich so an als meintest du es ginge nicht, stimmt das?

  • In die richtige Richtung bewegen

    • Jam00
    • 23. März 2009 um 18:27

    Hallo, leute, ich schon wieder^^
    Ich hab schon wieder ein Problem:
    Ich möchte ein Spiel machen, wo man eine Person (Bild^^) Bewegen kann. Ich hab es so gemacht das wenn ich links - rechts drücke, das er sich dann dreht, und wenn man oben - unten drückt, das der Vorwärz - rückwärz läuft.
    Mein Problem ist das er dann in die Richtige richtung läuft, also in die richtung in die er gedreht ist. Ich hab schon ein bischen rumprobiert, geht aber noch nicht richtig :(
    Kann mir jemand sagen wie ich das Rechen muss?

    Ich mache das Script in Dateianhang, weil man ja auch ein Bild braucht.

  • TCP - IP Chat

    • Jam00
    • 23. März 2009 um 17:41

    Wie währe es wenn du das Script mal Postest?

  • Bild drehen

    • Jam00
    • 22. März 2009 um 23:13

    Okay, THX
    hab es hinbekommen:-)

    Spoiler anzeigen
    [autoit]

    #include <GDIPlus.au3>
    #include <Misc.au3>
    #include <WindowsConstants.au3>

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

    _GDIPlus_Startup()

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

    $hGui = GUICreate("Test Rotate", 800, 600)
    GUISetBkColor (0x000000)
    GUISetState()
    $hGraphic = _GDIPlus_GraphicsCreateFromHWND($hGui)

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

    $hImage = _GDIPlus_ImageLoadFromFile(@WindowsDir & "\Angler.bmp")
    $iWidth = _GDIPlus_ImageGetWidth($hImage) * 96 / _GDIPlus_ImageGetVerticalResolution($hImage)
    $iHeight = _GDIPlus_ImageGetHeight($hImage) * 96 / _GDIPlus_ImageGetHorizontalResolution($hImage)
    $hMatrix = _GDIPlus_MatrixCreate()
    _GDIPlus_MatrixTranslate($hMatrix, 400, 300)
    GUIRegisterMsg($WM_PAINT, "WM_PAINT")
    _GDIPlus_MatrixRotate($hMatrix, 0, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    While GUIGetMsg() <> -3
    If _IsPressed ("27") Then
    _GDIPlus_MatrixRotate($hMatrix, 5, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    ElseIf _IsPressed ("25") Then
    _GDIPlus_MatrixRotate($hMatrix, -5, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndIf
    Sleep(10)
    WEnd

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

    Func WM_PAINT($hWnd, $Msg, $wParam, $lParam)
    _GDIPlus_MatrixRotate($hMatrix, 0, "False")
    _GDIPlus_GraphicsSetTransform($hGraphic, $hMatrix)
    _GDIPlus_GraphicsClear($hGraphic)
    _GDIPlus_GraphicsDrawImage($hGraphic, $hImage, -$iWidth / 2, -$iHeight / 2)
    EndFunc ;==>WM_PAINT

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

    _GDIPlus_MatrixDispose($hMatrix)
    _GDIPlus_ImageDispose($hImage)
    _GDIPlus_GraphicsDispose($hGraphic)
    _GDIPlus_Shutdown()

    [/autoit]
  • Bild drehen

    • Jam00
    • 22. März 2009 um 20:57

    Hey, thx das ist gut 8o
    jetzt ist nur noch das Problem, dass das Bild was voher da war nicht verschwindet, und wenn man ein Fenster drüber zieht ist alles weg:-(

  • Bild drehen

    • Jam00
    • 22. März 2009 um 19:47

    Dann muss ich blind sein ?(
    Was hat das mit Matrix zu tun? Also damit macht man doch einen Matrixbildschirm, seitwann dret man damit Bilder!

  • Datei-Umbenner

    • Jam00
    • 22. März 2009 um 19:45
    Zitat von leviathan

    ja, dass sich die Datein auf Basis von Regular Expressions umbennen lassen


    Das kapier ich nit:-(

  • Bild drehen

    • Jam00
    • 22. März 2009 um 18:04

    Ich hab mal eine Fage, und zwar wollte ich ein Bild drehen.
    Also ich möchte nit das BIld selbs drehen, sondern es gedreht in einer Gui Darstellen. Hat da jemand eine Idee wie das gehen könnte?

    Ich hab mal was vorbereitet

    Spoiler anzeigen
    [autoit]

    #include <ButtonConstants.au3>
    #include <GUIConstantsEx.au3>
    #include <StaticConstants.au3>
    #include <WindowsConstants.au3>

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

    #Region ### START Koda GUI section ### Form=
    $Form1 = GUICreate("Form1", 633, 447, 193, 125)
    $Pic1 = GUICtrlCreatePic(@WindowsDir & "\Angler.bmp", 240, 172, 100, 100, BitOR($SS_NOTIFY,$WS_GROUP,$WS_CLIPSIBLINGS))
    $Button1 = GUICtrlCreateButton("^", 602, 388, 27, 27, 0)
    GUICtrlSetFont(-1, 10, 400, 0, "Arial")
    $Button2 = GUICtrlCreateButton("v", 602, 417, 27, 27, 0)
    GUISetState(@SW_SHOW)
    #EndRegion ### END Koda GUI section ###

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

    While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
    Case $GUI_EVENT_CLOSE
    Exit

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

    EndSwitch
    WEnd

    [/autoit]


    Ich will nur das wenn man auf die Button klickt, das sich das Bild dann dreht, ohne das an der Datei was verändert wird.

  • Datei-Umbenner

    • Jam00
    • 22. März 2009 um 17:45

    Regex? Vorschau habe ich doch schon!

  • Namen von allen PCs im Netzwerk

    • Jam00
    • 22. März 2009 um 12:01

    Okay, THX.

  • Namen von allen PCs im Netzwerk

    • Jam00
    • 22. März 2009 um 11:41

    Ich hab mal eine Frage,
    wie kann ich mit AutoIt alle Namen der PCs im Netzwerk rausbekommen? Oder Ip würde auch gehen, aber namen Währe mir lieber. Hat jemand eine Idee?

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™