So there's a pretty well-known program called AutoHotkey that allows you to write simple scripts to press a button every x amount of minutes. You can also write more complex scripts, but for the purpose of not going afk, you only need a one-button script.
obviously if you're online for 3 days straight doing this you will get banned for botting and these types of bots can be detected so it's risky to use.
However, what if you were to write a script that pressed 'enter' every 40 minutes? It takes 5 minutes to go AFK, then an additional 30 minutes to be returned to the character selection screen. 30 minutes later, you will be disconnected from the server. Does anyone know if blizzard can ban you for this?
IF SO:
What about a script that (once you were returned to the character selection screen) pressed escape, typed in your password, and then selected a character? I think that would be pretty hard to pick up on, but I'm not sure. Thoughts?