lade mir die Datei gerade runter, mal sehen ob mein Script wirklich nicht klappt :)
bei mir kommt leider das Fenster nicht xD was muss man dafür machen?
bei mir kommt leider das Fenster nicht xD was muss man dafür machen?
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" )
While 1
For $a = 1 To 5 step 1
$x1=0
$y1=0
$result = _ImageSearch(@ScriptDir & $a & ".bmp",1,$x1,$y1,0)
If $result = 1 Then
MsgBox(0, "Der Wert ist:", $a)
EndIf
Next
Switch $a
Case 1
$b=0
WinWaitActive("[CLASS:TSplashScreen]",$Button[$b])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",$b)
Case 2
$b=1
WinWaitActive("[CLASS:TSplashScreen]",$Button[$b])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",$b)
Case 3
$b=2
WinWaitActive("[CLASS:TSplashScreen]",$Button[$b])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",$b)
Case 4
$b=3
WinWaitActive("[CLASS:TSplashScreen]",$Button[$b])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",$b)
Case 5
$b=4
WinWaitActive("[CLASS:TSplashScreen]",$Button[$b])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",$b)
EndSwitch
ExitLoop(2)
WEnd
;~ wenn $a = Bild1 drücke $Button[5] und wenn $a = Bild drücke $Button[1] und so weiter
Exit
#include <array.au3>
WinActivate("[CLASS:TFCB]")
WinWaitActive("[CLASS:TFCB]")
WinActivate("[CLASS:TSplashScreen]")
WinWaitActive("[CLASS:TSplashScreen]")
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"
For $a = 0 to 4 step 1
$result = _ImageSearch($Bild[$a],1,0,0,0)
If $result<>0 Then
MsgBox(0, "Der Wert ist:", $a)
exitloop(2)
EndIf
Next
send("{enter}")
select $a
case 1
MouseClick("left", X, Y von button1)
case 2
MouseClick("left", X, Y von button2)
case 3
MouseClick("left", X, Y von button3)
case 4
MouseClick("left", X, Y von button4)
case 5
MouseClick("left", X, Y von button5)
EndSelect
Exit
#include <array.au3>
#include <imagesearch.au3>
WinActivate("[CLASS:TFCB]")
WinWaitActive("[CLASS:TFCB]")
WinActivate("[CLASS:TSplashScreen]")
WinWaitActive("[CLASS:TSplashScreen]")
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"
For $a = 0 to 4 step 1
$result = _ImgSearch($Bild[$a])
If $result<>0 Then
MsgBox(0, "Der Wert ist:", $a)
exitloop(2)
EndIf
Next
send("{enter}")
select
case $a = 1
MouseClick("left", 1, 1)
case $a = 2
MouseClick("left", 1, 1 )
case $a = 3
MouseClick("left", 1, 1 )
case $a=4
MouseClick("left", 1, 1 )
case $a=5
MouseClick("left", 1, 1)
EndSelect
Exit
Func _ImgSearch($sPic, $iTimeout = 1, $bClick = 1, $iTol = 5)
Local $iX = 0, $iY = 0, $bResult = 0, $iTimer = TimerInit()
$aPics = StringRegExp($sPic, '([^|]+)', 3)
While TimerDiff($iTimer) < $iTimeout
For $i = 0 To UBound($aPics) - 1
$bResult = _ImageSearch(@ScriptDir & "/Data/" & $aPics[$i] & ".bmp", 1, $iX, $iY, $iTol)
If $bResult = 1 Then ExitLoop(2)
Sleep(50)
Next
WEnd
Return $bResult
EndFunc ;==>_ImgSearch
#include <array.au3>
#include <imagesearch.au3>
WinActivate("[CLASS:TFCB]")
WinWaitActive("[CLASS:TFCB]")
WinActivate("[CLASS:TSplashScreen]")
WinWaitActive("[CLASS:TSplashScreen]")
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"
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"
For $a = 0 to 4 step 1
$result = _ImgSearch($Bild[$a])
If $result<>0 Then
MsgBox(0, "Der Wert ist:", $a)
exitloop(2)
EndIf
Next
Switch $a
Case 1
WinWaitActive("[CLASS:TSplashScreen]",$Button[0])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",5)
Case 2
WinWaitActive("[CLASS:TSplashScreen]",$Button[1])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",4)
Case 3
WinWaitActive("[CLASS:TSplashScreen]",$Button[2])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",3)
Case 4
WinWaitActive("[CLASS:TSplashScreen]",$Button[3])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke",2)
Case 5
WinWaitActive("[CLASS:TSplashScreen]",$Button[4])
Sleep (2000)
Send("{ENTER}")
MsgBox(0,"Drücke", 1)
EndSwitch
Exit
Func _ImgSearch($sPic, $iTimeout = 1, $bClick = 1, $iTol = 5)
Local $iX = 0, $iY = 0, $bResult = 0, $iTimer = TimerInit()
$aPics = StringRegExp($sPic, '([^|]+)', 3)
While TimerDiff($iTimer) < $iTimeout
For $i = 0 To UBound($aPics) - 1
$bResult = _ImageSearch(@ScriptDir & "/Data/" & $aPics[$i] & ".bmp", 1, $iX, $iY, $iTol)
If $bResult = 1 Then ExitLoop(2)
Sleep(50)
Next
WEnd
Return $bResult
EndFunc ;==>_ImgSearch