[Ahk] use the title name to activate IE to specify the tab and ahktab

Source: Internet
Author: User

[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 :""}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.