Moving the cursor in Java

Robot class can do the trick for you. Here is a sample code for moving the mouse cursor: try { // These coordinates are screen coordinates int xCoord = 500; int yCoord = 500; // Move the cursor Robot robot = new Robot(); robot.mouseMove(xCoord, yCoord); } catch (AWTException e) { }

Change the mouse pointer using JavaScript

JavaScript is pretty good at manipulating CSS: document.body.style.cursor = *cursor-url*; //OR var elementToChange = document.getElementsByTagName(“body”)[0]; elementToChange.style.cursor = “url(‘cursor url with protocol’), auto”; or with jQuery: $(“html”).css(“cursor: url(‘cursor url with protocol’), auto”); Firefox will not work unless you specify a default cursor after the imaged one! other cursor keywords Also remember that IE6 only supports .cur … Read more

Increase cursor size in HTML body

there is no property regarding size of cursor but still you can use custom cursors, the trick behind this is to hide real cursor while show custom image. You can find more about this here Create Custom cursors edit: above link is dead, it’s still found on wayback machine: https://web.archive.org/web/20170605131602/http://www.ajaxblender.com/howto-create-custom-image-cursors.html

How to move the cursor or simulate clicks for other applications?

You’ve inspired me to refactor some of my automation code: NativeMethods.cs – got most of this from online: using System; using System.Runtime.InteropServices; public class NativeMethods { [DllImport( “user32.dll”, SetLastError = true )] internal static extern Int32 SendInput( Int32 cInputs, ref INPUT pInputs, Int32 cbSize ); [StructLayout( LayoutKind.Explicit, Pack = 1, Size = 28 )] internal … Read more