[Ahk] use the title name to activate IE to specify the tab and ahktab
Function: Activate the specified IE tab/* Test method: Open IE and access http://www.baidu.com/http://cn.bing.com/hundred degrees. If the activation is disabled, the activation status must be used. */; Author: sunwind; Time: January 18, 2015 01:03:16; problem feedback: qq 157157; test environment: IE8; Operating System: WIN7 64; AHK version: autoHotkey Unicode 32-bit 1.1.16.4iWeb _ Activate ("Baidu, you will know") sleep, 1000 iWeb_Activate ("Microsoft Bing search-global search, Bing )") returniWeb_Activate (sTitle) {; thanks Sean; http://www.autohotkey.com/forum/viewtopic.php? P = 231093 #231093 DllCall ("LoadLibrary", "str", "oleacc. dll") DetectHiddenWindows, On ;~ WinActivate, % "ahk_id" HWND ;~ WinWaitActive, % "ahk_id" HWND, 5 ControlGet, hTabBand, hWnd, TabBandClass1, ahk_class IEFrameControlGet, hTabUI, hWnd, DirectUIHWND1, ahk_id % hTabBand % If hTabUI & DllCall ("oleacc \ AccessibleObjectFromWindow", "Uint", hTabUI, "Uint",-4, "Uint", GUID (IID_IAccessible, "{618736E0-3C3D-11CF-810C-00AA00389B71}"), "UintP", pacc) = 0 {Loop, % pacc. accChildCount If paccChild: = pacc. accChild [A_Index] If pa CcChild. accRole [0] = 0x3C {pacalb: = paccChild Break} If pacc: = pacctl {Loop, % pacc. accChildCount If paccChild: = pacc. accChild [A_Index] If paccChild. accName [0] = sTitle {paccChild. accDoDefaultAction [0] Break} WinActivate, % sTitle} GUID (ByRef GUID, sGUID); Converts a string to a binary GUID and returns its address. {VarSetCapacity (GUID, 16, 0) return DllCall ("ole32 \ CLSIDFromString", "wstr ", SGUID, "ptr", & GUID)> = 0? & GUID :""}