找回密码
 加入
搜索
查看: 2326|回复: 7

[AU3基础] 网维大师自动安装问题,AU3的问题么,句柄前会加0

  [复制链接]
发表于 2012-4-18 04:59:50 | 显示全部楼层 |阅读模式
本帖最后由 heavenm 于 2012-4-18 11:47 编辑

网维下载
http://down.icafe8.com/archive/Icafe_Server7.1.3.0.exe
#include <Process.au3>
#include <Array.au3>
#include <WinAPIEx.au3>
;Opt("WinSearchChildren", 1)
Dim $Title = '顺网网维大师蝌蚪娱乐平台V7.1.3.0 - 安装'
Local $Install, $i,$_PHandle
Dim $TimeOut = 15
;_IcafePatch()
Global $Pid = Run('NBMSClient.exe')
If WinWait($Title, '', $TimeOut) Then
        Sleep(100);必须等待否则会出错
        $PHandle = _WinAPI_EnumProcessWindows($Pid)
        $_PHandle = $PHandle[1][0]
Else
        Exit
EndIf

;If WinWait($PHandle[1][0],'sdasdasd') Then MsgBox(0, '', $PHandle[1][0])
;_ArrayDisplay($PHandle, '_WinAPI_EnumProcessWindows')
;MsgBox(0, '', WinGetText($PHandle[1][0]))
;MsgBox(0, '', WinGetText($PHandle[1][0]))


;ControlCommand($PHandle[1][0], '', 'Button1', "Check", "")

_Check($PHandle[1][0], '欢迎使用 网维大师蝌蚪娱乐平台 安装向导', "Button1")
Sleep(2000)
MsgBox(0, '', $_PHandle)
_Check($PHandle[1][0], '安装类型', "Button7")
Exit


Func _Check($C_Handle, $C_Content, $C_ID)
        Local $strin
;~         $PHandle = _WinAPI_EnumProcessWindows($Pid)
;~         $_PHandle = $PHandle[1][0]
        While 1
                ConsoleWrite($C_Handle & @CR)
                

                If StringInStr(WinGetText(HWnd($C_Handle), ''), $C_Content) Then
                        ;MsgBox(0, '',$string )
                        ExitLoop
                EndIf
                Sleep(1000)
;~                 ;MsgBox(0, $C_Handle, WinGetText(HWnd ($C_Handle)))
                ConsoleWrite(WinGetText(HWnd($C_Handle), ''))
        WEnd
        ControlFocus($C_Handle, $C_Content, $C_ID)
        ControlCommand($C_Handle, $C_Content, $C_ID, "Check", "")
EndFunc   ;==>_Check
 楼主| 发表于 2012-4-18 05:00:45 | 显示全部楼层
第一次可以但是第二次的句柄不知道为什么前面会加一个0
 楼主| 发表于 2012-4-18 05:07:51 | 显示全部楼层

纠结啊
发表于 2012-4-18 06:00:59 | 显示全部楼层
网维下载
heavenm 发表于 2012-4-18 04:59


我不能运行你的代码,没有_WinHandle函数!就没有再仔细看下去了
发表于 2012-4-18 09:24:29 | 显示全部楼层
WinGetHandle 这个都不可以么?
 楼主| 发表于 2012-4-18 11:53:07 | 显示全部楼层
我不能运行你的代码,没有_WinHandle函数!就没有再仔细看下去了
happytc 发表于 2012-4-18 06:00



   这个函数我删除了,换成_Check了
发表于 2012-4-18 15:04:10 | 显示全部楼层
没办法测试,看到老板相同的名头进来顶下
发表于 2012-4-23 10:09:11 | 显示全部楼层
  你们说的什么东西 啊
您需要登录后才可以回帖 登录 | 加入

本版积分规则

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

GMT+8, 2024-9-20 17:54 , Processed in 0.083964 second(s), 23 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

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