Emerogork Posted August 21, 2023 Share Posted August 21, 2023 When I hit <ctrl> the circle shows to help find the mouse pointer. Is there code that will cause that ring to show every time I move the mouse? Link to comment Share on other sites More sharing options...
Andreik Posted August 21, 2023 Share Posted August 21, 2023 What circle? What ring? If you want to get help at least describe your issue in a proper way. When the words fail... music speaks. Link to comment Share on other sites More sharing options...
Emerogork Posted August 21, 2023 Author Share Posted August 21, 2023 Oop, Neglected to say Windows 10. To see where the mouse pointer is located, press <ctrl> and upon release, a ring appears around the mouse pointer and shrinks away. I would like to have it appear when ever the mouse is moved and disappear when the mouse stops. Link to comment Share on other sites More sharing options...
Nine Posted August 21, 2023 Share Posted August 21, 2023 Still clear as mud. What app is doing it ? Record it and post it here. Andreik 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
pixelsearch Posted August 21, 2023 Share Posted August 21, 2023 (edited) I think OP is talking about Windows visibility configuration (found on all Windows OS's I guess) where you can display a circle around the mouse cursor (by hitting Ctrl) or leave a vanishing trace of several mouse cursors while the cursor is moving etc... I just checked these possibilities to test them : Edited August 21, 2023 by pixelsearch Link to comment Share on other sites More sharing options...
ioa747 Posted August 22, 2023 Share Posted August 22, 2023 (edited) Something like that? #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, $WS_EX_TRANSPARENT) GUISetBkColor(0xFFEA00) ; * <-- set the color WinSetTrans($hGui, '', 100) ; * <-- transparency 255 = Solid, 0 = Invisible. GUISetState(@SW_SHOW, $hGui) Local $aPos = WinGetPos($hGui) Local $iWidth = $aPos[2] Local $iHeight = $aPos[3] $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $iWidth, $iHeight, $iWidth, $iHeight) _WinAPI_SetWindowRgn($hGui, $hRgn) ; Loop until the user exits. While 1 $aMpos = MouseGetPos() WinMove($hGui, "", $aMpos[0] - 50, $aMpos[1] - 50) Switch GUIGetMsg() Case $GUI_EVENT_CLOSE ExitLoop EndSwitch Sleep(10) WEnd Edited August 22, 2023 by ioa747 Correction argumentum and Musashi 2 I know that I know nothing Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 This is a good start. However, it needs to activate when the mouse is moved and disappear when the mouse stops.. Is AutoIt capable of generating a TSR program? Link to comment Share on other sites More sharing options...
argumentum Posted August 22, 2023 Share Posted August 22, 2023 (edited) 1 hour ago, Emerogork said: Is AutoIt capable of generating a TSR program? yes PS: ok, here's some code: expandcollapse popup#include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> #include <Misc.au3> Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, BitOR($WS_EX_TOOLWINDOW,$WS_EX_TRANSPARENT)) ; close this GUI by the tray icon GUISetBkColor(0xFFEA00) ; * <-- set the color WinSetTrans($hGui, '', 100) ; * <-- transparency 255 = Solid, 0 = Invisible. GUISetState(@SW_SHOW, $hGui) ; https://www.autoitscript.com/forum/topic/210715-special-effect-for-the-mouse-cursor/?do=findComment&comment=1523181 WinSetOnTop($hGui, "", 1) Local $aPos = WinGetPos($hGui) Local $iWidth = $aPos[2] Local $iHeight = $aPos[3] Global $aMposWas[5], $hTimer = 0, $bItIsPressed = False $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $iWidth, $iHeight, $iWidth, $iHeight) _WinAPI_SetWindowRgn($hGui, $hRgn) ; Loop until the user exits. While 1 $aMpos = MouseGetPos() If $aMposWas[0] <> $aMpos[0] Or $aMposWas[1] <> $aMpos[1] Then If Not $hTimer Then WinSetState($hGui, "", @SW_SHOW) $hTimer = TimerInit() $aMposWas = $aMpos WinMove($hGui, "", $aMpos[0] - 50, $aMpos[1] - 50) EndIf If $hTimer And TimerDiff($hTimer) > 500 Then $hTimer = 0 WinSetState($hGui, "", @SW_HIDE) EndIf ; on click, do something. This changes the color. If Not $bItIsPressed And _IsPressed("01") Then GUISetBkColor(0xFF33AA) AdlibRegister(SetColorBackToNormal, 250) $bItIsPressed = True $hTimer = TimerInit() EndIf If $bItIsPressed And Not _IsPressed("01") Then $bItIsPressed = False EndIf Switch GUIGetMsg() Case $GUI_EVENT_CLOSE GUIDelete() ExitLoop EndSwitch WEnd Func SetColorBackToNormal() $hTimer = TimerInit() ; ..to extend the time it shows the circle. AdlibUnRegister(SetColorBackToNormal) GUISetBkColor(0xFFEA00) ; * <-- set the color EndFunc ...but you could have done this changes yourself 😕 Edit2: hid the taskbar icon. ( Also, I like Nine's dimming effect. Looks nice. ) Edit3: added to change the color of the circle on click. Edited August 22, 2023 by argumentum better code Musashi 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Solution Nine Posted August 22, 2023 Solution Share Posted August 22, 2023 (edited) To pursue on a nice script from @ioa747, try this : #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <WinAPIGdi.au3> Opt("MustDeclareVars", True) HotKeySet("^!{ESC}", _Exit) ; ctrl-alt Esc Local $hGui = GUICreate("", 100, 100, 0, 0, $WS_POPUp, $WS_EX_TRANSPARENT + $WS_EX_TOPMOST) GUISetBkColor(0xFFEA00) ; * <-- set the color GUISetState() Local $aPos = WinGetPos($hGui) Local $hRgn = _WinAPI_CreateRoundRectRgn(0, 0, $aPos[2], $aPos[3], $aPos[2], $aPos[3]) _WinAPI_SetWindowRgn($hGui, $hRgn) Local $iX = $aPos[0], $iY = $aPos[1], $iCount = 0 While Sleep(20) $aPos = MouseGetPos() If $iX <> $aPos[0] Or $iY <> $aPos[1] Then WinMove($hGui, "", $aPos[0] - 50, $aPos[1] - 50) WinSetTrans($hGui, '', 100) $iX = $aPos[0] $iY = $aPos[1] $iCount = 0 Else If $iCount = 10 Then ContinueLoop $iCount += 0.5 ; set speep of vanishing here WinSetTrans($hGui, '', 100 - ($iCount * 10)) EndIf WEnd Func _Exit() Exit EndFunc ;==>_Exit Edited August 22, 2023 by Nine pixelsearch, argumentum and Musashi 3 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 It is very close and it does work the way I want. No, I could not have done this myself. I have no experience with this type of coding.. 50 years of other kinds of coding, yes, but not this. Now that I have a working program, I can explore to develop this further and branch off to design other projects. Thank you. argumentum 1 Link to comment Share on other sites More sharing options...
argumentum Posted August 22, 2023 Share Posted August 22, 2023 ..I'm guessing that you're gonna use it for a video tutorial or make a show of sorts. If you need more help, just say exactly what you envision and we all are going to help Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 It is very close and it does work the way I want. No, I could not have done this myself. I have no experience with this type of coding.. 50 years of other kinds of coding, yes, but not this. Now that I have a working program, I can explore to develop this further and branch off to design other projects. Although I have use for it myself, I have an instructor or two that have on-line courses. Most of the time, the student has no idea where he recently clicked to go the demonstration. He is not one to remember to use the <ctrl> button to show the rings. I suspect that he is going to ask me if I can get the concentric rings the way that Windows has it. Thank you. argumentum 1 Link to comment Share on other sites More sharing options...
ioa747 Posted August 22, 2023 Share Posted August 22, 2023 @Nine very good. I like the fade effect I know that I know nothing Link to comment Share on other sites More sharing options...
argumentum Posted August 22, 2023 Share Posted August 22, 2023 15 minutes ago, Emerogork said: Most of the time, the student has no idea where he recently clicked to go the demonstration. added a color change for when the left click is clicked. To have a reference that it was clicked. 16 minutes ago, Emerogork said: I suspect that he is going to ask me if I can get the concentric rings the way that Windows has it. if one of the above members code it. All this is above my pay grade Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 (edited) How do I increase the opacity? Maybe all the way to solid... Edited August 22, 2023 by Emerogork Link to comment Share on other sites More sharing options...
argumentum Posted August 22, 2023 Share Posted August 22, 2023 try WinSetTrans($hGui, '', 200) 255 would be solid Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 I do not see a difference. Is it a matter of location in the code? Tell me where I should put it.... Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 Oop, I found it.... argumentum 1 Link to comment Share on other sites More sharing options...
argumentum Posted August 22, 2023 Share Posted August 22, 2023 (edited) cool PS: midnight here fore me. 💤 Edited August 22, 2023 by argumentum g'night :-) Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Emerogork Posted August 22, 2023 Author Share Posted August 22, 2023 (edited) Same here. Coding usually keeps me up until 5am or so. Benefit of being retired... Edited August 22, 2023 by Emerogork 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