.. I will try to help then~
You could register for
TRAINER_
SHOW, and
only then maybe use an OnUpdate handler to click on the button, and cancel the OnUpdate handler again on
TRAINER_
CLOSED. but that's just my 2 cents...
This
link should also be useful, for in the future
- AutoTrainSpells.lua
Code:
local f = ClassTrainerTrainButton
f.e = 0
f:SetScript("OnUpdate", function(f, e)
f.e = f.e + e
if f.e > .01 then
f.e = 0
f:Click()
end
end)
- AutoTrainSpells.toc
Code:
## Interface: 40100
## Version: 0.1
## Title: AutoTrainSpells
## Notes: Auto trains your spells
## Author: Xaelic
## Dependencies: Blizzard_TrainerUI
AutoTrainSpells.lua