Risia Ice Games/Swap Instance Script

Instructions for using this script are at Risia Ice Games/Instance swapping.

CycleCount := 0 ;this is the key to use for hotkey. Set this to what key you want to use. 4:: If CycleCount = 0 ;get menu position. The first press of the hotkey should be with the mouse at the center of the area name box on the minimap {  MouseGetPos, MenuXpos, MenuYpos Ypos1 := MenuYpos + 5 + 14*1 Ypos2 := MenuYpos + 5 + 14*2 Ypos3 := MenuYpos + 5 + 14*3 Ypos4 := MenuYpos + 5 + 14*4 Ypos5 := MenuYpos + 5 + 14*5 Tooltip Stored menu position x%MenuXpos% y%MenuYpos% } If CycleCount = 1 ;switch to instance 1 {  Tooltip Switching to instance %CycleCount% Send, t  MouseClick, left,  %MenuXpos%,  %MenuYpos% MouseClick, left, %MenuXpos%,  %Ypos1% Send, t } If CycleCount = 2 ;switch to instance 2 {  Tooltip Switching to instance %CycleCount% ;remove the ';' on the next line if there are only 2 instances ;CycleCount := 0 Send, t  MouseClick, left,  %MenuXpos%,  %MenuYpos% MouseClick, left, %MenuXpos%,  %Ypos2% Send, t } If CycleCount = 3 ;switch to instance 3 {  Tooltip Switching to instance %CycleCount% ;remove the ';' on the next line if there are only 3 instances ;CycleCount := 0 Send, t  MouseClick, left,  %MenuXpos%,  %MenuYpos% MouseClick, left, %MenuXpos%,  %Ypos3% Send, t } If CycleCount = 4 ;switch to instance 4 {  Tooltip Switching to instance %CycleCount% ;remove the ';' on the next line if there are only 4 instances ;CycleCount := 0 Send, t  MouseClick, left,  %MenuXpos%,  %MenuYpos% MouseClick, left, %MenuXpos%,  %Ypos4% Send, t } If CycleCount = 5 ;switch to instance 4 {  Tooltip Switching to instance %CycleCount% CycleCount := 0 Send, t  MouseClick, left,  %MenuXpos%,  %MenuYpos% MouseClick, left, %MenuXpos%,  %Ypos5% Send, t } CycleCount := CycleCount + 1 Return
 * 1) IfWinActive ahk_class Turbine Device Class