Trigger Mouse Over Events
Top  Previous  Next

Related example macros: Demo-JavaScriptMenu

On some web pages menus are used that require the mouse pointer to be hovering over the menu in order to not fold it back. This can be archieved by instructing the WINCLICK command to send so-called mouseover events. You can instruct iMacros to do so via

WINCLICK X=200 Y=263 CONTENT=EVENT:MOUSEOVER

For example, you can use the mouseover event to automate Javascript-based menus. The same technique applies to mouseover and mousemove events in Java or Flash applets.

To record a mouseover event:

1.Select WINCLICK as Clickmode and make sure the box "Record Winclick at original speed" is unchecked.  
2.Move the mouse over the menu(s) item you like to trigger with mouse over.  
3.Press CTRL+M while keeping the mouse over the menu item.  
4.The mouse over event is recorded.  
5.Move the mouse to the next level and repeat .  
6.Once you are at the final menu item, click to record a normal WINCLICK command.  
 
mouseover-winclick-javascript-menu

Example: To automate selecting the "Business hardware solutions" item in the screenshot above, the following macro was recorded:

'Product finder (Level 1)
WINCLICK X=50 Y=135 CONTENT=EVENT:MOUSEOVER   
'Phone (Level 2)
WINCLICK X=58 Y=157 CONTENT=EVENT:MOUSEOVER  
'Phones (Level 3)
WINCLICK X=191 Y=162 CONTENT=EVENT:MOUSEOVER  
'We reached the menu item to click (Level 4)
WINCLICK X=336 Y=209 CONTENT=


Note: Some Javascript menu systems have built-in timeouts, so it is important that the mouseover commands are sent with the right timing, neither too slow nor too fast. For most menus
SET !REPLAYSPEED MEDIUM seems to work very well.



Page URL http://www.iopus.com/imacros/help/trigger_mouseover_events.htm