找回密码
 加入
搜索
查看: 1662|回复: 4

[IE类操作] GUICtrlCreateObj 打开的网页如何判断用户点登陆了

[复制链接]
发表于 2011-1-22 18:13:22 | 显示全部楼层 |阅读模式
#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
 楼主| 发表于 2011-1-22 18:17:02 | 显示全部楼层
我想点了后地址一定会变,我怎么判断地址变了,
发表于 2011-1-22 19:49:14 | 显示全部楼层
Dim $o_url = ""



If $o_url <> $oIE.locationURL Then 
        $o_url = $oIE.locationURL
        MsgBox(0,0,"地址变了!")
        
EndIf
 楼主| 发表于 2011-1-22 20:48:57 | 显示全部楼层
我怎么加上没有反应啊
发表于 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
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 14:46 , Processed in 0.084317 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表