SPONSORS:






User Tag List

Results 1 to 6 of 6
  1. #1
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FAQ-How to click on HtmlImage successfully...

    The idea is to use a combination of reference point and tab and enter buttons.

    One good idea of setting a reference point is to PressMouse() on a control. This will set the tab on your reference control(if possible a static control). Then tab to your HtmlImage, followed by a ReleaseMouse()
    and an enter. Observe that when you ReleaseMouse() you still performed a Click() operation. This problem is solved(I hope) because your enter key will take effect before your ReleaseMouse() does.

    Try it out, and tell me if it works:P

    Hope that more ppl post their tips and tricks. Start the 'subject' with FAQ, so that you can search the message easily. This forums is getting big

    [This message has been edited by GodKnows (edited 03-07-2001).]

    [This message has been edited by GodKnows (edited 03-07-2001).]

  2. #2
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FAQ-How to click on HtmlImage successfully...

    What Click(2) means? If you do 2 Clicks then your control will act upon the Click. I only want to set the tab to a control, so PressMouse() will just do that. Then ReleaseMouse() followed by TypeKeys() for 'enter'.

  3. #3
    Senior Member
    Join Date
    Aug 1999
    Location
    San Diego, CA USA
    Posts
    219
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FAQ-How to click on HtmlImage successfully...

    The first optional parameter to the Click method is the button number. On a 2-button mouse the button numbered 1 is the one you would use for a left-click and the button numbered 2 is the one you would use for a right-click. Thus, Click (2) means right-click.

    PS: For more details try looking up the Click method in the online help.

    [This message has been edited by pcostigan (edited 03-07-2001).]

  4. #4
    Senior Member
    Join Date
    Jul 2000
    Posts
    186
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FAQ-How to click on HtmlImage successfully...

    "This problem is solved(I hope) because your enter key will take effect before your ReleaseMouse()"


    You could try a Click(2) to avoid the race situation above.
    Tom

  5. #5
    Senior Member
    Join Date
    Jan 2001
    Posts
    750
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FAQ-How to click on HtmlImage successfully...

    I don't see why a right click is a solution to the race problem.

    Show a sample code to show your reasoning.

  6. #6
    Member
    Join Date
    Jan 2001
    Location
    Westborough, mA, USa
    Posts
    91
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: FAQ-How to click on HtmlImage successfully...

    Got a better and a faster way to click on a link.

    An example:

    [+] ImageClick(Window wImageName)
    [ ]
    [ ]
    [ ] Integer iXPos
    [ ] Integer iYPos
    [ ]
    [ ] RECT rRelativeRect
    [ ] RECT rGlobalRect
    [ ]
    [ ] rGlobalRect = wImageName.GetRect(True) // Getting the co-ordinates of the image wrt to Global Co-ordinate system
    [ ] rRelativeRect = wImageName.GetRect() // Getting the co-ordinates of the image wrt to the parent window
    [ ]
    [ ] iXPos = rGlobalRect.xPos-rRelativeRect.xPos+rRelativeRect.xSize/2
    [ ] iYPos = rGlobalRect.yPos-rRelativeRect.yPos-rRelativeRect.ySize/2
    [ ]
    [ ] wImageName.Click(1,iXPos,iYPos)
    [ ]


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

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

vBulletin Optimisation provided by vB Optimise v2.6.0 Beta 4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.0.9 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Questions / Answers Form provided by vBAnswers (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominatevBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:21 PM.

Copyright BetaSoft Inc.