As some games actually do support in-game macro creation and some of them can be made to loop for afk play, and since you did not name the game you are asking about, I am gonna cut you some slack and not yell, or delete, or ban you.
The wikibase forum, here, is for the Wiki, as a whole, not really for game discussions. You need to find the forum for your game, and ask there. That said, I will warn you that MOST games regard afk gaming as a violation of the TOS and will ban you for it. In keeping with that view, we consider botting as "Ebil(tm)" and will ban you for it.