获取某标签url

#SingleInstance force
;测试方法,IE中打开多个网页Tab,其中一个是百度
#z::
tabName := "百度一下,你就知道"
ie:=getTabObj(tabName)
MsgBox % ie.LocationURL
Return 

getTabObj(TabName="")      ;Retrieve pointer to existing IE window/tab
{
   IfEqual, TabName,, WinGetTitle, TabName, ahk_class IEFrame
      TabName := ( TabName="新建选项卡 - Windows Internet Explorer" ) ? "about:Tabs" ;如果是新建选项卡就返回 about:Tabs
      : RegExReplace( TabName, " - (Windows|Microsoft) Internet Explorer" ) ;去除 - Windows Internet Explorer 或者 - Microsoft Internet Explorer 
   For Pwb in ComObjCreate( "Shell.Application" ).Windows
      if(InStr( Pwb.LocationName , TabName ) && InStr( Pwb.FullName, "iexplore.exe" ))
         Return Pwb
}

给TA捐赠
共{{data.count}}人
人已捐赠
其他

获取文件类型关联默认图标

2020-3-9 5:22:44

其他案例

获取系统版本

2020-3-9 5:24:44

个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索