Jump to content

Recommended Posts

Posted

Did you even read the helpfile? GuiSetCursor().

For a list of valid cursor IDs see MouseGetCursor.

CursorId = 16 will hide the mouse cursor.

Posted

Did you even read the helpfile? GuiSetCursor().

Yes i did read the help file...

that is only for while the mouse is on-top of the GUI,

i want it to be hidden for the whole screen.

Posted (edited)

This works. To exit, press the WINDOWS key, and click the exit button the tray item.

$H = GUICreate("", @DesktopWidth+20, @DesktopHeight+20)
WinSetTrans($h, "", 1)
GUISetState()
GUISetCursor(16)
While 1
    WEnd

Or, if you wanted to do this, real, that would take some work, you could get the explorer window handle, and use GUISetCursor().

Edited by Alienware
Posted

You could alos use

Function Reference

_WinAPI_ShowCursor

--------------------------------------------------------------------------------

Displays or hides the cursor

#Include <WinAPI.au3>

_WinAPI_ShowCursor($fShow)

Parameters $fShow If True, the curor is shown, otherwise it is hidden

Return Value Success: The new display counter

Remarks

This function sets an internal display counter that determines whether the cursor should be displayed. The

cursor is displayed only if the display count is greater than or equal to 0. If a mouse is installed, the

initial display count is 0. If no mouse is installed, the display count is -1.

See Also

Search ShowCursor in MSDN Library

*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Posted

Hi

I would like to know how . . . to hide, and show the mouse cursor,

Surprisingly, no one has mentioned the _MouseTrap() function that's part of the Misc.au3 UDF. Search the Help file and you'll see _MouseTrap() is all you'll need to hide and show the mouse. Use screen coordinates verses window or client for best results. And for screen position you could use any position outside of your current screen resolution.

_MouseTrap

-------------------

Confine the Mouse Cursor to specified coords.

#Include <Misc.au3>
_MouseTrap([$iLeft = 0[, $iTop = 0[, $iRight = 0[, $iBottom = 0]]]])
Posted

Surprisingly, no one has mentioned the _MouseTrap() function that's part of the Misc.au3 UDF. Search the Help file and you'll see _MouseTrap() is all you'll need to hide and show the mouse. Use screen coordinates verses window or client for best results. And for screen position you could use any position outside of your current screen resolution.

I have used that function before,

but i still want to be able to move the mouse,

so that doesn't help me at all

Posted

I have used that function before,

but i still want to be able to move the mouse,

so that doesn't help me at all

Sorry for the stupid question, but with a "hidden mouse" how would you know its where you want it? If you're wanting to use MouseMove() or MouseMove() to click screen coord and not see the mouse trail, you could use 0 for the speed. Then again you could also use the ControlClick() or ControlCommand().

Maybe a little more insight could help us help you with your end goal.

Posted

Sorry for the stupid question, but with a "hidden mouse" how would you know its where you want it? If you're wanting to use MouseMove() or MouseMove() to click screen coord and not see the mouse trail, you could use 0 for the speed. Then again you could also use the ControlClick() or ControlCommand().

Maybe a little more insight could help us help you with your end goal.

If you have seen my C Pong game in Example Scripts,

i am looking to use it for that,

If i add it I might use a UDF to disable the mouse click until the game is ended.

The main thing is,

i want the mouse movable,

but not seen,

I could make a mouse trap the height of the screen with params -5, 0, 1, @DesktopHeight

That i think will be the best solution :)

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
  • Recently Browsing   0 members

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