ZitatIch möchte gerne das mein Tool das erkennen tut geht möglich
und wenn wie?
Bitte nochmal in verständlichen Sätzen. ![]()
Und weil ich vermute, dass es um das umgehen von einem Captcha geht weise ich dich gleich auf die Forenregelnhin. ![]()
ZitatIch möchte gerne das mein Tool das erkennen tut geht möglich
und wenn wie?
Bitte nochmal in verständlichen Sätzen. ![]()
Und weil ich vermute, dass es um das umgehen von einem Captcha geht weise ich dich gleich auf die Forenregelnhin. ![]()
Pixelsearch ist mir persönlich viel zu unsicher und langsam...
Ich lese die Pixel direkt aus der Bitmap. Ist das jetzt zu viel für den Anfang?
In meiner Signatur ist ein Link zu einem GDI+ Paint. Da ist eine Füllfunktion mit drin. ![]()
Kann es sein, dass du damit Buttons in einem anderen Fenster erstellen willst?
Wenn ja würde ich das mit der ANYGUI.au3 machen. ;).... Vor allem weil es so nicht geht. ![]()
Und ich würde einfach die Funktion _GDIPlus_LineBrushCreate benutzen...
Wenn er schon mit GDI+ arbeitet geht es so doch viel einfacher und schneller. ![]()
Könnte sein, dass sich diese Funktion nicht mit Lyered Windows verträgt. ![]()
Ich kann dir leider nicht weiterhelfen, da ich die Funktion nicht geschrieben habe. Prog@ndy weiß vielleicht Rat. ![]()
Suchst du vielleicht Run? ![]()
Du brauchst noch ein #include <Constants.au3>.
Und wieder einmal hat die Forensuche die Lösung parat.
_Win_SetClickThrough
Zitatdas andere sah irgendwie ein wenig altmodisch aus
Es ist ja auch ein Retro Shooter ![]()
Das ist echt ne Prima Idee. Es gibt ja mittlerweile einige AutoIt Spiele, da kommt ein Highscore Server gerade recht.
Wenn die PHP Version kommt werde ich alle meine zukünftigen Spiele damit ausrüsten
. Und dein Name kommt in die Credits. ![]()
Zitatirgentwie ist mir dort das Deutsch zu hoch oO
Dafür gibt es ja das AutoIt Window Info Tool
in deinem AutoIt Ordner.
Ich hab dir in meinem 1.Post mal ein Beispiel geschrieben.
Kann es sein, dass der 6 stellige Hex String ein "0x" vorne stehen hat? Wenn ja musst du natürlich noch mit StringTrimLeft diese 2 abschneiden. ![]()
"0xFF" anhängen klappt bei mir nämlich prima. ![]()
Ach ja:
; #FUNCTION# ====================================================================================================================
; Name...........: _GDIPlus_LineBrushCreate
; Description ...: Creates a LinearGradientBrush object from a set of boundary points and boundary colors
; Syntax.........: _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2[, $iWrapMode = 0])
; Parameters ....: $nX1 - X coordinate of the starting point of the gradient. The starting boundary line passes through the
; +starting point
; $nY1 - Y coordinate of the starting point of the gradient. The starting boundary line passes through the
; +starting point
; $nX2 - X coordinate of the ending point of the gradient. The ending boundary line passes through the
; +ending point
; $nY2 - Y coordinate of the ending point of the gradient. The ending boundary line passes through the
; +ending point
; $iARGBClr1 - Alpha, Red, Green and Blue components of the starting color of the line
; $iARGBClr2 - Alpha, Red, Green and Blue components of the ending color of the line
; $iWrapMode - Wrap mode that specifies how areas filled with the brush are tiled:
; |0 - Tiling without flipping
; |1 - Tiles are flipped horizontally as you move from one tile to the next in a row
; |2 - Tiles are flipped vertically as you move from one tile to the next in a column
; |3 - Tiles are flipped horizontally as you move along a row and flipped vertically as you move along a column
; |4 - No tiling takes place
; Return values .: Success - Pointer to a new LinearGradientBrush object
; Failure - 0 and either:
; |@error and @extended are set if DllCall failed
; |$GDIP_STATUS contains a non zero value specifying the error code
; Remarks .......: After you are done with the object, call _GDIPlus_BrushDispose to release the object resources
; Related .......: _GDIPlus_BrushDispose
; Link ..........; @@MsdnLink@@ GdipCreateLineBrush
; Example .......; No
; ===============================================================================================================================
Func _GDIPlus_LineBrushCreate($nX1, $nY1, $nX2, $nY2, $iARGBClr1, $iARGBClr2, $iWrapMode = 0)
Local $tPointF1, $pPointF1
Local $tPointF2, $pPointF2
Local $aResult
$tPointF1 = DllStructCreate("float;float")
$pPointF1 = DllStructGetPtr($tPointF1)
$tPointF2 = DllStructCreate("float;float")
$pPointF2 = DllStructGetPtr($tPointF2)
DllStructSetData($tPointF1, 1, $nX1)
DllStructSetData($tPointF1, 2, $nY1)
DllStructSetData($tPointF2, 1, $nX2)
DllStructSetData($tPointF2, 2, $nY2)
$aResult = DllCall($ghGDIPDll, "uint", "GdipCreateLineBrush", "ptr", $pPointF1, "ptr", $pPointF2, "uint", $iARGBClr1, "uint", $iARGBClr2, "int", $iWrapMode, "int*", 0)
[/autoit] [autoit][/autoit] [autoit]If @error Then Return SetError(@error, @extended, 0)
$GDIP_STATUS = $aResult[0]
Return $aResult[6]
EndFunc ;==>_GDIPlus_LineBrushCreate
Lineare Farbverläufe lassen sich auch effektiver erstellen :D.
Edit: Mir fällt gerade auf, dass du in deinem Script ziemlich viele Pens erstellst, aber keinen einzigen mit PenDispose wieder löschst. Das solltest du entweder korrigieren oder du nimmst die Funktion die ich oben geschrieben habe
.
Du musst als Parameter natürlich auch noch eine ControlID mit angeben (siehe Hilfe) ;).
Edit: Hier mal ein Beispiel:
Run("notepad")
[/autoit] [autoit][/autoit] [autoit]Do
Sleep(100)
Until ProcessExists("notepad.exe")
Sleep(2000)
[/autoit] [autoit][/autoit] [autoit]ControlSend("Unbenannt - Editor", "", "[CLASS:Edit; INSTANCE:1]", "Test")
;Alternativ auch: ControlSend("Unbenannt - Editor", "", 15, "Test")
Rückmeldung?
Hat das wieder was mit nem Bot zu tun? ![]()
Ich glaube in AutoIt kannst du das vergessen...
Zumindest wären sie noch im TaskManager sichtbar. Ganz verstecken geht also nicht. Du kannst versuchen es als Dienst laufen zu lassen. ![]()
Edit: Zu spät...^^
Und ich dachte immer Wingdings und Webdings sind für nichts zu gebrauchen.^^
Tadaaa
Nur um zu zeigen, dass GDI+ dafür besser geeignet ist. ![]()
#include <GDIPlus.au3>
#include <GUIConstants.au3>
#include <Misc.au3>
$iGUIWidth = 400
$iGUIHeight = 400
$GUIColorBG = 0xFF000000
$iShots = 0
$iMaxShots = 5
$iShotSpeed = 5
$iCoolDownTime = 500
$iTimerShot = $iCoolDownTime * - 1
$hWnd = GUICreate("Test", $iGUIWidth, $iGUIHeight)
GUISetState()
_GDIPlus_Startup()
[/autoit] [autoit][/autoit] [autoit]$hGraphic = _GDIPlus_GraphicsCreateFromHWND($hWnd)
$hBitmap = _GDIPlus_BitmapCreateFromGraphics($iGUIWidth, $iGUIHeight, $hGraphic)
$hBuffer = _GDIPlus_ImageGetGraphicsContext($hBitmap)
_GDIPlus_GraphicsSetSmoothingMode($hBuffer, 2)
_GDIPlus_GraphicsClear($hGraphic, $GUIColorBG)
$hImage_Ship = _GDIPlus_ImageLoadFromFile(@ScriptDir & "\Raumschiff.jpg")
$hBrush_Shot = _GDIPlus_BrushCreateSolid(0xFFFFFFFF)
Dim $aShot[2][2]
[/autoit] [autoit][/autoit] [autoit]$iX_Ship = $iGUIWidth / 2 - 25
$iY_Ship = $iGUIHeight - 30
AdlibRegister("_ReDraw", 20)
[/autoit] [autoit][/autoit] [autoit]While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
AdlibUnRegister()
_GDIPlus_GraphicsDispose($hGraphic)
_GDIPlus_GraphicsDispose($hBuffer)
_GDIPlus_BitmapDispose($hBitmap)
_GDIPlus_ImageDispose($hImage_Ship)
_GDIPlus_BrushDispose($hBrush_Shot)
_GDIPlus_Shutdown()
Exit
EndSwitch
WEnd
Func _ReDraw()
If _IsPressed("27") And $iX_Ship > 0 Then $iX_Ship += 2
If _IsPressed("25") And $iX_Ship < $iGUIWidth Then $iX_Ship -= 2
If _IsPressed("20") And TimerDiff($iTimerShot) >= $iCoolDownTime And UBound($aShot) < $iMaxShots Then
_Array2DAdd($aShot, $iX_Ship + 23 & "|" & $iY_Ship - 10)
$iTimerShot = TimerInit()
EndIf
_GDIPlus_GraphicsClear($hBuffer, $GUIColorBG)
For $i = 1 To UBound($aShot) - 1
If $aShot[$i][1] <> "" Then
_GDIPlus_GraphicsFillRect($hBuffer, $aShot[$i][0], $aShot[$i][1], 5, 10, $hBrush_Shot)
$aShot[$i][1] -= $iShotSpeed
EndIf
Next
For $i = 1 To UBound($aShot) - 1
If $aShot[$i][1] <= 0 Then
_Array2DDelete($aShot, $i)
ExitLoop
EndIf
Next
_GDIPlus_GraphicsDrawImageRect($hBuffer, $hImage_Ship, $iX_Ship, $iY_Ship, 50, 30)
_GDIPlus_GraphicsDrawImageRect($hGraphic, $hBitmap, 0, 0, $iGUIWidth, $iGUIHeight)
EndFunc ;==>_ReDraw
;------------------------------------------------------------------------------------------------------------
;
; Function _Array2DAdd(ByRef $avArray, $sValue='')
;
; Description Redim Array Size and add an Array element at last position
; Works with any occurences in 2nd Dimension
; Works also with 1D-Array
;
; Parameter $avArray Given Array
; optional $sValue Value of new Element, parts must be seperate with '|'
;
; Return Succes -1
; Failure 0 and set @error
; @error = 1 given array is not array
; @error = 2 given parts of Element too less/much
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;------------------------------------------------------------------------------------------------------------
Func _Array2DAdd(ByRef $avArray, $sValue='')
If ( Not IsArray($avArray) ) Then
SetError(1)
Return 0
EndIf
Local $i
Local $UBound2nd = UBound($avArray,2)
If @error = 2 Then
ReDim $avArray[UBound($avArray)+1]
$avArray[UBound($avArray)-1] = $sValue
Else
Local $arValue
ReDim $avArray[UBound($avArray)+1][$UBound2nd]
If $sValue = '' Then
For $i = 0 To $UBound2nd-2
$sValue &= '|'
Next
EndIf
$arValue = StringSplit($sValue, '|')
If $arValue[0] <> $UBound2nd Then
SetError(2)
Return 0
EndIf
For $i = 0 To $UBound2nd-1
$avArray[UBound($avArray)-1][$i] = $arValue[$i+1]
Next
EndIf
Return -1
EndFunc ;==>_Array2DAdd
;----------------------------------------------------------------------------------------------------------------------
; Fuction _Array2DDelete(ByRef $ARRAY, $iDEL)
;
; Description Delete one row on a given index in an 1D/2D -Array
;
; Parameter $ARRAY the array, where one row will deleted
; $iDEL Row-Index to delete
;
; Return Succes -1 ByRef $ARRAY
; Failure 0 set @error = 1; given array are not array
; set @error = 2; index is out of range
;
; Author BugFix ([email='bugfix@autoit.de'][/email])
;----------------------------------------------------------------------------------------------------------------------
Func _Array2DDelete(ByRef $ARRAY, $iDEL)
If ( Not IsArray($ARRAY) ) Then
SetError(1)
Return 0
EndIf
If ( $iDEL < 0 ) Or ( $iDEL > UBound($ARRAY)-1 ) Then
SetError(2)
Return 0
EndIf
Local $i, $k, $l
Local $UBound2nd = UBound($ARRAY,2)
If @error = 2 Then
Local $arTmp[UBound($ARRAY)-1]
$k = 0
For $i = 0 To UBound($ARRAY)-1
If $i <> $iDEL Then
$arTmp[$k] = $ARRAY[$i]
$k += 1
EndIf
Next
Else
Local $arTmp[UBound($ARRAY)-1][$UBound2nd]
$k = 0
For $i = 0 To UBound($ARRAY)-1
If $i <> $iDEL Then
For $l = 0 To $UBound2nd-1
$arTmp[$k][$l] = $ARRAY[$i][$l]
Next
$k += 1
EndIf
Next
EndIf
$ARRAY = $arTmp
Return -1
EndFunc ;==>_Array2DDelete
Ich hätte schon Lust auf so einen Retro Shooter, aber über die 12345678 Fragen müssen wir noch mal reden. ![]()
Ich bin vielleicht doof...
Ich hab jetzt erst gesehen, dass du bei den Pfaden noch ein img davor gesetzt hast. ![]()
Ich dachte zuerst, dass wird ein größeres Projekt, da ich Begriffe wie Raumschiff o.Ä. gelesen habe.
Deswegen habe ich dir auch GDI+ empfohlen...
Wieso verwendest du eigentlich Arrays, wenn man sowieso nur einen Schuss abgeben kann solange der andere nicht verschwunden ist?
Ach so das ist ja gar nicht gewollt. :wacko:
Ich glaube immer noch, dass das einfacher in GDI+ zu realisieren ist... Wenn du möchtest könnte ich dir dabei helfen.
Und jetzt.
Es geht immer noch nicht.^^
Hattest du schon ein funktionierendes Script?
Bei mir tut sich nichts egal wie oft ich die Leertaste drücke.^^