AHK 之 ComObjCreate("Shell.Application").Windows
2015-03-29 12:55
736 查看
autohotkey 笔记 20150329
几乎盲人摸象般折腾好久,一点总结:
1. Shell object
: https://msdn.microsoft.com/en-us/library/bb774094.aspx
2. ShellWindows object: https://msdn.microsoft.com/en-us/library/bb773974.aspx
For IE in ComObjCreate("Shell.Application").Windows { ; for each open window, can only find explorer.exe and iexplorer.exe on win XP
;cnt := cnt+1
;实际测试结果,ComObjCreate("Shell.Application").Windows有以下属性:
; .FullName
; .Name
; .path
; .locationname
这个最有用,在XP+IE8下,是每个Tab的名字
; .LocationURL
OutputDebug % IE.FullName "---" IE.path "---" IE.name
OutputDebug % IE.locationname " :: " IE.LocationURL "`n"
;obj_addr := &IE
;obj_VarType := ComObjType(IE)
;obj_Name := ComObjType(IE, "Name")
;obj_IID := ComObjType(IE, "IID")
OutputDebug % "[" &IE "]--[" ComObjType(IE) "]---[" ComObjType(IE, "Name") "]---[" ComObjType(IE, "IID") "]"
If InStr(IE.FullName, "iexplore.exe") ; check if it's an ie window
{
;msgbox % IE.document.Name
MsgBox % IE.locationname " cookie:`n" IE.document.cookie
;break ; keep that window's handle
; this assumes an ie window is available. it won't work if not
}
}
几乎盲人摸象般折腾好久,一点总结:
1. Shell object
: https://msdn.microsoft.com/en-us/library/bb774094.aspx
2. ShellWindows object: https://msdn.microsoft.com/en-us/library/bb773974.aspx
For IE in ComObjCreate("Shell.Application").Windows { ; for each open window, can only find explorer.exe and iexplorer.exe on win XP
;cnt := cnt+1
;实际测试结果,ComObjCreate("Shell.Application").Windows有以下属性:
; .FullName
; .Name
; .path
; .locationname
这个最有用,在XP+IE8下,是每个Tab的名字
; .LocationURL
OutputDebug % IE.FullName "---" IE.path "---" IE.name
OutputDebug % IE.locationname " :: " IE.LocationURL "`n"
;obj_addr := &IE
;obj_VarType := ComObjType(IE)
;obj_Name := ComObjType(IE, "Name")
;obj_IID := ComObjType(IE, "IID")
OutputDebug % "[" &IE "]--[" ComObjType(IE) "]---[" ComObjType(IE, "Name") "]---[" ComObjType(IE, "IID") "]"
If InStr(IE.FullName, "iexplore.exe") ; check if it's an ie window
{
;msgbox % IE.document.Name
MsgBox % IE.locationname " cookie:`n" IE.document.cookie
;break ; keep that window's handle
; this assumes an ie window is available. it won't work if not
}
}
相关文章推荐
- Mysql "Cannot create windows service for mysql.error:0" 安装删除windows服务[转]
- Mysql "Cannot create windows service for mysql.error:0" 安装删...
- windows error "the application was unable to start correctly (0x000007b)"
- java.lang.ClassNotFoundException: Didn't find class "com.kge.love.base.BaseApplication" on path: Dex
- 【翻译自mos文章】windows下 11gR2 安装报错:"PRKN-1019 : Failed to create directory"
- 曾经安装过MySQL数据库,已卸载,但仍无法重新安装MySQL,提示错误"Cannot create windows service for mysql.error:0"
- android 构建项目bug之 Didn't find class "com.android.tools.fd.runtime.BootstrapApplication"
- AutomationFactory.CreateObject("Excel.Application")无法为指定的ProgID创建对象实例
- asp.net create windows application and setup service.
- Mysql "Cannot create windows service for mysql.error:0" 安装删除windows服务
- 重装mysql后出现"cannot create windows service for mysql.error:0"错误
- NetBeans 7.1创建项目时为啥没有了“Create Java Desktop Application"选项
- Application "cn.com.chengang.sms.application" could not be found in the register!
- create Context Menu in Windows Forms application using C# z
- AutomationFactory.CreateObject("Excel.Application")) // Exception: 指定的 ProgID 未注册任何对象
- 一个在HTML使用JavaScript实现调用Windows Shell.Application的例子。
- Error with pscp on Windows: "Cannot create file"
- WP_How to: Create Your First Silverlight Application for Windows Phone(1)
- 无法将类型为"Microsoft.Office.Interop.Excel.ApplicationClass"的 COM 对象强制转换
- Loadrunner 11在win7录制中失败“the recording of the application was terminated by windows due to window data execution prevention feature"