Loading ...
Sorry, an error occurred while loading the content.

Re: [perlguitest] Can we focus to a control without caption???

Expand Messages
  • Lee Marlin
    Sriram - I had a similar problem with an application based on Javascript. I tried SPY++ and was able to get window handles and some class information. From
    Message 1 of 4 , Mar 1, 2005
    • 0 Attachment
      Sriram - I had a similar problem with an application based on Javascript.

      I tried SPY++ and was able to get window handles and some class information.

      From that I used the spy.pl application that comes as part of Win32-GuiTest-1.50.3-ad in the \eg folder. This enabled me to get the children and their depth from the Desktop.

      I tediously experimented until I found that control I needed to send keys to (
      SetForegroundWindow($child)
      SetFocus($child)
      Sendkey ($message)


      So the refined process now is:


      Determine which controls were the children of the parent window, I then used

      FindWindowLike(based from the parent)

      then searched the children and find the control at the right depth with the right class,
      set the focus to that control, and finally Sendkeys to it.

      Perhaps something like this will help you along.

      I still have a challenge with my application - namely,

      I need to perform a mouse click on a Tab that is above the controls on my window. By clicking on the Tab, the search is cleared/reset. I have a clumsy workaround but wonder if there is a better eway.

      the control's description is:

      http://www.stuff.com/Tab.aspx?Text=Table%20%23%20Search&Selected=1&FontSize=8.0


      Is there a natural way in win32-guitest-1.50.3-ad to find this control and send a left mouse click?


      Lee Marlin
      lmarlin@...

      Sriram Parthasarathy <sriramparthasarathy2000@...> wrote:

      Hi,
      I have an "Windows application" where there are 4
      editboxes without captions. To turn the focus to any
      one of the edit boxes, I am not able to get the
      control ids or captions using Spy++( Visual Studio
      Tool.

      Could anyone pls. tell me as to how I could turn the
      focus to edit boxes without controlid's, caption's or
      mousemove functionality, so I could use SendKeys( ) to
      give my input.

      Pls. help me overcome from this difficult situation.

      Thanks in advance for your help,
      Sriram.



      __________________________________
      Do you Yahoo!?
      Read only the mail you want - Yahoo! Mail SpamGuard.
      http://promotions.yahoo.com/new_mail




      Yahoo! Groups SponsorADVERTISEMENT


      ---------------------------------
      Yahoo! Groups Links

      To visit your group on the web, go to:
      http://groups.yahoo.com/group/perlguitest/

      To unsubscribe from this group, send an email to:
      perlguitest-unsubscribe@yahoogroups.com

      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


      __________________________________________________
      Do You Yahoo!?
      Tired of spam? Yahoo! Mail has the best spam protection around
      http://mail.yahoo.com

      [Non-text portions of this message have been removed]
    • liu xiaolei
      First: use Win32::GuiTest qw(GetCursorPos); while (1) { ($x, $y) = GetCursorPos(); print rx:$x y:$y ; sleep 1; } then,get pixel x,y:
      Message 2 of 4 , Mar 1, 2005
      • 0 Attachment
        First:

        use Win32::GuiTest qw(GetCursorPos);
        while (1)
        {
        ($x, $y) = GetCursorPos();
        print "\rx:$x y:$y ";
        sleep 1;
        }

        then,get pixel x,y:
        MouseMoveAbsPix(x,y);
        SendMouse("{LEFTCLICK}");
        sleep 1;


        --- Sriram Parthasarathy
        <sriramparthasarathy2000@...> 的正文:

        ---------------------------------

        Hi,
        I have an "Windows application" where there are 4
        editboxes without captions. To turn the focus to any
        one of the edit boxes, I am not able to get the
        control ids or captions using Spy++( Visual Studio
        Tool.

        Could anyone pls. tell me as to how I could turn the
        focus to edit boxes without controlid's, caption's or
        mousemove functionality, so I could use SendKeys( ) to
        give my input.

        Pls. help me overcome from this difficult situation.

        Thanks in advance for your help,
        Sriram.



        __________________________________
        Do you Yahoo!?
        Read only the mail you want - Yahoo! Mail SpamGuard.
        http://promotions.yahoo.com/new_mail




        Yahoo! Groups Sponsor ADVERTISEMENT


        ---------------------------------
        Yahoo! Groups Links

        To visit your group on the web, go to:
        http://groups.yahoo.com/group/perlguitest/

        To unsubscribe from this group, send an email to:
        perlguitest-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo!
        Terms of Service.


        _________________________________________________________
        Do You Yahoo!?
        150万曲MP3疯狂搜,带您闯入音乐殿堂
        http://music.yisou.com/
        美女明星应有尽有,搜遍美图、艳图和酷图
        http://image.yisou.com
        1G就是1000兆,雅虎电邮自助扩容!
        http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/
      • pkaluski
        ... 20Search&Selected=1&FontSize=8.0 ... control and send a left mouse click? ... Lee, Could you please check the link provided? It does not provide any
        Message 3 of 4 , Mar 1, 2005
        • 0 Attachment
          >
          > the control's description is:
          >
          > http://www.stuff.com/Tab.aspx?Text=Table%20%23%
          20Search&Selected=1&FontSize=8.0
          >
          >
          > Is there a natural way in win32-guitest-1.50.3-ad to find this
          control and send a left mouse click?
          >
          >
          > Lee Marlin
          > lmarlin@y...
          >

          Lee,
          Could you please check the link provided? It does not provide any
          control description, nor it sends to a site which have any specific
          control on it.

          -Piotr
        Your message has been successfully submitted and would be delivered to recipients shortly.