Sol’s RNG will kick idle players after a period of inactivity. The macro’s AFK prevention feature counters this by sending a sequence of keypresses and a mouse click to the target Roblox window at a configurable interval. Because the AFK action runs through the same scheduler as item use, it takes priority over cooldown checks — the game staying alive always comes first.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Flyingbacen/Sols-Biome-Randomizer-Macro/llms.txt
Use this file to discover all available pages before exploring further.
What the AFK Action Does
TheDoAFK() function performs the following steps every time it fires:
- Activates the target Roblox window and waits 150 ms for focus to settle.
- Sends
{Space 3}— jumps three times. - Sends
{e 3}— presses the interact key three times. - Sends
{f 3}— presses the use/action key three times. - Schedules
CheckEden()to run 5 seconds later viaSetTimer(CheckEden, -5000)— this one-shot timer scans for Eden NPC text after the action has had time to trigger any on-screen dialogue. - Releases the right mouse button if it is currently held down (
if GetKeyState("RButton", "P") MouseClick("Right",,,,,"U")), so the click in the next step is not blocked by an active right-drag. - Moves the mouse to coordinates (778, 912) — the position of the Eden dialogue left-option button — and clicks.
- Moves the mouse back to its original position.
- Restores focus to the previously active window.
DoAFK() is called, the function shows a “Window not Found” message box and returns false — the lastAFK timestamp is not updated in this case, so the scheduler will try again next cycle.
Configuration
The AFK interval is set byAFKIntervalMinutes in the [Cooldowns] section of settings.ini. The default is 1.5 minutes.
Window Targeting
Both the AFK action and item-use automation send input to a specific target window. The macro needs to know which window is Roblox, especially if multiple windows share the same title. The target can be set in two ways from the GUI:Ctrl+Click = active window
Click this button, then hold Ctrl and click anywhere on the Roblox window. The macro captures the window’s HWND (a unique numeric handle) and stores it as the target. A tray notification confirms the captured handle and window title.
Apply text as HWND/title
Type a window title (e.g.
Roblox) or a raw HWND number into the text field, then click this button. The macro uses the entered value directly. HWND values take priority and are looked up with ahk_id."Roblox", which works for most single-instance setups.
Force AFK
The Force AFK button in the GUI triggersDoAFK() immediately, regardless of how much time remains on the AFK interval, and then resets lastAFK to the current tick count. Use it to manually trigger the AFK animation if you know the game’s idle timer is about to expire, or to test that window targeting is set up correctly.
The AFK action temporarily steals window focus from whatever application you are currently using — your active window will be pushed to the background while the macro activates Roblox, sends keystrokes, and clicks. After the action completes, the macro restores focus to the previously active window. If you are typing or doing other work on the same machine, be aware that keystrokes sent during this brief focus change may be missed or misdirected.