Après beaucoup de travail, sa ne donne rien ...
Je ne sais pas pourquoi mais ça ne marche pas.
Les ControlMouse etc n'ont aucun effet.
Bref, j'abandonne.
Je met tout de même mon script ici, au cas ou cela aiderait quelqun.
Code : Tout sélectionner
#include <GUIConstants.au3>
#include <IE.au3>
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include 'misc.au3'
#include <SliderConstants.au3>
#include <INet.au3>
#include <File.au3>
#include <Date.au3>
#include <Array.au3>
#include <GUIListBox.au3>
#include <WinAPI.au3>
Func order($a, $b)
Dim $res[2]
If $a < $b Then
$res[0] = $a
$res[1] = $b - $a
Else
$res[0] = $b
$res[1] = $a - $b
EndIf
Return $res
EndFunc
$Serveur = InputBox("Serveur","Please, write serveur adress")
$Height = @DesktopHeight
$Width = @DesktopWidth
$Height = $Height/2.3
$Width = $Width/2.4
$ui = GUICreate("Darkobit",500,600,-1,-1) ; on créer la GUI
$btn = GUICtrlCreateButton("Start", 180, 10, 210, 25) ; on créer un bouton pour enregistrer un fichier
$wb = _IECreateEmbedded() ; on appel le navigateur embarqué
GUICtrlCreateObj($wb, 10, 40, 580, 450) ; on le met en place ici
GUISetState() ; on montre la GUI
_IENavigate($wb, "http://darkorbit.com", 1) ; l'adresse
While 1
Switch GUIGetMsg()
Case $btn ; si on clique sur le bouton démarrer
Call("Start")
Case $GUI_EVENT_CLOSE
Exit
EndSwitch
WEnd
Func Start()
_IENavigate($wb,$Serveur,1) ;adresse du serveur
Global $handle = ControlGetHandle("Darkobit", "", "[CLASS:Internet Explorer_Server; INSTANCE:1]")
Msgbox(4096,"Start","Start Botting")
Sleep(1000)
MsgBox(4096, "Select", "Please select killers area ( WARNING : Don't put the little map in the killers area !!)")
Local $selected = 0
Global $coordinate[4]
$area = GUICreate("", 1, 1, 1, 1, $ws_popup, $ws_ex_topmost)
GUISetBkColor(3407616, $area)
WinSetTrans($area, "", 80)
GUISetState()
While $selected = 0
If _ispressed("1") Then
$mp = MouseGetPos()
WinMove($area, "", $mp[0], $mp[1], 1, 1)
While _ispressed("01")
$pos = MouseGetPos()
Global $lefts = order($mp[0], $pos[0])
Global $tops = order($mp[1], $pos[1])
WinMove($area, "", $lefts[0], $tops[0], $lefts[1], $tops[1])
ConsoleWrite($lefts[0] & ", " & $tops[0] & ", " & $lefts[1] & ", " & $tops[1] & @CRLF)
WEnd
$coordinate[0] = $lefts[0]
$coordinate[1] = $tops[0]
$coordinate[2] = $lefts[0] + $lefts[1]
$coordinate[3] = $tops[0] + $tops[1]
$selected = 1
EndIf
WEnd
GUIDelete($area)
MsgBox(4096, "Select", "Please select the minimap")
Local $selected = 0
Global $coordinatemap[4]
$area = GUICreate("", 1, 1, 1, 1, $ws_popup, $ws_ex_topmost)
GUISetBkColor(3407616, $area)
WinSetTrans($area, "", 80)
GUISetState()
While $selected = 0
If _ispressed("1") Then
$mp = MouseGetPos()
WinMove($area, "", $mp[0], $mp[1], 1, 1)
While _ispressed("01")
$pos = MouseGetPos()
Global $lefts = order($mp[0], $pos[0])
Global $tops = order($mp[1], $pos[1])
WinMove($area, "", $lefts[0], $tops[0], $lefts[1], $tops[1])
ConsoleWrite($lefts[0] & ", " & $tops[0] & ", " & $lefts[1] & ", " & $tops[1] & @CRLF)
WEnd
$coordinatemap[0] = $lefts[0]
$coordinatemap[1] = $tops[0]
$coordinatemap[2] = $lefts[0] + $lefts[1]
$coordinatemap[3] = $tops[0] + $tops[1]
$selected = 1
EndIf
WEnd
GUIDelete($area)
Call("Kill")
EndFunc
Func Kill()
$a = 0
$i = 0
$time = 0
Local $x = Random($coordinate[0], $coordinate[2])
Local $y = Random($coordinate[1], $coordinate[3])
ControlClick("Darkobit","",$handle,"left",1,$x,$y)
While 1
$during = 20
While 1
$coord = PixelSearch($coordinate[0], $coordinate[1]+60, $coordinate[2], $coordinate[3], 13369344, 5)
If NOT @error Then
PixelSearch($coord[0], $coord[1], $coord[0] + 40, $coord[1] - 60, 7122410, 15)
If NOT @error Then
Local $x = Random($coordinate[0], $coordinate[2])
Local $y = Random($coordinate[1], $coordinate[3])
ControlClick("Darkobit","",$handle,"left",1,$x,$y)
Call("Kill")
EndIf
PixelSearch($coordinate[0], $coordinate[1], $coordinate[2], $coordinate[3], 11933696, 15)
If @error Then
$i = 1
Else
$i = 0
EndIf
ControlClick("Darkobit","",$handle,"left",1,$coord[0] + 5,$coord[1] - 60)
Sleep(500)
ControlSend("Darkobit","",$handle,"{LCTRL}")
$coord = PixelSearch($coordinate[0], $coordinate[1], $coordinate[2], $coordinate[3], 11933696, 5)
If NOT @error Then
$coord = PixelSearch($coordinate[0], $coordinate[1], $coordinate[2], $coordinate[3], 0)
ControlMove("Darkobit","",$handle,$coord[0],$coord[1])
MouseDown("left")
$coord = PixelSearch($coordinate[0], $coordinate[1], $coordinate[2], $coordinate[3], 11933696, 15)
EndIf
While 1
$coord = PixelSearch($coordinate[0], $coordinate[1], $coordinate[2], $coordinate[3], 11933696,15)
If NOT @error Then
ControlMove("Darkobit","",$handle,$coord[0]+10,$coord[1]+10)
$i = $i + 1
Else
MouseUp("left")
$r = 0
$time = 24
Sleep(100)
ExitLoop
EndIf
WEnd
ControlSend("Darkobit","",$handle,"1")
Else
$during = 20
ExitLoop
EndIf
WEnd
$time = $time + 1
If $during = 20 Then
$coord2 = PixelSearch($coordinatemap[0], $coordinatemap[1], $coordinatemap[2], $coordinatemap[3], 16711680, 70)
If NOT @error Then
ControlClick("Darkobit","",$handle,"left",1,$coord2[0],$coord2[1])
Sleep(2000)
$during = 20
$time = 24
Elseif $time = 25 Then
$during = 20
$time = 0
Local $x = Random($coordinatemap[0], $coordinatemap[2])
Local $y = Random($coordinatemap[1], $coordinatemap[3])
ControlClick("Darkobit","",$handle,"left",1,$x,$y)
Mouseclick("left",$x,$y)
EndIf
While 1
$i = $i + 1
Sleep(80)
If $i = 45 Then
ExitLoop
EndIf
WEnd
$i = 0
EndIf
WEnd
EndFunc