IMPORTANT NOTICE: As of 21 February, anything posted in this community WILL NOT BE MIGRATED to our new community site. We have pulled all user information and data from this site and are now in an approximately week long process of importing users, roles, and data to our new site. We are leaving this site open and active so you can post and hopefully get a response until the migration is complete. Once complete, the URL that currently takes you to this site will take you to our new site so your bookmarks will work as always. Please read the information on a New Login Process
Using the MouseEvent Function from within the windows API it is possible to send the appropriate signals to manipulate the mouse as required. e.g.
[-] dll "user32.dll" [ ] [ ] mouse_event (long dwFlags ,long dx,long dy,long cButtons,long dwExtraInfo) [ ] [ ] [-] testDblClick() [ ] [ ] 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_LEFTDOWN, 0, 0, 0, 0) [ ] mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) [ ] mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0) [ ] mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0) [ ]
When Called the testDblClick() function will carry out a doubleclick of the Left mouse button on whatever part of the screen the mouse is sitting. Using this in conjuction with MoveMouse or SetPosition should should allow you to manipulate the mouse whichever way you wish.
On occasion the SilkTest method DoubleClick() sometimes does not work. This usually happens when the application opens a dialog on the first click and carries out another function with the second click. The SilkTest doubleclick() method can be too fast.