you would have to make a macro that does the following:
1) casts the related attack
2) checks if you either got the associated buff, or determines if the skill did dmg (if it is an attack skill)
3) /wait X seconds
4) /whisper yourself when its ready (or send any type of message you're looking for).
The problem with making a perfect, but complex, macro is that you can't make timers with lua without additional stuff, and I'm not sure if it exists. Below is a really simple, but not so great macro for the following example.
Example: Light of Day;
"When you
[successfully] strike your opponent with Holy Light Strike or Light
Charge, it instantly increases your Light damage for 15.0 seconds. (After the effect has ended it cannot be triggered again for 20.0 seconds.)" -theromwiki
/cast Light of Day
/wait 15
/w Xamd Light of Day ready
This macro doesn't check if you msised, or didn't deal damage for that skill, but atm it should be sufficient.