Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Get SyntaxEditor Control Text
#1
Hi,
Using the following code, I can get the text of the SyntaxEditor control, but the ID of the control is dynamically changing 
I have tried other methods, but they have no effect. Is there a more effective method?

Thanks in advance for any suggestions and help
david

int w=wait(6 WV win("LINQPad 7" "*.Window.*"))
Acc a.Find(w "CLIENT" "" "class=WindowsForms10.Window.8.app.0.245fb7_r3_ad1[]id=7276110" 0x1004 6)
str name=a.Name
out name
#2
Its direct parent has wfName.

Macro Macro3168
 
Code:
Copy      Help
int w=win("LINQPad 7" "*.Window.*")
int c=child("" "WindowsForms10.Window.8.app.0.2aeb54d_r3_ad1" w 0x0 "wfName=panEditor")
c=GetWindow(c GW_CHILD)

To discover it I used LibreAutomate. Its "Find window" tool is better. LA code would be

Code:
Copy      Help
var w = wnd.find(1, "LINQPad 7");
var c = w.Child(1, "***wfName panEditor", "*.Window.*");
c = c.Get.FirstChild;
#3
Still not getting control handle

Where can I find wfName ?


[Image: a.gif]

#4
In LA "Find window" tool the control with wfName is one line above the selected control in the tree.
#5
It's a bit strange
In QM and LA, Unable to find wfName when code is not saved(After the tab text, there is a *) Huh
#6
My Linqpad version is 7.6.6. The LA "Find window" tool shows "***wfName panEditor" property of the direct parent control, regardless of saved or not.
#7
same ver7.6.6 
my system: windows7 x64 .Net4.8+.Net6

It seems that the problem is random

[Image: a.gif]
#8
You don't select the parent control in the tree.
#9
Thanks for your help 
After finding it, the following code still has no results 
QM: prompt: handle not found 
LA: output is empty

Macro Macro5
 
Code:
Copy      Help
int w=win("LINQPad 7" "*.Window.*")
int c=child("" "WindowsForms10.Window.8.app.0.2aeb54d_r3_ad1" w 0x0 "wfName=panEditor")
c=GetWindow(c GW_CHILD)

_s.getwintext(c)
out _s
 
Code:
Copy      Help
var w = wnd.find(1, "LINQPad 7");
var c = w.Child(1, "***wfName panEditor", "*.Window.*");
c = c.Get.FirstChild;

print.it(c.ControlText);
#10
LA
print.it(c.NameElm);

QM
Acc a1.FromWindow( c )
_s=a1.Name
#11
If not found in QM, may the class name is different on computers.

int c=child("" "*.Window.*" w 0x0 "wfName=panEditor")
#12
thank you so much!

Macro Macro5
Code:
Copy      Help
int w=win("LINQPad 7" "*.Window.*")

;int c=child("" "WindowsForms10.Window.8.app.0.2aeb54d_r3_ad1" w 0x0 "wfName=panEditor") ;;NO
int c=child("" "*.Window.*" w 0x0 "wfName=panEditor") ;;OK

c=GetWindow(c GW_CHILD)

;_s.getwintext(c); out _s ;;NO
Acc a1.FromWindow(c); out a1.Name ;;OK

When I type the letter n, the AT list shows that the last item is selected, but the Name... is not selected
[Image: aa.png]


Forum Jump:


Users browsing this thread: 1 Guest(s)