Bien du courage à ceux qui mettent les mains dans le cambouis

Code : Tout sélectionner
Local $o = ObjCreate("InternetExplorer.Application")
$o.visible = 1
Code : Tout sélectionner
ObjCreate("Shell.Explorer.2")
Code : Tout sélectionner
_IEPropertyGet($oIE,"locationurl")
Code : Tout sélectionner
If IsObj($oIE) Then $doc = _IEDocGetObj($oIE)
If IsObj($doc) Then
$cookies = string($doc.cookie)
Code : Tout sélectionner
If IsObj($oIE) Then
_IELoadWait($oIE)
$aerror = 0
$v_ret = DllCall("user32.dll", "int", "IsHungAppWindow", "hwnd", HWnd($oIE.HWND))
If @error <> 0 Or $v_ret[0] Then $aerror = 1
Else
$aerror = 1
EndIf
Code : Tout sélectionner
#Include <WindowsConstants.au3> #include <WinAPI.au3> #Include <Constants.au3> local $pid, $hHandle, $hGUI, $sURL, $xHeight, $xWidth $sURL = "www.google.com" $xWidth = 1024 $xHeight = 568 $hGUI = GUICreate("Test", $xWidth, $xHeight) $oIE = _IECreate2($xWidth, $xHeight, $hGUI) ;Apres cette ligne, vous pouvez utilisez les fonctions _IE comme vous l'auriez fait normalement. func _IECreate2($xWidth, $xHeight, $hGUI) $pid = Run(@ProgramFilesDir&"\internet explorer\iexplore.exe -k "&$sURL, "", @SW_HIDE) Sleep(2000) $hHandle = _ProcessGetHWnd($pid) GUISetState(@SW_SHOW, $hGUI) _WinAPI_SetParent($hHandle, $hGUI) _WinAPI_MoveWindow($hHandle, 0, 0, $xWidth, $xHeight, True) _WinAPI_SetWindowLong($hHandle, $GWL_STYLE, $WS_POPUP+$WS_VISIBLE) Send("{F5}") EndFunc Func _ProcessGetHWnd($iPid, $iOption = 1, $sTitle = "", $iTimeout = 2000) Local $aReturn[1][1] = [[0]], $aWin, $hTimer = TimerInit() While 1 $aWin = WinList($sTitle) For $i = 1 To $aWin[0][0] If $iPid = WinGetProcess($aWin[$i][1]) Then If $iOption = 1 OR ($iOption = 0 And $aWin[$i][0] <> "") Then Return $aWin[$i][1] ElseIf $iOption = 2 Then ReDim $aReturn[UBound($aReturn) + 1][2] $aReturn[0][0] += 1 $aReturn[$aReturn[0][0]][0] = $aWin[$i][0] $aReturn[$aReturn[0][0]][1] = $aWin[$i][1] EndIf EndIf Next If $iOption = 2 And $aReturn[0][0] > 0 Then Return $aReturn If TimerDiff($hTimer) > $iTimeout Then ExitLoop Sleep(Opt("WinWaitDelay")) WEnd SetError(1) Return 0 EndFunc ;==>_ProcessGetHWnd Do Sleep(200) Until GUIGetMsg() = -3 ProcessClose($pid)