#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#include <IE.au3>
#include <FF.au3>
#include <string.au3>
#include <ProgressConstants.au3>
Dim $s_html
_IEErrorHandlerRegister ()
$ie = _IECreateEmbedded ()
$Form1_1 = GUICreate("Form1", 801, 584, 196, 122, BitOR($WS_OVERLAPPEDWINDOW, $WS_CLIPSIBLINGS, $WS_CLIPCHILDREN))
$label1 = GUICtrlCreateLabel("Adresse :", 0, 0, 71, 24)
GUICtrlSetFont(-1, 12, 400, 0, "MS Sans Serif")
$Input1 = GUICtrlCreateInput("", 72, 0, 681, 21)
$MyButton1 = GUICtrlCreateButton("<----", 0, 24, 100, 30, $BS_FLAT)
$MyButton2 = GUICtrlCreateButton("---->", 104, 24, 100, 30, $BS_FLAT)
$MyButton3 = GUICtrlCreateButton("Actualiser", 208, 24, 108, 30, $BS_FLAT)
$gobuton = GUICtrlCreateButton("Go", 752, 0, 52, 22, $BS_FLAT)
$ProgressBar = GUICtrlCreateProgress(320, 32, 129, 17)
GUISetState(@SW_SHOW)
GuiSetState()
$inter = GUICtrlCreateObj($ie,0, 56, 799, 530)
$SinkObject=ObjEvent($ie,"IEEvent_","DWebBrowserEvents")
GUICtrlSetResizing($inter, $GUI_DOCKAUTO + $GUI_DOCKBOTTOM + $GUI_DOCKTOP)
GUICtrlSetResizing($MyButton1,$GUI_DOCKALL)
GUICtrlSetResizing($MyButton2,$GUI_DOCKALL)
GUICtrlSetResizing($MyButton3,$GUI_DOCKALL)
GUICtrlSetResizing($ProgressBar,$GUI_DOCKALL)
GUICtrlSetResizing($Input1, $GUI_DOCKRIGHT + $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKHEIGHT)
Sleep(1000)
_IENavigate ($ie, "
http://www.google.ca")
Func IEEvent_ProgressChange($Progress,$ProgressMax)
If $ProgressMax >=0 Then
GUICtrlSetData($ProgressBar, ($Progress * 100) / $ProgressMax )
EndIf
EndFunc
Func IEEvent_NavigateComplete($URL)
; Note: the declaration is different from the one on MSDN.
GUICtrlSetData ( $Input1, $URL)
EndFunc
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $gobuton,$Input1
_IENavigate ($ie, GUICtrlRead($Input1))
Case $MyButton1
_IEAction ($IE, "back")
Case $MyButton2
_IEAction ($IE, "forward")
Case $MyButton3
_IEAction($ie, "refresh")
EndSwitch
WEnd