0

Hello making post/sendMessage, inserting user/password than click on application button.and....

After i connected to apllication i have Windows with info,ok until now all fine. My problem is i have one Window with folders (not like before textBoxs,buttons that was very easy to use),and in side of each folder there a file that i need to select and press enter.

I want to do this:

1.Find this form

2.Press WM_KEYUP/WM_KEYDown (i think like this PostMessage(currChild, WM_KEYUP, 0, 0);)

3.To know each folder(name) is selected and press Enter if i need

4.Then go to sub files select one by one and press Enter

Ok i am on step 2 and dont know what to do

My code

if (connected)
 {

 prevChild = 0;

    intWhdr = FindWindow("WindowsForms10.Window.8.app.0.33c0d9d","Finance");//Main Window
    currChild = FindWindowEx(intWhdr, prevChild, "WindowsForms10.SysTreeView32.app.0.33c0d9d", "TreeView");//This my Window with folders
    currChild = FindWindowEx(intWhdr, prevChild,"WindowsForms10.SysTreeView32.app.0.33c0d9d", "");

                                do
                                {
    currChild = FindWindowEx(intWhdr, prevChild, "WindowsForms10.SysTreeView32.app.0.33c0d9d", "TreeView");
            currChild = FindWindowEx(intWhdr, prevChild, null, null);
       if (currChild != 0)//here i trying to find my folders
      {
  byte[] buffer = new byte[256];
  string text = null;
  int rs = SendMessage(currChild, WM_GETTEXT, 256, buffer);

text = System.Text.Encoding.Unicode.GetString(buffer);
text = text.Replace("\0", "");//Trying to read text from folder
prevChild = currChild;
PostMessage(currChild, WM_KEYUP, 0, 0);

                                 }
                                }
         while (currChild != 0);
user3567884
  • 213
  • 1
  • 6
  • 19
  • Is this `asp.net`, `wpf` as well as `winforms` ? – Sriram Sakthivel May 13 '14 at 12:29
  • Are you sure you wouldn't be better served by working at a higher level - e.g. use the [UI Automation](http://msdn.microsoft.com/en-us/library/ms747327(v=vs.110).aspx) system that is designed for assisstive technologies to interact with other applications? Rather than fiddling around at this low level enumerating windows and synthesizing window messages. – Damien_The_Unbeliever May 13 '14 at 12:34

0 Answers0