Powershell을 이용하여 마우스 좌표 확인하기
시스템 사양 (환경)
CPU - Intel i7-10700F
Memory - 32GB
Mainboard - Msi, MAG B460M MORTAR
GPU - RTX 3060 Ti
여차여차하여 마우스 좌표를 확인해야 할 일이 생겼다.
pyautogui를 이용할 수 있으나, powershell로 확인이 필요해서 구글링 해 보았다.
아래의 글들에서 해당 방법을 짜집기 하였다.
https://learn-powershell.net/2015/11/30/create-a-mouse-cursor-tracker-using-powershell-and-wpf/
Create a Mouse Cursor Tracker using PowerShell and WPF
Sometimes when you have a little bit of free time, you decide to build things just to see if you can do it regardless of how useful it might actually be. I think this might be one of those occasion…
learn-powershell.net
https://www.donovanbrown.com/post/Save-and-restore-your-mouse-position-with-PowerShell
Donovan Brown | Save and restore your mouse position with PowerShell
Problem: I need to store my mouse position so I can return it so the exact spot on my screen to fix an error during a screen recording. Solution: Using PowerShell version 5.x on Windows you can use the following code. First you will need to load the correc
www.donovanbrown.com
먼저 Powershell에 아래의 코드를 입력한다. (관리자였는지 기억이 잘 안난다, 안되면 관리자로 해볼 것)
Add-Type -Path 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\System.Windows.Forms.dll'
그리고 [System.Windows.Forms.Cursor]::Position 를 입력하면
아래의 그림처럼 X, Y 좌표를 확인 할 수 있다.