"Ahk" activates IE with title name to specify tab

Source: Internet
Author: User

; function: Activate IE to specify tab/* test method: open IE in order to access http://www.baidu.com/http://cn.bing.com/Baidu is inactive, Bing is in the active state. */;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 a bit, you Know") sleep,1000 iweb_activate ("Microsoft Bing Search-Global search, Ask 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,,5controlget, HTabBand, HWND,, Ta BBandClass1, 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_i Ndex] if paccchild.accrole[0] = 0x3C {pacctab:=paccchild break}} If pacc:=pacctab {Loop,% pacc.acCchildcount if Paccchild:=pacc.accchild[a_index] if paccchild.accname[0] = stitle {paccchild.accdodefaultaction[0]b Reak}} winactivate,% Stitle} GUID (ByRef GUID, sguid); Converts a string to a binary GUID and returns its address. {varsetcapacity (GUID, 0) return Dllcall ("ole32\clsidfromstring", "Wstr", Sguid, "ptr", &guid) >= 0? &am P GUID: ""}

"Ahk" activates IE with title name to specify tab

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.