shano 发表于 2010-8-25 20:11:49

IE隐藏的问题

想写一个隐藏IE窗口 自动点击网页内连接的程序问题如下
隐藏窗口后不知该如何操作了,用了KN007的_GetProcessHandle 也无法获取到句柄,显示为0



#include <IE.au3>
#include <Array.au3>
          
#include-once
#AutoIt3Wrapper_run_debug_mode=Y

run(@ProgramFilesDir & "\Internet Explorer\IEXPLORE.EXE http://www.9ku.com/play/366609.htm","",@SW_HIDE);此连接内有背景音乐 想用来判断点击成功与否

Sleep(29000)


                Func _GetProcessHandle($aName)
;~ 无论您是使用或者转载,请保留原作者(kn007)信息,谢谢!
        Local $aWList = WinList()
        Dim $aRet =
        If $aName="" Then
                SetError(1,0,$aRet)
        Else
                Local $aList=Processlist($aName)
        EndIf
        If $aList = 0 Then Return SetError(1,1,$aRet)
        For $i=1 To $aList
                Dim $aPid = $aList[$i]
                For $iCC = 0 To $aWList
                        If WinGetProcess($aWList[$iCC]) = $aPid AND _
                                        BitAND(WinGetState($aWList[$iCC]), 2) Then
                                ReDim $aRet
                                $aRet += 1
                                $aRet = "Handle"
                                $aRet[$aRet] = $aPid
                                $aRet[$aRet] = $aWList[$iCC]
                        EndIf
                Next
        Next
        Return SetError(0,0,$aRet)
EndFunc   ;==>_GetProcessHandle


                           $test = _GetProcessHandle("IEXPLORE.EXE");获取IE进程的句柄
                                   _ArrayDisplay($test)

qq1244521 发表于 2010-9-14 01:51:14

{:face (427):}要暗弹IE

morphling12345 发表于 2010-9-14 06:55:31

可以用IE.au3中的$oIE = _IEAttach("http://www.baidu.com", "URL")
具体可以看看帮助,然后可以直接调用$oIE来点击啥的
页: [1]
查看完整版本: IE隐藏的问题