If you hook the right functions, you can get the screenshot to activate perfectly each time.
Lua Code:
local Hooked={};
local function OnFinished() RunBinding("SCREENSHOT"); end
hooksecurefunc("AchievementAlertFrame_SetUp",function(frame)
if not Hooked[frame] then
if frame.glow then frame.glow.supressGlow=true; end
frame.animIn:HookScript("OnFinished",OnFinished);
Hooked[frame]=true;
end
end);
This catches when a dynamic achievement alert frame is shown and hooks the
animIn animation to take a screenshot when it finishes fading in. This also tells the frames to suppress the glow animation so it doesn't interfere.