Hallo,
ich bräuchte mal eure Hilfe ich möchte das:
wenn $a = Bild1 drücke $Button[5] und wenn $a = Bild2 drücke $Button[1] und so weiter ist.
Wie mache ich das am besten mit Case oder For oder While?:handsdown:
Ausserdem Aktiviert er mir das Fenster CLASS:TFCB nicht warum?
MfG Vierus
ich bräuchte mal eure Hilfe ich möchte das:
wenn $a = Bild1 drücke $Button[5] und wenn $a = Bild2 drücke $Button[1] und so weiter ist.
Wie mache ich das am besten mit Case oder For oder While?:handsdown:
Ausserdem Aktiviert er mir das Fenster CLASS:TFCB nicht warum?
MfG Vierus
Code:
#include <string.au3>
#include <ImageSearch.au3>
#include <Array.au3>
#cs ----------------------------------------------------------------------------
AutoIt Version: 3.3.6.1
Author: Vierus
Script Function:
Auf 1 oder 2 oder 3 oder 4 oder 5 Klicken
#ce ----------------------------------------------------------------------------
; Script Start - Add your code below here
WinActivate("[CLASS:TFCB]")
Sleep (2000)
WinWaitActive("[CLASS:TFCB]")
Sleep (2000)
WinActivate("[CLASS:TSplashScreen]")
Sleep (2000)
WinWaitActive("[CLASS:TSplashScreen]")
Sleep (2000)
Dim $Bild[5] ; Array wird definiert
$Bild[0] = "1.bmp" ; bei 0 wird begonnen
$Bild[1] = "2.bmp"
$Bild[2] = "3.bmp"
$Bild[3] = "4.bmp"
$Bild[4] = "5.bmp"
_ArrayDisplay( $Bild, "Bild array" )
Dim $Button[5] ; Array wird definiert
$Button[0] = "5" ; bei 0 wird begonnen
$Button[1] = "4"
$Button[2] = "3"
$Button[3] = "2"
$Button[4] = "1"
_ArrayDisplay( $Button[, "Button array" )
$x1=0
$y1=0
$i=5
$result = _ImageSearch($Bild[$a],1,$x1,$y1,0)
if $result=1 Then
MsgBox(0, "Der Wert ist:", $a)
EndIf
;~ wenn $a = Bild1 drücke $Button[5] und wenn $a = Bild2 drücke $Button[1] und so weiter
WinWaitActive("[CLASS:TSplashScreen]",$Button[$b])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Found",$b)
Exit