aboutsummaryrefslogtreecommitdiff
path: root/tt.programs.ahk
diff options
context:
space:
mode:
Diffstat (limited to 'tt.programs.ahk')
-rw-r--r--tt.programs.ahk45
1 files changed, 45 insertions, 0 deletions
diff --git a/tt.programs.ahk b/tt.programs.ahk
index ee1df2f..0459825 100644
--- a/tt.programs.ahk
+++ b/tt.programs.ahk
@@ -164,4 +164,49 @@ return
!d::SendInput, {LCtrl Down}l{LCtrl Up}
+/*
+#IfWinActive ahk_class Notepad2
+
+F5::
+
+return
+*/
+
+#If WinActive("ahk_exe v2game.exe")
+
+MButton::RButton
+RButton::MButton
+
+;; -> library
+
+ClipCursor(Confines := True, Left := 100, Top := 200, Right := 800, Bottom := 900)
+{
+ if !(Confines)
+ return DllCall("user32.dll\ClipCursor")
+ static RECT, init := VarSetCapacity(RECT, 16, 0)
+ NumPut(Left, RECT, 0, "Int"), NumPut(Top, RECT, 4, "Int"), NumPut(Right, RECT, 8, "Int"), NumPut(Bottom, RECT, 12, "Int")
+ if !(DllCall("user32.dll\ClipCursor", "Ptr", &RECT))
+ return DllCall("kernel32.dll\GetLastError")
+ return 1
+}
+
+VictoriaWindowMessage(wParam, lParam)
+{
+ if (wParam = 4 or wParam = 32772) ; HSHELL_WINDOW_ACTIVATED | HSHELL_RUDEAPPACTIVATED
+ {
+ WinGet, exe, ProcessName, A
+ if (exe = "v2game.exe")
+ {
+ Sleep, 1500
+ ClipCursor(True, 6, 6, A_ScreenWidth-5, A_ScreenHeight-5)
+ }
+ }
+}
+
+;; -> init
+
+WindowMessageHandlers.Push("VictoriaWindowMessage")
+
+;; -> body
+
#IfWinActive