-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Addition: Get current cursor type #15
Comments
The Ruby code is not very helpful in understanding the issue, but (as you write yourself), it basically seems to boil down to getting the cursor type – which is not difficult. |
sorry about the ruby... |
I wouldn’t want to add the logic part to cliclick, as the possible behaviors – and therefore command syntaxes – are endless. (For instance: someone might just want to write to STDERR and exit, if the cursor is not as expected, while somebody else might want to wait 10 seconds and check again, while a third person might want to check the cursor is one of 3 allowed types.) |
just getting the active cursor would be very useful, and I can add my own logic in the ruby code... |
As I wrote before, getting the current cursor is not difficult – well, at least theoretically … The problem is, that as soon as I add NSLog(@"Supported: %@", [NSCursor respondsToSelector:@selector(currentSystemCursor)] ? @"Y" : @"N");
NSCursor *cursor = [NSCursor currentSystemCursor]; // <-- Causes SIGABRT The stack suggests that the code tries to get a graphics context (calling
Unfortunately, I don’t have a clue about graphics contexts and how to create one without a window. I am now adding this comment, hoping that someone out there might be able to help out with this … |
does using currentCursor have the same issue? |
No, it hasn’t, but it doesn’t help in identifying the global cursor. |
hi, great utility btw...
I'm using it inside app via an embedded ruby api.
I can get a click position from both ruby and cliclick to work out the offset factor to reliably find the window edge for a window drag resize...
that all works, however I can't work out a edge test to ensure I'm not being masked...
I was wondering if 'The resize-left-and-right cursor (resizeLeftRightCursor)' could be tested for and the dd: x,y target modified until true...
e.g. safe = safe + 10 if not left_right_cursor
drag = %Q[dd:#{@edg},#{safe} du:#{sq},+0]
so I guess it's a 'get cursor' function I'm after. e.g. cliclick gc:#{@edg},#{safe}
not convinced i'm making sense, but thought I'd ask...
john
The text was updated successfully, but these errors were encountered: