Jump to content

can you add cursors?


 Share

Recommended Posts

i doubt this is possible but could i add cursors to this function? if you can how?

makeing it so the function identifies more than just 16 id's

Returns a cursor ID Number of the current Mouse Cursor.

MouseGetCursor ( )

Parameters

None.

Return Value

Returns a cursor ID Number:

0 = UNKNOWN (this includes pointing and grabbing hand icons)

1 = APPSTARTING

2 = ARROW

3 = CROSS

4 = HELP

5 = IBEAM

6 = ICON

7 = NO

8 = SIZE

9 = SIZEALL

10 = SIZENESW

11 = SIZENS

12 = SIZENWSE

13 = SIZEWE

14 = UPARROW

15 = WAIT

sleep(2000);allow time to move mouse before reporting ID

;create an array that tells us the meaning of an ID Number
$IDs = StringSplit("AppStarting|Arrow|Cross|Help|IBeam|Icon|No|_
Size|SizeAll|SizeNESW|SizeNS|SizeNWSE|SizeWE|UpArrow|Wait", "|")
$IDs[0] = "Unknown"

$cursor = MouseGetCursor()
MsgBox(4096, "ID = " & $cursor, "Which means " & $IDs[$cursor])

would i just add the cursor name in to this part of the script?

$IDs = StringSplit("AppStarting|Arrow|Cross|Help|IBeam|Icon|No|_
Size|SizeAll|SizeNESW|SizeNS|SizeNWSE|SizeWE|UpArrow|Wait", "|")
Edited by (^_^)

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Link to comment
Share on other sites

not sure exactly what your asking

Global Const $OCR_APPSTARTING = 32650
Global Const $OCR_NORMAL = 32512
Global Const $OCR_CROSS = 32515
Global Const $OCR_HAND = 32649
Global Const $OCR_IBEAM = 32513
Global Const $OCR_NO = 32648
Global Const $OCR_SIZEALL = 32646
Global Const $OCR_SIZENESW = 32643
Global Const $OCR_SIZENS = 32645
Global Const $OCR_SIZENWSE = 32642
Global Const $OCR_SIZEWE = 32644
Global Const $OCR_UP = 32516
Global Const $OCR_WAIT = 32514

;~ _SetCursor(@WindowsDir & "\cursors\3dgarro.cur", $OCR_NORMAL)
;~ _SetCursor(@WindowsDir & "\cursors\3dwarro.cur", $OCR_NORMAL)
_SetCursor(@WindowsDir & "\cursors\banana.ani", $OCR_NORMAL)

;==================================================================
; $s_file - file to load cursor from
; $i_cursor - system cursor to change
;==================================================================
Func _SetCursor($s_file, $i_cursor)
   Local $newhcurs, $lResult
   $newhcurs = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $s_file)
   If Not @error Then
      $lResult = DllCall("user32.dll", "int", "SetSystemCursor", "int", $newhcurs[0], "int", $i_cursor)
      If Not @error Then
         $lResult = DllCall("user32.dll", "int", "DestroyCursor", "int", $newhcurs[0])
      Else
         MsgBox(0, "Error", "Failed SetSystemCursor")
      EndIf
   Else
      MsgBox(0, "Error", "Failed LoadCursorFromFile")
   EndIf
EndFunc  ;==>_SetCursor

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

what im asking is ... cursor id=0 thats unknown if i have the cursor file could i make it so auto it reconizes that cursor? ill attach the cursor file ... wait i cant error

Upload failed. You are not permitted to upload a file with that file extension.

how would i add id's for new cursors like game cursors when i just change the code from this

$IDs = StringSplit("AppStarting|Arrow|Cross|Help|IBeam|Icon|No|_
Size|SizeAll|SizeNESW|SizeNS|SizeNWSE|SizeWE|UpArrow|Wait", "|")

to this

$IDs = StringSplit("AppStarting|Arrow|Cross|Help|IBeam|Icon|No|_
Size|SizeAll|SizeNESW|SizeNS|SizeNWSE|SizeWE|UpArrow|Wait|Hand|button|normal|something!", "|")

it still doesnt id the cursor still gives unknown is there a way to make the cursor known to this func?

nother ex

0 = UNKNOWN (this includes pointing and grabbing hand icons)

is there a way to make it reconize the pointing and grabbing hand icons?

[center][font="Arial Black"] DESEAN[/font][/center] [center]<<<WOW Fi$her>>>[/center][center]<<<mp3 player>>>[/center]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...