창 내에서 마우스 클릭에 시각적 효과를 어떻게 추가합니까? 시각적 거품 효과가 발생하거나 스크린 캐스트에서

마우스 클릭을 모니터링하는 작은 유틸리티를 사용하여 시각적 거품 효과가 발생하거나 스크린 캐스트에서 볼 수있는 것과 유사한 시각적 거품 효과가 발생합니다.



답변

기본 Windows 옵션

마우스 속성> 포인터 옵션> 포인터 위치 표시

오토 핫키 와 결합

~LButton::
Send {Ctrl}
return

~LButton UP::
Send {Ctrl}
return

모든 마우스 클릭 (아래쪽 및 위쪽)은 Ctrl잠깐 동안 발생합니다 .

Paolo가 지적한 것처럼 스크립트의 일부로 마우스 설정을 변경할 수도 있습니다.

DllCall("SystemParametersInfo", UInt, 0x101D, UInt, 0, UInt, 1, UInt, 0) ;SPI_SETMOUSESONAR ON

OnExit, ExitSub
ExitSub:
   DllCall("SystemParametersInfo", UInt, 0x101D, UInt, 0, UInt, 0, UInt, 0) ;SPI_SETMOUSESONAR OFF
   ExitApp


답변

이것은 Paolo Fulgoni의 변경 사항을 통합 한 RJFalconer의 답변 변형입니다. CTRL 버튼을 누를 때 항상 마우스를보고 싶지는 않았으며 DllInfo수정으로 설정을 동적으로 켜고 끄기를 원했지만 작동하지 못했습니다 (스크립트가 종료됩니다). 의심 할 여지없이 AHK의 더 정교한 누군가가 내가 뭘 잘못했는지 설명 할 수는 있지만, 나 자신의 버전을 만들었습니다.

마우스 버튼을 누를 때 “컨트롤을 누를 때 마우스 표시”옵션이 ON으로 전환 된 다음 나중에 스위치를 끕니다. 마우스 포인터가 때때로 사라지지만 제한된 테스트에서는 제대로 작동합니다. 누구든지 문제를 해결하는 방법을 알고 있거나 다른 개선 사항이 있으면 자유롭게 뛰어 들어보십시오.

그것은 (과도하게) 문서화되어 있습니다. 물건을 빨리 잊어 버리고 다시 방문해야 할 때 스크립트가 충분한 정보를 제공하여 처음에 사용한 모든 오래된 참조를 찾기 위해 검색 할 필요가없는 정보를 원합니다.

;Visualize mouse clicks by showing radiating concentric circles on mouse click
;Author: traycerb
;Date/Version: 01-31-2018
;
;Source:
;/superuser/106815/how-do-you-add-a-visual-effect-to-a-mouse-click-from-within-windows
;https://autohotkey.com/board/topic/77380-mouse-click-special-effects-for-presentationsdemos/

;Dynamically switch on the Windows accessibility feature to show the mouse when the control key is pressed
;when the script is executed, then switch off afterwards
;Windows settings > Mouse > Pointer Options tab > Visibility group > Show location of pointer when I press CTRL key



;Window's SystemParametersInfo function, retrieves or sets the value of one of the
;system-wide parameters.  AHK DllCall fxn with SystemParameterInfo parameter is used to access
;this Windows API.
;https://msdn.microsoft.com/en-us/library/windows/desktop/ms724947(v=vs.85).aspx
;BOOL WINAPI SystemParametersInfo(
;  _In_    UINT  uiAction,
;  _In_    UINT  uiParam,
;  _Inout_ PVOID pvParam,
;  _In_    UINT  fWinIni
;);

;uiParam [in]
;Type: UINT
;
;A parameter whose usage and format depends on the system parameter being queried or set.
;For more information about system-wide parameters, see the uiAction parameter.
;If not otherwise indicated, you must specify zero for this parameter.

;pvParam [in, out]
;Type: PVOID
;
;A parameter whose usage and format depends on the system parameter being queried or set.
;For more information about system-wide parameters, see the uiAction parameter.
;If not otherwise indicated, you must specify NULL for this parameter.
;For information on the PVOID datatype, see Windows Data Types.

;fWinIni [in]
;Type: UINT
;
;If a system parameter is being set, specifies whether the user profile is to be updated,
;and if so, whether the WM_SETTINGCHANGE message is to be broadcast to all top-level
;windows to notify them of the change.

;This parameter can be zero if you do not want to update the user profile
;or broadcast the WM_SETTINGCHANGE message or it can be set to the following [...]

;Accessibility parameter
;S0x101D PI_SETMOUSESONAR
;Turns the Sonar accessibility feature on or off. This feature briefly
;shows several concentric circles around the mouse pointer when the user
;presses and releases the CTRL key.
;The pvParam parameter specifies TRUE for on and FALSE for off.

;Press the control button each time mouse button is pressed, showing location of mouse pointer.
~LButton::
{
  DllCall("user32\SystemParametersInfo", UInt, 0x101D, UInt, 0, UInt, 1, UInt, 0)
  Send {Ctrl}
  DllCall("user32\SystemParametersInfo", UInt, 0x101D, UInt, 0, UInt, 0, UInt, 0)
  return
}

~RButton::
{
  DllCall("user32\SystemParametersInfo", UInt, 0x101D, UInt, 0, UInt, 1, UInt, 0)
  Send {Ctrl}
  DllCall("user32\SystemParametersInfo", UInt, 0x101D, UInt, 0, UInt, 0, UInt, 0)
  return
}


답변