Skip to content

Instantly share code, notes, and snippets.

@suiheilibe
Created January 13, 2020 03:52
Show Gist options
  • Save suiheilibe/e95c36430957bb64739e647f4a518eaf to your computer and use it in GitHub Desktop.
Save suiheilibe/e95c36430957bb64739e647f4a518eaf to your computer and use it in GitHub Desktop.
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#Persistent
SetTitleMatchMode RegEx
OnClipboardChange("ClipChanged")
return
ClipChanged(Type) {
if (Type == 1) {
x := 0 + clipboard
if (x != null) {
film := Floor(x * 4 / 5)
if (WinExist("AvsPmod ahk_class ^wxWindowClassNR$")) {
WinActivate
Send, ^g%film%{Enter}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment