Forum Discussion

Rodm00011's avatar
Occasional Contributor
2 months ago

Wait for hourglass to turn to a pointer?

Im trying to determine if cursor is spinning (busy)  or has changed back to pointer

the idea is 

get_cursor_shape() // for example pointer

click button

   while(get_cursor_shape == "Busy"){





in get_cursor_shape I am using

   procID = Aliases.myApp.Id;
   var pid = Win32API.GetWindowThreadProcessId(procID.Handle, null);

   var tid = Win32API.GetCurrentThreadId();

   Win32API.AttachThreadInput(pid, tid, true);

   var crsr = Win32API.GetCursor();


but I consistently get a result of crsr = 65543 

how can I check if mouse cursor is pointer or spinning wheel?

1 Reply

  • rraghvani's avatar
    Champion Level 3

    GetCursor will either return a value which is the handle of the current cursor or NULL, if there's no cursor.

    There should be plenty of examples of using Win32 to get the current cursor shape