Thanks again, appreciate the help i added }} to the end and now it works.
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
, EXE := "ahk_exe Adobe Premiere Pro.exe"
__New(keybind, name, description) {
fn := this.hideDescription.Bind("", hwnd, keybind)
Hotkey % Format("~{} Up", keybind), % fn
}
isPremiereActive() {
return WinActive(PremiereTooltip.EXE) && !A_CaretX
}
hideDescription(hwnd, keybind)
{
ControlGetFocus, FocusedCtrl , ahk_exe Adobe Premiere Pro.exe
If (FocusedCtrl = "Chrome_WidgetWin_01")
return
else
{
PremiereTooltip.isPremiereActive()
Send v
return
}
}
}