按键精灵怎么切换到除ie外的浏览器? 200
我可以获得句柄,但是把句柄转化为浏览器对象就不行,请问怎么弄?代码如下:Dimie,Ret,hdRunApp("C:\ProgramFiles\Google\Chrome...
我可以获得句柄,但是把句柄转化为浏览器对象就不行,请问怎么弄?代码如下:
Dim ie,Ret,hd
RunApp ("C:\Program Files\Google\Chrome\Application\chrome.exe zhidao.baidu.com")
Delay 3000
hd = Plugin.Window.Foreground()
// 窗口最大化
Plugin.Window.Max(hd)
MsgBox hd
Set SHApp = CreateObject("ChromeHTML")
For Each SHWin In SHApp.Windows
MsgBox LCase(SHWin.FullName)
If LCase(Right(SHWin.FullName, 10)) = "chrome.exe" Then
MsgBox "==" &Int(SHWin.hWnd) & "++" & Int(hd)
If Int(SHWin.hWnd) = Int(hd) Then
MsgBox SHWin
Set ie = SHWin
Exit For
End If
End If
Next
Ret = ie.getElementById("userbar-login").Click 展开
Dim ie,Ret,hd
RunApp ("C:\Program Files\Google\Chrome\Application\chrome.exe zhidao.baidu.com")
Delay 3000
hd = Plugin.Window.Foreground()
// 窗口最大化
Plugin.Window.Max(hd)
MsgBox hd
Set SHApp = CreateObject("ChromeHTML")
For Each SHWin In SHApp.Windows
MsgBox LCase(SHWin.FullName)
If LCase(Right(SHWin.FullName, 10)) = "chrome.exe" Then
MsgBox "==" &Int(SHWin.hWnd) & "++" & Int(hd)
If Int(SHWin.hWnd) = Int(hd) Then
MsgBox SHWin
Set ie = SHWin
Exit For
End If
End If
Next
Ret = ie.getElementById("userbar-login").Click 展开
2个回答
展开全部
按键精灵的网页按键精灵只能用它自带的,建议你用句柄查找其他浏览器切换
追问
上面的代码中已经获得谷歌浏览器的句柄了,但是没法获取流浪器对象,怎么根据句柄获得浏览器对象呢?
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询