APPLEEATER Posted September 13, 2008 Posted September 13, 2008 Hi I would like to know how the best way to hide, and show the mouse cursor, if there is any simple ways like _MouseHide and _MouseShow that would be best Thanks
dbzfanatic Posted September 13, 2008 Posted September 13, 2008 Did you even read the helpfile? GuiSetCursor().For a list of valid cursor IDs see MouseGetCursor.CursorId = 16 will hide the mouse cursor. Go to my website. | My Zazzle Page (custom products)Al Bhed Translator | Direct linkScreenRec ProSimple Text Editor (STE) [TUTORIAL]Task Scheduler UDF <--- First ever UDF!_ControlPaste() UDF[quote name='renanzin' post='584064' date='Sep 26 2008, 07:00 AM']whats help ?[/quote]
APPLEEATER Posted September 13, 2008 Author Posted September 13, 2008 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.
TehWhale Posted September 13, 2008 Posted September 13, 2008 (edited) Create a GUI the size of the screen and make it 1 Transparentcy using WinSetTrans. Edited September 13, 2008 by Alienware
APPLEEATER Posted September 13, 2008 Author Posted September 13, 2008 Create a GUI the size of the screen and make it 0 Transparentcy using WinSetTrans.OK Thats for your help
TehWhale Posted September 13, 2008 Posted September 13, 2008 (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 September 13, 2008 by Alienware
ProgAndy Posted September 13, 2008 Posted September 13, 2008 You could alos useFunction 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 counterRemarksThis function sets an internal display counter that determines whether the cursor should be displayed. Thecursor is displayed only if the display count is greater than or equal to 0. If a mouse is installed, theinitial display count is 0. If no mouse is installed, the display count is -1.See AlsoSearch 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
ssubirias3 Posted September 13, 2008 Posted September 13, 2008 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]]]])
APPLEEATER Posted September 13, 2008 Author Posted September 13, 2008 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
ssubirias3 Posted September 13, 2008 Posted September 13, 2008 I have used that function before,but i still want to be able to move the mouse,so that doesn't help me at allSorry 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.
APPLEEATER Posted September 13, 2008 Author Posted September 13, 2008 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, @DesktopHeightThat i think will be the best solution
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now