You would need to multiple actions.

1. a keystroke action of CTRL+O to the ATG
2. a JOIN ATG action, with a target of the ATG, and have that execute based on a timer after x.x seconds
3. a LEAVE ATG action, with a target of the ATG, and just let that execute immediately or have this on a different timer, with a time of 0.1 seconds (this latter is probably the better option - makes sure the other stuff all works first).