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

Beiträge von Asterion

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 16:46
    Zitat von alpines

    Ich kenne die Antwort auf die Frage nicht, aber man kann doch mal in die ImageSearch2015.au3 schauen.

    0, 0, @DesktopWidth, @DesktopHeight Was könnte das bloß sein? Kombiniere das mit WinGetPos und die Sache läuft.
    Windows ordnet die Bildschirme an, und je nach dem wie du sie anordnest gehen sie entweder von Negativ ins Positive oder sind nur im Positiven.
    Meine sind so angeordnet das der linke Bildschirm von -Breite bis 0 geht. Und der rechte von 0 bis +Breite.

    Wenn du also den linken scannen willst, dann musst du auch von -Breite bis 0 gehen.
    Erstell doch mal ein neues Script und MouseMove mal nach (-200, 100) und schau wo die Maus hingeht, dann siehste was ich meine.

    Jap hab es hinbekommen! Danke dir für alles!

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 16:26
    Zitat von alpines

    Das liegt daran wie deine Monitore angeordnet sind. Wenn sie von -1920 bis 1920 gehen kann es nicht klappen weil @DesktopWidth nur 1920 glaube ich zurückgibt.

    Was meinst du genau? Also insgesamt sind meine beiden Monitor zusammen bzw maximal 3286 x 1080. Mein Hauptmonitor ist 1920x1080 und mein zweiter, der ist links davon ist 1366x768. Also ist es möglich das er meinen zweiten (den kleineren) auch absucht? bzw nur absucht? Oder kann man auch irgendwie definieren das der ein Fenster absucht? z.B sucht er nur das Steam-Login Fenster nach dem OK.png ab?

    Edit: Habs herausgefunden, habe einfach die @DekstopWidth auf 3286 gesetzt in der ImageSearch2015.au3!

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 16:22
    Zitat von alpines

    Hast du denn auch mein Script genutzt mit der png die ich hochgeladen hab? Zeig mal ein Screenshot vom Steam-Anmelde-Fenster.

    Okay habs. Es liegt daran das ich das Steam Fenster auf meinem zweiten Monitor hatte. Wie kann man denn definieren das ImageSearch den zweiten Monitor absucht? Ich meine eigentlich ist doch schon global definiert, das er alles absucht?

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 16:16
    Zitat von alpines

    Du hat auch den falschen Anmelde-Button gecropt und der Fenstertitel ist falsch.

    Der Button sieht anders aus wenn man das Fenster markiert, und anders aus wenn man Daten einträgt.

    Das hier klappt bei mir einwandfrei.
    (Ich merke grad das WBB den Button vorhin falsch dargestellt hat. Er hat abgerundete Ecken obwohl die Bild-Datei vollständig ist.)

    AutoIt
    #RequireAdmin
    #autoit3wrapper_usex64=y
    #include 'ImageSearch2015.au3'
    
    
    HotKeySet( "e", "_Exit")
    HotKeySet( "s", "_Start")
    
    
    global $x = 0, $y = 0
    
    
    Opt("SendKeyDelay", 50)
    Opt("SendKeyDownDelay", 50)
    
    
    While 1
    	Sleep(200)
    WEnd
    
    
    Func _Start() ;Funktion (Programm) startet
    	WinActivate("Steam-Login")
    	Sleep(500)
    	ControlSend("Steam-Login", "", "", "Username")
    	Sleep(500)
    	ConTrolSend("Steam-Login", "", "", "{TAB}")
    	Sleep(500)
    	ControlSend("Steam-Login", "", "", "Passwort")
    	Sleep(500)
    	global $search = _ImageSearch("OK.png", 0, $x, $y, 0)
    	If $search = 1 Then
    	MouseClick( "LEFT", $x, $y, 10)
    	EndIf
    EndFunc
    
    
    Func _Exit()
    	Exit
    EndFunc
    Alles anzeigen

    Komisch o_O Bei mir klickt er trotzdem nicht auf anmelden.

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 16:04
    Zitat von alpines

    Läuft das Script denn noch oder gehts aus? Hast du in deinem Script auch _ImageSearchStartup() verwendet?
    Das Script was du hochgeladen hat hats nämlich nicht und die Ausgabe kriegt man nur wenn man es verwendet.

    Das Script bleibt an, nur es passiert nichts. Ne hab _ImageSearchStartup() nicht verwendet, wie muss man das denn genau verwenden?

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:57
    Zitat von alpines

    Du fügst oben in deinem Script folgende Zeile hinzu: #AutoIt3Wrapper_UseX64=y.
    Die ImageSearch2015 hat es ja auch, allerdings werden einige (?) Wrapper-Befehle in UDFs vom Compiler ignoriert.

    Okay dank ^^, Jetzt nutzt er die 64 Bit DLL jedoch passiert danach immer noch nichts :/ Woran liegts? Kriege keine Fehlermeldung

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:51
    Zitat von alpines

    Ja... das soll wohl ein schlechter Scherz sein.

    Schau mal in die ImageSearch2015.au3 den If-Block bei Zeile 18 an. Dieser löst nicht aus weil die Bedingung false ist. Ok soweit.
    Nun schau mal nach wo der If-Block fürs Debuggen endet und welcher Befehl unter dem EndIf steht.

    Oh okay danke :D Hab das Exit entfernt xD
    Nun läuft es soweit bis zum ImageSearch jedoch kommt dann die Fehlermeldung:
    +>@OSArch=X64 @AutoItX64=0 therefore using x32 ImageSearch DLL
    Und er bleibt dann einfach stehen ^^ Liegts daran das ich 64 Bit PC habe aber er die 32 Bit DLL nutzt? Wo kann ich das umändern?

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:43
    Zitat von alpines

    Schmiert die DLL ab? Lad mal bitte dein Entwicklungsordner, UDF+Dll+Script und png hoch bitte.

    Dateien

    Entwicklung.zip 1,07 MB – 242 Downloads
  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:26
    Zitat von alpines

    Dein Scripte sollte so eigentlich laufen. Zeig uns doch mal die ImageSearch2015.au3.

    Kriegst du auch keine Fehlermeldung wenn du das Script über den Explorer und nicht SciTE startest?

    Kriege über den Explorer auch keine Fehlermeldung.

    C
    #AutoIt3Wrapper_UseX64=y ; Set to Y or N depending on your situation/preference!!
    #include-once
    #include <WinAPIFiles.au3> ; for _WinAPI_Wow64EnableWow64FsRedirection
    #include <ScreenCapture.au3> ;_ScreenCapture_CaptureWnd etc. ;using this in the example to create a test image, otherwise not neccessary here
    
    
    #Region When running compiled script, Install needed DLLs if they don't exist yet
    If Not FileExists("ImageSearchDLLx32.dll") Then FileInstall("ImageSearchDLLx32.dll", "ImageSearchDLLx32.dll", 1);FileInstall ( "source", "dest" [, flag = 0] )
    If Not FileExists("ImageSearchDLLx64.dll") Then FileInstall("ImageSearchDLLx64.dll", "ImageSearchDLLx64.dll", 1)
    If Not FileExists("msvcr110d.dll") Then FileInstall("msvcr110d.dll", "msvcr110d.dll", 1);Microsoft Visual C++ Redistributable dll x64
    If Not FileExists("msvcr110.dll") Then FileInstall("msvcr110.dll", "msvcr110.dll", 1);Microsoft Visual C++ Redistributable dll x32
    #EndRegion
    
    
    Local $h_ImageSearchDLL = -1; Will become Handle returned by DllOpen() that will be referenced in the _ImageSearchRegion() function
    
    
    #Region TESTING/Example
    Local $bTesting = False; Change to TRUE to turn on testing/example
    
    
    If $bTesting Then
    	cr(">" & "_ImageSearchStartup()=" & _ImageSearchStartup(), 2)
    	OnAutoItExitRegister(_ImageSearchShutdown)
    
    
    	cr("!Testing...")
    	;using Notepad as a simple example
    	#Region Notepad Snapshot Creation
    	$hWin = WinGetHandle("[CLASS:Notepad]")
    	If Not IsHWnd($hWin) Then
    		If Run("notepad.exe") = 0 Then cr("Couldn't run notepad.exe")
    		Local $hWin = WinWait("[CLASS:Notepad]", "", 10)
    		If $hWin = 0 Then cr("Notepad WinWait Timeout!")
    	EndIf
    	WinSetState($hWin, "", @SW_RESTORE)
    	WinSetState($hWin, "", @SW_SHOW)
    	WinActivate($hWin)
    	Local $testimage = "24bit.bmp"
    	_ScreenCapture_CaptureWnd($testimage, $hWin, 0, 0, -1, -1, False);_ScreenCapture_CaptureWnd ( $sFileName, $hWnd [, $iLeft = 0 [, $iTop = 0 [, $iRight = -1 [, $iBottom = -1 [, $bCursor = True]]]]] )
    	cr("made Notepad Window screenshot")
    	#EndRegion Notepad Snapshot Creation
    
    
    	#Region Test if application appeared
    	Local $y = 0, $x = 0, $result
    	$result = _ImageSearch($testimage, 1, $x, $y, 0, 0);_ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
    	If $result = 1 Then
    		cr("! $result=" & $result, 1)
    		MouseMove($x, $y, 0)
    		cr("+" & "recognised notepad! moved mouse to center of notepad!")
    	Else
    		cr("! $result=" & $result, 1)
    		Exit
    	EndIf
    	#EndRegion Test if application appeared
    
    
    	#Region Test if application vanished
    	WinSetState($hWin, "", @SW_MINIMIZE)
    	Local $y = 0, $x = 0, $result
    	$result = _ImageSearch($testimage, 1, $x, $y, 0, 0);_ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
    	If $result = 1 Then
    		cr("! $result=" & $result, 1)
    		Exit
    	Else
    		cr("! $result=" & $result, 1)
    		cr("+" & "notepad dissapeared!")
    	EndIf
    	#EndRegion Test if application vanished
    	cr()
    	cr("!Test finished")
    EndIf
    Exit
    #EndRegion TESTING/Example
    
    
    #Region ImageSearch Startup/Shutdown
    Func _ImageSearchStartup()
    	_WinAPI_Wow64EnableWow64FsRedirection(True)
    	$sOSArch = @OSArch ;Check if running on x64 or x32 Windows ;@OSArch Returns one of the following: "X86", "IA64", "X64" - this is the architecture type of the currently running operating system.
    	$sAutoItX64 = @AutoItX64 ;Check if using x64 AutoIt ;@AutoItX64 Returns 1 if the script is running under the native x64 version of AutoIt.
    	If $sOSArch = "X86" Or $sAutoItX64 = 0 Then
    		cr("+>" & "@OSArch=" & $sOSArch & @TAB & "@AutoItX64=" & $sAutoItX64 & @TAB & "therefore using x32 ImageSearch DLL")
    		$h_ImageSearchDLL = DllOpen("ImageSearchDLLx32.dll")
    		If $h_ImageSearchDLL = -1 Then Return "DllOpen failure"
    	ElseIf $sOSArch = "X64" And $sAutoItX64 = 1 Then
    		cr("+>" & "@OSArch=" & $sOSArch & @TAB & "@AutoItX64=" & $sAutoItX64 & @TAB & "therefore using x64 ImageSearch DLL")
    		$h_ImageSearchDLL = DllOpen("ImageSearchDLLx64.dll")
    		If $h_ImageSearchDLL = -1 Then Return "DllOpen failure"
    	Else
    		Return "Inconsistent or incompatible Script/Windows/CPU Architecture"
    	EndIf
    	Return True
    EndFunc   ;==>_ImageSearchStartup
    
    
    Func _ImageSearchShutdown()
    	DllClose($h_ImageSearchDLL)
    	_WinAPI_Wow64EnableWow64FsRedirection(False)
    	cr(">" & "_ImageSearchShutdown() completed")
    	Return True
    EndFunc   ;==>_ImageSearchShutdown
    #EndRegion ImageSearch Startup/Shutdown
    
    
    #Region ImageSearch UDF;slightly modified
    ; ------------------------------------------------------------------------------
    ;
    ; AutoIt Version: 3.0
    ; Language:       English
    ; Description:    Functions that assist with Image Search
    ;                 Require that the ImageSearchDLL.dll be loadable
    ;
    ; ------------------------------------------------------------------------------
    ;===============================================================================
    ;
    ; Description:      Find the position of an image on the desktop
    ; Syntax:           _ImageSearchArea, _ImageSearch
    ; Parameter(s):
    ;                   $findImage - the image to locate on the desktop
    ;                   $tolerance - 0 for no tolerance (0-255). Needed when colors of
    ;                                image differ from desktop. e.g GIF
    ;                   $resultPosition - Set where the returned x,y location of the image is.
    ;                                     1 for centre of image, 0 for top left of image
    ;                   $x $y - Return the x and y location of the image
    ;                   $transparency - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of
    ;                                  the color to be used as transparency; can be omitted if
    ;                                  not needed
    ;
    ; Return Value(s):  On Success - Returns True
    ;                   On Failure - Returns False
    ;
    ; Note: Use _ImageSearch to search the entire desktop, _ImageSearchArea to specify
    ;       a desktop region to search
    ;
    ;===============================================================================
    Func _ImageSearch($findImage, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
    	Return _ImageSearchArea($findImage, $resultPosition, 0, 0, @DesktopWidth, @DesktopHeight, $x, $y, $tolerance, $transparency)
    EndFunc   ;==>_ImageSearch
    
    
    Func _ImageSearchArea($findImage, $resultPosition, $x1, $y1, $right, $bottom, ByRef $x, ByRef $y, $tolerance = 0, $transparency = 0);Credits to Sven for the Transparency addition
    	If Not FileExists($findImage) Then Return "Image File not found"
    	If $tolerance < 0 Or $tolerance > 255 Then $tolerance = 0
    	If $h_ImageSearchDLL = -1 Then _ImageSearchStartup()
    
    
    	If $transparency <> 0 Then $findImage = "*" & $transparency & " " & $findImage
    	If $tolerance > 0 Then $findImage = "*" & $tolerance & " " & $findImage
    	$result = DllCall($h_ImageSearchDLL, "str", "ImageSearch", "int", $x1, "int", $y1, "int", $right, "int", $bottom, "str", $findImage)
    	If @error Then Return "DllCall Error=" & @error
    	If $result = "0" Or Not IsArray($result) Or $result[0] = "0" Then Return False
    
    
    	$array = StringSplit($result[0], "|")
    	If (UBound($array) >= 4) Then
    		$x = Int(Number($array[2])); Get the x,y location of the match
    		$y = Int(Number($array[3]))
    		If $resultPosition = 1 Then
    			$x = $x + Int(Number($array[4]) / 2); Account for the size of the image to compute the centre of search
    			$y = $y + Int(Number($array[5]) / 2)
    		EndIf
    		Return True
    	EndIf
    EndFunc   ;==>_ImageSearchArea
    
    
    ;===============================================================================
    ;
    ; Description:      Wait for a specified number of seconds for an image to appear
    ;
    ; Syntax:           _WaitForImageSearch, _WaitForImagesSearch
    ; Parameter(s):
    ;                   $waitSecs  - seconds to try and find the image
    ;                   $findImage - the image to locate on the desktop
    ;                   $tolerance - 0 for no tolerance (0-255). Needed when colors of
    ;                                image differ from desktop. e.g GIF
    ;                   $resultPosition - Set where the returned x,y location of the image is.
    ;                                     1 for centre of image, 0 for top left of image
    ;                   $x $y - Return the x and y location of the image
    ;                   $transparency - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of
    ;                                  the color to be used as transparency can be omitted if
    ;                                  not needed
    ;
    ; Return Value(s):  On Success - Returns 1
    ;                   On Failure - Returns 0
    ;
    ;
    ;===============================================================================
    Func _WaitForImageSearch($findImage, $waitSecs, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
    	$waitSecs = $waitSecs * 1000
    	$startTime = TimerInit()
    	While TimerDiff($startTime) < $waitSecs
    		Sleep(100)
    		If _ImageSearch($findImage, $resultPosition, $x, $y, $tolerance, $transparency) Then
    			Return True
    		EndIf
    	WEnd
    	Return False
    EndFunc   ;==>_WaitForImageSearch
    
    
    ;===============================================================================
    ;
    ; Description:      Wait for a specified number of seconds for any of a set of
    ;                   images to appear
    ;
    ; Syntax:           _WaitForImagesSearch
    ; Parameter(s):
    ;                   $waitSecs  - seconds to try and find the image
    ;                   $findImage - the ARRAY of images to locate on the desktop
    ;                              - ARRAY[0] is set to the number of images to loop through
    ;                                ARRAY[1] is the first image
    ;                   $tolerance - 0 for no tolerance (0-255). Needed when colors of
    ;                                image differ from desktop. e.g GIF
    ;                   $resultPosition - Set where the returned x,y location of the image is.
    ;                                     1 for centre of image, 0 for top left of image
    ;                   $x $y - Return the x and y location of the image
    ;                   $transparent - TRANSBLACK, TRANSWHITE or hex value (e.g. 0xffffff) of
    ;                                  the color to be used as transparent; can be omitted if
    ;                                  not needed
    ;
    ; Return Value(s):  On Success - Returns the index of the successful find
    ;                   On Failure - Returns 0
    ;
    ;
    ;===============================================================================
    Func _WaitForImagesSearch($findImage, $waitSecs, $resultPosition, ByRef $x, ByRef $y, $tolerance, $transparency = 0)
    	$waitSecs = $waitSecs * 1000
    	$startTime = TimerInit()
    	While TimerDiff($startTime) < $waitSecs
    		For $i = 1 To $findImage[0]
    			Sleep(100)
    			If _ImageSearch($findImage[$i], $resultPosition, $x, $y, $tolerance, $transparency) Then
    				Return $i
    			EndIf
    		Next
    	WEnd
    	Return False
    EndFunc   ;==>_WaitForImagesSearch
    #EndRegion ImageSearch UDF;slightly modified
    
    
    #Region My Custom ConsoleWrite/debug Function
    Func cr($text = "", $addCR = 1, $printTime = False) ;Print to console
    	Static $sToolTip
    	If Not @Compiled Then
    		If $printTime Then ConsoleWrite(@HOUR & ":" & @MIN & ":" & @SEC & ":" & @MSEC & " ")
    		ConsoleWrite($text)
    		If $addCR >= 1 Then ConsoleWrite(@CR)
    		If $addCR = 2 Then ConsoleWrite(@CR)
    	Else
    		If $printTime Then $sToolTip &= @HOUR & ":" & @MIN & ":" & @SEC & ":" & @MSEC & " "
    		$sToolTip &= $text
    		If $addCR >= 1 Then $sToolTip &= @CR
    		If $addCR = 2 Then $sToolTip &= @CR
    		ToolTip($sToolTip)
    	EndIf
    	Return $text
    EndFunc   ;==>cr
    #EndRegion My Custom ConsoleWrite/debug Function
    Alles anzeigen
  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:17
    Zitat von alpines

    Passiert denn überhaupt was? Kommt eine Fehlermeldung, wird der Username eingetippt?
    Triggert das ControlSend eventuell die Schließen-Funktion? Setz die Hotkeys doch lieber auf {F1} und {F2} um sicher zu gehen.

    Um Fehlermeldungen lesen zu können musst du die selben Rechte wie das Script haben. Starte also entweder die Datei oder starte SciTE mit Adminrechten!

    Nein es startet und schließt direkt, ich komme nicht mal dazu die Funktion zu starten = kein Username. F1 und F2 bringt leider auch nichts :(.
    Hab ich als Admin gestartet, passiert trotzdem nix :D Das ist der Console Output:

    Code
    >"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\Aster\Desktop\Test\Test.au3" /UserParams    
    +>15:15:49 Starting AutoIt3Wrapper v.17.224.935.0 SciTE v.3.7.3.0   Keyboard:00000407  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:0407)  CodePage:0  utf8.auto.check:4
    +>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\Aster\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Aster\AppData\Local\AutoIt v3\SciTE 
    >Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\Aster\Desktop\Test\Test.au3
    +>15:15:49 AU3Check ended.rc:0
    >Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3.exe "C:\Users\Aster\Desktop\Test\Test.au3"    
    --> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop
    +>15:15:49 AutoIt3.exe ended.rc:0
    +>15:15:49 AutoIt3Wrapper Finished.
    >Exit code: 0    Time: 0.5911
  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:12

    Jap bei mir sieht der auch so aus, aber hab nur nen kleinen bereich ausgeschnitten, geht aber auch leider nicht mit deinem Bild :(.
    Bei .bmp wird alles transparente ja direkt gelöscht, und es funktioniert trotzdem nicht :/.

    Ich glaube das muss irgendwo anders dranliegen, eventuell an der ImageSearch2015.au3 oder so, weil das Programm sich ja direkt schließt ich drücke nicht einmal s um die Funktion zu starten :(

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:07
    Zitat von alpines

    Wie schaut denn deine OK.png aus?

    Bilder

    • OK.PNG
      • 721 Byte
      • 63 × 19
  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 15:03
    Zitat von alpines

    Bitte nicht, es gibt hundertausend bessere Wege als Probleme mit ImageSearch zu lösen.
    Nimmt deine ImageSearch-Funktion überhaupt .png Dateien an? Ich denke die arbeitet mit .bmp?

    Ja aber will trotzdem mal ImageSearch ausprobieren :D. Habs mit .bmp auch versucht, immer noch das gleiche :/ Schließt sich einfach ohne Fehlermeldung etc.

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 14:59
    Zitat von alpines

    Verzichte lieber auf ImageSearch und nimm lieber das Command Line Interface. Hier bei der Steam Dokumentation steht sogar ein Beispiel dazu:
    https://support.steampowered.com/kb_article.php?ref=5623-QOSV-5250

    Danke, ich weiß was du meinst :D. Ich logge mich auch schon automatisch bei Steam und so ein, jedoch wollte ich einfach so mit ImageSearch mal rumspielen weil ich das denke ich sowieso irgendwann brauchen werde und das relativ interessant und vielfältig aussieht^^.

  • ImageSearch keine Fehlermeldung

    • Asterion
    • 29. April 2017 um 14:55

    Hallo Leute,

    Ich bin relativ neu in AutoIT und habe mich heute mal an ImageSearch gewagt, jedoch funktioniert es nicht so wie es soll. Wenn ich das Programm mit F5 teste, passiert einfach nichts und es schließt sich direkt wieder (kriege nicht einmal eine Fehlermeldung). Jedoch wenn ich alles was mit ImageSearch zu tun hat entferne, funktioniert was wieder mit ControlSend etc.. Hoffe hier kann mir jemand bei helfen :), könnt mich gerne bei allem verbessern, bin noch sehr neu also mache ich bestimmt noch viel falsch xD.

    C
    #RequireAdmin
    #include 'ImageSearch2015.au3'
    
    
    HotKeySet( "e", "_Exit")
    HotKeySet( "s", "_Start")
    
    
    global $x = 0, $y = 0
    
    
    Opt("SendKeyDelay", 50)
    Opt("SendKeyDownDelay", 50)
    
    
    While 1
    	Sleep(200)
    WEnd
    
    
    Func _Start() ;Funktion (Programm) startet
    	ControlSend("Steam", "", "", "Username")
    	Sleep(500)
    	ConTrolSend("Steam", "", "", "{TAB}")
    	Sleep(500)
    	ControlSend("Steam", "", "", "Passwort")
    	Sleep(500)
    	global $search = _ImageSearch("OK.png", 0, $x, $y, 0)
    	If $search = 1 Then
    	MouseClick( "LEFT", $x, $y, 10)
    	EndIf
    EndFunc
    
    
    Func _Exit()
    	Exit
    EndFunc
    Alles anzeigen

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™