一个是内嵌,一个是IE默认打开,貌似效果是不一样的,#include <IE.au3>
Opt("SendKeyDelay", 250)
$oIE = _IECreate("http://www.ip138.com/", "url")
$hIE = _IEPropertyGet($oIE, "hwnd")
$ip = _IEGetObjById($oIE, 'ip')
_IEAction($ip, "focus")
ControlSend($hIE, "", '', '123456789', 1)
#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$oIE = _IECreateEmbedded()
$GUI_HANDLE = GUICreate("Embedded Web control Test", @DesktopWidth, 614, 0, 0)
GUICtrlCreateObj($oIE, 0, 0, @DesktopWidth, 614)
GUISetState()
Opt("SendKeyDelay", 250)
_IENavigate($oIE, 'http://www.ip138.com/', 1)
$ip = _IEGetObjById($oIE, 'ip')
_IEAction($ip, "focus")
ControlSend($GUI_HANDLE, "", '', '123456789', 1)
While 1
$msg = GUIGetMsg()
If $msg = $GUI_EVENT_CLOSE Then ExitLoop
WEnd
|