本帖最后由 happy61 于 2009-9-3 23:53 编辑
我想做这样的效果。。
用ie.au3创建一个webbrowser.
然后点击里面的链接<a href="event:aaa>点击我</a>
然后执行指定事件。。
如果vb的代码是这样子的
Private Sub webbrowser_BeforeNavigate2(ByVal pDisp As Object, URL As Variant, Flags As Variant, TargetFrameName As Variant, PostData As Variant, Headers As Variant, Cancel As Boolean)
Dim Ev As String
If UCase$(Left$(URL, 6)) = "EVENT:" Then
Ev = UCase$(Mid$(URL, 7))
Select Case Split(Ev, "=")(0)
Case "AUTO"
MsgBox "正在自动安装.." & Split(Ev, "=")(1)
Case "RUN"
MsgBox "正在安装.." & Split(Ev, "=")(1)
Case "CLOSE"
If MsgBox("Are you sure you want to exit?", _
vbYesNo) = vbYes Then
End
End If
End Select
Cancel = True
End If
End Sub
---------------------------------------
autoit怎样实现呢? |