| View previous topic :: View next topic |
| Author |
Message |
Sakurako
Joined: 10 May 2007 Posts: 142
|
Posted: Fri Jan 25, 2008 10:26 am Post subject: CursorCheck() |
|
|
| Code: | ^t::MsgBox, 64, Cursor Check, % "Cursor: " CursorCheck() A_Space "(" A_Cursor ")"
CursorCheck()
{
; Credit: shimanov, http://www.autohotkey.com/forum/post-47747.html#47747
VarSetCapacity(ci, 20, 0)
ci := Chr(20)
ErrorLevel := DllCall("GetCursorInfo", "uint", &ci)
ErrorLevel := mod(ErrorLevel + 1, 2)
h_cursor := *(&ci+8)+(*(&ci+9) << 8)+(*(&ci+10) << 16)+(*(&ci+11) << 24)
return h_cursor
} |
_________________
|
|
| Back to top |
|
 |
Andreone
Joined: 20 Jul 2007 Posts: 257 Location: Paris, France
|
Posted: Fri Jan 25, 2008 11:51 am Post subject: |
|
|
| Thank for sharing, but how is it more useful than just using A_Cursor? |
|
| Back to top |
|
 |
Sakurako
Joined: 10 May 2007 Posts: 142
|
Posted: Fri Jan 25, 2008 1:26 pm Post subject: |
|
|
Some program(s), esp. game(s) probably not using standard system cursor, and A_Cursor might be Unknown ~ _________________
|
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4031 Location: Pittsburgh
|
Posted: Fri Jan 25, 2008 6:22 pm Post subject: |
|
|
| In MS Word, Wordpad, MultiEdit, IE7... the msgbox always says the cursor is 65555. What does it mean? Is it the code of IBeam? (XP SP2) |
|
| Back to top |
|
 |
Sakurako
Joined: 10 May 2007 Posts: 142
|
Posted: Fri Jan 25, 2008 9:51 pm Post subject: |
|
|
The function should be used for comparing cursor, but probably difficult to get what cursor would look like. However, if just trying to find the name of displayed standard system cursor, A_Cursor would be recommended instead ~ _________________
|
|
| Back to top |
|
 |
|