본문 바로가기
컴퓨터/오토핫키

오토핫키로 마우스 커서 바꾸기

by 큐브빌드 2021. 11. 23.
반응형
F1:: ReplaceSystemCursors((t := !t) ? "커서모형" : "")
ReplaceSystemCursors(IDC = "") ; IDC must be a cursor name like "IDC_CROSS" or cursor handle
{
static IMAGE_CURSOR := 2, SPI_SETCURSORS := 0x57
, exitFunc := Func("ReplaceSystemCursors").Bind("")
, setOnExit := false
, SysCursors := { IDC_APPSTARTING: 32650
, IDC_ARROW : 32512
, IDC_CROSS : 32515
, IDC_HAND : 32649
, IDC_HELP : 32651
, IDC_IBEAM : 32513
, IDC_NO : 32648
, IDC_SIZEALL : 32646
, IDC_SIZENESW : 32643
, IDC_SIZENWSE : 32642
, IDC_SIZEWE : 32644
, IDC_SIZENS : 32645
, IDC_UPARROW : 32516
, IDC_WAIT : 32514 }
if !IDC {
DllCall("SystemParametersInfo", "UInt", SPI_SETCURSORS, "UInt", 0, "UInt", 0, "UInt", 0)
OnExit(exitFunc, 0), setOnExit := false
}
else {
hCursor := (IDC + 0) ? IDC : DllCall("LoadCursor", "Ptr", 0, "UInt", SysCursors[IDC], "Ptr")
for k, v in SysCursors {
hCopy := DllCall("CopyImage", "Ptr", hCursor, "UInt", IMAGE_CURSOR, "Int", 0, "Int", 0, "UInt", 0, "Ptr")
DllCall("SetSystemCursor", "Ptr", hCopy, "UInt", v)
}
if !setOnExit
OnExit(exitFunc), setOnExit := true
}
}

 

How to change the system cursor?? - AutoHotkey Community

 

How to change the system cursor?? - AutoHotkey Community

Home Board index AutoHotkey Ask For Help Search It is currently 23 Nov 2021, 02:05 All times are UTC-05:00 Get help with using AutoHotkey and its commands and hotkeys jly Posts: 57 Joined: 30 Sep 2020, 06:06 Report this post @ Quote 08 May 2021, 00:00 Chan

www.autohotkey.com

 

해당 사이트에 제공되었던 마우스 커서 변경하는 오토 핫키 코드입니다.

 

"커서모형" 대신 "IDC_HAND"

 

이렇게 입력하면 됩니다.

 

커서 타입은 Syscursors에 존재하는 것 들입니다.

 

F1 키를 누르시면 실행 됩니다.

 

오토 핫키에서 현재 마우스 커서를 확인하는 방법은

 

a_cursor를 통해서 확인 가능합니다.

 

msgbox % a_cursor%라고 할 수 있네요.

 

 

반응형

댓글