| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 
 | $adresse = "http://www.google.tn/"
Run("c:\program files\Internet Explorer\iexplore.exe" & ' "' & $adresse & '"' )
    While 1
    If WinExists("Connecter à 172.168.x.x", "") Then
        WinActivate("Connecter à 172.168.x.x", "")
	$hWnd = WinGetHandle("Connexion à 172.168.x.x", "")
        WinActivate($hWnd, "")
        $hUser = ControlGetHandle($hWnd, "", "[CLASS:Edit; INSTANCE:2]")
        ControlSetText($hWnd, "", $hUser, "test")
        $hPass = ControlGetHandle($hWnd, "", "[CLASS:Edit; INSTANCE:3]")
        ControlSetText($hWnd, "", $hPass, "test")
        $hCheck = ControlGetHandle($hWnd, "", "[CLASS:Button; INSTANCE:1]")
        ;ControlCommand ($hWnd, "", $hCheck, "check")
        $hOK = ControlGetHandle($hWnd, "", "[CLASS:Button; INSTANCE:2]")
        ControlFocus($hWnd, "", $hOK)
        ControlClick($hWnd, "", $hOK)
        ExitLoop
    EndIf
    Wend | 
Partager