kuautoit 发表于 2011-1-22 18:13:22

GUICtrlCreateObj 打开的网页如何判断用户点登陆了

#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("163", 381, 270)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX= GUICtrlCreateObj($oIE,-500,-115,1000,1000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$oIE.navigate("http://mail.163.com/")


While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit
                       

        EndSwitch
WEnd

kuautoit 发表于 2011-1-22 18:17:02

我想点了后地址一定会变,我怎么判断地址变了,

_ddqs. 发表于 2011-1-22 19:49:14


Dim $o_url = ""



If $o_url <> $oIE.locationURL Then
        $o_url = $oIE.locationURL
        MsgBox(0,0,"地址变了!")
       
EndIf

kuautoit 发表于 2011-1-22 20:48:57

我怎么加上没有反应啊

_ddqs. 发表于 2011-1-22 21:03:30

#include <IE.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("163", 381, 270)
$oIE = ObjCreate("Shell.Explorer.2")
$GUIActiveX = GUICtrlCreateObj($oIE, -500, -115, 1000, 1000)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

$oIE.navigate("http://mail.163.com/")


Sleep(2000)

Dim $o_url = $oIE.locationURL

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit


        EndSwitch


        If $o_url <> $oIE.locationURL Then

                $o_url = $oIE.locationURL

                MsgBox(262144, 0, "地址变了!", 3 ,$Form1)



        EndIf




WEnd
页: [1]
查看完整版本: GUICtrlCreateObj 打开的网页如何判断用户点登陆了