Code: Select all
#NoEnv
#SingleInstance Force
#Warn ClassOverwrite
SendMode Input
SetBatchLines -1
SetTitleMatchMode 2
TooltipHotkeys := [new PremiereTooltip("V", "Selection tool", "The default tool, used to select clips in the timeline.")
, new PremiereTooltip("A", "Track Select tool", "Select all clips on a track from a given point, or select multiple tracks.")
, new PremiereTooltip("B", "Ripple Edit tool", "Adjust an edit point and move other clips in the timeline to compensate.")
, new PremiereTooltip("N", "Rolling Edit tool", "Adjust an edit point between two clips without affecting the rest of the timeline.")
, new PremiereTooltip("R", "Rate Stretch tool", "Change the duration of a clip while simultaneously changing the speed to compensate.")
, new PremiereTooltip("C", "Razor tool", "Cut a clip (or multiple clips) into two clips.")
, new PremiereTooltip("Y", "Slip tool", "Move a clip's in and out points by the same amount simultaneously, so the rest of the timeline is not affected.")
, new PremiereTooltip("U", "Slide tool", "Move a clip back and forth in the timeline, while simultaneously adjusting adjacent clips to compensate.")
, new PremiereTooltip("P", "Pen tool", "Create control (anchor) points.")
, new PremiereTooltip("H", "Hand tool", "Drag the timeline view left and right.")
, new PremiereTooltip("Z", "Zoom tool", "Click in the timeline to magnify the view, or drag and select a rectangular area to zoom into.")]
class PremiereTooltip
{
static GUI_WIDTH := 200
, MARGIN := 6
, TEXT_WIDTH := PremiereTooltip.GUI_WIDTH - 2 * PremiereTooltip.MARGIN
, EXE := "ahk_exe Adobe Premiere Pro.exe"
, COLOR_SCHEME := {"BACKGROUND": "1D1D1D"
, "SEPARATOR": "313131"
, "TITLE": "2D8CEB"
, "DESCRIPTION": "A7A7A7"}
__New(keybind, name, description) {
fn := this.hideDescription.Bind("", hwnd, keybind)
Hotkey % Format("~{} Up", keybind), % fn
}
__Delete() {
Hotkey % Format("~{} Up", this.keybind), Off
}
isPremiereActive() {
return WinActive(PremiereTooltip.EXE) && !A_CaretX
}
showDescription(hwnd, keybind) {
Send % "{" keybind "}"
}
hideDescription(hwnd, keybind) {
if PremiereTooltip.isPremiereActive()
Send v
}
}