본문 바로가기

퍼스트 디센던트 오토핫키 (백그라운드 사용가능)

`,.' 2024. 8. 15.

사용자 본인 책임 - 오토핫키 프로그램 설치후 - pd.ahk 실행

pd.ahk
0.00MB
AutoHotkey_1.1.37.02_setup.exe
3.27MB

1. 매크로를 킨다
2. 퍼디를 킨다
3. 퍼디를 띄워둔 상태로 F3 눌러서 현재 윈도우 (퍼디)를 매크로에 자동입력하게 만든다
4. esc 누른후, 임무중단 위에 마우스를 올려둔다.
5. F4를 눌러 마우스 위치를 자동으로 매크로 내부로 입력한다
6. 매크로 즐겜한다

F3 = 현재 윈도우를 자동으로 매크로에 입력
F4 = 현재 마우스 위치를 자동으로 임무중단 매크로에 입력
F5 = 임무중단 매크로
F6 = 버튼맨 E 누르기 매크로
F7 = 버니 점프 + V 매크로
F8 = 버니 v + 앞구르기 + 뒷구르기 매크로
F9 = 모든 매크로 중단
F10 = 매크로 종료

#Persistent
#NoEnv
; Variables to control the state of each action
isPressingE := false
isJumpingAndPressingV := false
isPressingVWCtrlS := false
currentMouseX := 0
currentMouseY := 0
storedWindowTitle := ""

; Function to disable all macros
DisableAllMacros() {
global isPressingE, isJumpingAndPressingV, isPressingVWCtrlS
isPressingE := false
isJumpingAndPressingV := false
isPressingVWCtrlS := false
SetTimer, PressE, Off
SetTimer, JumpAndPressV, Off
SetTimer, PressVWCtrlS, Off
}

; Hotkey to start holding 'E'
F6::
DisableAllMacros()
isPressingE := !isPressingE
if (isPressingE)
{
SetTimer, PressE, 50
}
else
{
ControlSend,, {e up}, %storedWindowTitle%
}
return

; Hotkey to start jumping and pressing 'V'
F7::
DisableAllMacros()
isJumpingAndPressingV := !isJumpingAndPressingV
if (isJumpingAndPressingV)
{
SetTimer, JumpAndPressV, 100
}
return

; Hotkey to start pressing 'V', 'W+Ctrl', 'S+Ctrl' in sequence
F8::
DisableAllMacros()
isPressingVWCtrlS := !isPressingVWCtrlS
if (isPressingVWCtrlS)
{
SetTimer, PressVWCtrlS, 100
}
return

; Hotkey to stop all actions
F9::
DisableAllMacros()
return

; Hotkey to retrieve and display current mouse position
F4::
MouseGetPos, currentMouseX, currentMouseY
ToolTip, Current Mouse Position:`nX: %currentMouseX%`nY: %currentMouseY%
Sleep, 2000 ; Display the tooltip for 2 seconds
ToolTip ; Remove the tooltip
return

; Hotkey to press ESC, click the last recorded mouse position, then press Space (only once)
F5::
DisableAllMacros()
; Ensure mouse position is recorded before attempting to use it
if (currentMouseX != 0 || currentMouseY != 0)
{
; Press ESC
ControlSend,, {Esc}, %storedWindowTitle%
Sleep, 100
; Click at the recorded mouse position
Click, %currentMouseX%, %currentMouseY%
Sleep, 100
; Press Space
ControlSend,, {Space}, %storedWindowTitle%
}
else
{
MsgBox, Please retrieve the mouse position first by pressing F4.
}
return

; Hotkey to retrieve and store the current active window title (no tooltip)
F3::
WinGetActiveTitle, storedWindowTitle
return

; Function to hold 'E'
PressE:
if (isPressingE)
{
ControlSend,, {e down}, %storedWindowTitle%
}
return

; Function to jump and press 'V'
JumpAndPressV:
if (isJumpingAndPressingV)
{
ControlSend,, {Space}, %storedWindowTitle%
Sleep, 50
ControlSend,, v, %storedWindowTitle%
}
return

; Function to press 'V', 'W+Ctrl', 'S+Ctrl' in sequence
PressVWCtrlS:
if (isPressingVWCtrlS)
{
ControlSend,, v, %storedWindowTitle%
Sleep, 100
ControlSend,, {w down}, %storedWindowTitle%
Sleep, 100
ControlSend,, {Ctrl down}, %storedWindowTitle%
Sleep, 100
ControlSend,, {Ctrl up}, %storedWindowTitle%
ControlSend,, {w up}, %storedWindowTitle%
Sleep, 100
ControlSend,, {s down}, %storedWindowTitle%
Sleep, 100
ControlSend,, {Ctrl down}, %storedWindowTitle%
Sleep, 100
ControlSend,, {Ctrl up}, %storedWindowTitle%
ControlSend,, {s up}, %storedWindowTitle%
}
return

; Hotkey to exit AutoHotkey
F10::
ExitApp
return​

 

댓글