SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 2 of 2
  1. #1
    Member
    Join Date
    Oct 2003
    Location
    CA
    Posts
    94
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    using mouse_event()

    Hi All,
    In my web page if I double click a button, an error message pops up. I need to test this. ST's DoubleClick() is not working, it is not different to Click() method, I am just navigated to the next page without getting the desired error message.
    So I used mouse_event like below:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    [-] dll &quot;user32.dll&quot;
    [ ] mouse_event (long dwFlags ,long dx,long dy,long cButtons,long dwExtraInfo)
    [-] testDblClick(long x,long y)
    [ ]
    [ ] const MOUSEEVENTF_ABSOLUTE = 32768
    [ ] const MOUSEEVENTF_LEFTDOWN = 2
    [ ] const MOUSEEVENTF_LEFTUP = 4
    [ ] // const MOUSEEVENTF_MIDDLEDOWN = 14
    [ ] // const MOUSEEVENTF_MIDDLEUP = 64
    [ ] const MOUSEEVENTF_MOVE = 1
    [ ] const MOUSEEVENTF_RIGHTDOWN = 8
    [ ] const MOUSEEVENTF_RIGHTUP = 16
    [ ] mouse_event(MOUSEEVENTF_MOVE ,x,y,0,0)
    [ ] mouse_event(MOUSEEVENTF_LEFTDOWN, x,y, 0, 0)
    [ ] mouse_event(MOUSEEVENTF_LEFTUP, x,y, 0, 0)
    [ ] mouse_event(MOUSEEVENTF_LEFTDOWN, x,y, 0, 0)
    [ ] mouse_event(MOUSEEVENTF_LEFTUP, x,y, 0, 0)
    [-] main()
    [ ] VMRingtones.pbBuyNow.SetFocus()
    [ ] RECT lsRect = VMRingtones.pbBuyNow.GetRect(TRUE)
    [ ] testDblClick(lsRect.xPos+lsRect.xSize/2,lsRect.yPos+lsRect.ySize/2)
    </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">As you can see I am trying to click the center of the button, but the mouse pointer is moving to some another point on the screen. First I tried without MouseMove, it didn't work so I have included mouse_even() to move the mouse first, but it is moving to some other location. Then I tried using it with Absolute value, like below:
    </font><blockquote><font size="1" face="Verdana, Arial, Helvetica">code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">
    [ ] mouse_event(MOUSEEVENTF_ABSOLUTE + MOUSEEVENTF_MOVE ,x,y,0,0)
    </pre><hr /></blockquote><font size="2" face="Verdana, Arial, Helvetica">Now it is going to 0,0 of the screen.
    Any idea where I am going wrong?
    Or any ideas of simulating DoubleClick() in ST?
    Thanks,
    Kiran Malla
    kiran.kiranmalla@yahoo.com

  2. #2
    Senior Member
    Join Date
    Aug 2003
    Location
    NY
    Posts
    708
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: using mouse_event()

    Use SendMessage and the message is WM_LBUTTONDBLCLK with integer value 515.

    It is already declared in mswfun32.inc

    Thanks and Regards,
    Harshil

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 11.54%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin 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:47 PM.

Copyright BetaSoft Inc.