Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
get name of the currently open tab
#1
I need to get the name of the currently open tab in the Linqpad window (indicated by the pink arrow in the image),
The text obtained after executing the LA code (indicated by the red arrow below),
The text obtained after executing the QM code (indicated by the green arrow below).
Which tag should be added to solve this problem?

Code:
Copy      Help
// script "LA_getTab.cs"
//.
script.setup(trayIcon: true, sleepExit: true);
//..

var w = wnd.find(1, "LINQPad 8 [admin]", "*.Window.*").Activate();
var e = w.Elm["PAGETABLIST", prop: "class=HwndWrapper[DefaultDomain;*"]["PAGETAB", "LINQPad.UI.HybridTab.Internal.SlaveTabItem*", "state=SELECTED, FOCUSABLE, SELECTABLE", navig: "fi"].Find(3);
print.it(e.Name);


Macro QM_getTab
Trigger Aa     Help - how to add the trigger to the macro
Code:
Copy      Help
out 
int w=win("LINQPad 8 [admin]" "*.Window.*")
Acc a.Find(w "PAGETABLIST" "" "class=HwndWrapper[DefaultDomain;;*]" 0x1004 3)
ARRAY(Acc) ac
a.GetChildObjects(ac)
for _i 0 ac.len
,Acc& r=ac[_i]
,out r.Role; out r.State
,if r.Role=37 and r.State=0x300002
,,Acc a2.Find(r.Hwnd "STATICTEXT")
,,mes a2.Name


Attached Files Image(s)
   


Messages In This Thread
get name of the currently open tab - by Davider - 03-22-2024, 03:20 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)