c# - Sending text with SendMessage to another program that has changing control id's and class names that are the same -



c# - Sending text with SendMessage to another program that has changing control id's and class names that are the same -

details: started coding in c# , remaking programme made in autoit3. programme pulls text html , sends programme clicks buttons. didn't create other programme values beingness sent to. can access controls/handles/id using spy++.

problem: problem have ran using sendmessage send text controls in program. problem have same class name. in autoit used "edit4". 4th text box class name "edit" in given window. going utilize getdlgitem , controlid found out controlid changes according spy++. not think possible anymore.

workarounds: thinking of finding first text box findwindowex, using getwindow , gw_hwndnext find next, , on. approach seems poor , inaccurate. thought of getting array of controls in program/window, filtering array class name, using instance of command looking for.

there has improve way approach this. sending tab keys far has been successful, more direct way edit control.

is there anyway can utilize classnamenn "edit4" or advanced mode "[class:edit; instance:4]" or similar in situation?

thanks help in advance, if need more details please ask.

edit: if somehow can loop findwindowex(window, intptr.zero, "edit", null) can homecoming controls class name edit , utilize instance. seems on form within programme using foreach command loop, there not similar api? if isn't best coding method utilize me have been stuck on over week why posting help.

c# winapi control sendmessage classname

Comments

Popular posts from this blog

javascript - mongodb won't find my schema method in nested container -

How do you set up a perforce server to work over the internet? -

ios - Lagging ScrollView with UIWebview inside -