supraspecies Posted April 11, 2013 Share Posted April 11, 2013 (edited) Hello. I would like to show mouse "busy" cursor (pointer with sand clock on XP/pointer with a circle on Vista/7) until a window shows up. And I am not using a custom GUI. All I want is to let the user know that my script is doing its work. I don't want to use "Please Wait" splash screens or tray notifications. A "busy" cursor will do. I know I can change it for GUI window, but I want to do it system-wide. Any way? Thanks in advance. Edited April 11, 2013 by supraspecies Link to comment Share on other sites More sharing options...
water Posted April 11, 2013 Share Posted April 11, 2013 Please have a look at function GUISetCursor. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
supraspecies Posted April 11, 2013 Author Share Posted April 11, 2013 I did... Not sure how do I go around that without having GUI. Link to comment Share on other sites More sharing options...
James Posted April 11, 2013 Share Posted April 11, 2013 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\aero_arrow.cur", $OCR_NORMAL) ; Uncomment to reset _SetCursor(@WindowsDir & "\cursors\aero_busy.ani", $OCR_NORMAL) Func _SetCursor($sCursorFile, $iCursor) Local $hCursor, $bResult $hCursor = DllCall("user32.dll", "int", "LoadCursorFromFile", "str", $sCursorFile) If Not @error Then $bResult = DllCall("user32.dll", "int", "SetSystemCursor", "int", $hCursor[0], "int", $iCursor) If Not @error Then $bResult = DllCall("user32.dll", "int", "DestroyCursor", "int", $hCursor[0]) Else SetError(1, 0, 0) EndIf Else SetError(1, 1, 0) EndIf EndFunc ;==>_SetCursor Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
NotM Posted July 27, 2017 Share Posted July 27, 2017 The function works well except that the "busy" cursor does not spin. How do I make it spin and not be a static circle? If change the cursor to the hour glass then it should turn upside down and back etc. But it does not. Bottom line is how do you animate the cursor once you change it? Thanks for the help, Ralph Link to comment Share on other sites More sharing options...
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