【菜鸟学飞】怎样点击360安全卫士提示中的"允许本次操作"单选框???
小弟现写代码如下,但功能不能实现,希望大大为我解困,在下感激不尽.Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
'360安全卫士提示框没有标题,我就用了WindowFromPoint,如果Mouse移到框内就选上单选按钮.
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Const WM_LBUTTONDOWN = &H201
Private Const WM_LBUTTONUP = &H202
Private Type POINTAPI
x As Long
y As Long
End Type
Dim strC As String * 255
Private Sub Form_Load()
With Timer1
.Interval = 200
.Enabled = True
End With
End Sub
Private Sub Timer1_Timer()
Dim tP As POINTAPI
Dim intWinHwnd As Long, intOptHwnd As Long, intBtnHwnd As Long
GetCursorPos tP
intWinHwnd = WindowFromPoint(tP.x, tP.y)'360安全卫士提示框没有标题,我就用了WindowFromPoint,如果Mouse移到框内就选上单选按钮.
Me.Caption = intWinHwnd
GetWindowText intWinHwnd, strC, 255
Debug.Print strC
If InStr(1, strC, "误报反馈") <> 0 Then
Do
intOptHwnd = FindWindowEx(intWinHwnd, 0, "Button", vbNullString)'SPY++查不到单选按钮的文本
Do While intOptHwnd <> 0 '这个循环$%$@#@^$@^#@^#$!!@%#$#
SendMessage intOptHwnd, WM_LBUTTONDOWN, 0, ByVal 0&
SendMessage intOptHwnd, WM_LBUTTONUP, 0, ByVal 0&
intOptHwnd = FindWindowEx(intWinHwnd, intOptHwnd, "Button", vbNullString)
DoEvents
Loop
DoEvents
intBtnHwnd = FindWindowEx(intWinHwnd, 0, "Button", "确定")'确定是可以找到的
Loop While intBtnHwnd = 0 '找到了就退出吧
SendMessage intBtnHwnd, WM_LBUTTONDOWN, 0, ByVal 0&
SendMessage intBtnHwnd, WM_LBUTTONUP, 0, ByVal 0&
End If
End Sub
代码大致这样,希望各位大神帮帮忙.谢谢了................................... --------------------编程问答-------------------- R3下想操作360和难很难,现在360对我们是这样的,它把Windows当作他老婆了,而且是那种后宫老婆,不允许别人看一眼的,所以他把老婆的易做图咋、内衣啊都是“量身定做”的,比如LZ上面想跑到后宫里面非礼他老婆,360自然不同意了。
比如前段时间那个金山XX不是想分他老婆一杯羹,结果被360易做图的易做图了,唉。。。
不过,肯定有人不择手段的弓虽易做图360老婆的。。。
PS:我已经N年没用过360了,LZ可以试试mouse_event把,或许可以。。。 --------------------编程问答-------------------- 不知道用AutoHotKey行不行,估计十有易做图也不行。 --------------------编程问答--------------------
呵呵。 --------------------编程问答-------------------- 你这些常规代码... --------------------编程问答--------------------
LZ可以试试mouse_event把,或许可以。。。
顶
--------------------编程问答-------------------- 过了他的驱动才行吧.
补充:VB , API