“Are you tired of constantly switching between different sets in Idle Wizard? Look no further! Our AutoHotkey Sets Cycler allows you to automate the process, cycling between sets at your desired interval. You can even customize the order of your sets and adjust the cycle time. Originally created for personal use, we’re sharing this tool with the gaming community. Say goodbye to manual set switching and hello to a more efficient gameplay experience!”
First things first
After you’ve installed them, let’s move on to the next step:
Make a new text file, save it with the extension .ahk, and right click on it. Select “edit with notepad++”
Now you can copy my code in there. I have also separated the sections of the code so you can easily read it before you run it, to ensure there is nothing inside that would harm your computer.
Be careful when downloading and running scripts!
I assume you can also post it into chatGPT now and ask it if there’s anything malicious, or to explain what it does. Anyway, let’s move on to the next part.
Code
#NoEnv
SendMode Input
;======================================== ONLY CHANGE THESE =================================
global cycleTime := 1000
global sets := [1, 2, 3]
; cycleTime is how long will each cycle take, in milliseconds. Default is 1000 (1 second)
; sets means which sets it will cycle through, and the order. [1,2,3] means it will press q1 then q2 then q3 then q1 again.
; If you want it to go 1,3,2,4,2 then you should put that order in the array: [1,3,2,4,2]
;======================================== NOTHING BELOW HERE =================================
global changeSets := false
global changeCycling := false
global changeCycle := false
global allowSources := false
global allowUpgrades := false
global CurrentSet := 0
global message := “NOT Cycling”
global showSets := “Sets Selected: ”
global showCycle := Round(cycleTime/1000, 1)
for index, value in sets
{
showSets .= value . “, ”
}
showSets := RTrim(showSets, “, “)
global showTimer := “Cycle Selected: ” . showCycle . ” seconds”
global cycling := false
global timer := Round(cycleTime/100)
;————————————————————–LOOPS—————————————————
SetTimer, KeepOnTop, 100
SetTimer, CyclingMessage, 200
SetTimer, ResetSets, 500
SetTimer, ResetCycle, 500
;————————————————————–GUI—————————————————
SysGet, Monitor, Monitor, 1
ScreenWidth := MonitorRight – MonitorLeft
ScreenHeight := MonitorBottom – MonitorTop
GuiWidth := 600
GuiHeight := 500
GuiX := (ScreenWidth // 2) – (GuiWidth // 2)
GuiY := (ScreenHeight // 2) – (GuiHeight // 2)
Gui, +AlwaysOnTop +ToolWindow -SysMenu +Owner
Gui Color, 000000
Gui -Border -MaximizeBox -MinimizeBox
WinSet, Transparent, 150
WinSet, ExStyle, +0x20 ; WS_EX_TRANSPARENT
WinSet, Style, -0xC00000 ; WS_CAPTION|WS_THICKFRAME
Gui, Font, s18
Gui , Font , cRed
Gui, Add, Text, Left cPurple vTitle, IdleWizard Cycle Script by Makai Rosi
Gui, Add, Text, Left, c: Toggle Cycling on/off | F6: Exit Script
Gui, Add, Text, Left, y: Toggle Buy Sources | u: Toggle Buy Upgrades
Gui, Add, Text, Left, n: Change Sets | t: Change Cycle
Gui, Add, Text, Left cYellow vShowSets, %showSets%
GuiControl, Move, ShowSets, % “w” GuiWidth
Gui, Add, Text, Left cYellow vShowCycle, %showTimer%
GuiControl, Move, ShowCycle, % “w” GuiWidth
Gui, Add, Text, Left cRed vCycleMsg, %message%
Gui, Add, Text, Left cRed vUpgrades, NOT Buying Upgrades
Gui, Add, Text, Left cRed vSources, NOT Buying Sources
Gui, Font, s15
Gui, Add, Text, Left cRed vTimer, Timer: %timer%
GuiControl, Move, Timer, % “w” GuiWidth
Gui, Show, x%GuiX% y%GuiY% w%GuiWidth% h%GuiHeight%, Cycle GUI
WinSet, AlwaysOnTop, On, Cycle GUI
WinSet, Transparent, 200, Cycle GUI
WinActivateBottom, Cycle GUI
return
;——————————————————————-HOTKEYS—————————————-
F5::Reload
F6::ExitApp
y::ToggleBuySources()
ToggleBuySources(){
If WinActive(“IdleWizard”){
if(allowSources){
allowSources:=false
GuiControl, +cRed, Sources
GuiControl,, Sources, NOT Buying Sources
}
else{
allowSources:=true
GuiControl, +cGreen, Sources
GuiControl,, Sources, Buying Sources
}
}
}
u::ToggleBuyUpgrades()
ToggleBuyUpgrades(){
If WinActive(“IdleWizard”){
if(allowUpgrades){
allowUpgrades:=false
GuiControl, +cRed, Upgrades
GuiControl,, Upgrades, NOT Buying Upgrades
}
else{
allowUpgrades:=true
GuiControl, +cGreen, Upgrades
GuiControl,, Upgrades, Buying Upgrades
}
}
}
n::InputSets() ;these functions are at the bottom, in INPUTS section
t::InputCycle()
SetTitleMatchMode, 2 ; Allows matching part of the window title
IfWinExist, IdleWizard
{
WinGet, hwnd, ID, IdleWizard
}
else
{
MsgBox, IdleWizard.exe is not running. Exiting script.
ExitApp
}
c::
IfWinActive, IdleWizard
{
if (cycling)
{
cycling := false
changeCycling := true
}
else
{
cycling := true
changeCycling := true
SetTimer, CycleLoop, -1
}
}
return
CycleLoop:
while (cycling)
{
for index, value in sets
{
if (!cycling){
changeCycling := true
break
}
Send {q down}
Sleep 10
Send {%value% down}
CurrentSet := value
changeCycling := true
Sleep 10
Send {%value% up}
Sleep 10
Send {q up}
Sleep 10
if(allowUpgrades) {
Send {b down}
Sleep 10
Send {b up}
Sleep 10
}
if(allowSources){
Send {Up down}
Sleep 10
Send {Up up}
Sleep 10
}
while(timer){
if (!cycling){
changeCycling := true
break
}
Sleep 100
timer := timer-1
GuiControl,, Timer, Timer: %timer%
}
ResetTimer()
;Sleep, cycleTime
If WinActive(“IdleWizard”)
{
}
Else {
cycling:=false
changeCycling := true
}
}
}
return
;——————————————————————-CHECKS—————————————-
CyclingMessage:
if(changeCycling){
if(cycling){
GuiControl, +cGreen, CycleMsg
message := “Cycling… q” CurrentSet
GuiControl,, CycleMsg, %message%
}
else{
message := “NOT Cycling”
GuiControl, +cRed, CycleMsg
GuiControl,, CycleMsg, %message%
ResetTimer()
}
changeCycling:=false
}
return
ResetTimer() {
timer := Round(cycleTime/100)
GuiControl,, Timer, Timer: %timer%
return
}
KeepOnTop:
If WinActive(“IdleWizard”)
{
Gui Show, NoActivate, Cycle GUI
}
Else
{
Gui, Submit
}
return
ResetSets() {
if(changeSets){
showSets := “Sets Selected: ”
for index, value in sets
{
showSets .= value . “, ”
}
showSets := RTrim(showSets, “, “)
GuiControl,, ShowSets, %showSets%
changeSets:=false
}
return
}
ResetCycle() {
if(changeCycle){
showCycle := Round(cycleTime/1000, 1)
showTimer := “Cycle Selected: ” . showCycle . ” seconds”
GuiControl,, ShowCycle, %showTimer%
changeCycle:=false
ResetTimer()
}
return
}
;——————————————————————-INPUTS—————————————-
InputSets() {
If WinActive(“IdleWizard”){
InputBox, userInput, Enter Numbers, Enter new sets (1-9) separated by commas, to cycle:
if (ErrorLevel) {
return
}
numbersArray := []
Loop, Parse, userInput, `,
{
number := Trim(A_LoopField)
if (RegExMatch(number, “^[1-9]$”)) {
numbersArray.Push(number)
} else {
return
}
}
sets := numbersArray
changeSets:=true
}
return
}
InputCycle() {
If WinActive(“IdleWizard”){
InputBox, userInput, Enter Number, Enter new cycle in ms (100 – 60000):
if (ErrorLevel) {
return
}
if (RegExMatch(userInput, “^\d+$”) && userInput >= 100 && userInput <= 60000) {
storedNumber := userInput
;MsgBox, The number entered is: %storedNumber%
} else {
return
}
cycleTime := storedNumber
changeCycle := true
}
}
GuiClose:
ExitApp
How do I use this?
You will see a new black box with some letters in that explain some stuff.
The important stuff are:
F6: This turns off the script. If the script starts bugging out, this will terminate it.
F5: This will restart the script. Again, in case it bugs out
Pressing “c” will make it start the cycling.
The default Sets it will cycle through are 1, 2 and 3 in that order. If you want to change the order or the sets, you can press “n”, and use the prompt window. For example, if you want it to cycle from 1 to 3 to 2 to 4 and back to 1, then you can type 1,3,2,4 in that prompt window.
The default Cycle timer is 1 second, which means it will change a set every 1 second. But some builds use more time for each set, so I included a way to change that, by pressing “t”. Note that the timer is in milliseconds, so 1000 is 1 second. I’ve let it go up to 60 seconds (60000), but as low as 100 (0.1 seconds), so that it doesn’t bug out.
But that’s not all!
By pressing “u” you toggle buying all upgrades per set (so by default, every 1 second), while by pressing “y” you toggle buying all sources. However, note that this uses the up arrow to buy them, so you must have unlocked that first from the paragon level. Also, buying upgrades is prioritized over sources.
Last but not least, I have also included a “Timer” underneath, just to give you a general idea of how much time remains before it goes to the next set.
Problem
But, you can simply press F6 (close the script) and continue whatever you wanted to do. Then turn it back on when you want to leave your computer alone.
So yeah
I thought I’d add some clicking and stuff, but I’d rather keep it simple so that it works for all computers.
Comment below if you find a bug, or just to say thanks ^_^
And that wraps up our share on Idle Wizard: AutoHotkey Sets Cycler. If you have any additional insights or tips to contribute, don’t hesitate to drop a comment below. For a more in-depth read, you can refer to the original article here by MAKAIROSI, who deserves all the credit. Happy gaming!