| || |
If anyone has any info/comes across the Mercury.DeviceReplay library and its syntax, please let me & everyone here, know. I have been trying too but not able to find any [img]/images/graemlins/frown.gif[/img]
Search the forum, it's returning 65 results..
Hi, This is what I have. Most of it seems to be accurate.
Device Replay API
Example: Move the mouse to a location on the screen, click on the button and enter some text
Set obj = CreateObject ("Mercury.DeviceReplay")
obj.MouseClick 10, 50, 0 ' Click the left (0) mouse button on screen location 10, 50
obj.SendString "Type some text" ' Type a string simulating use of the keyboard
These functions are supplied by the Mercury.DeviceReplay object::
MouseMove x, y Move the mouse to screen coordinate (x,y)
MouseClick x, y, button Move the mouse to screen coordinate (x,y) and click on the button (0=left; 1=middle; 2=right)
MouseDblClick x, y, button Move the mouse to screen coordinate (x,y) and double-click on the button
DragAndDrop x, y, dropx, dropy, button Drag the mouse from screen coordinate (x,y) to (dropx,dropy) with the button pressed
PressKey key Press a key using the ASCII code of the key. For example, Chr(13), vbCR and vbTab
MouseDown x, y, button Depress the mouse button on screen coordinate (x,y)
MouseUp x, y, button Release the mouse button on screen coordinate (x,y)
KeyDown key Depress the key
KeyUp key Release the key
SendString string Type a string
Note: all coodinates are relative to the top left corder of the screen
Thank you, MJP. I did see it on the other post. I am trying to use PressKey or MouseDblClick, but both are not working.
Hi, I use SendString in place of PressKey. If MouseDblClick is failing, try setting the focus and pressing the enter key. Use a single MouseClick followed by a SendString VbCr.
Thanks! Will try that too.
Just to brief you about the problem: I am trying to double click a cell inside a SAPGuiTable. It dosent work, as I can get only the co-ords of the table and not the cell.