With a two-line macro: /click QuestFrameCompleteButton and /click QuestFrameCompleteQuestButton. The first clicks Continue and the second clicks Complete Quest. The quest window from the NPC has to be open.
The macro
/click QuestFrameCompleteButton
/click QuestFrameCompleteQuestButtonThe server doesn't answer instantly, so you'll usually press it twice. The first press opens the reward window, and the second turns the quest in.
/click QuestFrameAcceptButtonThe same thing for the Accept button. You can add it to the same key as a third line.
We checked the button names against Forever's UI code but haven't tested the macro in game. It's the same in any client language, since these are button names, not their labels.
What it can't do
- Reward choices. Click the reward you want first. Without a choice, the game asks you to pick one.
- An NPC's quest list. Pick the quest yourself. The macro only works once the quest window is open.