Jump to content
Sign in to follow this  
SinkoDemio

_GetCursor() Function

Recommended Posts

SinkoDemio

Ahh Yes. I was seeing a thread with a function.

Func _SetCursor($s_file=Default, $i_cursor=Default)

Local $newhcurs, $lResult

If $s_file=Default Then $s_file=@WindowsDir&"\cursors\arrow_m.cur"

If $i_cursor=Default Then $i_cursor=$OCR_NORMAL

$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

I want to get the original cursor set this cursor and then load the app and then get the orig cursor back. is this possible?

Share this post


Link to post
Share on other sites
SinkoDemio

bump

Share this post


Link to post
Share on other sites
SinkoDemio

how do i use that?

Share this post


Link to post
Share on other sites
SinkoDemio

im a beginer i dont no how i just used that func from a topic

Share this post


Link to post
Share on other sites
MikeP

You might wanna look here

Share this post


Link to post
Share on other sites
SinkoDemio

Wow, Thanks for that. >_>

Dude did you read my first post

i already got that i want to get the cursor they got now, so i can get it, change it, and then change it back

Share this post


Link to post
Share on other sites
MikeP

That thread is probably the answer to your question so I found it back for you.. it's very well written and not that hard to use, but since your post is so "well written", not to mention the raw pasting of the code, it's not easy to get what you want... ._.

Nevermind.. good luck.

Share this post


Link to post
Share on other sites
SinkoDemio

oh sorry i will look again

Share this post


Link to post
Share on other sites
SinkoDemio

can u plz help me i really want this plz! please

Share this post


Link to post
Share on other sites
SmOke_N

I'll only say this once... stop bumping your thread, no matter how much you want something, it isn't fair to others that are also looking for help for their threads to continuously get pushed down by your bumps.

If you need to bump, wait 24 hours, if you bump 3 times, consider it a dead question and try to find the resolution on your own (In other words, don't bump again.).


Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites
d2addict4

once again flipping through old topics and such, and found this, this appears to be a possible good function, has anyone found the answer to this, hmm, i think i can convert that microsoft call to a dllcall, im going to try to make these some functions and submit them in a UDF. i tried looking at the simalarities between the _setcursor, and the getcursorinfo on microsofts website, and they appear to have no comparisen with the dllcall in the sample script above. hmm

Share this post


Link to post
Share on other sites
d2addict4

Hmm, it appears to return ""

i also tried all the other functions on there. it still wont set my cursor back to the windows default, or the dll call before i set this cursor.

Edited by d2addict4

Share this post


Link to post
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
Sign in to follow this  

×