Unrapekit refactored menu

User Tag List

Results 1 to 5 of 5
  1. #1
    nimb777's Avatar Member
    Reputation
    6
    Join Date
    Dec 2013
    Posts
    27
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unrapekit refactored

    I refactored it a bit, might sitll need a simplified execution for type1 hotkeys and work or copy from elsewhere on the type7 swap section. AHKV1, 1080p, might need a little work with the .ini file at first if you want to start new.

    name this whatever you want .ahk
    Code:
    ; ==================== INITIALIZATION ====================
    #s ingleInstance , force
    #WinActivateForce 
    ;#IfWinActive Path of Exile
    #MaxThreadsperHotkey  2
    ; -------------------- Settings --------------------
    SetTitleMatchMode, 2
    CoordMode, Mouse
    SetWorkingDir, %A_ScriptDir%
    
    SetBatchLines, -1
    SetDefaultMouseSpeed, 1
    SetKeyDelay, 20, 20
    SetMouseDelay, 20
    
    ToolTip, Loading
    
    Hk := 1
    T7:= 1
    gosub IniLoad
    
    ToolTip, Load Complete
    SetTimer, RemoveToolTip, -500
    
    #Include , IniSettings.ahk
    #Include , GeneralFunctions.ahk
    #Include , DelayConfig.ahk
    #Include , ScreenCapture.ahk
    #Include , ScanConfig.ahk
    #Include , SpellScan.ahk
    #Include , HotkeyConfig.ahk
    #Include , HotkeyRouting.ahk
    #Include , ConfigType1.ahk
    #Include , ConfigType2.ahk
    #Include , ConfigType3.ahk
    #Include , ConfigType4.ahk
    #Include , ConfigType5&6.ahk
    #Include , ConfigType7.ahk
    #Include , Type1.ahk
    #Include , Type2.ahk
    #Include , Type3.ahk
    #Include , Type4.ahk
    #Include , Type5.ahk
    #Include , Type6.ahk
    #Include , Type7.ahk
    
    WinGetPos, X, Y, WinW, WinH, Path of Exile
    Winset, Transparent, 0
    
    FileGetSize, Size, C:\Program Files (x86)\Grinding Gear Games\Path of Exile\Content.ggpk
    Return
    
    ; ==================== CONFIGURATION LOADING ====================
    
    F7::
    return
    
    ; ==================== FUNCTIONS ====================
    
    RCtrl & F10:: Reload
    RCtrl & F11:: Pause
    RCtrl & F12:: ExitApp
    
    
    
    RCtrl & F9::
    	GuiWidth:= 270
    	GuiHeight:= 270
    	MouseGetPos, Xpos, Ypos
    	gosub GuiBuild
    	Gui, Add, Text, X10 Y10, Configuration Hotkeys:
    	Gui, Add, Edit, X10 Y40 H21 W140 vHotkeyConfig, %HotkeyConfig%
    	Gui, Add, Edit, X10 Y70 H21 W140 vScanConfig, %ScanConfig%
    	Gui, Add, Edit, X10 Y100 H21 W140 vSpellScan, %SpellScan%
    	Gui, Add, Edit, X10 Y130 H21 W140 vScreenCapture, %ScreenCapture%
    	Gui, Add, Edit, X10 Y160 H21 W140 vDelayConfig, %DelayConfig%
    	Gui, Add, Text, X160 Y43, Hotkey Configuration
    	Gui, Add, Text, X160 Y73, Scan Configuration
    	Gui, Add, Text, X160 Y103, Spell Scan
    	Gui, Add, Text, X160 Y133, Screen Capture
    	Gui, Add, Text, X160 Y163, Delay Configuration
    	Gui, Add, Button, x70 y200 w90 h20 gSetupConfig Default, Ok
    	Gui, Add, Button, x170 y200 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Configuration
    Return
    
    SetupConfig:
    	gosub GuiSD
    	IniWrite, %ScanCount%, UnrapeKitConfig.ini, ScanCount, ScanCount
    	IniWrite, %HotkeyConfig%, UnrapeKitConfig.ini, Configuration, HotkeyConfig
    	IniWrite, %ScanConfig%, UnrapeKitConfig.ini, Configuration, ScanConfig
    	IniWrite, %SpellScan%, UnrapeKitConfig.ini, Configuration, SpellScan
    	IniWrite, %ScreenCapture%, UnrapeKitConfig.ini, Configuration, ScreenCapture
    	IniWrite, %DelayConfig%, UnrapeKitConfig.ini, Configuration, DelayConfig
    	Hotkey, %HotkeyConfig%, HotkeyConfig
    	Hotkey, %ScanConfig%, ScanConfig
    	Hotkey, %SpellScan%, SpellScan
    	Hotkey, %ScreenCapture%, ScreenCapture
    	Hotkey, %DelayConfig%, DelayConfig
    	Reload
    Return
    
    IniLoad:
    	IniRead, ScanCount, UnrapeKitConfig.ini, ScanCount, ScanCount, %A_Space%
    	IniRead, HotkeyLimit, UnrapeKitConfig.ini, Hotkeys, HotkeyLimit, %A_Space%
    	IniRead, Delay, UnrapeKitConfig.ini, Delay, Delay, %A_Space%
    	IniRead, FrameTime, UnrapeKitConfig.ini, Delay, FrameTime, %A_Space%
    	IniRead, KeyDelay1, UnrapeKitConfig.ini, Delay, KeyDelay1, %A_Space%
    	IniRead, KeyDelayPress, UnrapeKitConfig.ini, Delay, KeyDelayPress, %A_Space%
    	IniRead, MouseDelay, UnrapeKitConfig.ini, Delay, MouseDelay, %A_Space%
    	SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
    	SetMouseDelay, %MouseDelay%
    	IniRead, HotkeyConfig, UnrapeKitConfig.ini, Configuration, HotkeyConfig, %A_Space%
    	IniRead, ScanConfig, UnrapeKitConfig.ini, Configuration, ScanConfig, %A_Space%
    	IniRead, SpellScan, UnrapeKitConfig.ini, Configuration, SpellScan, %A_Space%
    	IniRead, ScreenCapture, UnrapeKitConfig.ini, Configuration, ScreenCapture, %A_Space%
    	IniRead, DelayConfig, UnrapeKitConfig.ini, Configuration, DelayConfig, %A_Space%
    	IniRead, CaptureName, UnrapeKitConfig.ini, Configuration, CaptureName, %A_Space%
    	Hotkey, %HotkeyConfig%, HotkeyConfig
    	Hotkey, %ScanConfig%, ScanConfig
    	Hotkey, %SpellScan%, SpellScan
    	Hotkey, %ScreenCapture%, ScreenCapture
    	Hotkey, %DelayConfig%, DelayConfig
    return
    .
    These need the exact naming.
    IniSettings.ahk
    Code:
    HotkeyLoadLoop:
    gosub hotkeySetupRead
    Hk:= 1
    	Loop, %HotKeyLimit% {
    		While (Hkey%Hk%Toggle = 0) {
    			Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    			If (Hkey%Hk%Type1 = 1) {
    				gosub Type1Load
    				break
    			}
    			If (Hkey%Hk%Type2 = 1) {
    				gosub Type2Load
    				break
    			}
    			If (Hkey%Hk%Type3 = 1) {
    				gosub Type3Load
    				break
    			}
    			If (Hkey%Hk%Type4 = 1)
    				gosub Type4Load
    				break
    			If (Hkey%Hk%Type5 = 1) {
    				gosub Type5Load
    				break
    			}
    			If (Hkey%Hk%Type6 = 1) {
    				gosub Type6Load
    				break
    			}
    			If (Hkey%Hk%Type7 = 1) {
    				gosub Type7Load
    				break
    			}
    		}
    		If (A_Index = HotkeyLimit) {
    			Hk:= 1
    			break
    		}
    	Hk += 1
    	}
    return
    
    HotkeySetupRead:
    Hk:= 1
        Loop, %HotKeyLimit% {
    		IniRead, Hkey%Hk%Toggle, UnrapeKitConfig.ini, HotkeyToggle, Hkey%Hk%Toggle, %A_Space%
    		IniRead, Hkey%Hk%Type1, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type1, %A_Space%
    		IniRead, Hkey%Hk%Type2, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type2, %A_Space%
    		IniRead, Hkey%Hk%Type3, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type3, %A_Space%
    		IniRead, Hkey%Hk%Type4, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type4, %A_Space%
    		IniRead, Hkey%Hk%Type5, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type5, %A_Space%
    		IniRead, Hkey%Hk%Type6, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type6, %A_Space%
    		IniRead, Hkey%Hk%Type7, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type7, %A_Space%
    		IniRead, Hkey%Hk%Type8, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type8, %A_Space%
    		IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key, %A_Space%
    		IniRead, KeyX_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyX_%Hk%, %A_Space%
    		IniRead, KeyY_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyY_%Hk%, %A_Space%
    		IniRead, Hkey%Hk%Shortcut, UnrapeKitConfig.ini, HotkeyShortcut, Hkey%Hk%Shortcut, %A_Space%
    		Hk+= 1
    	}
    Hk:= 1
    return
    
    LoadSocketLists:
    	SocketList1 := [ {name: "6SocketWeaponTopRightSocket", x: 72, y: 50, coordX: 1355, coordY: 170}
    				   , {name: "6SocketWeaponTopCenterSocket", x: 149, y: 50, coordX: 1405, coordY: 170}
    				   , {name: "6SocketWeaponMiddleRightSocket", x: 71, y: 125, coordX: 1355, coordY: 225}
    				   , {name: "6SocketWeaponMiddleCenterSocket", x: 149, y: 125, coordX: 1405, coordY: 225}
    				   , {name: "6SocketWeaponBottomRightSocket", x: 72, y: 200, coordX: 1355, coordY: 280}
    				   , {name: "6SocketWeaponBottomCenterSocket", x: 149, y: 200, coordX: 1405, coordY: 280}
    				   , {name: "RightWeaponTopSocket", x: 111, y: 50, coordX: 1380, coordY: 170}
    				   , {name: "RightWeaponMiddleSocket", x: 111, y: 125, coordX: 1380, coordY: 225}
    				   , {name: "RightWeaponBottomSocket", x: 111, y: 200, coordX: 1380, coordY: 280}
    				   , {name: "RightWeaponTopRightSocket", x: 84, y: 88, coordX: 1355, coordY: 200}
    				   , {name: "RightWeaponTopCenterSocket", x: 137, y: 88, coordX: 1405, coordY: 200}
    				   , {name: "RightWeaponBottomCenterSocket", x: 137, y: 163, coordX: 1405, coordY: 250}
    				   , {name: "LeftHandTopSocket", x: 523, y: 50, coordX: 1795, coordY: 170}
    				   , {name: "LeftHandMiddleSocket", x: 523, y: 125, coordX: 1795, coordY: 225}
    				   , {name: "LeftHandBottomSocket", x: 523, y: 200, coordX: 1795, coordY: 280}
    				   , {name: "LeftHandTopCenterSocket", x: 496, y: 88, coordX: 1765, coordY: 200}
    				   , {name: "LeftHandTopLeftSocket", x: 550, y: 88, coordX: 1820, coordY: 200}
    				   , {name: "LeftHandBottomLeftSocket", x: 550, y: 163, coordX: 1820, coordY: 250}
    				   , {name: "LeftHandMiddleCenterSocket", x: 485, y: 125, coordX: 1770, coordY: 225}
    				   , {name: "LeftHandMiddleLeftSocket", x: 561, y: 125, coordX: 1820, coordY: 225} ]
    
    	SocketList2 := [ {name: "HelmetTopRightSocket", x: 279, y: 21, coordX: 1560, coordY: 135}
    				   , {name: "HelmetTopLeftSocket", x: 355, y: 21, coordX: 1615, coordY: 135}
    				   , {name: "HelmetBottomRightSocket", x: 279, y: 97, coordX: 1560, coordY: 185}
    				   , {name: "HelmetBottomLeftSocket", x: 355, y: 97, coordX: 1615, coordY: 185}
    				   , {name: "HelmetMiddleRightSocket", x: 279, y: 57, coordX: 1560, coordY: 160}
    				   , {name: "HelmetMiddleLeftSocket", x: 355, y: 57, coordX: 1615, coordY: 160}
    				   , {name: "HelmetMiddleSocket", x: 317, y: 57, coordX: 1690, coordY: 160}
    				   , {name: "GlovesTopRightSocket", x: 151, y: 257, coordX: 1430, coordY: 370}
    				   , {name: "GlovesTopCenterSocket", x: 224, y: 257, coordX: 1485, coordY: 370}
    				   , {name: "GlovesBottomRightSocket", x: 151, y: 332, coordX: 1430, coordY: 420}
    				   , {name: "GlovesBottomCenterSocket", x: 224, y: 332, coordX: 1485, coordY: 420}
    				   , {name: "GlovesMiddleRightSocket", x: 151, y: 294, coordX: 1430, coordY: 395}
    				   , {name: "GlovesMiddleCenterSocket", x: 224, y: 294, coordX: 1485, coordY: 395}
    				   , {name: "GlovesMiddleSocket", x: 187, y: 294, coordX: 1455, coordY: 395}
    				   , {name: "4SocketArmorTopRightSocket", x: 293, y: 172, coordX: 1560, coordY: 275}
    				   , {name: "4SocketArmorTopLeftSocket", x: 343, y: 172, coordX: 1615, coordY: 275}
    				   , {name: "4SocketArmorBottomRightSocket", x: 293, y: 235, coordX: 1560, coordY: 333}
    				   , {name: "4SocketArmorBottomLeftSocket", x: 343, y: 235, coordX: 1615, coordY: 333}
    				   , {name: "6SocketArmorTopRightSocket", x: 281, y: 140, coordX: 1560, coordY: 250}
    				   , {name: "6SocketArmorTopLeftSocket", x: 355, y: 140, coordX: 1615, coordY: 250}
    				   , {name: "6SocketArmorMiddleRightSocket", x: 281, y: 203, coordX: 1560, coordY: 305} ]
    
    	SocketList3 := [ {name: "6SocketArmorMiddleLeftSocket", x: 355, y: 203, coordX: 1615, coordY: 305}
    				   , {name: "6SocketArmorBottomRightSocket", x: 281, y: 266, coordX: 1560, coordY: 360}
    				   , {name: "6SocketArmorBottomLeftSocket", x: 355, y: 266, coordX: 1615, coordY: 360}
    				   , {name: "1SocketArmorMiddleSocket", x: 317, y: 204, coordX: 1585, coordY: 305}
    				   , {name: "BootsTopCenterSocket", x: 411, y: 257, coordX: 1690, coordY: 370}
    				   , {name: "BootsTopLeftSocket", x: 484, y: 257, coordX: 1740, coordY: 370}
    				   , {name: "BootsBottomCenterSocket", x: 411, y: 332, coordX: 1690, coordY: 420}
    				   , {name: "BootsBottomLeftSocket", x: 484, y: 332, coordX: 1740, coordY: 420}
    				   , {name: "BootsMiddleCenterSocket", x: 411, y: 294, coordX: 1690, coordY: 395}
    				   , {name: "BootsMiddleLeftSocket", x: 484, y: 294, coordX: 1740, coordY: 395}
    				   , {name: "BootsMiddleSocket", x: 447, y: 294, coordX: 1715, coordY: 395}
    				   , {name: "RightFingerSocket", x: 213, y: 202, coordX: 1485, coordY: 305}
    				   , {name: "LeftFingerSocket", x: 421, y: 202, coordX: 1690, coordY: 305}
    				   , {name: "AmuletSocket", x: 421, y: 137, coordX: 1690, coordY: 245}
    				   , {name: "BeltRightSocket", x: 293, y: 320, coordX: 1565, coordY: 420}
    				   , {name: "BeltCenterSocket", x: 317, y: 320, coordX: 1585, coordY: 420}
    				   , {name: "BeltLeftSocket", x: 343, y: 320, coordX: 1605, coordY: 420}
    				   , {name: "Flask1", x: 218, y: 410, coordX: 1487, coordY: 515}
    				   , {name: "Flask2", x: 270, y: 410, coordX: 1540, coordY: 515}
    				   , {name: "Flask3", x: 322, y: 410, coordX: 1592, coordY: 515}
    				   , {name: "Flask4", x: 375, y: 410, coordX: 1645, coordY: 515}
    				   , {name: "Flask5", x: 427, y: 410, coordX: 1697, coordY: 515} ]
    return
    
    LoadScanSettings:
        IniRead, SaveHotkey, UnrapeKitConfig.ini, ScanLangList, SaveHotkey, %A_Space%
        IniRead, SaveAsHotkey, UnrapeKitConfig.ini, ScanLangList, SaveAsHotkey, %A_Space%
        IniRead, CloseHotkey, UnrapeKitConfig.ini, ScanLangList, CloseHotkey, %A_Space%
        IniRead, YesHotkey, UnrapeKitConfig.ini, ScanLangList, YesHotkey, %A_Space%
        IniRead, AddressBarHotkey, UnrapeKitConfig.ini, ScanLangList, AddressBarHotkey, %A_Space%
        IniRead, SaveAsWindowName, UnrapeKitConfig.ini, ScanLangList, SaveAsWindowName, %A_Space%
        IniRead, ConfirmSaveAsWindowName, UnrapeKitConfig.ini, ScanLangList, ConfirmSaveAsWindowName, %A_Space%
        IniRead, SnippingToolWindowName, UnrapeKitConfig.ini, ScanLangList, SnippingToolWindowName, %A_Space%
        IniRead, SnippingToolPath, UnrapeKitConfig.ini, ScanLangList, SnippingToolPath, %A_Space%
    return
    
    ScanReadLoad:
    	Loop, %ScanCount% {
    		IniRead, Name%A_Index%, UnrapeKitConfig.ini, Names, Name%A_Index%, %A_Space%
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, IconToggle, IconToggle%A_Index%, %A_Space%
    		IniRead, Line%A_Index%, UnrapeKitConfig.ini, Lines, Line%A_Index%, %A_Space%
    		NameN:= % Name%A_Index%
    		IconToggleN:= % IconToggle%A_Index%
    		LineN:= % Line%A_Index%
    		CaptureName%A_Index%:= % Name%A_Index% "" Line%A_Index%
    		IniRead, %NameN%X, UnrapeKitConfig.ini, SpellCoordinates, %NameN%X, %A_Space%
    		IniRead, %NameN%Y, UnrapeKitConfig.ini, SpellCoordinates, %NameN%Y, %A_Space%
    	}
    return
    
    WriteScanSettings:
        IniWrite, %SaveHotkey%, UnrapeKitConfig.ini, ScanLangList, SaveHotkey
        IniWrite, %SaveAsHotkey%, UnrapeKitConfig.ini, ScanLangList, SaveAsHotkey
        IniWrite, %CloseHotkey%, UnrapeKitConfig.ini, ScanLangList, CloseHotkey
        IniWrite, %YesHotkey%, UnrapeKitConfig.ini, ScanLangList, YesHotkey
        IniWrite, %AddressBarHotkey%, UnrapeKitConfig.ini, ScanLangList, AddressBarHotkey
        IniWrite, %SaveAsWindowName%, UnrapeKitConfig.ini, ScanLangList, SaveAsWindowName
        IniWrite, %ConfirmSaveAsWindowName%, UnrapeKitConfig.ini, ScanLangList, ConfirmSaveAsWindowName
        IniWrite, %SnippingToolWindowName%, UnrapeKitConfig.ini, ScanLangList, SnippingToolWindowName
        IniWrite, %SnippingToolPath%, UnrapeKitConfig.ini, ScanLangList, SnippingToolPath
    return
    
    Type1Load:
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    	TrigN:= 3
    	IniRead, TriggeredCount%Hk%, UnrapeKitConfig.ini, TriggeredCount, TriggeredCount%Hk%, %A_Space%
    	IniRead, ScanDelay%Hk%, UnrapeKitConfig.ini, Delay, ScanDelay%Hk%, %A_Space%
    	IniRead, T1Cooldown%Hk%, UnrapeKitConfig.ini, Delay, T1Cooldown%Hk%, %A_Space%
    	Loop, % TriggeredCount%Hk% {
    		IniRead, TriggerToggle%TrigN%_%Hk%, UnrapeKitConfig.ini, TriggeredToggle, TriggerToggle%TrigN%_%Hk%, %A_Space%
    		IniRead, Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Spell%TrigN%, %A_Space%
    		Spell1:= Hkey%Hk%Spell%TrigN%
    		IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    		IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    		Iniread, Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%T1Cooldown%TrigN%, %A_Space%
    	}
    return
    
    Type2Load:
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Type2MoveToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type2MoveToggleHotkey%Hk%, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    return
    
    Type3Load:
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Type3Cast1ToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type3Cast1ToggleHotkey%Hk%, %A_Space%
    	IniRead, Type3Cast2ToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type3Cast2ToggleHotkey%Hk%, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    return
    
    Type4Load:
    	IniRead, Hkey%Hk%Spell1T4, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1T4, %A_Space%
    	Spell1:= Hkey%Hk%Spell1T4
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    return
    
    Type5Load:
    	IniRead, GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%
    	IniRead, GemSwap1Hotkey%Hk%_X, UnrapeKitConfig.ini, GemSwap1Coordinates, GemSwap1Hotkey%Hk%_X, %A_Space%
    	IniRead, GemSwap1Hotkey%Hk%_Y, UnrapeKitConfig.ini, GemSwap1Coordinates, GemSwap1Hotkey%Hk%_Y, %A_Space%
    	IniRead, GemSwap2Hotkey%Hk%_X, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2Hotkey%Hk%_X, %A_Space%
    	IniRead, GemSwap2Hotkey%Hk%_Y, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2Hotkey%Hk%_Y, %A_Space%
    	IniRead, GemSwap2AltHotkey%Hk%_X, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2AltHotkey%Hk%_X, %A_Space%
    	IniRead, GemSwap2AltHotkey%Hk%_Y, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2AltHotkey%Hk%_Y, %A_Space%
    return
    
    Type6Load:
    	IniRead, EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%, %A_Space%
    	IniRead, EquipSwap1Hotkey%Hk%_X, UnrapeKitConfig.ini, EquipSwap1Coordinates, EquipSwap1Hotkey%Hk%_X, %A_Space%
    	IniRead, EquipSwap1Hotkey%Hk%_Y, UnrapeKitConfig.ini, EquipSwap1Coordinates, EquipSwap1Hotkey%Hk%_Y, %A_Space%
    	IniRead, EquipSwap2Hotkey%Hk%_X, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2Hotkey%Hk%_X, %A_Space%
    	IniRead, EquipSwap2Hotkey%Hk%_Y, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2Hotkey%Hk%_Y, %A_Space%
    	IniRead, EquipSwap2AltHotkey%Hk%_X, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2AltHotkey%Hk%_X, %A_Space%
    	IniRead, EquipSwap2AltHotkey%Hk%_Y, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2AltHotkey%Hk%_Y, %A_Space%
    return
    
    Type7Load:
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations, %A_Space%
    	IniRead, GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%, %A_Space%
    	IniRead, EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniRead, Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, Type7Delay, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, Type7HotkeySpells, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, Type7HotkeyKey, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, Type7Send, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, %A_Space%
    		IniRead, ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, GemSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, GemSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, GemSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, GemSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, GemSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, GemSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, EquipSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, EquipSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, EquipSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, EquipSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%, %A_Space%
    		IniRead, KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    
    Type7Write:
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations, %A_Space%
    	IniWrite, % GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%, %A_Space%
    	IniWrite, % EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, Type7Delay, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, Type7HotkeySpells, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, Type7HotkeyKey, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, Type7Send, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, %A_Space%
    		IniWrite, % ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % GemSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % GemSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % GemSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % GemSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % GemSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % GemSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % EquipSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % EquipSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % EquipSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % EquipSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % EquipSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    
    Type7Write2:
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%
    	}
    return
    GeneralFunctions.ahk
    Code:
    GuiBuild:
        X_Offset := GuiWidth / 2
        Y_Offset := GuiHeight / 2
        If (Xpos < X_Offset)
            Move_X := 0
        Else If (Xpos < A_ScreenWidth - X_Offset)
            Move_X := Xpos - X_Offset
        Else
            Move_X := A_ScreenWidth - GuiWidth
        If (Ypos < Y_Offset)
            Move_Y := 0
        Else If (Ypos < A_ScreenHeight - Y_Offset)
            Move_Y := Ypos - Y_Offset
        Else
            Move_Y := A_ScreenHeight - GuiHeight - 30
        Gui, -0x80000 AlwaysOnTop
    return
    
    HotkeySetup:
    	gosub HotkeySetupRead
        Loop, %HotKeyLimit% {
    		If Hkey%A_Index%Toggle = 0
    			Hotkey, % Hkey%A_Index%Shortcut, Hotkey%A_Index%
    		If (Hkey%A_Index%Type1 = 1) {
    			gosub Type1Load
    		}
    		If (Hkey%A_Index%Type2 = 1) {
    			gosub Type2Load
    		}
    		If (Hkey%A_Index%Type3 = 1) {
    			gosub Type3Load
    		}
    		If (Hkey%A_Index%Type4 = 1) {
    			gosub Type4Load
    		}
    		If (Hkey%A_Index%Type5 = 1) {
    			gosub Type5Load
    		}
    		If (Hkey%A_Index%Type6 = 1) {
    			gosub Type6Load
    		}
    		If (Hkey%A_Index%Type7 = 1) {
    			gosub Type7Load
    		}
    	}
    return
    
    KeyWrite:
    		If (Hkey%Hk%Key = "Q") {
    			KeyX_%Hk%:= 1440
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "W") {
    			KeyX_%Hk%:= 1495
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "E") {
    			KeyX_%Hk%:= 1550
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "R") {
    			KeyX_%Hk%:= 1605
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "T") {
    			KeyX_%Hk%:= 1655
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "LButton") {
    			KeyX_%Hk%:= 1550
    			KeyY_%Hk%:= 975
    		}
    		If (Hkey%Hk%Key = "MButton") {
    			KeyX_%Hk%:= 1600
    			KeyY_%Hk%:= 975
    		}
    		If (Hkey%Hk%Key = "RButton") {
    			KeyX_%Hk%:= 1650
    			KeyY_%Hk%:= 975
    		}
    	IniWrite, % KeyX_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyX_%Hk%
    	IniWrite, % KeyY_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyY_%Hk%
    	Hk += 1
    	Gosub HkTypeConfigLoop
    Return
    
    GuiSD:
        Gui, Submit
        Gui, Destroy
    Return
    
    RemoveToolTip:
        ToolTip
    Return
    DelayConfig.ahk
    Code:
    DelayConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 220
    	GuiHeight:= 160
    	gosub GuiBuild
    	Gui, Add, Text, x10 y13, Server Latency (ms)
    	Gui, Add, Edit, x140 y10 w30 h20 vDelay, %Delay%
    	Gui, Add, Text, x10 y43, Maximum Frame Time (Ms)
    	Gui, Add, Edit, x140 y40 w30 h20 vFrameTime, %FrameTime%
    	Gui, Add, Text, x10 y73, Keyboard Delays (Ms)
    	Gui, Add, Edit, x140 y70 w30 h20 vKeyDelay1, %KeyDelay1%
    	Gui, Add, Edit, x180 y70 w30 h20 vKeyDelayPress, %KeyDelayPress%
    	Gui, Add, Text, x10 y103, Mouse Delay (Ms)
    	Gui, Add, Edit, x140 y100 w30 h20 vMouseDelay, %MouseDelay%
    	Gui, Add, Button, x20 y130 w90 h20 gDelayConfigRecord Default, Record
    	Gui, Add, Button, x120 y130 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Delay configuration
    Return
    
    DelayWrite:
    	gosub GuiSD
    	IniWrite, %Delay%, UnrapeKitConfig.ini, Delay, Delay
    	IniWrite, %FrameTime%, UnrapeKitConfig.ini, Delay, FrameTime
    	IniWrite, %KeyDelay1%, UnrapeKitConfig.ini, Delay, KeyDelay1
    	IniWrite, %KeyDelayPress%, UnrapeKitConfig.ini, Delay, KeyDelayPress
    	IniWrite, %MouseDelay%, UnrapeKitConfig.ini, Delay, MouseDelay
    return
    
    DelayConfigRecord:
    	gosub DelayWrite
    	Reload
    Return
    
    Delay:
    		MouseGetPos, Xpos, Ypos
    		GuiWidth:= 220
    		GuiHeight:= 160
    		gosub GuiBuild
    		Gui, Add, Text, x10 y13, Server Latency (ms)
    		Gui, Add, Edit, x140 y10 w30 h20 vDelay, %Delay%
    		Gui, Add, Text, x10 y43, Maximum Frame Time (Ms)
    		Gui, Add, Edit, x140 y40 w30 h20 vFrameTime, %FrameTime%
    		Gui, Add, Text, x10 y73, Keyboard Delays (Ms)
    		Gui, Add, Edit, x140 y70 w30 h20 vKeyDelay1, %KeyDelay1%
    		Gui, Add, Edit, x180 y70 w30 h20 vKeyDelayPress, %KeyDelayPress%
    		Gui, Add, Text, x10 y103, Mouse Delay (Ms)
    		Gui, Add, Edit, x140 y100 w30 h20 vMouseDelay, %MouseDelay%
    		Gui, Add, Button, x20 y130 w90 h20 gDelayRecord Default, Record
    		Gui, Add, Button, x120 y130 w90 h20 gCancel, Reload
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Server Latency
    Return
    
    DelayRecord:
    		gosub DelayWrite
    Return
    ScreenCapture.ahk
    Code:
    ScreenCapture:
    	GuiWidth:= 300
    	GuiHeight:= 380
    	MouseGetPos, Xpos, Ypos
        gosub LoadScanSettings
    	gosub GuiBuild
        Move_X -= (GuiWidth + 20)
        Move_Y -= (GuiHeight + 20)
        Gui, Add, Text, x10 y10 w280, move the cursor to the top left of the snip and hit enter/tab
        Gui, Add, Text, x10 y25 w280, Hotkey syntax: ^ (Ctrl), ! (Alt), + (Shift), # (Win).
        Gui, Add, Text, x10 y40 w280,  Examples: ^!c for Ctrl+Alt+C
        Gui, Add, Edit, x10 y70 w100 h20 vSaveHotkey, % SaveHotkey
        Gui, Add, Text, % "x" 120 " y" 73, SaveHotkey
        Gui, Add, Edit, x10 y100 w100 h20 vSaveAsHotkey, % SaveAsHotkey
        Gui, Add, Text, % "x" 120 " y" 103, SaveAsHotkey
        Gui, Add, Edit, x10 y130 w100 h20 vCloseHotkey, % CloseHotkey
        Gui, Add, Text, % "x" 120 " y" 133, CloseHotkey
        Gui, Add, Edit, x10 y160 w100 h20 vYesHotkey, % YesHotkey
        Gui, Add, Text, % "x" 120 " y" 163, YesHotkey
        Gui, Add, Edit, x10 y190 w100 h20 vAddressBarHotkey, % AddressBarHotkey
        Gui, Add, Text, % "x" 120 " y" 193, AddressBarHotkey
        Gui, Add, Edit, x10 y220 w100 h20 vSaveAsWindowName, % SaveAsWindowName
        Gui, Add, Text, % "x" 120 " y" 223, SaveAsWindowName
        Gui, Add, Edit, x10 y250 w100 h20 vConfirmSaveAsWindowName, % ConfirmSaveAsWindowName
        Gui, Add, Text, % "x" 120 " y" 253, ConfirmSaveAsWindowName
        Gui, Add, Edit, x10 y280 w100 h20 vSnippingToolWindowName, % SnippingToolWindowName
        Gui, Add, Text, % "x" 120 " y" 283, SnippingToolWindowName
        Gui, Add, Edit, x10 y310 w100 h20 vSnippingToolPath, % SnippingToolPath
        Gui, Add, Text, % "x" 120 " y" 313, SnippingToolPath
    ; Run on PowerShell as admin: "Get-AppXPackage *Microsoft.ScreenSketch* -AllUsers" , then paste the directory on a browser to navigate to the correct directory (these might not work well though).
    
        Gui, Add, Button, x10 y350 w135 gCaptureSave Default, Save and Continue
        Gui, Add, Button, x155 y350 w135 gCancel, Cancel
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, Language Settings and top-left snip coordinates
    Return
    
    CaptureSave:
    	MouseGetPos, CaptureX1, CaptureY1
    	gosub GuiSD
    	gosub WriteScanSettings
    	gosub ScreenCapture2
    Return
    
    ScreenCapture2:
    
        IniRead, TempName, UnrapeKitConfig.ini, TemporaryScan, TempName
        IniRead, TempLine, UnrapeKitConfig.ini, TemporaryScan, TempLine
        N := ScanCount + 1
    	GuiWidth:= 210
    	GuiHeight:= 160
        gosub GuiBuild
        Move_X -= (GuiWidth + 20)
        Move_Y -= (GuiHeight + 20)
        Gui, Add, Text, x10 y10, Enter the spell name and icon line
        Gui, Add, Text, x10 y25, from the bottom up in the spell menu
        Gui, Add, Text, x10 y40, then move the cursor to the second
        Gui, Add, Text, x10 y55, set of coordinates and press Enter
        Gui, Add, Text, x10 y80, name                                                  Line
        Gui, Add, Edit, x10 y100 w150 h20 vTempName, %TempName%
        Gui, Add, Edit, x+10 w20 h20 vTempLine, %TempLine%
        Gui, Add, Button, x10 y130 w90 h20 gCaptureSave2 Default, Ok
        Gui, Add, Button, x110 y130 w90 h20 gCancel, Reload
        Gui, Show, % "w210 h160 X" Move_X " Y" Move_Y, name, menu line and B/R coordinates
    return
    
    CaptureSave2:
    	MouseGetPos, CaptureX2, CaptureY2
        gosub GuiSD
        IniWrite, %TempName%, UnrapeKitConfig.ini, TemporaryScan, TempName
        IniWrite, %TempLine%, UnrapeKitConfig.ini, TemporaryScan, TempLine
        CaptureName := TempName TempLine
        gosub SnippingTool
    return
    
    SnippingTool:
        SetMouseDelay, 40
        SetKeyDelay, 40, 40
        SendInput {PrintScreen}
        sleep, 500
        Send, #+s
        sleep, 400
        BlockInput, MouseMove
    	MouseClickDrag, L, CaptureX1, CaptureY1, CaptureX2, CaptureY2, 2
        BlockInput, MouseMoveOff
    ;    run C:\Program Files\WindowsApps\Microsoft.ScreenSketch_11.2407.3.0_x64__8wekyb3d8bbwe\SnippingTool\SnippingTool.exe
        sleep, 500
        Mousemove, 1800, 850, 2
        sleep, 100
        MouseClick, L
        sleep, 1500
        WinMaximize, Snipping Tool
        sleep, 300
    	MouseClick, L, 150, 20
        sleep, 300
        tooltip, Send, %SaveAsHotkey%
        Send, %SaveAsHotkey%
        sleep, 300
        tooltip, WinWait, %SaveAsWindowName%
        WinWait, %SaveAsWindowName%
        sleep, 300
        tooltip, SendInput %CaptureName%.png
        SendInput %CaptureName%.png
        sleep, 300
        tooltip, Send, %AddressBarHotkey%
        Send, %AddressBarHotkey%
        sleep, 300
        tooltip, SendInput %A_ScriptDir%
        SendInput %A_ScriptDir%
        sleep, 300
        tooltip, SendInput {Enter}
        SendInput {Enter}
        sleep, 300
        Send, !s
        ImageRepeat := 0
        sleep, 300
        Send, %YesHotkey%
        ImageRepeat := 1
        sleep, 300
    ;    Send, !F4
    ;    MouseClick, L, 1910, 10
        WinClose, Snipping Tool
        MouseMove, CaptureX2, CaptureY2
        if (CaptureX1 >= 1410 and CaptureX2 <= 1605 and CaptureY1 >= 410 and CaptureY2 <= 925) {
            CaptureX1 -= 5
            CaptureY1 -= 5
            CaptureX2 += 5
            CaptureY2 += 5
            tooltip, gosub CaptureSave3
            gosub CaptureSave3
        }
    
        SetMouseDelay, %MouseDelay%
        SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
        Reload
        SetTimer, RemoveToolTip, -500
    return
    
    CaptureSave3:
        Loop, 20 {
            ImageSearch, %TempName%X, %TempName%Y, %CaptureX1%, %CaptureY1%, %CaptureX2%, %CaptureY2%, *10 %CaptureName%.png
            if (ErrorLevel = 2 and A_Index = 20)
                ToolTip, Could Not perform scan
            else if (ErrorLevel = 1 and A_Index = 20)
                ToolTip, Could Not Find Scan %CaptureName%.png
            else if (ErrorLevel = 0) {
                Send, {Click}
                if (ImageRepeat = 1) {
                    Loop {
                        if (CaptureName = CaptureName%A_Index%) {
                            N := A_Index
                            break
                        }
                    }
                } else {
                    ScanCount += 1
                    N := ScanCount
                }
                Name%N%:= TempName
                Line%N%:= TempLine
                IconToggle%N%:= 1
                IniWrite, %ScanCount%, UnrapeKitConfig.ini, ScanCount, ScanCount
                IniWrite, % IconToggle%N%, UnrapeKitConfig.ini, IconToggle, IconToggle%N%
                IniWrite, % %TempName%X, UnrapeKitConfig.ini, SpellCoordinates, %TempName%X
                IniWrite, % %TempName%Y, UnrapeKitConfig.ini, SpellCoordinates, %TempName%Y
                IniWrite, % Name%N%, UnrapeKitConfig.ini, Names, Name%N%
                IniWrite, % Line%N%, UnrapeKitConfig.ini, Lines, Line%N%
                Break
            }
            Sleep, 10
        }
    return
    ; ==================== END SCREEN CAPTURE HANDLERS ====================
    ScanConfig.ahk
    Code:
    ScanConfig:
    	IniRead, ScanCount, UnrapeKitConfig.ini, ScanCount, ScanCount
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y5 w200 h26, Icons Count:
    	Gui, Add, Text, x10 y33 w120 h26, Scans:
    	Gui, Add, Edit, x145 y30 w30 h21 vScanCount, %ScanCount%
    	Gui, Add, Button, x10 y70 w90 h20 gScanDefinitions Default, Definitions
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Scan Count
    Return
    
    ScanDefinitions:
    	gosub GuiSD
    	IniWrite, %ScanCount%, UnrapeKitConfig.ini, ScanCount, ScanCount
    		Loop, %ScanCount% {
    			IniRead, Name%A_Index%, UnrapeKitConfig.ini, Names, Name%A_Index%
    			IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, IconToggle, IconToggle%A_Index%
    			IniRead, Line%A_Index%, UnrapeKitConfig.ini, Lines, Line%A_Index%
    			NameN:= % Name%A_Index%
    			LineN:= % Line%A_Index%
    		}
    	H:= 1
    	W:= 1
    	HMax:= 1
    	SysGet, SGW, 71
    	MouseGetPos, Xpos, Ypos
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, X10 Y10, Toggle`, SpellName`, Line# (Bottom to Top)
    	Loop, %ScanCount% {
    		GuiY:= 50 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 95
    			If (GuiY > ScreenHeight) {
    					W+= 1
    					HMax:= H
    					H= 1
    			}
    		Y1:= 18 + 30 * H
    		Y2:= 15 + 30 * H
    		GuiWidth:= 240 * W
    			If (W = 1) {
    				GuiHeight:= 105 + 30 * H
    				AddHeight:= 48 + 30 * H
    				AddButtonHeight:= 45 + 30 * H
    				ButtonHeight:= 75 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 105 + 30 * HMax
    				AddHeight:= 48 + 30 * HMax
    				AddButtonHeight:= 45 + 30 * HMax
    				ButtonHeight:= 75 + 30 * HMax
    			}
    		Button1Width:= GuiWidth - 200
    		Button2Width:= GuiWidth - 100
    		TextWidth:= GuiWidth - 215
    		CheckboxWidth:= GuiWidth - 195
    		NameWidth:= GuiWidth - 175
    		LineWidth:= GuiWidth - 45
    		Gui, Add, Text, x%TextWidth% Y%Y1%, %A_Index%
    		Gui, Add, Checkbox, % " x" CheckboxWidth " y" Y1 " h13 w13 vIconToggle" A_Index " Checked" IconToggle%A_Index%
    		Gui, Add, Edit, x%NameWidth% y%Y2% w120 h20 vName%A_Index%, % Name%A_Index%
    		Gui, Add, Edit, x%LineWidth% y%Y2% w20 h20 vLine%A_Index%, % Line%A_Index%
    			If (A_Index = ScanCount) {
    				X_Offset:= GuiWidth/2
    				Y_Offset:= GuiHeight/2
    				X_Limit:= A_ScreenWidth - X_Offset
    				Y_Limit:= A_ScreenHeight - Y_Offset
    				Mouse_X:= Xpos - X_Offset
    				Mouse_Y:= Ypos - Y_Offset
    					If Xpos between 0 and %X_Offset%
    						Move_X:= 0
    					If Xpos between %X_Offset% and %X_Limit%
    						Move_X:= Mouse_X
    					If Xpos between %X_Limit% and %A_ScreenWidth%
    						Move_X:= A_ScreenWidth - GuiWidth
    					If Ypos between 0 and %Y_Offset%
    						Move_Y:= 0
    					If Ypos between %Y_Offset% and %Y_Limit%
    						Move_Y:= Mouse_Y
    					If Ypos between %Y_Limit% and %A_ScreenHeight%
    						Move_Y:= A_ScreenHeight - GuiHeight - 30
    				Gui, Add, Button, x10 y%AddButtonHeight% w90 h20 gAddScan, Add
    				Gui, Add, Text, x110 y%AddHeight%, Add
    				Gui, Add, Edit, x140 y%AddButtonHeight% w30 h20 vXDefinitions
    				Gui, Add, Text, x180 y%AddHeight%, Definition(s)
    				Gui, Add, Button, x%Button1Width% y%ButtonHeight% w90 h20 gScanWrite Default, Record
    				Gui, Add, Button, x%Button2Width% y%ButtonHeight% w90 h20 gCancel, Reload
    				Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Scan Configuration
    				Break
    			}
    		H+= 1
    	}
    Return
    
    AddScan:
    	Gui, Submit
    	Gui, Destroy
    	N:= 1
    	Loop, %ScanCount% {
    		IniWrite, % IconToggle%A_Index%, UnrapeKitConfig.ini, IconToggle, IconToggle%A_Index%
    		IniWrite, % Name%A_Index%, UnrapeKitConfig.ini, Names, Name%A_Index%
    		IniWrite, % Line%A_Index%, UnrapeKitConfig.ini, Lines, Line%A_Index%
    		N+=1
    	}
    	ScanCount+= %XDefinitions%
    	Gosub ScanDefinitions
    Return
    
    ScanWrite:
    	Gui, Submit
    	Gui, Destroy
    	N:= 1
    	Loop, %ScanCount% {
    		IniWrite, % IconToggle%A_Index%, UnrapeKitConfig.ini, IconToggle, IconToggle%A_Index%
    		IniWrite, % Name%A_Index%, UnrapeKitConfig.ini, Names, Name%A_Index%
    		IniWrite, % Line%A_Index%, UnrapeKitConfig.ini, Lines, Line%A_Index%
    		N+=1
    	}
    	Gosub SpellScan
    Return
    SpellScan.ahk
    Code:
    SpellScan:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, 1660, 1025 ; t
    	Sleep, %Delay%
    	MouseClick, , 1660, 1025 ; t
    	Sleep, %Delay%
    	Loop, %ScanCount% {
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, IconToggle, IconToggle%A_Index%
    		If (IconToggle%A_Index% = 1) {
    			IniRead, Name%A_Index%, UnrapeKitConfig.ini, Names, Name%A_Index%
    			IniRead, Line%A_Index%, UnrapeKitConfig.ini, Lines, Line%A_Index%
    			NameN:= % Name%A_Index%
    			LineN:= % Line%A_Index%
    			ImageSearch, %NameN%X, %NameN%Y, 1410, 410, 1605, 925, *10 %NameN%%LineN%.png
    				If(ErrorLevel = 0) {
    					IniWrite, % %NameN%X, UnrapeKitConfig.ini, SpellCoordinates, %NameN%X
    					IniWrite, % %NameN%Y, UnrapeKitConfig.ini, SpellCoordinates, %NameN%Y
    				}
    		}
    	}
    	Send, {Esc}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	MouseMove, Xpos, Ypos
    	BlockInput, MouseMoveOff
    Return
    HotkeyConfig.ahk
    Code:
    HotkeyConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, Hotkeys wanted:
    	Gui, Add, Text, x50 y33, 200 Hotkeys Maximum
    	Gui, Add, Edit, x10 y30 w30 h20 vHotkeyLimit, %HotkeyLimit%
    	Gui, Add, Button, x10 y70 w90 h20 gHkeyEdit Default, Hotkeys
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Count
    Return
    
    HkeyEdit:
    	gosub GuiSD
    	IniWrite, %HotkeyLimit%, UnrapeKitConfig.ini, Hotkeys, HotkeyLimit
    	H:= 1
    	W:= 1
    	HMax:= 1
    	Hk:= 1
    	MouseGetPos, Xpos, Ypos
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Loop, %HotkeyLimit% {
    		GuiY:= 120 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    			If (GuiY > ScreenHeight) {
    				W+= 1
    				HMax:= H
    				H= 1
    			}
    		Y1:= 13 + 30 * H
    		Y2:= 10 + 30 * H
    		GuiWidth:= 610 * W
    			If (W = 1) {
    				GuiHeight:= 80 + 30 * H
    				ButtonHeight:= 50 + 30 * H
    				ButtonTxtHeight:= 53 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 80 + 30 * HMax
    				ButtonHeight:= 50 + 30 * HMax
    				ButtonTxtHeight:= 53 + 30 * HMax
    			}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		Text1X:= GuiWidth - 550
    		Radio0X:= GuiWidth - 590
    		Radio1X:= GuiWidth - 520
    		Radio2X:= GuiWidth - 480
    		Radio3X:= GuiWidth - 440
    		Radio4X:= GuiWidth - 400
    		Radio5X:= GuiWidth - 360
    		Radio6X:= GuiWidth - 320
    		Radio7X:= GuiWidth - 280
    		EditX:= GuiWidth - 240
    		EditButtonX:= GuiWidth -100
    		Radio0Txt:= GuiWidth - 600
    		Radio1Txt:= GuiWidth - 530
    		Radio2Txt:= GuiWidth - 490
    		Radio3Txt:= GuiWidth - 450
    		Radio4Txt:= GuiWidth - 410
    		Radio5Txt:= GuiWidth - 370
    		Radio6Txt:= GuiWidth - 330
    		Radio7Txt:= GuiWidth - 290
    		EditTxt:= GuiWidth - 220
    		EditButtonTxt:= GuiWidth -85
    		Gui, Add, Text, x%Radio0Txt% y20,Disable  Index
    		Gui, Add, Text, x%Radio1Txt% y20,Type 1
    		Gui, Add, Text, x%Radio2Txt% y20,Type 2
    		Gui, Add, Text, x%Radio3Txt% y20,Type 3
    		Gui, Add, Text, x%Radio4Txt% y20,Type 4
    		Gui, Add, Text, x%Radio5Txt% y20,Type 5
    		Gui, Add, Text, x%Radio6Txt% y20,Type 6
    		Gui, Add, Text, x%Radio7Txt% y20,Type 7
    		Gui, Add, Text, x%EditTxt% y20, Hotkey Shortcut
    		Gui, Add, Text, x%EditButtonTxt% y20, Hotkey Edit
    		Gui, Add, Text, x%Text1X% y%Y1%, %Hk%
    		Gui, Add, Radio, % "X" Radio0x " Y" Y1 " h13 w13 vHkey" Hk "Toggle Checked" Hkey%Hk%Toggle
    		Gui, Add, Radio, % "x" Radio1X " y" Y1 " h13 w13 vHkey" Hk "Type1 Checked" Hkey%Hk%Type1,1
    		Gui, Add, Radio, % "x" Radio2X " y" Y1 " h13 w13 vHkey" Hk "Type2 Checked" Hkey%Hk%Type2,2
    		Gui, Add, Radio, % "x" Radio3X " y" Y1 " h13 w13 vHkey" Hk "Type3 Checked" Hkey%Hk%Type3,3
    		Gui, Add, Radio, % "x" Radio4X " y" Y1 " h13 w13 vHkey" Hk "Type4 Checked" Hkey%Hk%Type4,4
    		Gui, Add, Radio, % "x" Radio5X " y" Y1 " h13 w13 vHkey" Hk "Type5 Checked" Hkey%Hk%Type5,5
    		Gui, Add, Radio, % "x" Radio6X " y" Y1 " h13 w13 vHkey" Hk "Type6 Checked" Hkey%Hk%Type6,6
    		Gui, Add, Radio, % "x" Radio7X " y" Y1 " h13 w13 vHkey" Hk "Type7 Checked" Hkey%Hk%Type7,7
    		Gui, Add, Edit, x%EditX% y%Y2% w120 h20 vHkey%Hk%Shortcut, % Hkey%Hk%Shortcut
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditHk, %Hk%
    		If (Hk = HotkeyLimit) {
    			gosub GuiBuild
    			Gui, Add, Button, x10 y%ButtonHeight% w90 H20 gHkAdd, Add
    			Gui, Add, Text, x110 y%ButtonTxtHeight%,Add
    			Gui, Add, Edit, x140 y%ButtonHeight% w20 h20 vHotkeyAdd
    			Gui, Add, Text, x170 y%ButtonTxtHeight%,Hotkey(s)
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gRecordHk Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gSetHk, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Hotkey Configuration
    			Break
    		}
    	H+= 1
    	Hk+= 1
    	}
    Return
    
    WriteHk:
    	IniWrite, % Hkey%Hk%Toggle, UnrapeKitConfig.ini, HotkeyToggle, Hkey%Hk%Toggle
    	IniWrite, % Hkey%Hk%Type1, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type1
    	IniWrite, % Hkey%Hk%Type2, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type2
    	IniWrite, % Hkey%Hk%Type3, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type3
    	IniWrite, % Hkey%Hk%Type4, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type4
    	IniWrite, % Hkey%Hk%Type5, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type5
    	IniWrite, % Hkey%Hk%Type6, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type6
    	IniWrite, % Hkey%Hk%Type7, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type7
    	IniWrite, % Hkey%Hk%Shortcut, UnrapeKitConfig.ini, HotkeyShortcut, Hkey%Hk%Shortcut
    		If (Hkey%Hk%Shortcut !=  AND Hkey%Hk%Toggle = 1)
    			Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    return
    
    RecordHk:
    	gosub GuiSD
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub WriteHk
    		Hk+= 1
    	}
    	reload
    Return
    
    HkAdd:
    	gosub GuiSD
    	HotkeyLimit+= %HotkeyAdd%
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub WriteHk
    		Hk+= 1
    	}
    	gosub HkeyEdit
    Return
    
    SetHk:
    	gosub GuiSD
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub WriteHk
    		Hk+= 1
    	}
    	Hk:= 1
    	gosub HkTypeConfigLoop
    Return
    
    EditHk:
    	A_GuiControlHk:= A_GuiControl
    	Hk:= A_GuiControlHk
    	If (Hkey%Hk%Toggle = 0)
    		Hkey%Hk%Toggle = 1
    	gosub GuiSD
    	gosub WriteHK
    	gosub HkTypeConfigLoop
    Return
    
    HkTypeConfigLoop:
    	Loop {
    			If (Hkey%Hk%Toggle = 1) {
    				Hk += 1
    			}
    			If (Hk > HotKeyLimit) {
    				Reload
    				Break
    			}
    			If (Hkey%Hk%Type1 = 1) {
    				Gosub ConfigType1
    				Break
    			}
    			If (Hkey%Hk%Type2 = 1) {
    				Gosub ConfigType2
    				Break
    			}
    			If (Hkey%Hk%Type3 = 1) {
    				Gosub ConfigType3
    				Break
    			}
    			If (Hkey%Hk%Type4 = 1) {
    				Gosub ConfigType4
    				Break
    			}
    			If (Hkey%Hk%Type5 = 1) {
    				Gosub GemSwap1
    				Break
    			}
    			If (Hkey%Hk%Type6 = 1) {
    				Gosub EquipSwap1
    				Break
    			}
    			If (Hkey%Hk%Type7 = 1) {
    				Gosub Type7Config
    				Break
    			}
    	}
    Return
    
    ;HkTypeConfigRouting:
    ;	If (Hkey%Hk%Toggle = 1)
    ;		Hk += 1
    ;	If (Hk > HotKeyLimit)
    ;		Reload
    ;	If (Hkey%Hk%Type1 = 1)
    ;		Gosub ConfigType1
    ;	If (Hkey%Hk%Type2 = 1)
    ;		Gosub ConfigType2
    ;	If (Hkey%Hk%Type3 = 1)
    ;		Gosub ConfigType3
    ;	If (Hkey%Hk%Type4 = 1)
    ;		Gosub ConfigType4
    ;	If (Hkey%Hk%Type5 = 1)
    ;		Gosub GemSwap1
    ;	If (Hkey%Hk%Type6 = 1)
    ;		Gosub EquipSwap1
    ;	If (Hkey%Hk%Type7 = 1)
    ;		Gosub Type7Config
    ;Return
    HotkeyRouting.ahk
    Code:
    Hotkey1:
    	Hk:= 1
    	Gosub HotkeyRouting
    Return
    
    Hotkey2:
    	Hk:= 2
    	Gosub HotkeyRouting
    Return
    
    Hotkey3:
    	Hk:= 3
    	Gosub HotkeyRouting
    Return
    
    Hotkey4:
    	Hk:= 4
    	Gosub HotkeyRouting
    Return
    
    Hotkey5:
    	Hk:= 5
    	Gosub HotkeyRouting
    Return
    
    Hotkey6:
    	Hk:= 6
    	Gosub HotkeyRouting
    Return
    
    Hotkey7:
    	Hk:= 7
    	Gosub HotkeyRouting
    Return
    
    Hotkey8:
    	Hk:= 8
    	Gosub HotkeyRouting
    Return
    
    Hotkey9:
    	Hk:= 9
    	Gosub HotkeyRouting
    Return
    
    Hotkey10:
    	Hk:= 10
    	Gosub HotkeyRouting
    Return
    
    Hotkey11:
    	Hk:= 11
    	Gosub HotkeyRouting
    Return
    
    Hotkey12:
    	Hk:= 12
    	Gosub HotkeyRouting
    Return
    
    Hotkey13:
    	Hk:= 13
    	Gosub HotkeyRouting
    Return
    
    Hotkey14:
    	Hk:= 14
    	Gosub HotkeyRouting
    Return
    
    Hotkey15:
    	Hk:= 15
    	Gosub HotkeyRouting
    Return
    
    Hotkey16:
    	Hk:= 16
    	Gosub HotkeyRouting
    Return
    
    Hotkey17:
    	Hk:= 17
    	Gosub HotkeyRouting
    Return
    
    Hotkey18:
    	Hk:= 18
    	Gosub HotkeyRouting
    Return
    
    Hotkey19:
    	Hk:= 19
    	Gosub HotkeyRouting
    Return
    
    Hotkey20:
    	Hk:= 20
    	Gosub HotkeyRouting
    Return
    
    Hotkey21:
    	Hk:= 21
    	Gosub HotkeyRouting
    Return
    
    Hotkey22:
    	Hk:= 22
    	Gosub HotkeyRouting
    Return
    
    Hotkey23:
    	Hk:= 23
    	Gosub HotkeyRouting
    Return
    
    Hotkey24:
    	Hk:= 24
    	Gosub HotkeyRouting
    Return
    
    Hotkey25:
    	Hk:= 25
    	Gosub HotkeyRouting
    Return
    
    Hotkey26:
    	Hk:= 26
    	Gosub HotkeyRouting
    Return
    
    Hotkey27:
    	Hk:= 27
    	Gosub HotkeyRouting
    Return
    
    Hotkey28:
    	Hk:= 28
    	Gosub HotkeyRouting
    Return
    
    Hotkey29:
    	Hk:= 29
    	Gosub HotkeyRouting
    Return
    
    Hotkey30:
    	Hk:= 30
    	Gosub HotkeyRouting
    Return
    
    Hotkey31:
    	Hk:= 31
    	Gosub HotkeyRouting
    Return
    
    Hotkey32:
    	Hk:= 32
    	Gosub HotkeyRouting
    Return
    
    Hotkey33:
    	Hk:= 33
    	Gosub HotkeyRouting
    Return
    
    Hotkey34:
    	Hk:= 34
    	Gosub HotkeyRouting
    Return
    
    Hotkey35:
    	Hk:= 35
    	Gosub HotkeyRouting
    Return
    
    Hotkey36:
    	Hk:= 36
    	Gosub HotkeyRouting
    Return
    
    Hotkey37:
    	Hk:= 37
    	Gosub HotkeyRouting
    Return
    
    Hotkey38:
    	Hk:= 38
    	Gosub HotkeyRouting
    Return
    
    Hotkey39:
    	Hk:= 39
    	Gosub HotkeyRouting
    Return
    
    Hotkey40:
    	Hk:= 40
    	Gosub HotkeyRouting
    Return
    
    Hotkey41:
    	Hk:= 41
    	Gosub HotkeyRouting
    Return
    
    Hotkey42:
    	Hk:= 42
    	Gosub HotkeyRouting
    Return
    
    Hotkey43:
    	Hk:= 43
    	Gosub HotkeyRouting
    Return
    
    Hotkey44:
    	Hk:= 44
    	Gosub HotkeyRouting
    Return
    
    Hotkey45:
    	Hk:= 45
    	Gosub HotkeyRouting
    Return
    
    Hotkey46:
    	Hk:= 46
    	Gosub HotkeyRouting
    Return
    
    Hotkey47:
    	Hk:= 47
    	Gosub HotkeyRouting
    Return
    
    Hotkey48:
    	Hk:= 48
    	Gosub HotkeyRouting
    Return
    
    Hotkey49:
    	Hk:= 49
    	Gosub HotkeyRouting
    Return
    
    Hotkey50:
    	Hk:= 50
    	Gosub HotkeyRouting
    Return
    
    Hotkey51:
    	Hk:= 51
    	Gosub HotkeyRouting
    Return
    
    Hotkey52:
    	Hk:= 52
    	Gosub HotkeyRouting
    Return
    
    Hotkey53:
    	Hk:= 53
    	Gosub HotkeyRouting
    Return
    
    Hotkey54:
    	Hk:= 54
    	Gosub HotkeyRouting
    Return
    
    Hotkey55:
    	Hk:= 55
    	Gosub HotkeyRouting
    Return
    
    Hotkey56:
    	Hk:= 56
    	Gosub HotkeyRouting
    Return
    
    Hotkey57:
    	Hk:= 57
    	Gosub HotkeyRouting
    Return
    
    Hotkey58:
    	Hk:= 58
    	Gosub HotkeyRouting
    Return
    
    Hotkey59:
    	Hk:= 59
    	Gosub HotkeyRouting
    Return
    
    Hotkey60:
    	Hk:= 60
    	Gosub HotkeyRouting
    Return
    
    Hotkey61:
    	Hk:= 61
    	Gosub HotkeyRouting
    Return
    
    Hotkey62:
    	Hk:= 62
    	Gosub HotkeyRouting
    Return
    
    Hotkey63:
    	Hk:= 63
    	Gosub HotkeyRouting
    Return
    
    Hotkey64:
    	Hk:= 64
    	Gosub HotkeyRouting
    Return
    
    Hotkey65:
    	Hk:= 65
    	Gosub HotkeyRouting
    Return
    
    Hotkey66:
    	Hk:= 66
    	Gosub HotkeyRouting
    Return
    
    Hotkey67:
    	Hk:= 67
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey68:
    	Hk:= 68
    	Gosub HotkeyRouting
    Return
    
    Hotkey69:
    	Hk:= 69
    	Gosub HotkeyRouting
    Return
    
    Hotkey70:
    	Hk:= 70
    	Gosub HotkeyRouting
    Return
    
    Hotkey71:
    	Hk:= 71
    	Gosub HotkeyRouting
    Return
    
    Hotkey72:
    	Hk:= 72
    	Gosub HotkeyRouting
    Return
    
    Hotkey73:
    	Hk:= 73
    	Gosub HotkeyRouting
    Return
    
    Hotkey74:
    	Hk:= 74
    	Gosub HotkeyRouting
    Return
    
    Hotkey75:
    	Hk:= 75
    	Gosub HotkeyRouting
    Return
    
    Hotkey76:
    	Hk:= 76
    	Gosub HotkeyRouting
    Return
    
    Hotkey77:
    	Hk:= 77
    	Gosub HotkeyRouting
    Return
    
    Hotkey78:
    	Hk:= 78
    	Gosub HotkeyRouting
    Return
    
    Hotkey79:
    	Hk:= 79
    	Gosub HotkeyRouting
    Return
    
    Hotkey80:
    	Hk:= 80
    	Gosub HotkeyRouting
    Return
    
    Hotkey81:
    	Hk:= 81
    	Gosub HotkeyRouting
    Return
    
    Hotkey82:
    	Hk:= 82
    	Gosub HotkeyRouting
    Return
    
    Hotkey83:
    	Hk:= 83
    	Gosub HotkeyRouting
    Return
    
    Hotkey84:
    	Hk:= 84
    	Gosub HotkeyRouting
    Return
    
    Hotkey85:
    	Hk:= 85
    	Gosub HotkeyRouting
    Return
    
    Hotkey86:
    	Hk:= 86
    	Gosub HotkeyRouting
    Return
    
    Hotkey87:
    	Hk:= 87
    	Gosub HotkeyRouting
    Return
    
    Hotkey88:
    	Hk:= 88
    	Gosub HotkeyRouting
    Return
    
    Hotkey89:
    	Hk:= 89
    	Gosub HotkeyRouting
    Return
    
    Hotkey90:
    	Hk:= 90
    	Gosub HotkeyRouting
    Return
    
    Hotkey91:
    	Hk:= 91
    	Gosub HotkeyRouting
    Return
    
    Hotkey92:
    	Hk:= 92
    	Gosub HotkeyRouting
    Return
    
    Hotkey93:
    	Hk:= 93
    	Gosub HotkeyRouting
    Return
    
    Hotkey94:
    	Hk:= 94
    	Gosub HotkeyRouting
    Return
    
    Hotkey95:
    	Hk:= 95
    	Gosub HotkeyRouting
    Return
    
    Hotkey96:
    	Hk:= 96
    	Gosub HotkeyRouting
    Return
    
    Hotkey97:
    	Hk:= 97
    	Gosub HotkeyRouting
    Return
    
    Hotkey98:
    	Hk:= 98
    	Gosub HotkeyRouting
    Return
    
    Hotkey99:
    	Hk:= 99
    	Gosub HotkeyRouting
    Return
    
    Hotkey100:
    	Hk:= 100
    	Gosub HotkeyRouting
    Return
    
    Hotkey101:
    	Hk:= 101
    	Gosub HotkeyRouting
    Return
    
    Hotkey102:
    	Hk:= 102
    	Gosub HotkeyRouting
    Return
    
    Hotkey103:
    	Hk:= 103
    	Gosub HotkeyRouting
    Return
    
    Hotkey104:
    	Hk:= 104
    	Gosub HotkeyRouting
    Return
    
    Hotkey105:
    	Hk:= 105
    	Gosub HotkeyRouting
    Return
    
    Hotkey106:
    	Hk:= 106
    	Gosub HotkeyRouting
    Return
    
    Hotkey107:
    	Hk:= 107
    	Gosub HotkeyRouting
    Return
    
    Hotkey108:
    	Hk:= 108
    	Gosub HotkeyRouting
    Return
    
    Hotkey109:
    	Hk:= 109
    	Gosub HotkeyRouting
    Return
    
    Hotkey110:
    	Hk:= 110
    	Gosub HotkeyRouting
    Return
    
    Hotkey111:
    	Hk:= 111
    	Gosub HotkeyRouting
    Return
    
    Hotkey112:
    	Hk:= 112
    	Gosub HotkeyRouting
    Return
    
    Hotkey113:
    	Hk:= 113
    	Gosub HotkeyRouting
    Return
    
    Hotkey114:
    	Hk:= 114
    	Gosub HotkeyRouting
    Return
    
    Hotkey115:
    	Hk:= 115
    	Gosub HotkeyRouting
    Return
    
    Hotkey116:
    	Hk:= 116
    	Gosub HotkeyRouting
    Return
    
    Hotkey117:
    	Hk:= 117
    	Gosub HotkeyRouting
    Return
    
    Hotkey118:
    	Hk:= 118
    	Gosub HotkeyRouting
    Return
    
    Hotkey119:
    	Hk:= 119
    	Gosub HotkeyRouting
    Return
    
    Hotkey120:
    	Hk:= 120
    	Gosub HotkeyRouting
    Return
    
    Hotkey121:
    	Hk:= 121
    	Gosub HotkeyRouting
    Return
    
    Hotkey122:
    	Hk:= 122
    	Gosub HotkeyRouting
    Return
    
    Hotkey123:
    	Hk:= 123
    	Gosub HotkeyRouting
    Return
    
    Hotkey124:
    	Hk:= 124
    	Gosub HotkeyRouting
    Return
    
    Hotkey125:
    	Hk:= 125
    	Gosub HotkeyRouting
    Return
    
    Hotkey126:
    	Hk:= 126
    	Gosub HotkeyRouting
    Return
    
    Hotkey127:
    	Hk:= 127
    	Gosub HotkeyRouting
    Return
    
    Hotkey128:
    	Hk:= 128
    	Gosub HotkeyRouting
    Return
    
    Hotkey129:
    	Hk:= 129
    	Gosub HotkeyRouting
    Return
    
    Hotkey130:
    	Hk:= 130
    	Gosub HotkeyRouting
    Return
    
    Hotkey131:
    	Hk:= 131
    	Gosub HotkeyRouting
    Return
    
    Hotkey132:
    	Hk:= 132
    	Gosub HotkeyRouting
    Return
    
    Hotkey133:
    	Hk:= 133
    	Gosub HotkeyRouting
    Return
    
    Hotkey134:
    	Hk:= 134
    	Gosub HotkeyRouting
    Return
    
    Hotkey135:
    	Hk:= 135
    	Gosub HotkeyRouting
    Return
    
    Hotkey136:
    	Hk:= 136
    	Gosub HotkeyRouting
    Return
    
    Hotkey137:
    	Hk:= 137
    	Gosub HotkeyRouting
    Return
    
    Hotkey138:
    	Hk:= 138
    	Gosub HotkeyRouting
    Return
    
    Hotkey139:
    	Hk:= 139
    	Gosub HotkeyRouting
    Return
    
    Hotkey140:
    	Hk:= 140
    	Gosub HotkeyRouting
    Return
    
    Hotkey141:
    	Hk:= 141
    	Gosub HotkeyRouting
    Return
    
    Hotkey142:
    	Hk:= 142
    	Gosub HotkeyRouting
    Return
    
    Hotkey143:
    	Hk:= 143
    	Gosub HotkeyRouting
    Return
    
    Hotkey144:
    	Hk:= 144
    	Gosub HotkeyRouting
    Return
    
    Hotkey145:
    	Hk:= 145
    	Gosub HotkeyRouting
    Return
    
    Hotkey146:
    	Hk:= 146
    	Gosub HotkeyRouting
    Return
    
    Hotkey147:
    	Hk:= 147
    	Gosub HotkeyRouting
    Return
    
    Hotkey148:
    	Hk:= 148
    	Gosub HotkeyRouting
    Return
    
    Hotkey149:
    	Hk:= 149
    	Gosub HotkeyRouting
    Return
    
    Hotkey150:
    	Hk:= 150
    	Gosub HotkeyRouting
    Return
    
    Hotkey151:
    	Hk:= 151
    	Gosub HotkeyRouting
    Return
    
    Hotkey152:
    	Hk:= 152
    	Gosub HotkeyRouting
    Return
    
    Hotkey153:
    	Hk:= 153
    	Gosub HotkeyRouting
    Return
    
    Hotkey154:
    	Hk:= 154
    	Gosub HotkeyRouting
    Return
    
    Hotkey155:
    	Hk:= 155
    	Gosub HotkeyRouting
    Return
    
    Hotkey156:
    	Hk:= 156
    	Gosub HotkeyRouting
    Return
    
    Hotkey157:
    	Hk:= 157
    	Gosub HotkeyRouting
    Return
    
    Hotkey158:
    	Hk:= 158
    	Gosub HotkeyRouting
    Return
    
    Hotkey159:
    	Hk:= 159
    	Gosub HotkeyRouting
    Return
    
    Hotkey160:
    	Hk:= 160
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey170:
    	Hk:= 170
    	Gosub HotkeyRouting
    Return
    
    Hotkey171:
    	Hk:= 171
    	Gosub HotkeyRouting
    Return
    
    Hotkey172:
    	Hk:= 172
    	Gosub HotkeyRouting
    Return
    
    Hotkey173:
    	Hk:= 173
    	Gosub HotkeyRouting
    Return
    
    Hotkey174:
    	Hk:= 174
    	Gosub HotkeyRouting
    Return
    
    Hotkey175:
    	Hk:= 175
    	Gosub HotkeyRouting
    Return
    
    Hotkey176:
    	Hk:= 176
    	Gosub HotkeyRouting
    Return
    
    Hotkey177:
    	Hk:= 177
    	Gosub HotkeyRouting
    Return
    
    Hotkey178:
    	Hk:= 178
    	Gosub HotkeyRouting
    Return
    
    Hotkey179:
    	Hk:= 179
    	Gosub HotkeyRouting
    Return
    
    Hotkey180:
    	Hk:= 180
    	Gosub HotkeyRouting
    Return
    
    Hotkey181:
    	Hk:= 181
    	Gosub HotkeyRouting
    Return
    
    Hotkey182:
    	Hk:= 182
    	Gosub HotkeyRouting
    Return
    
    Hotkey183:
    	Hk:= 183
    	Gosub HotkeyRouting
    Return
    
    Hotkey184:
    	Hk:= 184
    	Gosub HotkeyRouting
    Return
    
    Hotkey185:
    	Hk:= 185
    	Gosub HotkeyRouting
    Return
    
    Hotkey186:
    	Hk:= 186
    	Gosub HotkeyRouting
    Return
    
    Hotkey187:
    	Hk:= 187
    	Gosub HotkeyRouting
    Return
    
    Hotkey188:
    	Hk:= 188
    	Gosub HotkeyRouting
    Return
    
    Hotkey189:
    	Hk:= 189
    	Gosub HotkeyRouting
    Return
    
    Hotkey190:
    	Hk:= 190
    	Gosub HotkeyRouting
    Return
    
    Hotkey191:
    	Hk:= 191
    	Gosub HotkeyRouting
    Return
    
    Hotkey192:
    	Hk:= 192
    	Gosub HotkeyRouting
    Return
    
    Hotkey193:
    	Hk:= 193
    	Gosub HotkeyRouting
    Return
    
    Hotkey194:
    	Hk:= 194
    	Gosub HotkeyRouting
    Return
    
    Hotkey195:
    	Hk:= 195
    	Gosub HotkeyRouting
    Return
    
    Hotkey196:
    	Hk:= 196
    	Gosub HotkeyRouting
    Return
    
    Hotkey197:
    	Hk:= 197
    	Gosub HotkeyRouting
    Return
    
    Hotkey198:
    	Hk:= 198
    	Gosub HotkeyRouting
    Return
    
    Hotkey199:
    	Hk:= 199
    	Gosub HotkeyRouting
    Return
    
    Hotkey200:
    	Hk:= 200
    	Gosub HotkeyRouting
    Return
    
    HotkeyRouting:
    		If (Hkey%Hk%Type1 = 1) {
    			Gosub Type1
    		Return
    		}
    		If (Hkey%Hk%Type2 = 1) {
    			Gosub Type2
    		Return
    		}
    		If (Hkey%Hk%Type3 = 1) {
    			Gosub Type3
    		Return
    		}
    		If (Hkey%Hk%Type4 = 1) {
    			Gosub Type4
    		Return
    		}
    		If (Hkey%Hk%Type5 = 1) {
    			Gosub Type5
    		Return
    		}
    		If (Hkey%Hk%Type6 = 1) {
    			Gosub Type6
    		Return
    		}
    		If (Hkey%Hk%Type7 = 1) {
    			Gosub Type7
    		Return
    		}
    Return
    
    Cancel:
    	Reload
    Return
    ConfigType1.ahk
    Code:
    ConfigType1:
    	GuiWidth:= 210
    	GuiHeight:= 260
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 1"
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x10 y70 w140 h20 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Text, x160 y73, Spell 2
    	Gui, Add, Edit, x10 y100 w70 h20 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y103, Shortcut Key
    	Gui, Add, Edit, x10 y130 w20 h20 vTriggeredCount%Hk%, % TriggeredCount%Hk%
    	Gui, Add, Text, x40 y133, Extra Triggered Spells
    	Gui, Add, Edit, x10 y160 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y163, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y190 w30 h20 vT1Cooldown%Hk%, % T1Cooldown%Hk%
    	Gui, Add, Text, x50 y193, Spell 1 Cooldown, ms
    	Gui, Add, Button, x10 y230 w90 h20 gTriggered1 Default, Define
    	Gui, Add, Button, x110 y230 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    
    Triggered1:
    	gosub GuiSD
    	TrigN:= 3
    	IniWrite, % TriggeredCount%Hk%, UnrapeKitConfig.ini, triggeredCount, TriggeredCount%Hk%
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, Delay, ScanDelay%Hk%
    	IniWrite, % T1Cooldown%Hk%, UnrapeKitConfig.ini, Delay, T1Cooldown%Hk%
    	If TriggeredCount%Hk% = 0
    		gosub TriggeredWrite
    	Loop, % TriggeredCount%Hk% {
    		Y1:= 30 * TrigN - 27
    		Y2:= 30 * TrigN - 30
    		Y3:= 30 * TrigN + 3
    		Y4:= 30 * TrigN
    		Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional Spells"
    		Gui, Add, Text, x10 y30, Toggle`, SpellName
    		Gui, Add, Checkbox, % "x10 y" Y1 " h13 w13 vTriggerToggle" TrigN "_" Hk " Checked" TriggerToggle%TrigN%_%Hk%
    		Gui, Add, Edit, x41 y%Y2% w140 h20 vHkey%Hk%Spell%TrigN%, % Hkey%Hk%Spell%TrigN%
    		Gui, Add, Text, x191 y%Y1%, % "Spell " TrigN ", Cooldown"
    		Gui, Add, Edit, x291 y%Y2% w40 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    		Gui, Add, Text, x341 y%Y1%, ms
    			If (A_Index = TriggeredCount%Hk%) {
    				GuiWidth:= 370
    				GuiHeight:= 40 + 30 * TrigN
    				ButtonHeight:= 30 * TrigN + 10
    				gosub Guibuild
    				Gui, Add, Button, x170 y%ButtonHeight% w90 h20 gTriggeredWrite Default, Record
    				Gui, Add, Button, x270 y%ButtonHeight% w90 h20 gCancel, Reload
    				Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    				Break
    			}
    		TrigN+= 1
    	}
    Return
    
    TriggeredWrite:
    	gosub GuiSD
    	TrigN:= 3
    	Loop, % TriggeredCount%Hk% {
    		IniWrite, % TriggerToggle%TrigN%_%Hk%, UnrapeKitConfig.ini, TriggeredToggle, TriggerToggle%TrigN%_%Hk%
    		IniWrite, % Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Spell%TrigN%
    		IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%T1Cooldown%TrigN%
    		TrigN+=1
    	}
    	Gosub KeyWrite
    Return
    ConfigType2.ahk
    Code:
    ConfigType2:
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 210
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 2"
    	Gui, Add, Edit, x10 y40 W140 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x10 y70 W140 h20 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Text, x160 y73, Spell 2
    	Gui, Add, Edit, x10 y100 W70 h20 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y103, Shortcut Key
    	Gui, Add, Checkbox, % "x10 y130 h13 w13 vType2MoveToggleHotkey" Hk " Checked" Type2MoveToggleHotkey%Hk%
    	Gui, Add, Text, x30 y130, replace cursor
    	Gui, Add, Text, x10 y150,          unclick for buffs of other spells
    	Gui, Add, Button, x10 y180 w90 h20 gWrite2 Default, Define
    	Gui, Add, Button, x110 y180 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Swap Caster
    Return
    
    Write2:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key
    	IniWrite, % Type2MoveToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type2MoveToggleHotkey%Hk%
    	Gosub KeyWrite
    Return
    ConfigType3.ahk
    Code:
    ConfigType3:
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 220
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 3"
    	Gui, Add, Edit, x10 y40 W140 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x10 y70 W140 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Text, x160 y73, Spell 2
    	Gui, Add, Edit, x10 y100 W70 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y103, Shortcut key
    	Gui, Add, Checkbox, % "x10 y130 h13 w13 vType3Cast1ToggleHotkey" Hk " Checked" Type3Cast1ToggleHotkey%Hk%
    	Gui, Add, Text, x40 y130, Cast Spell 1
    	Gui, Add, Checkbox, % "x10 y160 h13 w13 vType3Cast2ToggleHotkey" Hk " Checked" Type3Cast2ToggleHotkey%Hk%
    	Gui, Add, Text, x40 y160, Cast Spell 2
    	Gui, Add, Button, x10 y190 w90 h20 gWrite3 Default, Define
    	Gui, Add, Button, x110 y190 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Shortcut Reset
    Return
    
    Write3:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2
    	IniWrite, % Type3Cast1ToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type3Cast1ToggleHotkey%Hk%
    	IniWrite, % Type3Cast2ToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type3Cast2ToggleHotkey%Hk%
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key
    	Gosub KeyWrite
    Return
    ConfigType4.ahk
    Code:
    ConfigType4:
    	GuiWidth:= 210
    	GuiHeight:= 140
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 4"
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell1T4, % Hkey%Hk%Spell1T4
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x10 y70 w70 h20 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y73, Shortcut key
    	Gui, Add, Button, x10 y110 w90 h20 gWrite4 Default, Define
    	Gui, Add, Button, x110 y110 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Spell Toggle
    Return
    
    Write4:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1T4, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1T4
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key
    	Gosub KeyWrite
    Return
    ConfigType5&6.ahk
    Code:
    GemSwap1:
    	Swap:= "GemSwap1"
    	Gosub Swap
    Return
    
    GemSwap2:
    	Swap:= "GemSwap2"
    	Gosub Swap
    return
    
    EquipSwap1:
    	Swap:= "EquipSwap1"
    	GoSub Swap
    Return
    
    EquipSwap2:
    	Swap:= "EquipSwap2"
    	GoSub Swap
    Return
    
    Swap:
    	Gosub LCAdd
    	gosub SwapRead1
    	gosub SwapRead2
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 800
    	If (Swap = "GemSwap2") {
    		GemSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit vGemSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	If (Swap = "EquipSwap2") {
    		EquipSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit vEquipSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Picture, x0 y0, InventoryEquip.png
    	Gui, Color, 0x050505
    
    	gosub guiBuild
    	gosub Radio1
    	gosub Radio3
    
    	Gui, Add, Button, x550 y772 w90 h20 gCancel, Reload
    	Gui, Add, Button, x450 y772 w90 h20 gSwapCoord Default, Select
    	If (Swap = "GemSwap2") OR (Swap = "EquipSwap2") {
    		GuiWidth:= 650
    		GuiHeight:= 800
    		Button1X:= 40
    		Button2X:= 460
    		ButtonY:= 450
    		gosub guibuild
    		Gui, Tab, 2
    		Gui, Add, Picture, x0 y0, InventoryEquip.png
    		Gui, Color, 0x050505
    		gosub Radio2
    		Gui, Add, Button, x550 y772 w90 h20 gCancel, Reload
    		Gui, Add, Button, x450 y772 w90 h20 gSwapCoord Default, Select
    	}
    	If (Swap = "GemSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipped Gem Swap"
    	If (Swap = "EquipSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipment Swap"
    	If (Swap = "GemSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipped Gem Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "EquipSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipment Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    Return
    
    SwapCoord:
    	Gui, Submit
    	Gui, Destroy
    	Gosub LCCoordAdd
    	gosub SwapWrite1
    	gosub SwapCoord1
    	gosub SwapRouting
    Return
    
    LCAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		IniRead, RadioL%L%C%C%%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RadioL%L%C%C%%Swap%Hotkey%Hk%
    			If (C = 12) {
    					If (L = 5)
    						Break
    				C:= 0
    				L+= 1
    			}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    LCCoordAdd:
    	L:= 1
    	C:= 1
    	Loop {
    			IniWrite, % RadioL%L%C%C%%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RadioL%L%C%C%%Swap%Hotkey%Hk%
    			%Swap%Hotkey%Hk%_X:= 1240 + (C*53)
    			%Swap%Hotkey%Hk%_Y:= 560 + (L*54)
    		If (C = 12) {
    				If (L = 5)
    					Break
    			C:= 0
    			L+= 1
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Radio1:
    	Gui, Add, Radio, % "x29 y511 w13 h13 vRadioL1C1" Swap "Hotkey" Hk " Checked" RadioL1C1%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C2" Swap "Hotkey" Hk " Checked" RadioL1C2%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C3" Swap "Hotkey" Hk " Checked" RadioL1C3%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C4" Swap "Hotkey" Hk " Checked" RadioL1C4%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL1C5" Swap "Hotkey" Hk " Checked" RadioL1C5%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C6" Swap "Hotkey" Hk " Checked" RadioL1C6%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C7" Swap "Hotkey" Hk " Checked" RadioL1C7%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C8" Swap "Hotkey" Hk " Checked" RadioL1C8%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL1C9" Swap "Hotkey" Hk " Checked" RadioL1C9%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C10" Swap "Hotkey" Hk " Checked" RadioL1C10%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C11" Swap "Hotkey" Hk " Checked" RadioL1C11%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL1C12" Swap "Hotkey" Hk " Checked" RadioL1C12%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x29 y563 w13 h13 vRadioL2C1" Swap "Hotkey" Hk " Checked" RadioL2C1%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C2" Swap "Hotkey" Hk " Checked" RadioL2C2%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C3" Swap "Hotkey" Hk " Checked" RadioL2C3%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C4" Swap "Hotkey" Hk " Checked" RadioL2C4%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL2C5" Swap "Hotkey" Hk " Checked" RadioL2C5%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C6" Swap "Hotkey" Hk " Checked" RadioL2C6%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C7" Swap "Hotkey" Hk " Checked" RadioL2C7%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C8" Swap "Hotkey" Hk " Checked" RadioL2C8%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL2C9" Swap "Hotkey" Hk " Checked" RadioL2C9%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C10" Swap "Hotkey" Hk " Checked" RadioL2C10%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C11" Swap "Hotkey" Hk " Checked" RadioL2C11%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL2C12" Swap "Hotkey" Hk " Checked" RadioL2C12%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x29 y616 w13 h13 vRadioL3C1" Swap "Hotkey" Hk " Checked" RadioL3C1%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C2" Swap "Hotkey" Hk " Checked" RadioL3C2%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C3" Swap "Hotkey" Hk " Checked" RadioL3C3%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C4" Swap "Hotkey" Hk " Checked" RadioL3C4%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL3C5" Swap "Hotkey" Hk " Checked" RadioL3C5%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C6" Swap "Hotkey" Hk " Checked" RadioL3C6%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C7" Swap "Hotkey" Hk " Checked" RadioL3C7%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C8" Swap "Hotkey" Hk " Checked" RadioL3C8%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL3C9" Swap "Hotkey" Hk " Checked" RadioL3C9%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C10" Swap "Hotkey" Hk " Checked" RadioL3C10%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C11" Swap "Hotkey" Hk " Checked" RadioL3C11%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL3C12" Swap "Hotkey" Hk " Checked" RadioL3C12%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x29 y669 w13 h13 vRadioL4C1" Swap "Hotkey" Hk " Checked" RadioL4C1%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C2" Swap "Hotkey" Hk " Checked" RadioL4C2%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C3" Swap "Hotkey" Hk " Checked" RadioL4C3%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C4" Swap "Hotkey" Hk " Checked" RadioL4C4%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL4C5" Swap "Hotkey" Hk " Checked" RadioL4C5%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C6" Swap "Hotkey" Hk " Checked" RadioL4C6%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C7" Swap "Hotkey" Hk " Checked" RadioL4C7%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C8" Swap "Hotkey" Hk " Checked" RadioL4C8%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL4C9" Swap "Hotkey" Hk " Checked" RadioL4C9%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C10" Swap "Hotkey" Hk " Checked" RadioL4C10%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C11" Swap "Hotkey" Hk " Checked" RadioL4C11%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL4C12" Swap "Hotkey" Hk " Checked" RadioL4C12%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x29 y721 w13 h13 vRadioL5C1" Swap "Hotkey" Hk " Checked" RadioL1C5%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C2" Swap "Hotkey" Hk " Checked" RadioL5C2%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C3" Swap "Hotkey" Hk " Checked" RadioL5C3%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C4" Swap "Hotkey" Hk " Checked" RadioL5C4%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL5C5" Swap "Hotkey" Hk " Checked" RadioL5C5%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C6" Swap "Hotkey" Hk " Checked" RadioL5C6%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C7" Swap "Hotkey" Hk " Checked" RadioL5C7%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C8" Swap "Hotkey" Hk " Checked" RadioL5C8%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+40 w13 h13 vRadioL5C9" Swap "Hotkey" Hk " Checked" RadioL5C9%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C10" Swap "Hotkey" Hk " Checked" RadioL5C10%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C11" Swap "Hotkey" Hk " Checked" RadioL5C11%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x+39 w13 h13 vRadioL5C12" Swap "Hotkey" Hk " Checked" RadioL5C12%Swap%Hotkey%Hk%
    return
    
    Radio2:
    	Gui, Add, Radio, % "x72 Y50 w13 h13 v6SocketWeaponTopRightSocket" Swap "AltHotkey" Hk " Checked" 6SocketWeaponTopRightSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x149 y50 w13 h13 v6SocketWeaponTopCenterSocket" Swap "AltHotkey" Hk " Checked" 6SocketWeaponTopCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x71 y125 w13 h13 v6SocketWeaponMiddleRightSocket" Swap "AltHotkey" Hk " Checked" 6SocketWeaponMiddleRightSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x149 y125 w13 h13 v6SocketWeaponMiddleCenterSocket" Swap "AltHotkey" Hk " Checked" 6SocketWeaponMiddleCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x72 y200 w13 h13 v6SocketWeaponBottomRightSocket" Swap "AltHotkey" Hk " Checked" 6SocketWeaponBottomRightSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x149 y200 w13 h13 v6SocketWeaponBottomCenterSocket" Swap "AltHotkey" Hk " Checked" 6SocketWeaponBottomCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x111 Y50 13 h13 vRightWeaponTopSocket" Swap "AltHotkey" Hk " Checked" RightWeaponTopSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x111 y125w13 h13 vRightWeaponMiddleSocket" Swap "AltHotkey" Hk " Checked" RightWeaponMiddleSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x111 y200w13 h13 vRightWeaponBottomSocket" Swap "AltHotkey" Hk " Checked" RightWeaponBottomSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x84 y88 w13 h13 vRightWeaponTopRightSocket" Swap "AltHotkey" Hk " Checked" RightWeaponTopRightSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x137 y88 w13 h13 vRightWeaponTopCenterSocket" Swap "AltHotkey" Hk " Checked" RightWeaponTopCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x137 y163 w13 h13 vRightWeaponBottomCenterSocket" Swap "AltHotkey" Hk " Checked" RightWeaponBottomCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x523 y50 w13 h13 vLeftHandTopSocket" Swap "AltHotkey" Hk " Checked" LeftHandTopSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x523 y125 w13 h13 vLeftHandMiddleSocket" Swap "AltHotkey" Hk " Checked" LeftHandMiddleSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x523 y200 w13 h13 vLeftHandBottomSocket" Swap "AltHotkey" Hk " Checked" LeftHandBottomSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x496 y88 w13 h13 vLeftHandTopCenterSocket" Swap "AltHotkey" Hk " Checked" LeftHandTopCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x550 y88 w13 h13 vLeftHandTopLeftSocket" Swap "AltHotkey" Hk " Checked" LeftHandTopLeftSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x550 y163 w13 h13 vLeftHandBottomLeftSocket" Swap "AltHotkey" Hk " Checked" LeftHandBottomLeftSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x485 y125 w13 h13 vLeftHandMiddleCenterSocket" Swap "AltHotkey" Hk " Checked" LeftHandMiddleCenterSocket%Swap%AltHotkey%Hk%
    	Gui, Add, Radio, % "x561 y125 w13 h13 vLeftHandMiddleLeftSocket" Swap "AltHotkey" Hk " Checked" LeftHandMiddleLeftSocket%Swap%AltHotkey%Hk%
    return
    
    Radio3:
    	Gui, Add, Radio, % "x72 Y50 w13 h13 v6SocketWeaponTopRightSocket" Swap "Hotkey" Hk " Checked" 6SocketWeaponTopRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x149 y50 w13 h13 v6SocketWeaponTopCenterSocket" Swap "Hotkey" Hk " Checked" 6SocketWeaponTopCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x71 y125 w13 h13 v6SocketWeaponMiddleRightSocket" Swap "Hotkey" Hk " Checked" 6SocketWeaponMiddleRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x149 y125 w13 h13 v6SocketWeaponMiddleCenterSocket" Swap "Hotkey" Hk " Checked" 6SocketWeaponMiddleCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x72 y200 w13 h13 v6SocketWeaponBottomRightSocket" Swap "Hotkey" Hk " Checked" 6SocketWeaponBottomRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x149 y200 w13 h13 v6SocketWeaponBottomCenterSocket" Swap "Hotkey" Hk " Checked" 6SocketWeaponBottomCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x111 Y50 w13 h13 vRightWeaponTopSocket" Swap "Hotkey" Hk " Checked" RightWeaponTopSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x111 y125 w13 h13 vRightWeaponMiddleSocket" Swap "Hotkey" Hk " Checked" RightWeaponMiddleSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x111 y200 w13 h13 vRightWeaponBottomSocket" Swap "Hotkey" Hk " Checked" RightWeaponBottomSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x84 y88 w13 h13 vRightWeaponTopRightSocket" Swap "Hotkey" Hk " Checked" RightWeaponTopRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x137 y88 w13 h13 vRightWeaponTopCenterSocket" Swap "Hotkey" Hk " Checked" RightWeaponTopCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x137 y163 w13 h13 vRightWeaponBottomCenterSocket" Swap "Hotkey" Hk " Checked" RightWeaponBottomCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x523 y50 w13 h13 vLeftHandTopSocket" Swap "Hotkey" Hk " Checked" LeftHandTopSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x523 y125 w13 h13 vLeftHandMiddleSocket" Swap "Hotkey" Hk " Checked" LeftHandMiddleSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x523 y200 w13 h13 vLeftHandBottomSocket" Swap "Hotkey" Hk " Checked" LeftHandBottomSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x496 y88 w13 h13 vLeftHandTopCenterSocket" Swap "Hotkey" Hk " Checked" LeftHandTopCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x550 y88 w13 h13 vLeftHandTopLeftSocket" Swap "Hotkey" Hk " Checked" LeftHandTopLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x550 y163 w13 h13 vLeftHandBottomLeftSocket" Swap "Hotkey" Hk " Checked" LeftHandBottomLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x485 y125 w13 h13 vLeftHandMiddleCenterSocket" Swap "Hotkey" Hk " Checked" LeftHandMiddleCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x561 y125 w13 h13 vLeftHandMiddleLeftSocket" Swap "Hotkey" Hk " Checked" LeftHandMiddleLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x279 y21 w13 h13 vHelmetTopRightSocket" Swap "Hotkey" Hk " Checked" HelmetTopRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x355 y21 w13 h13 vHelmetTopLeftSocket" Swap "Hotkey" Hk " Checked" HelmetTopLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x279 y97 w13 h13 vHelmetBottomRightSocket" Swap "Hotkey" Hk " Checked" HelmetBottomRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x355 y97 w13 h13 vHelmetBottomLeftSocket" Swap "Hotkey" Hk " Checked" HelmetBottomLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x279 y57 w13 h13 vHelmetMiddleRightSocket" Swap "Hotkey" Hk " Checked" HelmetMiddleRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x355 y57 w13 h13 vHelmetMiddleLeftSocket" Swap "Hotkey" Hk " Checked" HelmetMiddleLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x317 y57 w13 h13 vHelmetMiddleSocket" Swap "Hotkey" Hk " Checked" HelmetMiddleSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x151 y257 w13 h13 vGlovesTopRightSocket" Swap "Hotkey" Hk " Checked" GlovesTopRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x224 y257 w13 h13 vGlovesTopCenterSocket" Swap "Hotkey" Hk " Checked" GlovesTopCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x151 y332 w13 h13 vGlovesBottomRightSocket" Swap "Hotkey" Hk " Checked" GlovesBottomRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x224 y332 w13 h13 vGlovesBottomCenterSocket" Swap "Hotkey" Hk " Checked" GlovesBottomCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x151 y294 w13 h13 vGlovesMiddleRightSocket" Swap "Hotkey" Hk " Checked" GlovesMiddleRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x224 y294 w13 h13 vGlovesMiddleCenterSocket" Swap "Hotkey" Hk " Checked" GlovesMiddleCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x187 y294 w13 h13 vGlovesMiddleSocket" Swap "Hotkey" Hk " Checked" GlovesMiddleSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x293 y172 w13 h13 v4SocketArmorTopRightSocket" Swap "Hotkey" Hk " Checked" 4SocketArmorTopRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x343 y172 w13 h13 v4SocketArmorTopLeftSocket" Swap "Hotkey" Hk " Checked" 4SocketArmorTopLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x293 y235 w13 h13 v4SocketArmorBottomRightSocket" Swap "Hotkey" Hk " Checked" 4SocketArmorBottomRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x343 y235 w13 h13 v4SocketArmorBottomLeftSocket" Swap "Hotkey" Hk " Checked" 4SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x281 y140 w13 h13 v6SocketArmorTopRightSocket" Swap "Hotkey" Hk " Checked" 6SocketArmorTopRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x355 y140 w13 h13 v6SocketArmorTopLeftSocket" Swap "Hotkey" Hk " Checked" 6SocketArmorTopLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x281 y203 w13 h13 v6SocketArmorMiddleRightSocket" Swap "Hotkey" Hk " Checked" 6SocketArmorMiddleRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x355 y203 w13 h13 v6SocketArmorMiddleLeftSocket" Swap "Hotkey" Hk " Checked" 6SocketArmorMiddleLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x281 y266 w13 h13 v6SocketArmorBottomRightSocket" Swap "Hotkey" Hk " Checked" 6SocketArmorBottomRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x355 y266 w13 h13 v6SocketArmorBottomLeftSocket" Swap "Hotkey" Hk " Checked" 6SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x317 y204 w13 h13 v1SocketArmorMiddleSocket" Swap "Hotkey" Hk " Checked" 1SocketArmorMiddleSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x411 y257 w13 h13 vBootsTopCenterSocket" Swap "Hotkey" Hk " Checked" BootsTopCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x484 y257 w13 h13 vBootsTopLeftSocket" Swap "Hotkey" Hk " Checked" BootsTopLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x411 y332 w13 h13 vBootsBottomCenterSocket" Swap "Hotkey" Hk " Checked" BootsBottomCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x484 y332 w13 h13 vBootsBottomLeftSocket" Swap "Hotkey" Hk " Checked" BootsBottomLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x411 y294 w13 h13 vBootsMiddleCenterSocket" Swap "Hotkey" Hk " Checked" BootsMiddleCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x484 y294 w13 h13 vBootsMiddleLeftSocket" Swap "Hotkey" Hk " Checked" BootsMiddleLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x447 y294 w13 h13 vBootsMiddleSocket" Swap "Hotkey" Hk " Checked" BootsMiddleSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x213 Y202 w13 h13 vRightFingerSocket" Swap "Hotkey" Hk " Checked" RightFingerSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x421 y202 w13 h13 vLeftFingerSocket" Swap "Hotkey" Hk " Checked" LeftFingerSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x421 y137 w13 h13 vAmuletSocket" Swap "Hotkey" Hk " Checked" AmuletSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x293 y320 w13 h13 vBeltRightSocket" Swap "Hotkey" Hk " Checked" BeltRightSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x317 y320 w13 h13 vBeltCenterSocket" Swap "Hotkey" Hk " Checked" BeltCenterSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x343 y320 w13 h13 vBeltLeftSocket" Swap "Hotkey" Hk " Checked" BeltLeftSocket%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x218 y410 w13 h13 vFlask1" Swap "Hotkey" Hk " Checked" Flask1%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x270 y410 w13 h13 vFlask2" Swap "Hotkey" Hk " Checked" Flask2%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x322 y410 w13 h13 vFlask3" Swap "Hotkey" Hk " Checked" Flask3%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x375 y410 w13 h13 vFlask4" Swap "Hotkey" Hk " Checked" Flask4%Swap%Hotkey%Hk%
    	Gui, Add, Radio, % "x427 y410 w13 h13 vFlask5" Swap "Hotkey" Hk " Checked" Flask5%Swap%Hotkey%Hk%
    return
    
    SwapRouting:
    	If (Swap = "GemSwap2" AND GemSwapTab_%Hk% = 2) OR (Swap = "EquipSwap2" AND EquipSwapTab_%Hk% = 2) {
    		gosub SwapWrite2
    		gosub SwapCoord2
    	}
    	If (Swap = "GemSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%_X, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_X
    		IniWrite, % %Swap%Hotkey%Hk%_Y, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_Y
    		Gosub GemSwap2
    	Return
    	}
    	If (Swap = "EquipSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%_X, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_X
    		IniWrite, % %Swap%Hotkey%Hk%_Y, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_Y
    		Gosub EquipSwap2
    	Return
    	}
    	If (Swap = "GemSwap2" AND GemSwapTab_%Hk% = 1) {
    		IniWrite, % GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%_X, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_X
    		IniWrite, % %Swap%Hotkey%Hk%_Y, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_Y
    	Return
    	}
    	If (Swap = "EquipSwap2" AND EquipSwapTab_%Hk% = 1) {
    		IniWrite, % EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%_X, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_X
    		IniWrite, % %Swap%Hotkey%Hk%_Y, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%Hotkey%Hk%_Y
    	Return
    	}
    	If (Swap = "GemSwap2" AND GemSwapTab_%Hk% = 2) {
    		IniWrite, % GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%_X, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%AltHotkey%Hk%_X
    		IniWrite, % %Swap%AltHotkey%Hk%_Y, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%AltHotkey%Hk%_Y
    	Return
    	}
    	If (Swap = "EquipSwap2" AND EquipSwapTab_%Hk% = 2) {
    		IniWrite, % EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%_X, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%AltHotkey%Hk%_X
    		IniWrite, % %Swap%AltHotkey%Hk%_Y, UnrapeKitConfig.ini, %Swap%Coordinates, %Swap%AltHotkey%Hk%_Y
    	Return
    	}
    return
    
    SwapRead1:
    	IniRead, 6SocketWeaponTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopRightSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketWeaponTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopCenterSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketWeaponMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleRightSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketWeaponMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketWeaponBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomRightSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketWeaponBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomCenterSocket%Swap%Hotkey%Hk%
    	IniRead, RightWeaponTopSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopSocket%Swap%Hotkey%Hk%
    	IniRead, RightWeaponMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position,  RightWeaponMiddleSocket%Swap%Hotkey%Hk%
    	IniRead, RightWeaponBottomSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomSocket%Swap%Hotkey%Hk%
    	IniRead, RightWeaponTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopRightSocket%Swap%Hotkey%Hk%
    	IniRead, RightWeaponTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopCenterSocket%Swap%Hotkey%Hk%
    	IniRead, RightWeaponBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomCenterSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandTopSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandBottomSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopCenterSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopLeftSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomLeftSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniRead, LeftHandMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetTopRightSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetTopLeftSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetBottomRightSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetBottomLeftSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetMiddleRightSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniRead, HelmetMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetMiddleSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesTopRightSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesTopCenterSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesBottomRightSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesBottomCenterSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesMiddleRightSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniRead, GlovesMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesMiddleSocket%Swap%Hotkey%Hk%
    	IniRead, 4SocketArmorTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorTopRightSocket%Swap%Hotkey%Hk%
    	IniRead, 4SocketArmorTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorTopLeftSocket%Swap%Hotkey%Hk%
    	IniRead, 4SocketArmorBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorBottomRightSocket%Swap%Hotkey%Hk%
    	IniRead, 4SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketArmorTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorTopRightSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketArmorTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorTopLeftSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketArmorMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorMiddleRightSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketArmorMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketArmorBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorBottomRightSocket%Swap%Hotkey%Hk%
    	IniRead, 6SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%
    	IniRead, 1SocketArmorMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 1SocketArmorMiddleSocket%Swap%Hotkey%Hk%
    	IniRead, BootsTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsTopCenterSocket%Swap%Hotkey%Hk%
    	IniRead, BootsTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsTopLeftSocket%Swap%Hotkey%Hk%
    	IniRead, BootsBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsBottomCenterSocket%Swap%Hotkey%Hk%
    	IniRead, BootsBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsBottomLeftSocket%Swap%Hotkey%Hk%
    	IniRead, BootsMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniRead, BootsMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniRead, BootsMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsMiddleSocket%Swap%Hotkey%Hk%
    	IniRead, RightFingerSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightFingerSocket%Swap%Hotkey%Hk%
    	IniRead, LeftFingerSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftFingerSocket%Swap%Hotkey%Hk%
    	IniRead, AmuletSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, AmuletSocket%Swap%Hotkey%Hk%
    	IniRead, BeltRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BeltRightSocket%Swap%Hotkey%Hk%
    	IniRead, BeltCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BeltCenterSocket%Swap%Hotkey%Hk%
    	IniRead, BeltLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BeltLeftSocket%Swap%Hotkey%Hk%
    	IniRead, Flask1%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask1%Swap%Hotkey%Hk%
    	IniRead, Flask2%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask2%Swap%Hotkey%Hk%
    	IniRead, Flask3%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask3%Swap%Hotkey%Hk%
    	IniRead, Flask4%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask4%Swap%Hotkey%Hk%
    	IniRead, Flask5%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask5%Swap%Hotkey%Hk%
    Return
    
    SwapWrite1:
    	IniWrite, % 6SocketWeaponTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketWeaponTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketWeaponMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketWeaponMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketWeaponBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketWeaponBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightWeaponTopSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightWeaponMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position,  RightWeaponMiddleSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightWeaponBottomSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightWeaponTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightWeaponTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightWeaponBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetTopRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetTopLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetBottomRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetBottomLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetMiddleRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % HelmetMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, HelmetMiddleSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandTopSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandBottomSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftHandMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesTopRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesTopCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesBottomRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesBottomCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesMiddleRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % GlovesMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, GlovesMiddleSocket%Swap%Hotkey%Hk%
    	IniWrite, % 4SocketArmorTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorTopRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 4SocketArmorTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorTopLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % 4SocketArmorBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorBottomRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 4SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 4SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketArmorTopRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorTopRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketArmorTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorTopLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketArmorMiddleRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorMiddleRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketArmorMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketArmorBottomRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorBottomRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % 6SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketArmorBottomLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % 1SocketArmorMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 1SocketArmorMiddleSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsTopCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsTopCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsTopLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsTopLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsBottomCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsBottomCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsBottomLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsBottomLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsMiddleCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsMiddleCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsMiddleLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsMiddleLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % BootsMiddleSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BootsMiddleSocket%Swap%Hotkey%Hk%
    	IniWrite, % RightFingerSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightFingerSocket%Swap%Hotkey%Hk%
    	IniWrite, % LeftFingerSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftFingerSocket%Swap%Hotkey%Hk%
    	IniWrite, % AmuletSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, AmuletSocket%Swap%Hotkey%Hk%
    	IniWrite, % BeltRightSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BeltRightSocket%Swap%Hotkey%Hk%
    	IniWrite, % BeltCenterSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BeltCenterSocket%Swap%Hotkey%Hk%
    	IniWrite, % BeltLeftSocket%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, BeltLeftSocket%Swap%Hotkey%Hk%
    	IniWrite, % Flask1%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask1%Swap%Hotkey%Hk%
    	IniWrite, % Flask2%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask2%Swap%Hotkey%Hk%
    	IniWrite, % Flask3%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask3%Swap%Hotkey%Hk%
    	IniWrite, % Flask4%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask4%Swap%Hotkey%Hk%
    	IniWrite, % Flask5%Swap%Hotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, Flask5%Swap%Hotkey%Hk%
    return
    
    SwapRead2:
    	IniRead, 6SocketWeaponTopRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopRightSocket%Swap%AltHotkey%Hk%
    	IniRead, 6SocketWeaponTopCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, 6SocketWeaponMiddleRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleRightSocket%Swap%AltHotkey%Hk%
    	IniRead, 6SocketWeaponMiddleCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, 6SocketWeaponBottomRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomRightSocket%Swap%AltHotkey%Hk%
    	IniRead, 6SocketWeaponBottomCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, RightWeaponTopSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopSocket%Swap%AltHotkey%Hk%
    	IniRead, RightWeaponMiddleSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position,  RightWeaponMiddleSocket%Swap%AltHotkey%Hk%
    	IniRead, RightWeaponBottomSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomSocket%Swap%AltHotkey%Hk%
    	IniRead, RightWeaponTopRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopRightSocket%Swap%AltHotkey%Hk%
    	IniRead, RightWeaponTopCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, RightWeaponBottomCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandTopSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandMiddleSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandBottomSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandTopCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandTopLeftSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopLeftSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandBottomLeftSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomLeftSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandMiddleCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleCenterSocket%Swap%AltHotkey%Hk%
    	IniRead, LeftHandMiddleLeftSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleLeftSocket%Swap%AltHotkey%Hk%
    return
    
    SwapWrite2:
    	IniWrite, % 6SocketWeaponTopRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopRightSocket%Swap%AltHotkey%Hk%
    	IniWrite, % 6SocketWeaponTopCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponTopCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % 6SocketWeaponMiddleRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleRightSocket%Swap%AltHotkey%Hk%
    	IniWrite, % 6SocketWeaponMiddleCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponMiddleCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % 6SocketWeaponBottomRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomRightSocket%Swap%AltHotkey%Hk%
    	IniWrite, % 6SocketWeaponBottomCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, 6SocketWeaponBottomCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % RightWeaponTopSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopSocket%Swap%AltHotkey%Hk%
    	IniWrite, % RightWeaponMiddleSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position,  RightWeaponMiddleSocket%Swap%AltHotkey%Hk%
    	IniWrite, % RightWeaponBottomSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomSocket%Swap%AltHotkey%Hk%
    	IniWrite, % RightWeaponTopRightSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopRightSocket%Swap%AltHotkey%Hk%
    	IniWrite, % RightWeaponTopCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponTopCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % RightWeaponBottomCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, RightWeaponBottomCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandTopSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandMiddleSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandBottomSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandTopCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandTopLeftSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandTopLeftSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandBottomLeftSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandBottomLeftSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandMiddleCenterSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleCenterSocket%Swap%AltHotkey%Hk%
    	IniWrite, % LeftHandMiddleLeftSocket%Swap%AltHotkey%Hk%, UnrapeKitConfig.ini, %Swap%Position, LeftHandMiddleLeftSocket%Swap%AltHotkey%Hk%
    Return
    
    SwapCoord1:
    	If (6SocketWeaponTopRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1355
    		%Swap%Hotkey%Hk%_Y = 170
    	}
    	If (6SocketWeaponTopCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1405
    		%Swap%Hotkey%Hk%_Y = 170
    	}
    	If (6SocketWeaponMiddleRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1355
    		%Swap%Hotkey%Hk%_Y = 225
    	}
    	If (6SocketWeaponMiddleCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1405
    		%Swap%Hotkey%Hk%_Y = 225
    	}
    	If (6SocketWeaponBottomRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1355
    		%Swap%Hotkey%Hk%_Y = 280
    	}
    	If (6SocketWeaponBottomCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1405
    		%Swap%Hotkey%Hk%_Y = 280
    	}
    	If (RightWeaponTopSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1380
    		%Swap%Hotkey%Hk%_Y = 170
    	}
    	If (RightWeaponMiddleSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1380
    		%Swap%Hotkey%Hk%_Y = 225
    	}
    	If (RightWeaponBottomSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1380
    		%Swap%Hotkey%Hk%_Y = 280
    	}
    	If (RightWeaponTopRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1355
    		%Swap%Hotkey%Hk%_Y = 200
    	}
    	If (RightWeaponTopCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1405
    		%Swap%Hotkey%Hk%_Y = 200
    	}
    	If (RightWeaponBottomCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1405
    		%Swap%Hotkey%Hk%_Y = 250
    	}
    	If (LeftHandTopSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1795
    		%Swap%Hotkey%Hk%_Y = 170
    	}
    	If (LeftHandMiddleSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1795
    		%Swap%Hotkey%Hk%_Y = 225
    	}
    	If (LeftHandBottomSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1795
    		%Swap%Hotkey%Hk%_Y = 280
    	}
    	If (LeftHandTopCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1765
    		%Swap%Hotkey%Hk%_Y = 200
    	}
    	If (LeftHandTopLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1820
    		%Swap%Hotkey%Hk%_Y = 200
    	}
    	If (LeftHandBottomLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1820
    		%Swap%Hotkey%Hk%_Y = 250
    	}
    	If (LeftHandMiddleCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1770
    		%Swap%Hotkey%Hk%_Y = 225
    	}
    	If (LeftHandMiddleLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1820
    		%Swap%Hotkey%Hk%_Y = 225
    	}
    	If (HelmetTopRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 135
    	}
    	If (HelmetTopLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 135
    	}
    	If (HelmetBottomRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 185
    	}
    	If (HelmetBottomLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 185
    	}
    	If (HelmetMiddleRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 160
    	}
    	If (HelmetMiddleLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 160
    	}
    	If (HelmetMiddleSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1690
    		%Swap%Hotkey%Hk%_Y = 160
    	}
    	If (GlovesTopRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1430
    		%Swap%Hotkey%Hk%_Y = 370
    	}
    	If (GlovesTopCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1485
    		%Swap%Hotkey%Hk%_Y = 370
    	}
    	If (GlovesBottomRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1430
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (GlovesBottomCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1485
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (GlovesMiddleRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1430
    		%Swap%Hotkey%Hk%_Y = 395
    	}
    	If (GlovesMiddleCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1485
    		%Swap%Hotkey%Hk%_Y = 395
    	}
    	If (GlovesMiddleSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1455
    		%Swap%Hotkey%Hk%_Y = 395
    	}
    	If (4SocketArmorTopRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 275
    	}
    	If (4SocketArmorTopLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 275
    	}
    	If (4SocketArmorBottomRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 333
    	}
    	If (4SocketArmorBottomLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 333
    	}
    	If (6SocketArmorTopRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 250
    	}
    	If (6SocketArmorTopLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 250
    	}
    	If (6SocketArmorMiddleRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 305
    	}
    	If (6SocketArmorMiddleLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 305
    	}
    	If (6SocketArmorBottomRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1560
    		%Swap%Hotkey%Hk%_Y = 360
    	}
    	If (6SocketArmorBottomLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1615
    		%Swap%Hotkey%Hk%_Y = 360
    	}
    	If (1SocketArmorMiddleSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1585
    		%Swap%Hotkey%Hk%_Y = 305
    	}
    	If (BootsTopCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1690
    		%Swap%Hotkey%Hk%_Y = 370
    	}
    	If (BootsTopLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1740
    		%Swap%Hotkey%Hk%_Y = 370
    	}
    	If (BootsBottomCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1690
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (BootsBottomLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1740
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (BootsMiddleCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1690
    		%Swap%Hotkey%Hk%_Y = 395
    	}
    	If (BootsMiddleLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1740
    		%Swap%Hotkey%Hk%_Y = 395
    	}
    	If (BootsMiddleSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1715
    		%Swap%Hotkey%Hk%_Y = 395
    	}
    	If (RightFingerSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1485
    		%Swap%Hotkey%Hk%_Y = 305
    	}
    	If (LeftFingerSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1690
    		%Swap%Hotkey%Hk%_Y = 305
    	}
    	If (AmuletSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1690
    		%Swap%Hotkey%Hk%_Y = 245
    	}
    	If (BeltRightSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1565
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (BeltCenterSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1585
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (BeltLeftSocket%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1605
    		%Swap%Hotkey%Hk%_Y = 420
    	}
    	If (Flask1%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1487
    		%Swap%Hotkey%Hk%_Y = 515
    	}
    	If (Flask2%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1540
    		%Swap%Hotkey%Hk%_Y = 515
    	}
    	If (Flask3%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1592
    		%Swap%Hotkey%Hk%_Y = 515
    	}
    	If (Flask4%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1645
    		%Swap%Hotkey%Hk%_Y = 515
    	}
    	If (Flask5%Swap%Hotkey%Hk% = 1) {
    		%Swap%Hotkey%Hk%_X = 1697
    		%Swap%Hotkey%Hk%_Y = 515
    	}
    return
    
    SwapCoord2:
    	If (6SocketWeaponTopRightSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1355
    		%Swap%AltHotkey%Hk%_Y = 170
    	}
    	If (6SocketWeaponTopCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1405
    		%Swap%AltHotkey%Hk%_Y = 170
    	}
    	If (6SocketWeaponMiddleRightSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1355
    		%Swap%AltHotkey%Hk%_Y = 225
    	}
    	If (6SocketWeaponMiddleCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1405
    		%Swap%AltHotkey%Hk%_Y = 225
    	}
    	If (6SocketWeaponBottomRightSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1355
    		%Swap%AltHotkey%Hk%_Y = 280
    	}
    	If (6SocketWeaponBottomCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1405
    		%Swap%AltHotkey%Hk%_Y = 280
    	}
    	If (RightWeaponTopSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1380
    		%Swap%AltHotkey%Hk%_Y = 170
    	}
    	If (RightWeaponMiddleSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1380
    		%Swap%AltHotkey%Hk%_Y = 225
    	}
    	If (RightWeaponBottomSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1380
    		%Swap%AltHotkey%Hk%_Y = 280
    	}
    	If (RightWeaponTopRightSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1355
    		%Swap%AltHotkey%Hk%_Y = 200
    	}
    	If (RightWeaponTopCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1405
    		%Swap%AltHotkey%Hk%_Y = 200
    	}
    	If (RightWeaponBottomCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1405
    		%Swap%AltHotkey%Hk%_Y = 250
    	}
    	If (LeftHandTopSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1795
    		%Swap%AltHotkey%Hk%_Y = 170
    	}
    	If (LeftHandMiddleSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1795
    		%Swap%AltHotkey%Hk%_Y = 225
    	}
    	If (LeftHandBottomSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1795
    		%Swap%AltHotkey%Hk%_Y = 280
    	}
    	If (LeftHandTopCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1765
    		%Swap%AltHotkey%Hk%_Y = 200
    	}
    	If (LeftHandTopLeftSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1820
    		%Swap%AltHotkey%Hk%_Y = 200
    	}
    	If (LeftHandBottomLeftSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1820
    		%Swap%AltHotkey%Hk%_Y = 250
    	}
    	If (LeftHandMiddleCenterSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1770
    		%Swap%AltHotkey%Hk%_Y = 225
    	}
    	If (LeftHandMiddleLeftSocket%Swap%AltHotkey%Hk% = 1) {
    		%Swap%AltHotkey%Hk%_X = 1820
    		%Swap%AltHotkey%Hk%_Y = 225
    	}
    Return
    ConfigType7.ahk
    Code:
    Type7Config:
    	gosub Type7Load
    	MouseGetPos, Xpos, Ypos
    	Type7ConfigRecord:= 0
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiSD
    	Gui, Add, Text, x40 y10, Type 7 configuration
    	Gui, Add, Edit, x10 y40 w30 h20 vHkey%Hk%Iterations, % Hkey%Hk%Iterations
    	Gui, Add, Text, x50 y43, % "Iterations Hotkey " Hk
    	Gui, Add, Button, x10 y70 w90 h20 gType7Config2 Default, Configure
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Type 7
    Return
    
    Type7Config2:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations
    	MouseGetPos, Xpos, Ypos
    	H:= 1
    	W:= 1
    	HMax:= 1
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, x10 y10, Options:
    	Gui, Add, Text, x10 y40, Choose any of these or skip
    	Gui, Add, Text, x10 y70,
    	Gui, Add, Text, x10 y100, ImageSearch
    	Gui, Add, Text, x10 y130, GetMousePos
    	Gui, Add, Text, x10 y160, GoMousePos
    	Gui, Add, Text, x10 y190, SpellScan
    	Gui, Add, Text, x10 y220, Spell
    	Gui, Add, Text, x10 y250, SendInput
    	Gui, Add, Text, x10 y280, MouseMove
    	Gui, Add, Text, x10 y310, Delay
    	Gui, Add, Text, x10 y340, GemSwap
    	Gui, Add, Text, x10 y370, EquipmentSwap
    	Gui, Add, Text, x10 y400, Add
    	Gui, Add, Edit, x110 y400 w20 h20 vHkey%Hk%7Iterations
    	Gui, Add, Text, x140 y403, Iteration(s)
    	Gui, Add, Button, x10 y400 w90 h20 gType7ConfigAdd, Add
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		GuiY:= 60 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    		If (GuiY > ScreenHeight) {
    			W+= 1
    			HMax:= H
    			H= 1
    		}
    		Y1:= 8 + 30 * H
    		Y2:= 5 + 30 * H
    		GuiWidth:= 160 + 360 * W
    		If (W = 1) {
    			GuiHeight:= 70 + 30 * H
    			ButtonHeight:= 40 + 30 * H
    		}
    		If (W > 1) {
    			GuiHeight:= 70 + 30 * HMax
    			ButtonHeight:= 40 + 30 * HMax
    		}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		CheckboxX:= GuiWidth - 310
    		EditButtonX:= GuiWidth - 100
    		EditX:= GuiWidth - 280
    		TextX:= GuiWidth - 170
    		var1= Hkey%Hk%Iteration%T7%Toggle
    		Gui, Add, Edit, x%EditX% y%Y2% w100 h20 vHkey%Hk%Iteration%T7%, % Hkey%Hk%Iteration%T7%
    		Gui, Add, Text, x%TextX% y%Y1%, % "Iteration " T7
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditT7, %T7%
    		If (T7 = Hkey%Hk%Iterations) {
    			If ButtonHeight < 400
    				ButtonHeight = 400
    			If GuiHeight < 430
    				GuiHeight = 430
    			gosub GuiBuild
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gType7ConfigRecord Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gType7Config3, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Iteration Configuration
    			Break
    		}
    		T7+= 1
    		H+= 1
    	}
    Return
    
    EditT7:
    	A_GuiControlT7:= A_GuiControl
    	T7:= A_GuiControlT7
    	gosub GuiSD
    	gosub Type7Write2
    	Gosub Type7Config4
    Return
    
    Type7ConfigRecord:
    	gosub GuiSD
    	gosub Type7Write
    	Gosub Type7Config2
    Return
    
    Type7ConfigAdd:
    	gosub GuiSD
    	gosub Type7Write2
    	Hkey%Hk%Iterations+= % Hkey%Hk%7Iterations
    	Gosub Type7Config2
    Return
    
    Type7Config3:
    	gosub GuiSD
    	T7 := 1
    	gosub Type7Write2
    	T7 := 1
    	Gosub Type7Config4
    Return
    
    Type7Config4:
    	gosub GuiSD
    	If (A_GuiControlT7 > 0)
    		A_GuiControlType7Config4:= A_GuiControlT7
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations
    	Loop {
    		If (Hkey%Hk%Iteration%T7% = "ImageSearch") {
    			Gosub Type7ImageSearch
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GetMousePos") {
    			Gosub Type7GetMousePos
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GoMousePos") {
    			Gosub Type7GoMousePos
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "SpellScan") {
    			Gosub Type7LoopAdd
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "Spell") {
    			Gosub Type7Spell
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "SendInput") {
    			Gosub Type7Send
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "MouseMove") {
    			Gosub Type7MouseMove
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "Delay") {
    			Gosub Type7DelayConfig
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GemSwap") {
    			Gosub Type7GemSwap1
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "EquipmentSwap") {
    			Gosub Type7EquipSwap1
    			Break
    		}
    		If (T7 >= Hkey%Hk%Iterations) {
    			Hk += 1
    			Gosub HkTypeConfigLoop
    			Break
    		}
    	}
    Return
    
    Type7Msg:
    	MsgBox, % "Iteration " T7 " = " Hkey%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7LoopAdd:
    	gosub GuiSD
    	If (A_GuiControlType7Config4 > 0) {
    		A_GuiControlT7:= 0
    		gosub Type7Config2
    	} Else {
    		T7+= 1
    		Gosub Type7Config4
    	}
    Return
    
    Type7LoopSubtract:
    	gosub GuiSD
    	A_GuiControlT7:= 0
    	Loop {
    		T7-= 1
    		If (T7 = 0) {
    			T7:= 1
    			Gosub Type7Config4
    			Break
    		}
    	}
    Return
    
    Type7ImageSearch:
    	gosub GuiSD
    	gosub GuiBuild
    	Gui, Add, Edit, x10 y10 w30 h20 vScanCoordinatesHotkey%Hk%Iteration%T7%_L, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L
    	Gui, Add, Edit, x50 y10 w30 h20 vScanCoordinatesHotkey%Hk%Iteration%T7%_T, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T
    	Gui, Add, Edit, x90 y10 W30 H20 vScanCoordinatesHotkey%Hk%Iteration%T7%_R, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R
    	Gui, Add, Edit, x130 y10 W30 H20 vScanCoordinateHotkey%Hk%Iteration%T7%_B, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B
    	Gui, Add, Edit, x10 y40 W110 H20 vShadeVariationHotkey%Hk%Iteration%T7%, % ShadeVariationHotkey%Hk%Iteration%T7%
    	Gui, Add, Edit, x10 y70 w110 h20 vImageNameHotkey%Hk%Iteration%T7%, % ImageNameHotkey%Hk%Iteration%T7%
    	Gui, Add, Text, x170 y13, Left, Top, Right and Bottom Scan Coordinates
    	Gui, Add, Text, x130 y43, Scan Color Shade Variation and Optional Parameters
    	Gui, Add, Text, x130 y73, Scan Image Name
    	Gui, Add, Button, x310 y100 w90 h20 gType7ImageSearchWrite Default, Define
    	Gui, Add, Button, x210 y100 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y100 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y100 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Image Scan
    Return
    
    Type7ImageSearchWrite:
    	gosub GuiSD
    	Hkey%Hk%GetMousePosToggleIteration%T7%:= 1
    	IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B
    	IniWrite, % ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%
    	IniWrite, % ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GetMousePos:
    	GuiWidth:= 410
    	GuiHeight:= 100
    	gosub GuiBuild
    	If (Hkey%Hk%MouseXPosIteration%T7% is Integer Hkey%Hk%MouseYPosIteration%T7% is Integer) {
    		MouseMove, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	} Else {
    		MouseMove, 960, 540
    	}
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, x10 y13, Hotkey %Hk% Iteration %T7%: Move the mouse to the position to be saved and press ENTER
    	Gui, Add, Checkbox, % "x10 y40 h13 w13 vHkey" Hk "GetMousePosToggleIteration" T7 " Checked" Hkey%Hk%GetMousePosToggleIteration%T7%, Cancel Saving and get position during hotkey execution
    	Gui, Add, Button, x310 y70 w90 h20 gType7GetMousePosWrite Default, Define
    	Gui, Add, Button, x210 y70 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y70 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Get Mouse Position
    Return
    
    Type7GetMousePosWrite:
    	gosub GuiSD
    	If (Hkey%Hk%GetMousePosToggleIteration%T7% = 0) {
    		MouseGetPos, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%Type7MouseYPosIteration%T7%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseXPosIteration%T7%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseYPosIteration%T7%
    	}
    	IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GoMousePos:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	Gui, Add, Edit, x200 y10 w20 h20 vHkey%Hk%GoMousePosIteration%T7%, % Hkey%Hk%GoMousePosIteration%T7%
    	Gui, Add, Text, x10 y13, Move to Mouse Position from Iteration:
    	Gui, Add, Button, x310 y40 w90 h20 gType7GoMousePosWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%:Mouse Position
    Return
    
    Type7GoMousePosWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GoMousePosIteration%T7%
    	Gosub Type7Config2
    Return
    
    Type7MouseMove:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	If (Hkey%Hk%MouseXPosIteration%T7% is Integer) and (Hkey%Hk%MouseYPosIteration%T7% is Integer) {
    		MouseMove, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	} Else {
    		MouseMove, 960, 540
    	}
    	Gui, Add, Text, x10 y13, Hotkey %Hk% Iteration %T7%: Move the mouse to the position to be saved and press ENTER
    	Gui, Add, Button, x310 y40 w90 h20 gType7MouseMoveWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Mouse Position
    
    Return
    
    Type7MouseMoveWrite:
    	gosub GuiSD
    	MouseGetPos, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseXPosIteration%T7%
    	IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseYPosIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7Spell:
    	GuiWidth:= 410
    	GuiHeight:= 140
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, % Type 7 - "Iteration " T7 " Spell Configuration"
    	Gui, Add, Edit, x10 y40 w110 h20 vHkey%Hk%SpellIteration%T7%, % Hkey%Hk%SpellIteration%T7%
    	Gui, Add, Text, x130 y43, % "Spell - Hotkey " Hk
    	Gui, Add, Edit, x10 y70 W70 H20 vHkey%Hk%KeyIteration%T7%, % Hkey%Hk%KeyIteration%T7%
    	Gui, Add, Text, x90 y73, % "Key - Hotkey " Hk
    	Gui, Add, Button, x310 y110 w90 h20 gType7SpellWrite Default, Define
    	Gui, Add, Button, x210 y110 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y110 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y110 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Type 7 Spell Configuration
    Return
    
    Type7SpellWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, type7HotkeySpells, Hkey%Hk%SpellIteration%T7%
    	IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, type7HotkeyKey, Hkey%Hk%KeyIteration%T7%
    	Gosub Type7Key
    Return
    
    Type7Key:
    	If (Hkey%Hk%KeyIteration%T7% = "Q") {
    		KeyX_%Hk%Iteration%T7%:= 1440
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "W") {
    		KeyX_%Hk%Iteration%T7%:= 1495
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "E") {
    		KeyX_%Hk%Iteration%T7%:= 1550
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "R") {
    		KeyX_%Hk%Iteration%T7%:= 1605
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "T") {
    		KeyX_%Hk%Iteration%T7%:= 1655
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "LButton") {
    		KeyX_%Hk%Iteration%T7%:= 1550
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "MButton") {
    		KeyX_%Hk%Iteration%T7%:= 1600
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "RButton") {
    		KeyX_%Hk%Iteration%T7%:= 1650
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	IniWrite, % KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%
    	IniWrite, % KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7Send:
    	GuiWidth:= 410
    	GuiHeight:= 110
    	gosub GuiBuild
    	Gui, Add, Text, x185 y10, % "Hotkey " Hk
    	Gui, Add, Edit, x10 y40 w70 h20 vHkey%Hk%SendIteration%T7%, % Hkey%Hk%SendIteration%T7%
    	Gui, Add, Text, x90 y43, % "Iteration " T7 " Send"
    	Gui, Add, Button, x310 y80 w90 h20 gType7SendWrite Default, Define
    	Gui, Add, Button, x210 y80 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y80 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y80 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Send Config
    Return
    
    Type7SendWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, type7Send, Hkey%Hk%SendIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7DelayConfig:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	Gui, Add, Edit, x10 y10 w130 h20 vHkey%Hk%DelayIteration%T7%, % Hkey%Hk%DelayIteration%T7%
    	Gui, Add, Text, x150 y13, % "Iteration " T7 " Delay"
    	Gui, Add, Button, x310 y40 w90 h20 gType7DelayWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk
    Return
    
    Type7DelayWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, type7Delay, Hkey%Hk%DelayIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GemSwap1:
    	Swap:= "7GemSwap1"
    	GoSub Type7Swap
    Return
    
    Type7GemSwap2:
    	Swap:= "7GemSwap2"
    	GoSub Type7Swap
    Return
    
    Type7EquipSwap1:
    	Swap:= "7EquipSwap1"
    	GoSub Type7Swap
    Return
    
    Type7EquipSwap2:
    	Swap:= "7EquipSwap2"
    	GoSub Type7Swap
    Return
    
    Type7Swap:
    	Gosub Type7LCAdd
    	gosub Type7SwapRead1
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 800
    	If (Swap = "7GemSwap2") {
    		GemSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit v7GemSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	If (Swap = "7EquipSwap2") {
    		EquipSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit v7EquipSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	Gui, Color, 0x050505
    	Gui, Add, Picture, x0 y0, InventoryEquip.png
    	gosub GuiBuild
    	gosub Type7Radio1
    	gosub Type7Radio3
    	Gui, Add, Button, x550 y770 w90 h20 gType7SwapCoord Default, Select
    	Gui, Add, Button, x450 y770 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x350 y770 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y770 w90 h20 gCancel, Reload
    	If (Swap = "7GemSwap2") OR (Swap = "7EquipSwap2") {
    		GuiWidth:= 650
    		GuiHeight:= 800
    		gosub GuiBuild
    		Gui, Tab, 2
    		gosub Type7Radio2
    		Gui, Add, Button, x550 y770 w90 h20 gType7SwapCoord Default, Select
    		Gui, Add, Button, x450 y770 w90 h20 gType7LoopAdd, Skip
    		Gui, Add, Button, x350 y770 w90 h20 gType7LoopSubtract, Go Back
    		Gui, Add, Button, x10 y770 w90 h20 gCancel, Reload
    	}
    	If (Swap = "7GemSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipped Gem Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "7EquipSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipment Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "7GemSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipped Gem Swap - Iteration " T7
    	If (Swap = "7EquipSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipment Swap - Iteration " T7
    Return
    
    Type7LCAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		IniRead, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Swap%PositionType7, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7SwapCoord:
    	gosub GuiSD
    	Gosub Type7LCCoordAdd
    	Gosub Type7SwapWrite1
    	Gosub Type7SwapCoord1
    	gosub Type7SwapRouting
    Return
    
    Type7LCCoordAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		If (RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7% = 1) {
    			IniWrite, % RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Swap%PositionType7, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    			%Swap%Hotkey%Hk%Iteration%T7%_X:= 1240 + (C*53)
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:= 560 + (L*54)
    		}
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7Radio1:
    	L:= 1
    	C:= 1
    	RadioCX:= -10
    	RadioCY:= 459 + L*52
    	Loop {
    		RadioCX += 39
    		var2 = RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    		var3:= % var2
    		Gui, Add, Radio, % "x" RadioCX " y" RadioCY " h13 w13 v" var3 " Checked" var3
    		If (C = 5) or (c = 9) {
    			RadioCX += 1
    		}
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    
    Type7Radio2:
    	For _, socket in SocketList1 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    return
    
    
    Type7Radio3:
    	For _, socket in SocketList1 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    	For _, socket in SocketList2 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    	For _, socket in SocketList3 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    return
    
    Type7SwapRouting:
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 2) OR (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 2) {
    		gosub Type7SwapWrite2
    		gosub Type7SwapCoord2
    	}
    	If (Swap = "7GemSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    		Gosub Type7GemSwap2
    	}
    	If (Swap = "7EquipSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    		Gosub Type7EquipSwap2
    	}
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 1) {
    		IniWrite, % 7GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7GemSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 1) {
    		IniWrite, % 7EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7EquipSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 2) {
    		IniWrite, % 7GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7GemSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 2) {
    		IniWrite, % 7EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7EquipSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    return
    
    Type7SwapCoord1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    return
    
    Type7SwapCoord2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%AltHotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%AltHotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    Return
    
    Type7SwapRead1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapRead2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapWrite1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapWrite2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    Type1.ahk
    Code:
    Type1:
    	HkT1:= Hk
    	Trig:= 3
    	CooldownCount:= 0
    	CoolDown%Trig%:= 0
    	HKeyHkT1Spell1:= HKey%HkT1%Spell1
    	HKeyHkT1Spell2:= HKey%HkT1%Spell2
    	HKeyHkT1Key:= HKey%HkT1%Key
    	HKey%HkT1%KeyToggle:= !HKey%HkT1%KeyToggle
    	If HKey%HkT1%KeyToggle {
    		While HKey%HkT1%KeyToggle {
    			ImageSearch, , , 0, 0, 1000, 90, % "*10 " HKey%HkT1%Spell1 "Timer.png"
    				If (ErrorLevel = 0) {
    					CooldownCount+= 1
    					HKey%HkT1%Spell1Timer:= True
    				}
    				If (ErrorLevel = 1) {
    					loop, 7 {
    						Var:= A_Index + 1
    						ImageSearch, , , 0, 0, 1000, 80, % "*10 " HKey%HkT1%Spell1 "Timer" var ".png"
    						If (ErrorLevel = 0) {
    							CooldownCount+= 1
    							HKey%HkT1%Spell1Timer:= True
    							break
    						}
    						if (ErrorLevel = 1) and (A_Index = 7) {
    							HKey%HkT1%Spell1Timer:= False
    							break
    						}
    					}
    				}
    				If (HKey%HkT1%Spell1timer = False) {
    					If CooldownCount >= 1
    						Sleep, % T1Cooldown%HK%
    					ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%HkT1%Spell1 "-" HKey%HkT1%Key ".png"
    						If (ErrorLevel = 0 AND HKey%HkT1%KeyToggle = 1) {
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , U
    							SendInput, {%HKeyHkT1Key%}
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , D
    						}
    						If (ErrorLevel = 1 AND HKey%HkT1%KeyToggle = 1) {
    							MouseGetPos, Xpos, Ypos
    							BlockInput, MouseMove
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , U
    							MouseMove, KeyX_%HkT1%, KeyY_%HkT1%
    							SetMouseDelay, 40
    							MouseClick, , KeyX_%HkT1%, KeyY_%HkT1%
    							SetMouseDelay, %MouseDelay%
    							MouseMove, %HKeyHkT1Spell1%X, %HKeyHkT1Spell1%Y
    							SetMouseDelay, 40
    							MouseClick, , %HKeyHkT1Spell1%X, %HKeyHkT1Spell1%Y
    							SetMouseDelay, %MouseDelay%
    							MouseMove, Xpos, Ypos
    							Sleep, %FrameTime%
    							SendInput, {%HKeyHkT1Key%}
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , D
    							BlockInput, MouseMoveOff
    						}
    				}
    			While HKey%HkT1%KeyToggle {
    				If (TriggeredCount%Hk% = 0)
    					Break
    				If (TriggerToggle%Trig%_%HkT1% = 1) {
    					ImageSearch, , , 0, 0, 1000, 90, % "*10 " HKey%HkT1%Spell%Trig% "Timer.png"
    						If (ErrorLevel = 0) {
    							CoolDown%Trig%+= 1
    							HKey%HkT1%Spell%Trig%Timer:= True
    						}
    						If (ErrorLevel = 1) {
    							loop, 7 {
    								var:= A_Index + 1
    								ImageSearch, , , 0, 0, 1000, 80, % "*10 " HKey%HkT1%Spell%Trig% "Timer" var ".png"
    									If (ErrorLevel = 0) {
    										CoolDown%Trig%+= 1
    										HKey%HkT1%Spell%Trig%Timer:= True
    										break
    									}
    									if (ErrorLevel = 1) and (A_Index = 7) {
    										HKey%HkT1%Spell%Trig%Timer:= False
    										break
    									}
    							}
    						}
    						If (HKey%HkT1%Spell%Trig%timer = False) {
    							Sleep, % HKey%Hk%T1Cooldown%TrigN%
    							ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%hKT1%Spell%Trig% "-" HKey%HkT1%Key ".png"
    								If (ErrorLevel = 0 AND HKey%HkT1%KeyToggle = 1) {
    									GetKeyState, LButtonState, LButton, P
    										if LButtonState = D
    											MouseClick, , , , , , U
    									SendInput, {%HKeyHkT1Key%}
    									GetKeyState, LButtonState, LButton, P
    										If LButtonState = D
    											MouseClick, , , , , , D
    								}
    								If (ErrorLevel = 1 AND HKey%HkT1%KeyToggle = 1) {
    									HKeyHkT1SpellTrig:= HKey%HkT1%Spell%Trig%
    									MouseGetPos, Xpos, Ypos
    									BlockInput, MouseMove
    									GetKeyState, LButtonState, LButton, P
    										if LButtonState = D
    											MouseClick, , , , , , U
    									MouseMove, KeyX_%HkT1%, KeyY_%HkT1%
    									SetMouseDelay, 40
    									MouseClick, , KeyX_%HkT1%, KeyY_%HkT1%
    									SetMouseDelay, %MouseDelay%
    									MouseMove, %HKeyHkT1SpellTrig%X, %HKeyHkT1SpellTrig%Y
    									SetMouseDelay, 40
    									MouseClick, , %HKeyHkT1SpellTrig%X, %HKeyHkT1SpellTrig%Y
    									SetMouseDelay, %MouseDelay%
    									MouseMove, Xpos, Ypos
    									Sleep, %FrameTime%
    									SendInput, {%HKeyHkT1Key%}
    									GetKeyState, LButtonState, LButton, P
    										If LButtonState = D
    											MouseClick, , , , , , D
    									BlockInput, MouseMoveOff
    								}
    						}
    				}
    				If (A_Index = TriggeredCount%Hk%) {
    					Trig:= 3
    					Break
    				}
    			}
    			Trig+= 1
    			Sleep, % ScanDelay%Hk%
    		}
    	CooldownCount:= 0
    	CoolDown%Trig%:= 0
    	}
    	If !HKey%HkT1%KeyToggle {
    		MouseGetPos, Xpos, Ypos
    		BlockInput, MouseMove
    			GetKeyState, LButtonState, LButton, P
    				If LButtonState = D
    					MouseClick, , , , , , U
    		MouseMove, KeyX_%HkT1%, KeyY_%HkT1%
    		SetMouseDelay, 40
    		MouseClick, , KeyX_%HkT1%, KeyY_%HkT1%
    		SetMouseDelay, %MouseDelay%
    		MouseMove, %HKeyHkT1Spell2%X, %HKeyHkT1Spell2%Y
    		SetMouseDelay, 40
    		MouseClick, , %HKeyHkT1Spell2%X, %HKeyHkT1Spell2%Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, Xpos, Ypos
    		GetKeyState, LButtonState, LButton, P
    			If LButtonState = D
    				MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	}
    Return
    Type2.ahk
    Code:
    Type2:
    	HKeyHkSpell1:= HKey%Hk%Spell1
    	HKeyHkSpell2:= HKey%Hk%Spell2
    	HKeyHkKey:= HKey%Hk%Key
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, KeyX_%Hk%, KeyY_%Hk%
    	SetMouseDelay, 40
    	MouseClick, , KeyX_%Hk%, KeyY_%Hk%
    	SetMouseDelay, %MouseDelay%
    	MouseMove,  %HKeyHkSpell1%X, %HKeyHkSpell1%Y
    	SetMouseDelay, 40
    	MouseClick, ,  %HKeyHkSpell1%X, %HKeyHkSpell1%Y
    	SetMouseDelay, %MouseDelay%
    		If (Type2MoveToggleHotkey%Hk% = 1) {
    			MouseMove, Xpos, Ypos
    			Sleep, %FrameTime%
    		}
    	SendInput, {%HKeyHkKey%}
    	MouseMove, KeyX_%Hk%, KeyY_%Hk%
    	SetMouseDelay, 40
    	MouseClick, , KeyX_%Hk%, KeyY_%Hk%
    	SetMouseDelay, %MouseDelay%
    	MouseMove, %HKeyHkSpell2%X, %HKeyHkSpell2%Y
    	SetMouseDelay, 40
    	MouseClick, , %HKeyHkSpell2%X, %HKeyHkSpell2%Y
    	SetMouseDelay, %MouseDelay%
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState2, LButton, P
    		If LButtonState2 = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    Type3.ahk
    Code:
    Type3:
    	HKeyHkSpell1:= HKey%Hk%Spell1
    	HKeyHkSpell2:= HKey%Hk%Spell2
    	HKeyHkKey:= HKey%Hk%Key
    	HKey%Hk%Keytoggle:= !HKey%Hk%Keytoggle
    	If HKey%Hk%Keytoggle {
    		MouseGetPos, Xpos, Ypos
    		BlockInput, MouseMove
    		GetKeyState, LButtonState, LButton, P
    			If LButtonState = D
    				MouseClick, , , , , , U
    		MouseMove, KeyX_%Hk%, KeyY_%Hk%
    		SetMouseDelay, 40
    		MouseClick, , KeyX_%Hk%, KeyY_%Hk%
    		SetMouseDelay, %MouseDelay%
    		MouseMove, %HKeyHkSpell1%X, %HKeyHkSpell1%Y
    		SetMouseDelay, 40
    		MouseClick, , %HKeyHkSpell1%X, %HKeyHkSpell1%Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, Xpos, Ypos
    			If (Type3Cast1ToggleHotkey%Hk% = 1) {
    				Sleep, %FrameTime%
    				SendInput, {%HKeyHkKey%}
    			}
    		GetKeyState, LButtonState, LButton, P
    			If LButtonState = D
    				MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	Return
    	}
    	If !HKey%Hk%Keytoggle {
    		MouseGetPos, Xpos, Ypos
    		BlockInput, MouseMove
    			GetKeyState, LButtonState, LButton, P
    				If LButtonState = D
    					MouseClick, , , , , , U
    		MouseMove, KeyX_%Hk%, KeyY_%Hk%
    		SetMouseDelay, 40
    		MouseClick, , KeyX_%Hk%, KeyY_%Hk%
    		SetMouseDelay, %MouseDelay%
    		MouseMove, %HKeyHkSpell2%X, %HKeyHkSpell2%Y
    		SetMouseDelay, 40
    		MouseClick, , %HKeyHkSpell2%X, %HKeyHkSpell2%Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, Xpos, Ypos
    			If (Type3Cast2ToggleHotkey%Hk% = 1) {
    				Sleep, %FrameTime%
    				SendInput, {%HKeyHkKey%}
    			}
    		GetKeyState, LButtonState, LButton, P
    			If LButtonState = D
    				MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	Return
    	}
    	SetTimer, RemoveToolTip, -500
    Return
    Type4.ahk
    Code:
    Type4:
    	HKeyHkSpell1T4:= HKey%Hk%Spell1T4
    	HKeyHkKey:= HKey%Hk%Key
    	ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%Hk%Spell1T4 "-" Hkey%Hk%Key ".png"
    		If ErrorLevel = 0
    			SendInput, {%HKeyHkKey%}
    		If (ErrorLevel = 1) {
    			BlockInput, MouseMove
    			MouseGetPos, Xpos, Ypos
    			GetKeyState, LButtonState, LButton, P
    				If LButtonState = D
    					MouseClick, , , , , , U
    			MouseMove, KeyX_%Hk%, KeyY_%Hk%
    			SetMouseDelay, 40
    			MouseClick, , KeyX_%Hk%, KeyY_%Hk%
    			SetMouseDelay, %MouseDelay%
    			MouseMove,  %HKeyHkSpell1T4%X, %HKeyHkSpell1T4%Y
    			SetMouseDelay, 40
    			MouseClick, ,  %HKeyHkSpell1T4%X, %HKeyHkSpell1T4%Y
    			SetMouseDelay, %MouseDelay%
    			MouseMove, Xpos, Ypos
    			Sleep, %FrameTime%
    			SendInput, {%HKeyHkKey%}
    			GetKeyState, LButtonState, LButton, P
    				If LButtonState = D
    					MouseClick, , , , , , D
    			BlockInput, MouseMoveOff
    		}
    Return
    Type5.ahk
    Code:
    Type5:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	SetMouseDelay, 40
    	MouseClick, Right, GemSwap1Hotkey%Hk%_X, GemSwap1Hotkey%Hk%_Y
    		If (GemSwapTab_%Hk% = 1) {
    			MouseMove, GemSwap2Hotkey%Hk%_X, GemSwap2Hotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, Left, GemSwap2Hotkey%Hk%_X, GemSwap2Hotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    			MouseMove, GemSwap1Hotkey%Hk%_X, GemSwap1Hotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, Left, GemSwap1Hotkey%Hk%_X, GemSwap1Hotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    		}
    		If (GemSwapTab_%Hk% = 2) {
    			SendInput, {x}
    			Sleep, %FrameTime%
    			MouseMove, GemSwap2AltX%Hk%, GemSwap2AltY%Hk%
    			SetMouseDelay, 40
    			MouseClick, , GemSwap2AltX%Hk%, GemSwap2AltY%Hk%
    			SetMouseDelay, %MouseDelay%
    			SendInput, {x}
    			Sleep, %FrameTime%
    			MouseMove, GemSwap1AltHotkey%Hk%_X, GemSwap1AltHotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, , GemSwap1Hotkey%Hk%_X, GemSwap1Hotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    		}
    	SendInput, {i}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    Type6.ahk
    Code:
    Type6:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseClick, Left, EquipSwap1Hotkey%Hk%_X, EquipSwap1Hotkey%Hk%_Y
    		If (EquipSwapTab_%Hk% = 1) {
    			MouseMove, EquipSwap2Hotkey%Hk%_X, EquipSwap2Hotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, Left, EquipSwap2Hotkey%Hk%_X, EquipSwap2Hotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    			MouseMove, EquipSwap1Hotkey%Hk%_X, EquipSwap1Hotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, Left, EquipSwap1Hotkey%Hk%_X, EquipSwap1Hotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    		}
    		If (EquipSwapTab_%Hk% = 2) {
    			SendInput, {x}
    			Sleep, %FrameTime%
    			MouseMove, EquipSwap2AltHotkey%Hk%_X, EquipSwap2AltHotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, , EquipSwap2AltHotkey%Hk%_X, EquipSwap2AltHotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    			SendInput, {x}
    			Sleep, %FrameTime%
    			MouseMove, EquipSwap1AltHotkey%Hk%_X, EquipSwap1AltHotkey%Hk%_Y
    			SetMouseDelay, 40
    			MouseClick, , EquipSwap1AltHotkey%Hk%_X, EquipSwap1AltHotkey%Hk%_Y
    			SetMouseDelay, %MouseDelay%
    		}
    	SendInput, {i}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    Type7.ahk
    Code:
    Type7:
    	T7:= 1
    	MouseGetPos, Xpos, Ypos
    	Loop, % Hkey%Hk%Iterations {
    			If (Hkey%Hk%Iteration%T7% = "SpellScan") {
    				Gosub SpellScan
    			}
    			If (Hkey%Hk%Iteration%T7% = "ImageSearch") {
    				gosub T7ImageSearch
    			}
    			If (Hkey%Hk%Iteration%T7% = "Spell") {
    				gosub T7Spell
    			}
    			If (Hkey%Hk%Iteration%T7% = "SendInput") {
    				gosub T7SendInput
    			}
    			If (Hkey%Hk%Iteration%T7% = "GetMousePos") {
    				gosub T7GetMouse
    			}
    			If (Hkey%Hk%Iteration%T7% = "GoMousePos") {
    				gosub T7GoMouse
    			}
    			If (Hkey%Hk%Iteration%T7% = "MouseMove") {
    				gosub T7MouseMove
    			}
    			If (Hkey%Hk%Iteration%T7% = "Delay") {
    				Sleep, % HKey%Hk%DelayIteration%T7%
    			}
    			If (Hkey%Hk%Iteration%T7% = "GemSwap") {
    				gosub T7GemSwap
    			}
    			If (Hkey%Hk%Iteration%T7% = "EquipmentSwap") {
    				gosub T7EquipSwap
    			}
    		T7+= 1
    	}
    	MouseMove, Xpos, Ypos
    Return
    
    T7Routing:
    Return
    
    T7ImageSearch:
    	;BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LuttonState = D
    			MouseClick, , , , , , U
    	MouseMove, A_ScreenWidth, A_ScreenHeight
    	Loop {
    		ImageSearch, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, % "*" ShadeVariationHotkey%Hk%Iteration%T7% " " ImageNameHotkey%Hk%Iteration%T7% ".png"
    			If (ErrorLevel = 2) {
    				MsgBox % "Search Failed for image " ImageNameHotkey%Hk%Iteration%T7%
    				break
    			}
    			If (ErrorLevel = 1) {
    				MsgBox % "Search could not find image " ImageNameHotkey%Hk%Iteration%T7%
    				break
    			}
    			If (ErrorLevel = 0) {
    				ToolTip, % HKey%Hk%MouseXPosIteration%T7% ", " HKey%Hk%MouseYPosIteration%T7%
    				SetTimer, RemoveToolTip, 500
    				break
    			}
    	}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    ;			BlockInput, MouseMoveOff
    return
    
    T7Spell:
    	HKeyHkSpellIterationT7:= HKey%Hk%SpellIteration%T7%
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, KeyX_%Hk%Iteration%T7%, KeyY_%Hk%Iteration%T7%
    	Sleep, %FrameTime%
    	MouseClick, ,  KeyX_%Hk%Iteration%T7%, KeyY_%Hk%Iteration%T7%
    	Sleep, %FrameTime%
    	MouseMove, %HKeyHkSpellIterationT7%X, %HKeyHkSpellIterationT7%Y
    	SetMouseDelay, 40
    	MouseClick, , %HKeyHkSpellIterationT7%X, %HKeyHkSpellIterationT7%Y
    	SetMouseDelay, %MouseDelay%
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7SendInput:
    	HKeyHkSendIterationT7:= HKey%Hk%SendIteration%T7%
    	SendInput, {%HKeyHkSendIterationT7%}
    return
    
    T7GetMouse:
    	If (Hkey%Hk%GetMousePosToggleIteration%T7% = 1) {
    		BlockInput, MouseMove
    		GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    		MouseGetPos, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%
    			SetTimer, RemoveToolTip, -500
    		GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	}
    return
    
    T7GoMouse:
    	MouseT7:= HKey%Hk%GoMousePosIteration%T7%
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, HKey%Hk%MouseXPosIteration%MouseT7%, HKey%Hk%MouseYPosIteration%MouseT7%
    	Tooltip, % "x: " HKey%Hk%MouseXPosIteration%MouseT7% ", y: "HKey%Hk%MouseYPosIteration%MouseT7%
    		SetTimer, RemoveToolTip, -500
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7MouseMove:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%
    	Tooltip, % "x: " HKey%Hk%MouseXPosIteration%T7% ", y: "HKey%Hk%MouseYPosIteration%T7%
    		SetTimer, RemoveToolTip, -500
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    				MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7GemSwap:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, 40
    	MouseClick, Right, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, %MouseDelay%
    	If (GemSwapTab_%Hk% = 1) {
    		MouseMove, GemSwap2Hotkey%Hk%Iteration%T7%_X, GemSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap2Hotkey%Hk%Iteration%T7%_X, GemSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	If (GemSwapTab_%Hk% = 2) {
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, GemSwap2AltHotkey%Hk%Iteration%T7%_X, GemSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap2AltHotkey%Hk%Iteration%T7%_X, GemSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	SendInput, {i}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7EquipSwap:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, 40
    	MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, %MouseDelay%
    	If (EquipSwapTab_%Hk% = 1) {
    		MouseMove, EquipSwap2Hotkey%Hk%Iteration%T7%_X, EquipSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap2Hotkey%Hk%Iteration%T7%_X, EquipSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	If (EquipSwapTab_%Hk% = 2) {
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap2AltHotkey%Hk%Iteration%T7%_X, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	SendInput, {i}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    This is a code against human testing.
    Good luck with it.
    n
    Last edited by nimb777; 11-04-2024 at 03:35 PM. Reason: Fixed typo on HotkeyRouting.exe

    Unrapekit refactored
  2. #2
    nimb777's Avatar Member
    Reputation
    6
    Join Date
    Dec 2013
    Posts
    27
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Here's a working buffer script version. Tested with some guard skill I do not remember the name.
    Type1.ahk
    Code:
    Type1:
    	If (T1%Hk% = 1) {
    		Gosub V1Loop
    		return
    	}
    	If (T1%Hk% = 2) {
    		i:= TriggeredCount%Hk% + 1
    		Loop, %i% {
    			Cooldown:= Hkey%Hk%T1Cooldown%A_Index%
    			HKeyHkKeyTrigN:= HKey%Hk%Key%A_Index%
    			If (HKey%Hk%Key%TrigN% = LButton) {
    				Tx:= 1549
    				Ty:= 952
    				color:= 0x343233
    			}
    			If (HKey%Hk%Key%TrigN% = MButton) {
    				Tx:= 1604
    				Ty:= 952
    				color:= 0x5D5B5B
    			}
    			If (HKey%Hk%Key%TrigN% = RButton) {
    				Tx:= 1660
    				Ty:= 952
    				color:= 0x605A5D
    			}
    			If (HKey%Hk%Key%TrigN% = Q) {
    				Tx:= 1438
    				Ty:= 1021
    				color:= 0x625D5F
    			}
    			If (HKey%Hk%Key%TrigN% = W) {
    				Tx:= 1493
    				Ty:= 1021
    				color:= 0x5E5C5D
    			}
    			If (HKey%Hk%Key%TrigN% = E) {
    				Tx:= 1549
    				Ty:= 1021
    				color:= 0x5D5B5C
    			}
    			If (HKey%Hk%Key%TrigN% = R) {
    				Tx:= 1605
    				Ty:= 1021
    				color:= 0x5D5B5B
    			}
    			If (HKey%Hk%Key%TrigN% = T) {
    				Tx:= 1661
    				Ty:= 1021
    				color:= "0x5C5A5B"
    			}
    		}
    		Gosub V2Loop
    		return
    	}
    Return
    
    V1Loop:
    	HkT1:= Hk
    	Trig:= 3
    	CooldownCount:= 0
    	CoolDown%Trig%:= 0
    	HKeyHkT1Spell1:= HKey%HkT1%Spell1
    	HKeyHkT1Spell2:= HKey%HkT1%Spell2
    	HKeyHkT1Key:= HKey%HkT1%Key
    	HKey%HkT1%KeyToggle:= !HKey%HkT1%KeyToggle
    	If HKey%HkT1%KeyToggle {
    		While HKey%HkT1%KeyToggle {
    			ImageSearch, , , 0, 0, 1000, 90, % "*10 " HKey%HkT1%Spell1 "Timer.png"
    				If (ErrorLevel = 0) {
    					CooldownCount+= 1
    					HKey%HkT1%Spell1Timer:= True
    				}
    				If (ErrorLevel = 1) {
    					loop, 7 {
    						Var:= A_Index + 1
    						ImageSearch, , , 0, 0, 1000, 80, % "*10 " HKey%HkT1%Spell1 "Timer" var ".png"
    						If (ErrorLevel = 0) {
    							CooldownCount+= 1
    							HKey%HkT1%Spell1Timer:= True
    							break
    						}
    						if (ErrorLevel = 1) and (A_Index = 7) {
    							HKey%HkT1%Spell1Timer:= False
    							break
    						}
    					}
    				}
    				If (HKey%HkT1%Spell1timer = False) {
    					If CooldownCount >= 1
    						Sleep, % T1Cooldown%HK%
    					ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%HkT1%Spell1 "-" HKey%HkT1%Key ".png"
    						If (ErrorLevel = 0 AND HKey%HkT1%KeyToggle = 1) {
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , U
    							SendInput, {%HKeyHkT1Key%}
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , D
    						}
    						If (ErrorLevel = 1 AND HKey%HkT1%KeyToggle = 1) {
    							MouseGetPos, Xpos, Ypos
    							BlockInput, MouseMove
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , U
    							MouseMove, KeyX_%HkT1%, KeyY_%HkT1%
    							SetMouseDelay, 40
    							MouseClick, , KeyX_%HkT1%, KeyY_%HkT1%
    							SetMouseDelay, %MouseDelay%
    							MouseMove, %HKeyHkT1Spell1%X, %HKeyHkT1Spell1%Y
    							SetMouseDelay, 40
    							MouseClick, , %HKeyHkT1Spell1%X, %HKeyHkT1Spell1%Y
    							SetMouseDelay, %MouseDelay%
    							MouseMove, Xpos, Ypos
    							Sleep, %FrameTime%
    							SendInput, {%HKeyHkT1Key%}
    							GetKeyState, LButtonState, LButton, P
    								If LButtonState = D
    									MouseClick, , , , , , D
    							BlockInput, MouseMoveOff
    						}
    				}
    			While HKey%HkT1%KeyToggle {
    				If (TriggeredCount%Hk% = 0)
    					Break
    				If (TriggerToggle%Trig%_%HkT1% = 1) {
    					ImageSearch, , , 0, 0, 1000, 90, % "*10 " HKey%HkT1%Spell%Trig% "Timer.png"
    						If (ErrorLevel = 0) {
    							CoolDown%Trig%+= 1
    							HKey%HkT1%Spell%Trig%Timer:= True
    						}
    						If (ErrorLevel = 1) {
    							loop, 7 {
    								var:= A_Index + 1
    								ImageSearch, , , 0, 0, 1000, 80, % "*10 " HKey%HkT1%Spell%Trig% "Timer" var ".png"
    									If (ErrorLevel = 0) {
    										CoolDown%Trig%+= 1
    										HKey%HkT1%Spell%Trig%Timer:= True
    										break
    									}
    									if (ErrorLevel = 1) and (A_Index = 7) {
    										HKey%HkT1%Spell%Trig%Timer:= False
    										break
    									}
    							}
    						}
    						If (HKey%HkT1%Spell%Trig%timer = False) {
    							Sleep, % HKey%Hk%T1Cooldown%TrigN%
    							ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%hKT1%Spell%Trig% "-" HKey%HkT1%Key ".png"
    								If (ErrorLevel = 0 AND HKey%HkT1%KeyToggle = 1) {
    									GetKeyState, LButtonState, LButton, P
    										if LButtonState = D
    											MouseClick, , , , , , U
    									SendInput, {%HKeyHkT1Key%}
    									GetKeyState, LButtonState, LButton, P
    										If LButtonState = D
    											MouseClick, , , , , , D
    								}
    								If (ErrorLevel = 1 AND HKey%HkT1%KeyToggle = 1) {
    									HKeyHkT1SpellTrig:= HKey%HkT1%Spell%Trig%
    									MouseGetPos, Xpos, Ypos
    									BlockInput, MouseMove
    									GetKeyState, LButtonState, LButton, P
    										if LButtonState = D
    											MouseClick, , , , , , U
    									MouseMove, KeyX_%HkT1%, KeyY_%HkT1%
    									SetMouseDelay, 40
    									MouseClick, , KeyX_%HkT1%, KeyY_%HkT1%
    									SetMouseDelay, %MouseDelay%
    									MouseMove, %HKeyHkT1SpellTrig%X, %HKeyHkT1SpellTrig%Y
    									SetMouseDelay, 40
    									MouseClick, , %HKeyHkT1SpellTrig%X, %HKeyHkT1SpellTrig%Y
    									SetMouseDelay, %MouseDelay%
    									MouseMove, Xpos, Ypos
    									Sleep, %FrameTime%
    									SendInput, {%HKeyHkT1Key%}
    									GetKeyState, LButtonState, LButton, P
    										If LButtonState = D
    											MouseClick, , , , , , D
    									BlockInput, MouseMoveOff
    								}
    						}
    				}
    				If (A_Index = TriggeredCount%Hk%) {
    					Trig:= 3
    					Break
    				}
    			}
    			Trig+= 1
    			Sleep, % ScanDelay%Hk%
    		}
    	CooldownCount:= 0
    	CoolDown%Trig%:= 0
    	}
    	If !HKey%HkT1%KeyToggle {
    		MouseGetPos, Xpos, Ypos
    		BlockInput, MouseMove
    			GetKeyState, LButtonState, LButton, P
    				If LButtonState = D
    					MouseClick, , , , , , U
    		MouseMove, KeyX_%HkT1%, KeyY_%HkT1%
    		SetMouseDelay, 40
    		MouseClick, , KeyX_%HkT1%, KeyY_%HkT1%
    		SetMouseDelay, %MouseDelay%
    		MouseMove, %HKeyHkT1Spell2%X, %HKeyHkT1Spell2%Y
    		SetMouseDelay, 40
    		MouseClick, , %HKeyHkT1Spell2%X, %HKeyHkT1Spell2%Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, Xpos, Ypos
    		GetKeyState, LButtonState, LButton, P
    			If LButtonState = D
    				MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	}
    Return
    
    V2Loop:
    	HKey%HkT1%KeyToggle:= !HKey%HkT1%KeyToggle
    	While HKey%HkT1%KeyToggle {
    		If (A_Index = 1) {
    			Tooltip, % "Toggle State = " HKey%HkT1%KeyToggle " Cooldown = " Cooldown , 1880, 1050
    				SetTimer, RemoveToolTip, -500
    		}
    		PixelSearch, , , Tx, Ty, Tx, Ty, Color, 20
    			If (ErrorLevel = 0) {
    				gosub SendShortcut
    			}
    	}
    Return
    
    SendShortcut:
    	Tooltip, % "HKeyHkKeyTrigN = " HKeyHkKeyTrigN , 1880, 1050
    		SetTimer, RemoveToolTip, -500
    	Sleep, %Cooldown%
    	Sleep, 200
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	send, {%HKeyHkKeyTrigN%}
    	If LButtonState = D
    		MouseClick, , , , , , D
    return
    ConfigType1.ahk
    Code:
    ConfigType1:
    	GuiWidth:= 190
    	GuiHeight:= 60
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 1"
    	Gui, Add, Button, x10 y30 w50 h20 gV1 Default, v1
    	Gui, Add, Button, x70 y30 w50 h20 gV2 Default, v2
    	Gui, Add, Button, x130 y30 w50 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    
    V1:
    	gosub GuiSD
    	GuiWidth:= 210
    	GuiHeight:= 260
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - V1"
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x10 y70 w140 h20 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Text, x160 y73, Spell 2
    	Gui, Add, Edit, x10 y100 w70 h20 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y103, Shortcut Key
    	Gui, Add, Edit, x10 y130 w20 h20 vTriggeredCount%Hk%, % TriggeredCount%Hk%
    	Gui, Add, Text, x40 y133, Extra Triggered Spells
    	Gui, Add, Edit, x10 y160 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y163, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y190 w30 h20 vT1Cooldown%Hk%, % T1Cooldown%Hk%
    	Gui, Add, Text, x50 y193, Spell 1 Cooldown, ms
    	Gui, Add, Button, x10 y230 w90 h20 gTriggered1 Default, Define
    	Gui, Add, Button, x110 y230 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    
    Triggered1:
    	gosub GuiSD
    	T1%Hk%:= 1
    	TrigN:= 3
    	IniWrite, % T1%Hk%, UnrapeKitConfig.ini, triggeredCount, T1%Hk%
    	IniWrite, % TriggeredCount%Hk%, UnrapeKitConfig.ini, triggeredCount, TriggeredCount%Hk%
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, Delay, ScanDelay%Hk%
    	IniWrite, % T1Cooldown%Hk%, UnrapeKitConfig.ini, Delay, T1Cooldown%Hk%
    	If TriggeredCount%Hk% = 0
    		gosub TriggeredWrite1
    	Loop, % TriggeredCount%Hk% {
    		Y1:= 30 * TrigN - 27
    		Y2:= 30 * TrigN - 30
    		Y3:= 30 * TrigN + 3
    		Y4:= 30 * TrigN
    		Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional Spells"
    		Gui, Add, Text, x10 y30, Toggle`, SpellName
    		Gui, Add, Checkbox, % "x10 y" Y1 " h13 w13 vTriggerToggle" TrigN "_" Hk " Checked" TriggerToggle%TrigN%_%Hk%
    		Gui, Add, Edit, x41 y%Y2% w140 h20 vHkey%Hk%Spell%TrigN%, % Hkey%Hk%Spell%TrigN%
    		Gui, Add, Text, x191 y%Y1%, % "Spell " TrigN ", Cooldown"
    		Gui, Add, Edit, x291 y%Y2% w40 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    		Gui, Add, Text, x341 y%Y1%, ms
    			If (A_Index = TriggeredCount%Hk%) {
    				GuiWidth:= 370
    				GuiHeight:= 40 + 30 * TrigN
    				ButtonHeight:= 30 * TrigN + 10
    				gosub Guibuild
    				Gui, Add, Button, x170 y%ButtonHeight% w90 h20 gTriggeredWrite1 Default, Record
    				Gui, Add, Button, x270 y%ButtonHeight% w90 h20 gCancel, Reload
    				Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    				Break
    			}
    		TrigN+= 1
    	}
    Return
    
    TriggeredWrite1:
    	gosub GuiSD
    	TrigN:= 3
    	Loop, % TriggeredCount%Hk% {
    		IniWrite, % TriggerToggle%TrigN%_%Hk%, UnrapeKitConfig.ini, TriggeredToggle, TriggerToggle%TrigN%_%Hk%
    		IniWrite, % Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Spell%TrigN%
    		IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%T1Cooldown%TrigN%
    		TrigN+=1
    	}
    	Gosub KeyWrite
    Return
    
    ;============================================================================================================
    
    V2:
    	gosub GuiSD
    	TrigN:= 1
    	GuiWidth:= 210
    	GuiHeight:= 200
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - V2"
    	Gui, Add, Edit, x10 y40 w70 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    	Gui, Add, Text, x90 y43, Shortcut Key
    	Gui, Add, Edit, x10 y70 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y73, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y100 w30 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    	Gui, Add, Text, x50 y103, Spell 1 Cooldown, ms
    	Gui, Add, Edit, x10 y130 w40 h20 vTriggeredCount%Hk%, % TriggeredCount%Hk%
    	Gui, Add, Text, x60 y133, Extra Triggered Spells
    	Gui, Add, Button, x10 y160 w90 h20 gTriggered2 Default, Define
    	Gui, Add, Button, x110 y160 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    
    Triggered2:
    	gosub GuiSD
    	T1%Hk%:= 2
    	IniWrite, % TriggeredCount%Hk%, UnrapeKitConfig.ini, triggeredCount, TriggeredCount%Hk%
    	IniWrite, % T1%Hk%, UnrapeKitConfig.ini, triggeredCount, T1%Hk%
    	IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key%TrigN%
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, Delay, ScanDelay%Hk%
    	IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, Delay, Hkey%Hk%T1Cooldown%TrigN%
    	TrigN:= 2
    	If TriggeredCount%Hk% = 0
    		gosub TriggeredWrite2
    	Loop, % TriggeredCount%Hk% {
    		Y1:= 30 * TrigN - 27
    		Y2:= 30 * TrigN - 30
    		Y3:= 30 * TrigN + 3
    		Y4:= 30 * TrigN
    		Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional shortcuts"
    		Gui, Add, Edit, x41 y%Y2% w140 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    		Gui, Add, Text, x191 y%Y1%, % "Spell " TrigN ", Cooldown"
    		Gui, Add, Edit, x291 y%Y2% w40 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    		Gui, Add, Text, x341 y%Y1%, ms
    			If (A_Index = TriggeredCount%Hk%) {
    				GuiWidth:= 370
    				GuiHeight:= 40 + 30 * TrigN
    				ButtonHeight:= 30 * TrigN + 10
    				gosub Guibuild
    				Gui, Add, Button, x170 y%ButtonHeight% w90 h20 gTriggeredWrite2 Default, Record
    				Gui, Add, Button, x270 y%ButtonHeight% w90 h20 gCancel, Reload
    				Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%,
    		Gui, Add, Text, x10 y30, (Q, W, E, R, T, LButton, MButton, RButton)
    				Break
    			}
    		TrigN+= 1
    	}
    Return
    
    TriggeredWrite2:
    	gosub GuiSD
    		IniWrite, % Hkey%Hk%Key1, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Key1
    	TrigN:= 2
    	Loop, % TriggeredCount%Hk% {
    		IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Key%TrigN%
    		IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%T1Cooldown%TrigN%
    		TrigN+=1
    	}
    	Gosub KeyWrite
    Return
    Generalfunctions.ahk
    Code:
    GuiBuild:
        X_Offset := GuiWidth / 2
        Y_Offset := GuiHeight / 2
        If (Xpos < X_Offset)
            Move_X := 0
        Else If (Xpos < A_ScreenWidth - X_Offset)
            Move_X := Xpos - X_Offset
        Else
            Move_X := A_ScreenWidth - GuiWidth
        If (Ypos < Y_Offset)
            Move_Y := 0
        Else If (Ypos < A_ScreenHeight - Y_Offset)
            Move_Y := Ypos - Y_Offset
        Else
            Move_Y := A_ScreenHeight - GuiHeight - 30
        Gui, -0x80000 AlwaysOnTop
    return
    
    HotkeySetup:
    	gosub HotkeySetupRead
        Loop, %HotKeyLimit% {
    		If Hkey%A_Index%Toggle = 0
    			Hotkey, % Hkey%A_Index%Shortcut, Hotkey%A_Index%
    		If (Hkey%A_Index%Type1 = 1) {
    			gosub Type1Load
    		}
    		If (Hkey%A_Index%Type2 = 1) {
    			gosub Type2Load
    		}
    		If (Hkey%A_Index%Type3 = 1) {
    			gosub Type3Load
    		}
    		If (Hkey%A_Index%Type4 = 1) {
    			gosub Type4Load
    		}
    		If (Hkey%A_Index%Type5 = 1) {
    			gosub Type5Load
    		}
    		If (Hkey%A_Index%Type6 = 1) {
    			gosub Type6Load
    		}
    		If (Hkey%A_Index%Type7 = 1) {
    			gosub Type7Load
    		}
    	}
    return
    
    KeyWrite:
    		If (Hkey%Hk%Key = "Q") {
    			KeyX_%Hk%:= 1440
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "W") {
    			KeyX_%Hk%:= 1495
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "E") {
    			KeyX_%Hk%:= 1550
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "R") {
    			KeyX_%Hk%:= 1605
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "T") {
    			KeyX_%Hk%:= 1655
    			KeyY_%Hk%:= 1045
    		}
    		If (Hkey%Hk%Key = "LButton") {
    			KeyX_%Hk%:= 1550
    			KeyY_%Hk%:= 975
    		}
    		If (Hkey%Hk%Key = "MButton") {
    			KeyX_%Hk%:= 1600
    			KeyY_%Hk%:= 975
    		}
    		If (Hkey%Hk%Key = "RButton") {
    			KeyX_%Hk%:= 1650
    			KeyY_%Hk%:= 975
    		}
    	IniWrite, % KeyX_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyX_%Hk%
    	IniWrite, % KeyY_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyY_%Hk%
    	Hk += 1
    	if (A_GuiControlHk is Integer) {
    		Gosub HkeyEdit
    	} Else {
    		Gosub HkTypeConfigLoop
    	}
    Return
    
    GuiSD:
        Gui, Submit
        Gui, Destroy
    Return
    
    RemoveToolTip:
        ToolTip
    Return
    Hotkeyconfig.ahk
    Code:
    HotkeyConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, Hotkeys wanted:
    	Gui, Add, Text, x50 y33, 200 Hotkeys Maximum
    	Gui, Add, Edit, x10 y30 w30 h20 vHotkeyLimit, %HotkeyLimit%
    	Gui, Add, Button, x10 y70 w90 h20 gHkeyEdit Default, Hotkeys
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Count
    Return
    
    HkeyEdit:
    	gosub GuiSD
    	IniWrite, %HotkeyLimit%, UnrapeKitConfig.ini, Hotkeys, HotkeyLimit
    	H:= 1
    	W:= 1
    	HMax:= 1
    	Hk:= 1
    	MouseGetPos, Xpos, Ypos
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Loop, %HotkeyLimit% {
    		GuiY:= 120 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    			If (GuiY > ScreenHeight) {
    				W+= 1
    				HMax:= H
    				H= 1
    			}
    		Y1:= 13 + 30 * H
    		Y2:= 10 + 30 * H
    		GuiWidth:= 610 * W
    			If (W = 1) {
    				GuiHeight:= 80 + 30 * H
    				ButtonHeight:= 50 + 30 * H
    				ButtonTxtHeight:= 53 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 80 + 30 * HMax
    				ButtonHeight:= 50 + 30 * HMax
    				ButtonTxtHeight:= 53 + 30 * HMax
    			}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		Text1X:= GuiWidth - 550
    		Radio0X:= GuiWidth - 590
    		Radio1X:= GuiWidth - 520
    		Radio2X:= GuiWidth - 480
    		Radio3X:= GuiWidth - 440
    		Radio4X:= GuiWidth - 400
    		Radio5X:= GuiWidth - 360
    		Radio6X:= GuiWidth - 320
    		Radio7X:= GuiWidth - 280
    		EditX:= GuiWidth - 240
    		EditButtonX:= GuiWidth -100
    		Radio0Txt:= GuiWidth - 600
    		Radio1Txt:= GuiWidth - 530
    		Radio2Txt:= GuiWidth - 490
    		Radio3Txt:= GuiWidth - 450
    		Radio4Txt:= GuiWidth - 410
    		Radio5Txt:= GuiWidth - 370
    		Radio6Txt:= GuiWidth - 330
    		Radio7Txt:= GuiWidth - 290
    		EditTxt:= GuiWidth - 220
    		EditButtonTxt:= GuiWidth -85
    		Gui, Add, Text, x%Radio0Txt% y20,Disable  Index
    		Gui, Add, Text, x%Radio1Txt% y20,Type 1
    		Gui, Add, Text, x%Radio2Txt% y20,Type 2
    		Gui, Add, Text, x%Radio3Txt% y20,Type 3
    		Gui, Add, Text, x%Radio4Txt% y20,Type 4
    		Gui, Add, Text, x%Radio5Txt% y20,Type 5
    		Gui, Add, Text, x%Radio6Txt% y20,Type 6
    		Gui, Add, Text, x%Radio7Txt% y20,Type 7
    		Gui, Add, Text, x%EditTxt% y20, Hotkey Shortcut
    		Gui, Add, Text, x%EditButtonTxt% y20, Hotkey Edit
    		Gui, Add, Text, x%Text1X% y%Y1%, %Hk%
    		Gui, Add, Radio, % "X" Radio0x " Y" Y1 " h13 w13 vHkey" Hk "Toggle Checked" Hkey%Hk%Toggle
    		Gui, Add, Radio, % "x" Radio1X " y" Y1 " h13 w13 vHkey" Hk "Type1 Checked" Hkey%Hk%Type1,1
    		Gui, Add, Radio, % "x" Radio2X " y" Y1 " h13 w13 vHkey" Hk "Type2 Checked" Hkey%Hk%Type2,2
    		Gui, Add, Radio, % "x" Radio3X " y" Y1 " h13 w13 vHkey" Hk "Type3 Checked" Hkey%Hk%Type3,3
    		Gui, Add, Radio, % "x" Radio4X " y" Y1 " h13 w13 vHkey" Hk "Type4 Checked" Hkey%Hk%Type4,4
    		Gui, Add, Radio, % "x" Radio5X " y" Y1 " h13 w13 vHkey" Hk "Type5 Checked" Hkey%Hk%Type5,5
    		Gui, Add, Radio, % "x" Radio6X " y" Y1 " h13 w13 vHkey" Hk "Type6 Checked" Hkey%Hk%Type6,6
    		Gui, Add, Radio, % "x" Radio7X " y" Y1 " h13 w13 vHkey" Hk "Type7 Checked" Hkey%Hk%Type7,7
    		Gui, Add, Edit, x%EditX% y%Y2% w120 h20 vHkey%Hk%Shortcut, % Hkey%Hk%Shortcut
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditHk, %Hk%
    		If (Hk = HotkeyLimit) {
    			gosub GuiBuild
    			Gui, Add, Button, x10 y%ButtonHeight% w90 H20 gHkAdd, Add
    			Gui, Add, Text, x110 y%ButtonTxtHeight%,Add
    			Gui, Add, Edit, x140 y%ButtonHeight% w20 h20 vHotkeyAdd
    			Gui, Add, Text, x170 y%ButtonTxtHeight%,Hotkey(s)
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gRecordHk Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gSetHk, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Hotkey Configuration
    			Break
    		}
    	H+= 1
    	Hk+= 1
    	}
    Return
    
    WriteHk:
    	IniWrite, % Hkey%Hk%Toggle, UnrapeKitConfig.ini, HotkeyToggle, Hkey%Hk%Toggle
    	IniWrite, % Hkey%Hk%Type1, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type1
    	IniWrite, % Hkey%Hk%Type2, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type2
    	IniWrite, % Hkey%Hk%Type3, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type3
    	IniWrite, % Hkey%Hk%Type4, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type4
    	IniWrite, % Hkey%Hk%Type5, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type5
    	IniWrite, % Hkey%Hk%Type6, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type6
    	IniWrite, % Hkey%Hk%Type7, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type7
    	IniWrite, % Hkey%Hk%Shortcut, UnrapeKitConfig.ini, HotkeyShortcut, Hkey%Hk%Shortcut
    		If (Hkey%Hk%Shortcut !=  AND Hkey%Hk%Toggle = 1)
    			Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    return
    
    RecordHk:
    	gosub GuiSD
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub WriteHk
    		Hk+= 1
    	}
    	reload
    Return
    
    HkAdd:
    	gosub GuiSD
    	HotkeyLimit+= %HotkeyAdd%
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub WriteHk
    		Hk+= 1
    	}
    	gosub HkeyEdit
    Return
    
    SetHk:
    	gosub GuiSD
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub WriteHk
    		Hk+= 1
    	}
    	Hk:= 1
    	gosub HkTypeConfigLoop
    Return
    
    EditHk:
    	A_GuiControlHk:= A_GuiControl
    	Hk:= A_GuiControlHk
    	If (Hkey%Hk%Toggle = 0)
    		Hkey%Hk%Toggle = 1
    	gosub GuiSD
    	gosub WriteHK
    	gosub HkTypeConfigRouting
    ;	gosub HkeyEdit
    Return
    
    HkTypeConfigLoop:
    	Loop {
    			If (Hkey%Hk%Toggle = 1) {
    				Hk += 1
    			}
    			If (Hk > HotKeyLimit) {
    				Reload
    				Break
    			}
    			If (Hkey%Hk%Type1 = 1) {
    				Gosub ConfigType1
    				Break
    			}
    			If (Hkey%Hk%Type2 = 1) {
    				Gosub ConfigType2
    				Break
    			}
    			If (Hkey%Hk%Type3 = 1) {
    				Gosub ConfigType3
    				Break
    			}
    			If (Hkey%Hk%Type4 = 1) {
    				Gosub ConfigType4
    				Break
    			}
    			If (Hkey%Hk%Type5 = 1) {
    				Gosub GemSwap1
    				Break
    			}
    			If (Hkey%Hk%Type6 = 1) {
    				Gosub EquipSwap1
    				Break
    			}
    			If (Hkey%Hk%Type7 = 1) {
    				Gosub Type7Config
    				Break
    			}
    	}
    Return
    
    HkTypeConfigRouting:
    	If (Hkey%Hk%Type1 = 1)
    		Gosub ConfigType1
    	If (Hkey%Hk%Type2 = 1)
    		Gosub ConfigType2
    	If (Hkey%Hk%Type3 = 1)
    		Gosub ConfigType3
    	If (Hkey%Hk%Type4 = 1)
    		Gosub ConfigType4
    	If (Hkey%Hk%Type5 = 1)
    		Gosub GemSwap1
    	If (Hkey%Hk%Type6 = 1)
    		Gosub EquipSwap1
    	If (Hkey%Hk%Type7 = 1)
    		Gosub Type7Config
    Return
    HotkeyRouting.ahk
    Code:
    Hotkey1:
    	Hk:= 1
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey2:
    	Hk:= 2
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey3:
    	Hk:= 3
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey4:
    	Hk:= 4
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey5:
    	Hk:= 5
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey6:
    	Hk:= 6
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey7:
    	Hk:= 7
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey8:
    	Hk:= 8
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey9:
    	Hk:= 9
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey10:
    	Hk:= 10
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey11:
    	Hk:= 11
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey12:
    	Hk:= 12
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey13:
    	Hk:= 13
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey14:
    	Hk:= 14
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey15:
    	Hk:= 15
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey16:
    	Hk:= 16
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey17:
    	Hk:= 17
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey18:
    	Hk:= 18
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey19:
    	Hk:= 19
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey20:
    	Hk:= 20
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey21:
    	Hk:= 21
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey22:
    	Hk:= 22
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey23:
    	Hk:= 23
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey24:
    	Hk:= 24
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey25:
    	Hk:= 25
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey26:
    	Hk:= 26
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey27:
    	Hk:= 27
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey28:
    	Hk:= 28
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey29:
    	Hk:= 29
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey30:
    	Hk:= 30
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey31:
    	Hk:= 31
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey32:
    	Hk:= 32
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey33:
    	Hk:= 33
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey34:
    	Hk:= 34
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey35:
    	Hk:= 35
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey36:
    	Hk:= 36
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey37:
    	Hk:= 37
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey38:
    	Hk:= 38
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey39:
    	Hk:= 39
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey40:
    	Hk:= 40
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey41:
    	Hk:= 41
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey42:
    	Hk:= 42
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey43:
    	Hk:= 43
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey44:
    	Hk:= 44
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey45:
    	Hk:= 45
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey46:
    	Hk:= 46
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey47:
    	Hk:= 47
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey48:
    	Hk:= 48
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey49:
    	Hk:= 49
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey50:
    	Hk:= 50
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey51:
    	Hk:= 51
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey52:
    	Hk:= 52
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey53:
    	Hk:= 53
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey54:
    	Hk:= 54
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey55:
    	Hk:= 55
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey56:
    	Hk:= 56
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey57:
    	Hk:= 57
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey58:
    	Hk:= 58
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey59:
    	Hk:= 59
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey60:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey61:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey62:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey63:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey64:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey65:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey66:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey67:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey68:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey69:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey70:
    	Hk:= 70
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey71:
    	Hk:= 71
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey72:
    	Hk:= 72
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey73:
    	Hk:= 73
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey74:
    	Hk:= 74
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey75:
    	Hk:= 75
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey76:
    	Hk:= 76
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey77:
    	Hk:= 77
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey78:
    	Hk:= 78
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey79:
    	Hk:= 79
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey80:
    	Hk:= 80
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey81:
    	Hk:= 81
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey82:
    	Hk:= 82
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey83:
    	Hk:= 83
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey84:
    	Hk:= 84
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey85:
    	Hk:= 85
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey86:
    	Hk:= 86
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey87:
    	Hk:= 87
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey88:
    	Hk:= 88
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey89:
    	Hk:= 89
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey90:
    	Hk:= 90
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey91:
    	Hk:= 91
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey92:
    	Hk:= 92
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey93:
    	Hk:= 93
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey94:
    	Hk:= 94
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey95:
    	Hk:= 95
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey96:
    	Hk:= 96
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey97:
    	Hk:= 97
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey98:
    	Hk:= 98
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey99:
    	Hk:= 99
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey100:
    	Hk:= 100
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey101:
    	Hk:= 101
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey102:
    	Hk:= 102
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey103:
    	Hk:= 103
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey104:
    	Hk:= 104
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey105:
    	Hk:= 105
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey106:
    	Hk:= 106
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey107:
    	Hk:= 107
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey108:
    	Hk:= 108
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey109:
    	Hk:= 109
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey110:
    	Hk:= 110
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey111:
    	Hk:= 111
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey112:
    	Hk:= 112
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey113:
    	Hk:= 113
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey114:
    	Hk:= 114
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey115:
    	Hk:= 115
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey116:
    	Hk:= 116
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey117:
    	Hk:= 117
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey118:
    	Hk:= 118
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey119:
    	Hk:= 119
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey120:
    	Hk:= 120
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey121:
    	Hk:= 121
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey122:
    	Hk:= 122
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey123:
    	Hk:= 123
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey124:
    	Hk:= 124
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey125:
    	Hk:= 125
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey126:
    	Hk:= 126
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey127:
    	Hk:= 127
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey128:
    	Hk:= 128
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey129:
    	Hk:= 129
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey130:
    	Hk:= 130
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey131:
    	Hk:= 131
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey132:
    	Hk:= 132
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey133:
    	Hk:= 133
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey134:
    	Hk:= 134
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey135:
    	Hk:= 135
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey136:
    	Hk:= 136
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey137:
    	Hk:= 137
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey138:
    	Hk:= 138
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey139:
    	Hk:= 139
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey140:
    	Hk:= 140
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey141:
    	Hk:= 141
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey142:
    	Hk:= 142
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey143:
    	Hk:= 143
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey144:
    	Hk:= 144
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey145:
    	Hk:= 145
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey146:
    	Hk:= 146
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey147:
    	Hk:= 147
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey148:
    	Hk:= 148
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey149:
    	Hk:= 149
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey150:
    	Hk:= 150
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey151:
    	Hk:= 151
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey152:
    	Hk:= 152
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey153:
    	Hk:= 153
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey154:
    	Hk:= 154
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey155:
    	Hk:= 155
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey156:
    	Hk:= 156
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey157:
    	Hk:= 157
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey158:
    	Hk:= 158
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey159:
    	Hk:= 159
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey160:
    	Hk:= 160
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey170:
    	Hk:= 170
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey171:
    	Hk:= 171
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey172:
    	Hk:= 172
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey173:
    	Hk:= 173
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey174:
    	Hk:= 174
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey175:
    	Hk:= 175
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey176:
    	Hk:= 176
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey177:
    	Hk:= 177
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey178:
    	Hk:= 178
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey179:
    	Hk:= 179
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey180:
    	Hk:= 180
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey181:
    	Hk:= 181
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey182:
    	Hk:= 182
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey183:
    	Hk:= 183
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey184:
    	Hk:= 184
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey185:
    	Hk:= 185
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey186:
    	Hk:= 186
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey187:
    	Hk:= 187
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey188:
    	Hk:= 188
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey189:
    	Hk:= 189
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey190:
    	Hk:= 190
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey191:
    	Hk:= 191
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey192:
    	Hk:= 192
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey193:
    	Hk:= 193
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey194:
    	Hk:= 194
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey195:
    	Hk:= 195
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey196:
    	Hk:= 196
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey197:
    	Hk:= 197
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey198:
    	Hk:= 198
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey199:
    	Hk:= 199
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey200:
    	Hk:= 200
    ;	Msgbox, % "Hotkey " Hk "is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    HotkeyRouting:
    		If (Hkey%Hk%Type1 = 1) {
    			Gosub Type1
    		Return
    		}
    		If (Hkey%Hk%Type2 = 1) {
    			Gosub Type2
    		Return
    		}
    		If (Hkey%Hk%Type3 = 1) {
    			Gosub Type3
    		Return
    		}
    		If (Hkey%Hk%Type4 = 1) {
    			Gosub Type4
    		Return
    		}
    		If (Hkey%Hk%Type5 = 1) {
    			Gosub Type5
    		Return
    		}
    		If (Hkey%Hk%Type6 = 1) {
    			Gosub Type6
    		Return
    		}
    		If (Hkey%Hk%Type7 = 1) {
    			Gosub Type7
    		Return
    		}
    Return
    
    Cancel:
    	Reload
    Return
    IniSetting.ahk
    Code:
    HotkeyLoadLoop:
    gosub hotkeySetupRead
    Hk:= 1
    	Loop, %HotKeyLimit% {
    		While (Hkey%Hk%Toggle = 0) {
    			Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    			If (Hkey%Hk%Type1 = 1) {
    				gosub Type1Load
    				break
    			}
    			If (Hkey%Hk%Type2 = 1) {
    				gosub Type2Load
    				break
    			}
    			If (Hkey%Hk%Type3 = 1) {
    				gosub Type3Load
    				break
    			}
    			If (Hkey%Hk%Type4 = 1)
    				gosub Type4Load
    				break
    			If (Hkey%Hk%Type5 = 1) {
    				gosub Type5Load
    				break
    			}
    			If (Hkey%Hk%Type6 = 1) {
    				gosub Type6Load
    				break
    			}
    			If (Hkey%Hk%Type7 = 1) {
    				gosub Type7Load
    				break
    			}
    		}
    		If (A_Index = HotkeyLimit) {
    			Hk:= 1
    			break
    		}
    	Hk += 1
    	}
    return
    
    HotkeySetupRead:
    Hk:= 1
        Loop, %HotKeyLimit% {
    		IniRead, Hkey%Hk%Toggle, UnrapeKitConfig.ini, HotkeyToggle, Hkey%Hk%Toggle, %A_Space%
    		IniRead, Hkey%Hk%Type1, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type1, %A_Space%
    		IniRead, Hkey%Hk%Type2, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type2, %A_Space%
    		IniRead, Hkey%Hk%Type3, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type3, %A_Space%
    		IniRead, Hkey%Hk%Type4, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type4, %A_Space%
    		IniRead, Hkey%Hk%Type5, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type5, %A_Space%
    		IniRead, Hkey%Hk%Type6, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type6, %A_Space%
    		IniRead, Hkey%Hk%Type7, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type7, %A_Space%
    		IniRead, Hkey%Hk%Type8, UnrapeKitConfig.ini, HotkeyType, Hkey%Hk%Type8, %A_Space%
    		IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key, %A_Space%
    		IniRead, KeyX_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyX_%Hk%, %A_Space%
    		IniRead, KeyY_%Hk%, UnrapeKitConfig.ini, KeyCoordinates, KeyY_%Hk%, %A_Space%
    		IniRead, Hkey%Hk%Shortcut, UnrapeKitConfig.ini, HotkeyShortcut, Hkey%Hk%Shortcut, %A_Space%
    		Hk+= 1
    	}
    Hk:= 1
    return
    
    LoadSocketLists:
    	SocketList1 := [ {name: "6SocketWeaponTopRightSocket", x: 72, y: 50, coordX: 1355, coordY: 170}
    				   , {name: "6SocketWeaponTopCenterSocket", x: 149, y: 50, coordX: 1405, coordY: 170}
    				   , {name: "6SocketWeaponMiddleRightSocket", x: 71, y: 125, coordX: 1355, coordY: 225}
    				   , {name: "6SocketWeaponMiddleCenterSocket", x: 149, y: 125, coordX: 1405, coordY: 225}
    				   , {name: "6SocketWeaponBottomRightSocket", x: 72, y: 200, coordX: 1355, coordY: 280}
    				   , {name: "6SocketWeaponBottomCenterSocket", x: 149, y: 200, coordX: 1405, coordY: 280}
    				   , {name: "RightWeaponTopSocket", x: 111, y: 50, coordX: 1380, coordY: 170}
    				   , {name: "RightWeaponMiddleSocket", x: 111, y: 125, coordX: 1380, coordY: 225}
    				   , {name: "RightWeaponBottomSocket", x: 111, y: 200, coordX: 1380, coordY: 280}
    				   , {name: "RightWeaponTopRightSocket", x: 84, y: 88, coordX: 1355, coordY: 200}
    				   , {name: "RightWeaponTopCenterSocket", x: 137, y: 88, coordX: 1405, coordY: 200}
    				   , {name: "RightWeaponBottomCenterSocket", x: 137, y: 163, coordX: 1405, coordY: 250}
    				   , {name: "LeftHandTopSocket", x: 523, y: 50, coordX: 1795, coordY: 170}
    				   , {name: "LeftHandMiddleSocket", x: 523, y: 125, coordX: 1795, coordY: 225}
    				   , {name: "LeftHandBottomSocket", x: 523, y: 200, coordX: 1795, coordY: 280}
    				   , {name: "LeftHandTopCenterSocket", x: 496, y: 88, coordX: 1765, coordY: 200}
    				   , {name: "LeftHandTopLeftSocket", x: 550, y: 88, coordX: 1820, coordY: 200}
    				   , {name: "LeftHandBottomLeftSocket", x: 550, y: 163, coordX: 1820, coordY: 250}
    				   , {name: "LeftHandMiddleCenterSocket", x: 485, y: 125, coordX: 1770, coordY: 225}
    				   , {name: "LeftHandMiddleLeftSocket", x: 561, y: 125, coordX: 1820, coordY: 225} ]
    
    	SocketList2 := [ {name: "HelmetTopRightSocket", x: 279, y: 21, coordX: 1560, coordY: 135}
    				   , {name: "HelmetTopLeftSocket", x: 355, y: 21, coordX: 1615, coordY: 135}
    				   , {name: "HelmetBottomRightSocket", x: 279, y: 97, coordX: 1560, coordY: 185}
    				   , {name: "HelmetBottomLeftSocket", x: 355, y: 97, coordX: 1615, coordY: 185}
    				   , {name: "HelmetMiddleRightSocket", x: 279, y: 57, coordX: 1560, coordY: 160}
    				   , {name: "HelmetMiddleLeftSocket", x: 355, y: 57, coordX: 1615, coordY: 160}
    				   , {name: "HelmetMiddleSocket", x: 317, y: 57, coordX: 1690, coordY: 160}
    				   , {name: "GlovesTopRightSocket", x: 151, y: 257, coordX: 1430, coordY: 370}
    				   , {name: "GlovesTopCenterSocket", x: 224, y: 257, coordX: 1485, coordY: 370}
    				   , {name: "GlovesBottomRightSocket", x: 151, y: 332, coordX: 1430, coordY: 420}
    				   , {name: "GlovesBottomCenterSocket", x: 224, y: 332, coordX: 1485, coordY: 420}
    				   , {name: "GlovesMiddleRightSocket", x: 151, y: 294, coordX: 1430, coordY: 395}
    				   , {name: "GlovesMiddleCenterSocket", x: 224, y: 294, coordX: 1485, coordY: 395}
    				   , {name: "GlovesMiddleSocket", x: 187, y: 294, coordX: 1455, coordY: 395}
    				   , {name: "4SocketArmorTopRightSocket", x: 293, y: 172, coordX: 1560, coordY: 275}
    				   , {name: "4SocketArmorTopLeftSocket", x: 343, y: 172, coordX: 1615, coordY: 275}
    				   , {name: "4SocketArmorBottomRightSocket", x: 293, y: 235, coordX: 1560, coordY: 333}
    				   , {name: "4SocketArmorBottomLeftSocket", x: 343, y: 235, coordX: 1615, coordY: 333}
    				   , {name: "6SocketArmorTopRightSocket", x: 281, y: 140, coordX: 1560, coordY: 250}
    				   , {name: "6SocketArmorTopLeftSocket", x: 355, y: 140, coordX: 1615, coordY: 250}
    				   , {name: "6SocketArmorMiddleRightSocket", x: 281, y: 203, coordX: 1560, coordY: 305} ]
    
    	SocketList3 := [ {name: "6SocketArmorMiddleLeftSocket", x: 355, y: 203, coordX: 1615, coordY: 305}
    				   , {name: "6SocketArmorBottomRightSocket", x: 281, y: 266, coordX: 1560, coordY: 360}
    				   , {name: "6SocketArmorBottomLeftSocket", x: 355, y: 266, coordX: 1615, coordY: 360}
    				   , {name: "1SocketArmorMiddleSocket", x: 317, y: 204, coordX: 1585, coordY: 305}
    				   , {name: "BootsTopCenterSocket", x: 411, y: 257, coordX: 1690, coordY: 370}
    				   , {name: "BootsTopLeftSocket", x: 484, y: 257, coordX: 1740, coordY: 370}
    				   , {name: "BootsBottomCenterSocket", x: 411, y: 332, coordX: 1690, coordY: 420}
    				   , {name: "BootsBottomLeftSocket", x: 484, y: 332, coordX: 1740, coordY: 420}
    				   , {name: "BootsMiddleCenterSocket", x: 411, y: 294, coordX: 1690, coordY: 395}
    				   , {name: "BootsMiddleLeftSocket", x: 484, y: 294, coordX: 1740, coordY: 395}
    				   , {name: "BootsMiddleSocket", x: 447, y: 294, coordX: 1715, coordY: 395}
    				   , {name: "RightFingerSocket", x: 213, y: 202, coordX: 1485, coordY: 305}
    				   , {name: "LeftFingerSocket", x: 421, y: 202, coordX: 1690, coordY: 305}
    				   , {name: "AmuletSocket", x: 421, y: 137, coordX: 1690, coordY: 245}
    				   , {name: "BeltRightSocket", x: 293, y: 320, coordX: 1565, coordY: 420}
    				   , {name: "BeltCenterSocket", x: 317, y: 320, coordX: 1585, coordY: 420}
    				   , {name: "BeltLeftSocket", x: 343, y: 320, coordX: 1605, coordY: 420}
    				   , {name: "Flask1", x: 218, y: 410, coordX: 1487, coordY: 515}
    				   , {name: "Flask2", x: 270, y: 410, coordX: 1540, coordY: 515}
    				   , {name: "Flask3", x: 322, y: 410, coordX: 1592, coordY: 515}
    				   , {name: "Flask4", x: 375, y: 410, coordX: 1645, coordY: 515}
    				   , {name: "Flask5", x: 427, y: 410, coordX: 1697, coordY: 515} ]
    return
    
    LoadScanSettings:
        IniRead, SaveHotkey, UnrapeKitConfig.ini, ScanLangList, SaveHotkey, %A_Space%
        IniRead, SaveAsHotkey, UnrapeKitConfig.ini, ScanLangList, SaveAsHotkey, %A_Space%
        IniRead, CloseHotkey, UnrapeKitConfig.ini, ScanLangList, CloseHotkey, %A_Space%
        IniRead, YesHotkey, UnrapeKitConfig.ini, ScanLangList, YesHotkey, %A_Space%
        IniRead, AddressBarHotkey, UnrapeKitConfig.ini, ScanLangList, AddressBarHotkey, %A_Space%
        IniRead, SaveAsWindowName, UnrapeKitConfig.ini, ScanLangList, SaveAsWindowName, %A_Space%
        IniRead, ConfirmSaveAsWindowName, UnrapeKitConfig.ini, ScanLangList, ConfirmSaveAsWindowName, %A_Space%
        IniRead, SnippingToolWindowName, UnrapeKitConfig.ini, ScanLangList, SnippingToolWindowName, %A_Space%
        IniRead, SnippingToolPath, UnrapeKitConfig.ini, ScanLangList, SnippingToolPath, %A_Space%
    return
    
    ScanReadLoad:
    	Loop, %ScanCount% {
    		IniRead, Name%A_Index%, UnrapeKitConfig.ini, Names, Name%A_Index%, %A_Space%
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, IconToggle, IconToggle%A_Index%, %A_Space%
    		IniRead, Line%A_Index%, UnrapeKitConfig.ini, Lines, Line%A_Index%, %A_Space%
    		NameN:= % Name%A_Index%
    		IconToggleN:= % IconToggle%A_Index%
    		LineN:= % Line%A_Index%
    		CaptureName%A_Index%:= % Name%A_Index% "" Line%A_Index%
    		IniRead, %NameN%X, UnrapeKitConfig.ini, SpellCoordinates, %NameN%X, %A_Space%
    		IniRead, %NameN%Y, UnrapeKitConfig.ini, SpellCoordinates, %NameN%Y, %A_Space%
    	}
    return
    
    WriteScanSettings:
        IniWrite, %SaveHotkey%, UnrapeKitConfig.ini, ScanLangList, SaveHotkey
        IniWrite, %SaveAsHotkey%, UnrapeKitConfig.ini, ScanLangList, SaveAsHotkey
        IniWrite, %CloseHotkey%, UnrapeKitConfig.ini, ScanLangList, CloseHotkey
        IniWrite, %YesHotkey%, UnrapeKitConfig.ini, ScanLangList, YesHotkey
        IniWrite, %AddressBarHotkey%, UnrapeKitConfig.ini, ScanLangList, AddressBarHotkey
        IniWrite, %SaveAsWindowName%, UnrapeKitConfig.ini, ScanLangList, SaveAsWindowName
        IniWrite, %ConfirmSaveAsWindowName%, UnrapeKitConfig.ini, ScanLangList, ConfirmSaveAsWindowName
        IniWrite, %SnippingToolWindowName%, UnrapeKitConfig.ini, ScanLangList, SnippingToolWindowName
        IniWrite, %SnippingToolPath%, UnrapeKitConfig.ini, ScanLangList, SnippingToolPath
    return
    
    Type1Load:
    	IniRead, T1%Hk%, UnrapeKitConfig.ini, triggeredCount, T1%Hk%
    	If (T1%Hk% = 1) {
    		IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1, %A_Space%
    		IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2, %A_Space%
    		Spell1:= Hkey%Hk%Spell1
    		Spell2:= Hkey%Hk%Spell2
    		IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    		IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    		IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    		IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    		TrigN:= 3
    		IniRead, TriggeredCount%Hk%, UnrapeKitConfig.ini, TriggeredCount, TriggeredCount%Hk%, %A_Space%
    		IniRead, ScanDelay%Hk%, UnrapeKitConfig.ini, Delay, ScanDelay%Hk%, %A_Space%
    		IniRead, T1Cooldown%Hk%, UnrapeKitConfig.ini, Delay, T1Cooldown%Hk%, %A_Space%
    		Loop, % TriggeredCount%Hk% {
    			IniRead, TriggerToggle%TrigN%_%Hk%, UnrapeKitConfig.ini, TriggeredToggle, TriggerToggle%TrigN%_%Hk%, %A_Space%
    			IniRead, Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Spell%TrigN%, %A_Space%
    			Spell1:= Hkey%Hk%Spell%TrigN%
    			IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    			IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    			Iniread, Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%T1Cooldown%TrigN%, %A_Space%
    		}
    	}
    	If (T1%Hk% = 2) {
    		TrigN:= 1
    		Iniread, TriggeredCount%Hk%, UnrapeKitConfig.ini, triggeredCount, TriggeredCount%Hk%
    		Iniread, Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, HotkeyKey, Hkey%Hk%Key%TrigN%
    		IniRead, Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, Delay, Hkey%Hk%T1Cooldown%TrigN%, %A_Space%
    		TrigN:= 2
    		Loop, % TriggeredCount%Hk% {
    			Iniread, Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%Key%TrigN%
    			Iniread, Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, TriggeredSpells, Hkey%Hk%T1Cooldown%TrigN%, %A_Space%
    			TrigN+=1
    		}
    	}
    return
    
    Type2Load:
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Type2MoveToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type2MoveToggleHotkey%Hk%, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    return
    
    Type3Load:
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Type3Cast1ToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type3Cast1ToggleHotkey%Hk%, %A_Space%
    	IniRead, Type3Cast2ToggleHotkey%Hk%, UnrapeKitConfig.ini, HotkeySpells, Type3Cast2ToggleHotkey%Hk%, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    return
    
    Type4Load:
    	IniRead, Hkey%Hk%Spell1T4, UnrapeKitConfig.ini, HotkeySpells, Hkey%Hk%Spell1T4, %A_Space%
    	Spell1:= Hkey%Hk%Spell1T4
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, SpellCoordinates, %Spell2%Y, %A_Space%
    return
    
    Type5Load:
    	IniRead, GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%
    	IniRead, GemSwap1Hotkey%Hk%_X, UnrapeKitConfig.ini, GemSwap1Coordinates, GemSwap1Hotkey%Hk%_X, %A_Space%
    	IniRead, GemSwap1Hotkey%Hk%_Y, UnrapeKitConfig.ini, GemSwap1Coordinates, GemSwap1Hotkey%Hk%_Y, %A_Space%
    	IniRead, GemSwap2Hotkey%Hk%_X, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2Hotkey%Hk%_X, %A_Space%
    	IniRead, GemSwap2Hotkey%Hk%_Y, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2Hotkey%Hk%_Y, %A_Space%
    	IniRead, GemSwap2AltHotkey%Hk%_X, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2AltHotkey%Hk%_X, %A_Space%
    	IniRead, GemSwap2AltHotkey%Hk%_Y, UnrapeKitConfig.ini, GemSwap2Coordinates, GemSwap2AltHotkey%Hk%_Y, %A_Space%
    return
    
    Type6Load:
    	IniRead, EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%, %A_Space%
    	IniRead, EquipSwap1Hotkey%Hk%_X, UnrapeKitConfig.ini, EquipSwap1Coordinates, EquipSwap1Hotkey%Hk%_X, %A_Space%
    	IniRead, EquipSwap1Hotkey%Hk%_Y, UnrapeKitConfig.ini, EquipSwap1Coordinates, EquipSwap1Hotkey%Hk%_Y, %A_Space%
    	IniRead, EquipSwap2Hotkey%Hk%_X, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2Hotkey%Hk%_X, %A_Space%
    	IniRead, EquipSwap2Hotkey%Hk%_Y, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2Hotkey%Hk%_Y, %A_Space%
    	IniRead, EquipSwap2AltHotkey%Hk%_X, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2AltHotkey%Hk%_X, %A_Space%
    	IniRead, EquipSwap2AltHotkey%Hk%_Y, UnrapeKitConfig.ini, EquipSwap2Coordinates, EquipSwap2AltHotkey%Hk%_Y, %A_Space%
    return
    
    Type7Load:
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations, %A_Space%
    	IniRead, GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%, %A_Space%
    	IniRead, EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniRead, Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, Type7Delay, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, Type7HotkeySpells, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, Type7HotkeyKey, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, Type7Send, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, %A_Space%
    		IniRead, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, %A_Space%
    		IniRead, ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, GemSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, GemSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, GemSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, GemSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, GemSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, GemSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, EquipSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, EquipSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, EquipSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, EquipSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniRead, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniRead, KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%, %A_Space%
    		IniRead, KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    
    Type7Write:
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations, %A_Space%
    	IniWrite, % GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, GemSwapTab_%Hk%, %A_Space%
    	IniWrite, % EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, EquipSwapTab_%Hk%, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, Type7Delay, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, Type7HotkeySpells, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, Type7HotkeyKey, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, Type7Send, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, Type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, %A_Space%
    		IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, %A_Space%
    		IniWrite, % ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % GemSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % GemSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap1CoordinatesType7, GemSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % GemSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % GemSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % GemSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % GemSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, GemSwap2CoordinatesType7, GemSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % EquipSwap1Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % EquipSwap1Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap1CoordinatesType7, EquipSwap1Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % EquipSwap2Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % EquipSwap2Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2Hotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % EquipSwap2AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, %A_Space%
    		IniWrite, % EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, EquipSwap2CoordinatesType7, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y, %A_Space%
    		IniWrite, % KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    
    Type7Write2:
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iteration%T7%
    	}
    return
    There's also added code for testing, and some routing code that got typoes.
    This code is aimed at preventing children, the elderly and women from being manipulated and hurt by their irresponsible familiars.
    Have fun with it.

  3. #3
    nimb777's Avatar Member
    Reputation
    6
    Join Date
    Dec 2013
    Posts
    27
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Buff code now scans from the top-left. Avoids scanning interference, but you might need multiple scans depending on instance lighting.
    New Compressed (zipped) Folder.zip
    Rip GGG for the pedocide and else associations.

  4. #4
    nimb777's Avatar Member
    Reputation
    6
    Join Date
    Dec 2013
    Posts
    27
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Alt-F4 and other rights, including property.

    So, here it is, more updates to straighten up ggg's discourse.
    The type1 hotkey got updated a bit, v3 scans the buff icon on the top and v2 the cooldown on the bottom.
    The screen capture had some removals/additions to make it more reliable and automated some of their following processes (add scan, menu scan).
    Other minor changes.
    Needs work on type7 for things like portal hotkeys and the likes, and maybe some foolproofing strategy for buffing.
    F4 hotkey so you dont get cheated out of it, your time and your brains.
    Free Palestine, oblivion to machado pedo enforcers and conspirators.
    Still work in progress.

  5. #5
    nimb777's Avatar Member
    Reputation
    6
    Join Date
    Dec 2013
    Posts
    27
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Reworked it a bit to help track and test with the ini file and minor rework.
    Comes with an .ini file example before the psyop agenda character death.
    Type 7 doesn't work and so des not the v3 of Type 1.
    I guess you all know the words and actions for all the crups and false modesty buttspeakers out there signaling.
    This is a caveman code, meant for cavemen.
    If you can't live with that, don't use it please.
    So, rip to that pedobear stepmom and everyone else's moms who got affected by this game and their satanist network.
    Code:
    ;======================================================Loading======================================================
    
    ToolTip, Loading
    
    ;=====================================INITIALIZATION
    #s ingleInstance , force
    WinActivate Path of Exile
    #IfWinActive  Path of Exile
    #MaxThreadsperHotkey  2
    ;------------------------------------------Settings
    SetTitleMatchMode, 2
    CoordMode, Mouse
    SetWorkingDir, %A_ScriptDir%
    SetBatchLines, -1
    SetDefaultMouseSpeed, 1
    SetKeyDelay, 20, 20
    SetMouseDelay, 20
    Hk := 1
    T7:= 1
    GuiToggle := 0
    LineSpacing1 = =========================================================================================================
    LineSpacing2 = --------------------------------------------------------------------------------------------------
    ;------------------------------------------Setup
    gosub IniLoad
    gosub HotkeyLoadLoop
    gosub DelayRead
    ;------------------------------------------Tooltip
    ToolTip, Load Complete
    SetTimer, RemoveToolTip, -500
    ;------------------------------------------Include
    #Include , GeneralFunctions.ahk
    #Include , IniSettings.ahk
    #Include , HotkeyConfig.ahk
    #Include , HotkeyRouting.ahk
    #Include , DelayConfig.ahk
    #Include , ScreenCapture.ahk
    #Include , ScanConfig.ahk
    #Include , SpellScan.ahk
    #Include , ConfigType1.ahk
    #Include , ConfigType2.ahk
    #Include , ConfigType3.ahk
    #Include , ConfigType4.ahk
    #Include , ConfigType5&6.ahk
    #Include , ConfigType7.ahk
    #Include , Type1.ahk
    #Include , Type2.ahk
    #Include , Type3.ahk
    #Include , Type4.ahk
    #Include , Type5.ahk
    #Include , Type6.ahk
    #Include , Type7.ahk
    Return
    ;======================================================End of Loading======================================================
    Code:
    ;======================================================GeneralFunctions======================================================
    RCtrl & F9::
    	GuiWidth:= 270
    	GuiHeight:= 270
    	MouseGetPos, Xpos, Ypos
    	gosub GuiBuild
    	Gui, Add, Text, X10 Y10, Configuration Hotkeys:
    	Gui, Add, Edit, X10 Y40 H21 W140 vHotkeyConfig, %HotkeyConfig%
    	Gui, Add, Edit, X10 Y70 H21 W140 vScanConfig, %ScanConfig%
    	Gui, Add, Edit, X10 Y100 H21 W140 vSpellScan, %SpellScan%
    	Gui, Add, Edit, X10 Y130 H21 W140 vScreenCapture, %ScreenCapture%
    	Gui, Add, Edit, X10 Y160 H21 W140 vDelayConfig, %DelayConfig%
    	Gui, Add, Text, X160 Y43, Hotkey Configuration
    	Gui, Add, Text, X160 Y73, Scan Configuration
    	Gui, Add, Text, X160 Y103, Spell Scan
    	Gui, Add, Text, X160 Y133, Screen Capture
    	Gui, Add, Text, X160 Y163, Delay Configuration
    	Gui, Add, Button, x70 y200 w90 h20 gSetupConfig Default, Ok
    	Gui, Add, Button, x170 y200 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Configuration
    Return
    ;======================================================
    HotkeyLoadLoop:
    gosub hotkeySetupRead
    Hk:= 1
    	Loop, %HotKeyLimit% {
    		if (Hkey%Hk%Toggle = 0) {
    			Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    			loop, 7 {
    				if (Hkey%Hk%Type = A_Index) {
    					gosub Type%A_Index%Load
    					break
    				}
    			}
    		}
    	Hk += 1
    	}
    	Hk:= 1
    return
    ;======================================================
    F4::
    	WinClose, Path of Exile
    return
    F7::
    return
    RCtrl & F10::
    	Gui, Cancel
    	Reload
    Return
    RCtrl & F11:: Pause
    RCtrl & F12:: ExitApp
    ;======================================================
    Cancel:
    	Reload
    Return
    ;======================================================
    HotkeyRouting:
    	loop, 7 {
    		If (Hkey%Hk%Type = A_Index) {
    			Gosub Type%A_Index%
    		Return
    		}
    	}
    Return
    ;======================================================
    GuiBuild:
    	if (GuiToggle = 1)
    		gosub guiSD
    	GuiToggle := 1
        X_Offset := GuiWidth / 2
        Y_Offset := GuiHeight / 2
        If (Xpos < X_Offset)
            Move_X := 0
        Else If (Xpos < A_ScreenWidth - X_Offset)
            Move_X := Xpos - X_Offset
        Else
            Move_X := A_ScreenWidth - GuiWidth
        If (Ypos < Y_Offset)
            Move_Y := 0
        Else If (Ypos < A_ScreenHeight - Y_Offset)
            Move_Y := Ypos - Y_Offset
        Else
            Move_Y := A_ScreenHeight - GuiHeight - 30
        Gui, -0x80000 AlwaysOnTop
    return
    ;======================================================
    SpellCast:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	LButtonState:= GetKeyState(LButton, P)
    		if (LButtonState = D)
    			MouseClick, , , , , , U
    	MouseMove, Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseClick
    	MouseMove, %HkeyHkSpell%X, %HkeyHkSpell%Y
    	MouseClick
    	MouseMove, Xpos, Ypos
    	if (Hkey%Hk%Cast%i%Toggle) {
    
    		if (Hkey%Hk%Cast%i%ShiftToggle) {
    			send, {LShift Down}
    		}
    			sleep, %Delay%
    		SendInput, % "{" Hkey%Hk%Key "}"
    		if (Hkey%Hk%Cast%i%ShiftToggle)
    			send, {LShift Up}
    	}
    ;	if (Hkey%Hk%Cast%i%ShiftToggle) {
    ;		sleep, % CastTime%i%
    	GetKeyState, LButtonState, LButton, P
    		if (LButtonState = D) {
    			MouseClick, , , , , , D
    			if (Hkey%Hk%Key = LButton)
    				MouseClick, , , , , , U
    		}
    	BlockInput, MouseMoveOff
    	j:= i
    return
    ;======================================================
    KeyWrite:
    		if (Hkey%Hk%Key = "Q") {
    			Hkey%Hk%KeyX:= 1440
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "W") {
    			Hkey%Hk%KeyX:= 1495
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "E") {
    			Hkey%Hk%KeyX:= 1550
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "R") {
    			Hkey%Hk%KeyX:= 1605
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "T") {
    			Hkey%Hk%KeyX:= 1655
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "LButton") {
    			Hkey%Hk%KeyX:= 1550
    			Hkey%Hk%KeyY:= 975
    		}
    		if (Hkey%Hk%Key = "MButton") {
    			Hkey%Hk%KeyX:= 1600
    			Hkey%Hk%KeyY:= 975
    		}
    		if (Hkey%Hk%Key = "RButton") {
    			Hkey%Hk%KeyX:= 1650
    			Hkey%Hk%KeyY:= 975
    		}
    	IniWrite, % Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX
    	IniWrite, % Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY
    	gosub KeywriteRouting
    Return
    ;======================================================
    KeyWrite1:
    		if (Hkey%Hk%Key%TrigN% = "Q") {
    			Hkey%Hk%Key%TrigN%X:= 1440
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "W") {
    			Hkey%Hk%Key%TrigN%X:= 1495
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "E") {
    			Hkey%Hk%Key%TrigN%X:= 1550
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "R") {
    			Hkey%Hk%Key%TrigN%X:= 1605
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "T") {
    			Hkey%Hk%Key%TrigN%X:= 1655
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "LButton") {
    			Hkey%Hk%Key%TrigN%X:= 1550
    			Hkey%Hk%Key%TrigN%Y:= 975
    		}
    		if (Hkey%Hk%Key%TrigN% = "MButton") {
    			Hkey%Hk%Key%TrigN%X:= 1600
    			Hkey%Hk%Key%TrigN%Y:= 975
    		}
    		if (Hkey%Hk%Key%TrigN% = "RButton") {
    			Hkey%Hk%Key%TrigN%X:= 1650
    			Hkey%Hk%Key%TrigN%Y:= 975
    		}
    	IniWrite, % Hkey%Hk%Key%TrigN%X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%X
    	IniWrite, % Hkey%Hk%Key%TrigN%Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%Y
    Return
    ;======================================================
    KeywriteRouting:
    	if (A_GuiControlHk is Integer) {
    		Hk := 0
    		A_GuiControlHk := ""
    		Gosub HkeyEdit
    	} else {
    		Hk += 1
    		Gosub HkTypeConfigRouting
    	}
    Return
    ;======================================================
    GuiSD:
        Gui, Submit
        Gui, Destroy
    	GuiToggle := 0
    Return
    ;======================================================
    LoadSocketLists:
    	SocketList := [ ["6SocketWeaponTopRightSocket",     72,  80 ]
    				  , ["6SocketWeaponTopCenterSocket",    149, 80 ]
    				  , ["6SocketWeaponMiddleRightSocket",  71,  155]
    				  , ["6SocketWeaponMiddleCenterSocket", 149, 155]
    				  , ["6SocketWeaponBottomRightSocket",  72,  230]
    				  , ["6SocketWeaponBottomCenterSocket", 149, 230]
    				  , ["RightWeaponTopSocket",            111, 80 ]
    				  , ["RightWeaponMiddleSocket",         111, 155]
    				  , ["RightWeaponBottomSocket",         111, 230]
    				  , ["RightWeaponTopRightSocket",       84,  118]
    				  , ["RightWeaponTopCenterSocket",      137, 118]
    				  , ["RightWeaponBottomCenterSocket",   137, 193]
    				  , ["LeftHandTopSocket",               523, 80 ]
    				  , ["LeftHandMiddleSocket",            523, 155]
    				  , ["LeftHandBottomSocket",            523, 230]
    				  , ["LeftHandTopCenterSocket",         496, 118]
    				  , ["LeftHandTopLeftSocket",           550, 118]
    				  , ["LeftHandBottomLeftSocket",        550, 193]
    				  , ["LeftHandMiddleCenterSocket",      485, 155]
    				  , ["LeftHandMiddleLeftSocket",        561, 155]
    				  , ["HelmetTopRightSocket",            279, 51 ]
    				  , ["HelmetTopLeftSocket",             355, 51 ]
    				  , ["HelmetBottomRightSocket",         279, 127]
    				  , ["HelmetBottomLeftSocket",          355, 127]
    				  , ["HelmetMiddleRightSocket",         279, 87 ]
    				  , ["HelmetMiddleLeftSocket",          355, 87 ]
    				  , ["HelmetMiddleSocket",              317, 87 ]
    				  , ["GlovesTopRightSocket",            151, 287]
    				  , ["GlovesTopCenterSocket",           224, 287]
    				  , ["GlovesBottomRightSocket",         151, 362]
    				  , ["GlovesBottomCenterSocket",        224, 362]
    				  , ["GlovesMiddleRightSocket",         151, 324]
    				  , ["GlovesMiddleCenterSocket",        224, 324]
    				  , ["GlovesMiddleSocket",              187, 324]
    				  , ["4SocketArmorTopRightSocket",      293, 202]
    				  , ["4SocketArmorTopLeftSocket",       343, 202]
    				  , ["4SocketArmorBottomRightSocket",   293, 265]
    				  , ["4SocketArmorBottomLeftSocket",    343, 265]
    				  , ["6SocketArmorTopRightSocket",      281, 170]
    				  , ["6SocketArmorTopLeftSocket",       355, 170]
    				  , ["6SocketArmorMiddleRightSocket",   281, 233]
    				  , ["6SocketArmorMiddleLeftSocket",    355, 233]
    				  , ["6SocketArmorBottomRightSocket",   281, 296]
    				  , ["6SocketArmorBottomLeftSocket",    355, 296]
    				  , ["1SocketArmorMiddleSocket",        317, 234]
    				  , ["BootsTopCenterSocket",            411, 287]
    				  , ["BootsTopLeftSocket",              484, 287]
    				  , ["BootsBottomCenterSocket",         411, 362]
    				  , ["BootsBottomLeftSocket",           484, 362]
    				  , ["BootsMiddleCenterSocket",         411, 324]
    				  , ["BootsMiddleLeftSocket",           484, 324]
    				  , ["BootsMiddleSocket",               447, 324]
    				  , ["RightFingerSocket",               213, 232]
    				  , ["LeftFingerSocket",                421, 232]
    				  , ["AmuletSocket",                    421, 167]
    				  , ["BeltRightSocket",                 293, 350]
    				  , ["BeltCenterSocket",                317, 350]
    				  , ["BeltLeftSocket",                  343, 350]
    				  , ["Flask1",                          218, 440]
    				  , ["Flask2",                          270, 440]
    				  , ["Flask3",                          322, 440]
    				  , ["Flask4",                          375, 440]
    				  , ["Flask5",                          427, 440] ]
    	SocketCoordList := [ ["6SocketWeaponTopRightSocket",     1355, 170]
    					   , ["6SocketWeaponTopCenterSocket",    1405, 170]
    					   , ["6SocketWeaponMiddleRightSocket",  1355, 225]
    					   , ["6SocketWeaponMiddleCenterSocket", 1405, 225]
    					   , ["6SocketWeaponBottomRightSocket",  1355, 280]
    					   , ["6SocketWeaponBottomCenterSocket", 1405, 280]
    					   , ["RightWeaponTopSocket",            1380, 170]
    					   , ["RightWeaponMiddleSocket",         1380, 225]
    					   , ["RightWeaponBottomSocket",         1380, 280]
    					   , ["RightWeaponTopRightSocket",       1355, 200]
    					   , ["RightWeaponTopCenterSocket",      1405, 200]
    					   , ["RightWeaponBottomCenterSocket",   1405, 250]
    					   , ["LeftHandTopSocket",               1795, 170]
    					   , ["LeftHandMiddleSocket",            1795, 225]
    					   , ["LeftHandBottomSocket",            1795, 280]
    					   , ["LeftHandTopCenterSocket",         1765, 200]
    					   , ["LeftHandTopLeftSocket",           1820, 200]
    					   , ["LeftHandBottomLeftSocket",        1820, 250]
    					   , ["LeftHandMiddleCenterSocket",      1770, 225]
    					   , ["LeftHandMiddleLeftSocket",        1820, 225]
    					   , ["HelmetTopRightSocket",            1560, 135]
    					   , ["HelmetTopLeftSocket",             1615, 135]
    					   , ["HelmetBottomRightSocket",         1560, 185]
    					   , ["HelmetBottomLeftSocket",          1615, 185]
    					   , ["HelmetMiddleRightSocket",         1560, 160]
    					   , ["HelmetMiddleLeftSocket",          1615, 160]
    					   , ["HelmetMiddleSocket",              1690, 160]
    					   , ["GlovesTopRightSocket",            1430, 370]
    					   , ["GlovesTopCenterSocket",           1485, 370]
    					   , ["GlovesBottomRightSocket",         1430, 420]
    					   , ["GlovesBottomCenterSocket",        1485, 420]
    					   , ["GlovesMiddleRightSocket",         1430, 395]
    					   , ["GlovesMiddleCenterSocket",        1485, 395]
    					   , ["GlovesMiddleSocket",              1455, 395]
    					   , ["4SocketArmorTopRightSocket",      1560, 275]
    					   , ["4SocketArmorTopLeftSocket",       1615, 275]
    					   , ["4SocketArmorBottomRightSocket",   1560, 333]
    					   , ["4SocketArmorBottomLeftSocket",    1615, 333]
    					   , ["6SocketArmorTopRightSocket",      1560, 250]
    					   , ["6SocketArmorTopLeftSocket",       1615, 250]
    					   , ["6SocketArmorMiddleRightSocket",   1560, 305]
    					   , ["6SocketArmorMiddleLeftSocket",    1615, 305]
    					   , ["6SocketArmorBottomRightSocket",   1560, 360]
    					   , ["6SocketArmorBottomLeftSocket",    1615, 360]
    					   , ["1SocketArmorMiddleSocket",        1585, 305]
    					   , ["BootsTopCenterSocket",            1690, 370]
    					   , ["BootsTopLeftSocket",              1740, 370]
    					   , ["BootsBottomCenterSocket",         1690, 420]
    					   , ["BootsBottomLeftSocket",           1740, 420]
    					   , ["BootsMiddleCenterSocket",         1690, 395]
    					   , ["BootsMiddleLeftSocket",           1740, 395]
    					   , ["BootsMiddleSocket",               1715, 395]
    					   , ["RightFingerSocket",               1485, 305]
    					   , ["LeftFingerSocket",                1690, 305]
    					   , ["AmuletSocket",                    1690, 245]
    					   , ["BeltRightSocket",                 1565, 420]
    					   , ["BeltCenterSocket",                1585, 420]
    					   , ["BeltLeftSocket",                  1605, 420]
    					   , ["Flask1",                          1487, 515]
    					   , ["Flask2",                          1540, 515]
    					   , ["Flask3",                          1592, 515]
    					   , ["Flask4",                          1645, 515]
    					   , ["Flask5",                          1697, 515] ]
    
    	AltSocketList := [ ["6SocketWeaponTopRightSocket",     72,  80,  1355, 170]
    					 , ["6SocketWeaponTopCenterSocket",    149, 80,  1405, 170]
    					 , ["6SocketWeaponMiddleRightSocket",  71,  155, 1355, 225]
    					 , ["6SocketWeaponMiddleCenterSocket", 149, 155, 1405, 225]
    					 , ["6SocketWeaponBottomRightSocket",  72,  230, 1355, 280]
    					 , ["6SocketWeaponBottomCenterSocket", 149, 230, 1405, 280]
    					 , ["RightWeaponTopSocket",            111, 80,  1380, 170]
    					 , ["RightWeaponMiddleSocket",         111, 155, 1380, 225]
    					 , ["RightWeaponBottomSocket",         111, 230, 1380, 280]
    					 , ["RightWeaponTopRightSocket",       84,  118, 1355, 200]
    					 , ["RightWeaponTopCenterSocket",      137, 118, 1405, 200]
    					 , ["RightWeaponBottomCenterSocket",   137, 193, 1405, 250]
    					 , ["LeftHandTopSocket",               523, 80,  1795, 170]
    					 , ["LeftHandMiddleSocket",            523, 155, 1795, 225]
    					 , ["LeftHandBottomSocket",            523, 230, 1795, 280]
    					 , ["LeftHandTopCenterSocket",         496, 118, 1765, 200]
    					 , ["LeftHandTopLeftSocket",           550, 118, 1820, 200]
    					 , ["LeftHandBottomLeftSocket",        550, 193, 1820, 250]
    					 , ["LeftHandMiddleCenterSocket",      485, 155, 1770, 225]
    					 , ["LeftHandMiddleLeftSocket",        561, 155, 1820, 225] ]
    return
    ;======================================================
    EquipRead:
    	for each, Socket in SocketList {
    		var1 := % socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		IniRead, %var2%, UnrapeKitConfig.ini, %Section%, %var2%, %A_Space%
    	}
    Return
    ;======================================================
    EquipWriteDelete:
    	for each, Socket in SocketList {
    		var1 := % Socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			IniWrite, % Hkey%Hk%%Swap%%var1%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%%var1%
    		} else {
    			IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%%var1%
    		}
    	}
    Return
    ;======================================================
    AltEquipRead:
    	for each, AltSocket in AltSocketList {
    		var1 := % AltSocket.1
    		var2 = Hkey%Hk%%Swap%Alt%var1%
    		var3:= % %var2%
    		IniRead, Hkey%Hk%%Swap%Alt%var1%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt%var1%, %A_Space%
    	}
    Return
    ;======================================================
    AltEquipWriteDelete:
    	for each, AltSocket in AltSocketList {
    		var1 := % AltSocket.1
    		var2 = Hkey%Hk%%Swap%Alt%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			IniWrite, % Hkey%Hk%%Swap%Alt%var1%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt%var1%
    		} else {
    			IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt%var1%
    		}
    	}
    Return
    ;======================================================
    AltEquipDelete:
    	for each, Socket in SocketList {
    		var1 := % Socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3:= % %var2%
    		IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%%var1%
    	}
    Return
    ;======================================================
    EquipCoord:
    	for each, SocketCoord in SocketCoordList {
    		var1 := % SocketCoord.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			Hkey%Hk%%Swap%_X := % socketCoord.2
    			Hkey%Hk%%Swap%_Y := % socketCoord.3
    		}
    	}
    Return
    ;======================================================
    AltEquipCoord:
    	for each, AltSocket in AltSocketList {
    		var1 := % AltSocket.1
    		var2 = Hkey%Hk%%Swap%Alt%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			Hkey%Hk%%Swap%Alt_X := % Altsocket.4
    			Hkey%Hk%%Swap%Alt_Y := % Altsocket.5
    		}
    	}
    Return
    ;======================================================
    RemoveToolTip:
        ToolTip
    Return
    RemoveToolTip1:
        ToolTip,,,, 1
    Return
    RemoveToolTip2:
    	ToolTip,,,, 2
    return
    RemoveToolTip3:
    	ToolTip,,,, 3
    return
    RemoveToolTip4:
    	ToolTip,,,, 4
    return
    RemoveToolTip5:
    	ToolTip,,,, 5
    return
    RemoveToolTip6:
    	ToolTip,,,, 6
    return
    RemoveToolTip7:
    	ToolTip,,,, 7
    return
    RemoveToolTip8:
    	ToolTip,,,, 8
    return
    RemoveToolTip9:
    	ToolTip,,,, 9
    return
    RemoveToolTip10:
    	ToolTip,,,, 10
    return
    RemoveToolTip11:
    	ToolTip,,,, 11
    return
    RemoveToolTip12:
    	ToolTip,,,, 12
    return
    RemoveToolTip13:
    	ToolTip,,,, 13
    return
    RemoveToolTip14:
    	ToolTip,,,, 14
    return
    RemoveToolTip15:
    	ToolTip,,,, 15
    return
    RemoveToolTip16:
    	ToolTip,,,, 16
    return
    RemoveToolTip17:
    	ToolTip,,,, 17
    return
    RemoveToolTip18:
    	ToolTip,,,, 18
    return
    RemoveToolTip19:
    	ToolTip,,,, 19
    return
    RemoveToolTip20:
    	ToolTip,,,, 20
    return
    ;======================================================End of GeneralFunctions======================================================
    Code:
    ;======================================================IniSettings======================================================
    IniLoad:
    	IniRead, ScanCount, UnrapeKitConfig.ini, Configuration, ScanCount, %A_Space%
    	IniRead, HotkeyLimit, UnrapeKitConfig.ini, Configuration, HotkeyLimit, %A_Space%
    	IniRead, HotkeyConfig, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, HotkeyConfig, %A_Space%
    	IniRead, ScanConfig, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScanConfig, %A_Space%
    	IniRead, SpellScan, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, SpellScan, %A_Space%
    	IniRead, ScreenCapture, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScreenCapture, %A_Space%
    	IniRead, DelayConfig, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, DelayConfig, %A_Space%
    	IniRead, CaptureName, UnrapeKitConfig.ini, Scan, CaptureName, %A_Space%
    	Hotkey, %HotkeyConfig%, HotkeyConfig
    	Hotkey, %ScanConfig%, ScanConfig
    	Hotkey, %SpellScan%, SpellScan
    	Hotkey, %ScreenCapture%, ScreenCapture
    	Hotkey, %DelayConfig%, DelayConfig
    return
    ;======================================================
    SetupConfig:
    	gosub GuiSD
    	IniWrite, %ScanCount%, UnrapeKitConfig.ini, Configuration, ScanCount
    	IniWrite, %HotkeyConfig%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, HotkeyConfig
    	IniWrite, %ScanConfig%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScanConfig
    	IniWrite, %SpellScan%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, SpellScan
    	IniWrite, %ScreenCapture%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScreenCapture
    	IniWrite, %DelayConfig%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, DelayConfig
    	Hotkey, %HotkeyConfig%, HotkeyConfig
    	Hotkey, %ScanConfig%, ScanConfig
    	Hotkey, %SpellScan%, SpellScan
    	Hotkey, %ScreenCapture%, ScreenCapture
    	Hotkey, %DelayConfig%, DelayConfig
    	Reload
    Return
    ;======================================================
    HotkeySetupRead:
        Loop, %HotKeyLimit% {
    		IniRead, Hkey%A_Index%Toggle, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%A_Index%Toggle, %A_Space%
    		IniRead, Hkey%A_Index%Type, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%A_Index%Type, %A_Space%
    		IniRead, Hkey%A_Index%Shortcut, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%A_Index%Shortcut, %A_Space%
    	}
    return
    ;======================================================
    LoadScanSettings:
        IniRead, ScreenCapturePos, UnrapeKitConfig.ini, %Section%, ScreenCapturePos, %A_Space%
        IniRead, SaveHotkey, UnrapeKitConfig.ini, %Section%, SaveHotkey, %A_Space%
        IniRead, SaveAsHotkey, UnrapeKitConfig.ini, %Section%, SaveAsHotkey, %A_Space%
        IniRead, CloseHotkey, UnrapeKitConfig.ini, %Section%, CloseHotkey, %A_Space%
        IniRead, YesHotkey, UnrapeKitConfig.ini, %Section%, YesHotkey, %A_Space%
        IniRead, AddressBarHotkey, UnrapeKitConfig.ini, %Section%, AddressBarHotkey, %A_Space%
        IniRead, SaveAsWindowName, UnrapeKitConfig.ini, %Section%, SaveAsWindowName, %A_Space%
        IniRead, ConfirmSaveAsWindowName, UnrapeKitConfig.ini, %Section%, ConfirmSaveAsWindowName, %A_Space%
        IniRead, SnippingToolWindowName, UnrapeKitConfig.ini, %Section%, SnippingToolWindowName, %A_Space%
        IniRead, SnippingToolPath, UnrapeKitConfig.ini, %Section%, SnippingToolPath, %A_Space%
    return
    ;======================================================
    ScanReadLoad:
    	Loop, %ScanCount% {
    		IniRead, Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%, %A_Space%
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%, %A_Space%
    		IniRead, Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%, %A_Space%
    		NameN:= % Name%A_Index%
    		IconToggleN:= % IconToggle%A_Index%
    		LineN:= % Line%A_Index%
    		CaptureName%A_Index%:= % Name%A_Index% "" Line%A_Index%
    		IniRead, %NameN%X, UnrapeKitConfig.ini, %Section%, %NameN%X, %A_Space%
    		IniRead, %NameN%Y, UnrapeKitConfig.ini, %Section%, %NameN%Y, %A_Space%
    	}
    return
    ;======================================================
    WriteScanSettings:
        IniWrite, %SaveAsHotkey%, UnrapeKitConfig.ini, %Section%, SaveAsHotkey
        IniWrite, %CloseHotkey%, UnrapeKitConfig.ini, %Section%, CloseHotkey
        IniWrite, %YesHotkey%, UnrapeKitConfig.ini, %Section%, YesHotkey
        IniWrite, %AddressBarHotkey%, UnrapeKitConfig.ini, %Section%, AddressBarHotkey
        IniWrite, %SaveAsWindowName%, UnrapeKitConfig.ini, %Section%, SaveAsWindowName
        IniWrite, %ConfirmSaveAsWindowName%, UnrapeKitConfig.ini, %Section%, ConfirmSaveAsWindowName
        IniWrite, %SnippingToolWindowName%, UnrapeKitConfig.ini, %Section%, SnippingToolWindowName
        IniWrite, %SnippingToolPath%, UnrapeKitConfig.ini, %Section%, SnippingToolPath
    return
    ;======================================================
    DelayRead:
    	IniRead, Delay, UnrapeKitConfig.ini, Delay%LineSpacing2%, Delay, %A_Space%
    	IniRead, FrameTime, UnrapeKitConfig.ini, Delay%LineSpacing2%, FrameTime, %A_Space%
    	IniRead, KeyDelay1, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelay1, %A_Space%
    	IniRead, KeyDelayPress, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelayPress, %A_Space%
    	IniRead, MouseDelay, UnrapeKitConfig.ini, Delay%LineSpacing2%, MouseDelay, %A_Space%
    	SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
    	SetMouseDelay, %MouseDelay%
    return
    ;======================================================
    Type1Load:
    	Section = Type1Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%T1V, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1V, %A_Space%
    	If (Hkey%Hk%T1V = 1) {
    		IniRead, Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount, %A_Space%
    		IniRead, Hkey%Hk%ScanDelay, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanDelay
    		Loop {
    			IniRead, Hkey%Hk%Spell%A_Index%, UnrapeKitConfig.ini, % Section, Hkey%Hk%Spell%A_Index%, %A_Space%
    			Spell:= Hkey%Hk%Spell%A_Index%
    			IniRead, %Spell%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell%X, %A_Space%
    			IniRead, %Spell%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell%Y, %A_Space%
    			IniRead, Hkey%Hk%TriggerToggle%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggerToggle%A_Index%, %A_Space%
    			Iniread, Hkey%Hk%Key%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%, %A_Space%
    			IniRead, Hkey%Hk%Key%A_Index%X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%X, %A_Space%
    			IniRead, Hkey%Hk%Key%A_Index%Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%Y, %A_Space%
    			IniRead, Hkey%Hk%Cooldown%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%A_Index%, %A_Space%
    			If (A_Index > Hkey%Hk%TriggeredCount)
    				Break
    		}
    	}
    	If (Hkey%Hk%T1V = 2) {
    		TrigN:= 1
    		Iniread, T1%Hk%, UnrapeKitConfig.ini, %Section%, T1%Hk%, %A_Space%
    		Iniread, Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount, %A_Space%
    		IniRead, ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%, %A_Space%
    		Loop, % (Hkey%Hk%TriggeredCount + 1) {
    			Iniread, HHkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%, %A_Space%
    			Iniread, HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%, %A_Space%
    		}
    		TrigN:= 1
    	}
    	If (Hkey%Hk%T1V = 3) {
    		TrigN:= 1
    		Iniread, TriggeredCount%Hk%, UnrapeKitConfig.ini, %Section%, TriggeredCount%Hk%, %A_Space%
    		IniRead, ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%, %A_Space%
    		Loop, % (TriggeredCount%Hk% + 1) {
    			Iniread, HHkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%, %A_Space%
    			Iniread, HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%, %A_Space%
    			TrigN+= 1
    		}
    		TrigN:= 1
    	}
    Return
    ;======================================================
    Type2Load:
    	Section = Type2Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key, %A_Space%
    	IniRead, Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX, %A_Space%
    	IniRead, Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY, %A_Space%
    	IniRead, Hkey%Hk%MoveToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MoveToggle, %A_Space%
    	IniRead, Hkey%Hk%ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShiftToggle, %A_Space%
    	IniRead, Hkey%Hk%AltEquiptoggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%AltEquiptoggle, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%Y, %A_Space%
    return
    ;======================================================
    Type3Load:
    	Section = Type3Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key, %A_Space%
    	IniRead, Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX, %A_Space%
    	IniRead, Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY, %A_Space%
    	IniRead, Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time, %A_Space%
    	IniRead, Hkey%Hk%Cast2Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Time, %A_Space%
    	IniRead, Hkey%Hk%Cast1ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1ShiftToggle, %A_Space%
    	IniRead, Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle, %A_Space%
    	IniRead, Hkey%Hk%Cast2Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Toggle, %A_Space%
    	IniRead, Hkey%Hk%Cast2ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2ShiftToggle, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%Y, %A_Space%
    return
    ;======================================================
    Type4Load:
    	Section = Type4Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniRead, Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time
    	IniRead, Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle
    	IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key, %A_Space%
    	IniRead, Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX, %A_Space%
    	IniRead, Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%Y, %A_Space%
    return
    ;======================================================
    Type5Load:
    	Section = Type5Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab, %A_Space%
    	IniRead, Hkey%Hk%GemSwap1_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1_X, %A_Space%
    	IniRead, Hkey%Hk%GemSwap1_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1_Y, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2_X, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2_Y, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Alt_X, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Alt_Y, %A_Space%
    return
    ;======================================================
    Type6Load:
    	Section = Type6Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap1_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1_X, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap1_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1_Y, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2_X, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2_Y, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Alt_X, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Alt_Y, %A_Space%
    return
    ;======================================================
    Type7Load:
    	Section = Type7Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations, %A_Space%
    	IniRead, Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, SwapTabs, Hkey%Hk%GemSwapTab, %A_Space%
    	IniRead, Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, SwapTabs, Hkey%Hk%EquipSwapTab, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniRead, Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_L, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_L, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_T, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_T, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_R, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_R, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_B, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_B, %A_Space%
    		IniRead, Hkey%Hk%ImageNameIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ImageNameIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%ShadeVariationIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShadeVariationIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GemSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%GemSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%KeyX_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX_Iteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%KeyY_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY_Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    ;======================================================
    Type7Write:
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iterations, %A_Space%
    	IniWrite, % Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab, %A_Space%
    	IniWrite, % Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_L, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_L, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_T, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_T, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_R, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_R, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_B, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_B, %A_Space%
    		IniWrite, % Hkey%Hk%ImageNameIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ImageNameIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%ShadeVariationIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShadeVariationIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%KeyX_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX_Iteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%KeyY_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY_Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    ;======================================================
    Type7Write2:
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%
    	}
    return
    ;======================================================End of IniSettings======================================================
    Code:
    ;======================================================HotkeyConfig======================================================
    HotkeyConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, Hotkeys wanted:
    	Gui, Add, Text, x50 y33, 200 Hotkeys Maximum
    	Gui, Add, Edit, x10 y30 w30 h20 vHotkeyLimit, %HotkeyLimit%
    	Gui, Add, Button, x10 y70 w90 h20 gHkeyEdit Default, Hotkeys
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Count
    Return
    ;======================================================
    HkeyEdit:
    	gosub GuiSD
        if (HotkeyLimit < 1 or HotkeyLimit > 200) {
    		msgbox Invalid entry: reloading script
    		SetTimer, RemoveToolTip2, -1000
    		Reload
    	}
    	gosub GuiSD
    	IniWrite, %HotkeyLimit%, UnrapeKitConfig.ini, Configuration, HotkeyLimit
    	H:= 1
    	W:= 1
    	HMax:= 1
    	Hk:= 1
    	MouseGetPos, Xpos, Ypos
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Loop, %HotkeyLimit% {
    		GuiY:= 120 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    			If (GuiY > ScreenHeight) {
    				W+= 1
    				HMax:= H
    				H= 1
    			}
    		Y0:= 14 + 30 * H
    		Y1:= 13 + 30 * H
    		Y2:= 10 + 30 * H
    		GuiWidth:= 610 * W
    			If (W = 1) {
    				GuiHeight:= 80 + 30 * H
    				ButtonHeight:= 50 + 30 * H
    				ButtonTxtHeight:= 53 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 80 + 30 * HMax
    				ButtonHeight:= 50 + 30 * HMax
    				ButtonTxtHeight:= 53 + 30 * HMax
    			}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		Text1X:= GuiWidth - 550
    		Radio0X:= GuiWidth - 590
    		loop, 7 {
    			Radio%A_Index%X:= GuiWidth - (560 - (40 * A_Index))
    		}
    		EditX:= GuiWidth - 240
    		EditButtonX:= GuiWidth -100
    		Radio0Txt:= GuiWidth - 600
    		loop, 7 {
    			Radio%A_Index%Txt:= GuiWidth - (570 - (40 * A_Index))
    		}
    		EditTxt:= GuiWidth - 220
    		EditButtonTxt:= GuiWidth -85
    		Gui, Add, Text, x%Radio0Txt% y20,Disable  Index
    		loop, 7 {
    			RadioTxt:= Radio%A_Index%Txt
    			Gui, Add, Text, x%RadioTxt% y20,Type %A_Index%
    		}
    		Gui, Add, Text, x%EditTxt% y20, Hotkey Shortcut
    		Gui, Add, Text, x%EditButtonTxt% y20, Hotkey Edit
    		Gui, Add, Text, x%Text1X% y%Y1%, %Hk%
    		Gui, Add, checkbox, % "X" Radio0x " Y" Y0 " h13 w13 vHkey" Hk "Toggle Checked" Hkey%Hk%Toggle
    		loop, 7 {
    			RadioX := Radio%A_Index%X
    			if (Hkey%Hk%Type = A_Index) {
    				HkeyType := 1
    			} else {
    				HkeyType := 0
    			}
    			Gui, Add, Radio, % "x" RadioX " y" Y1 " h13 w13 vHkey" Hk "Type" A_Index " Checked" HkeyType, A_Index
    		}
    		Gui, Add, Edit, x%EditX% y%Y2% w120 h20 vHkey%Hk%Shortcut, % Hkey%Hk%Shortcut
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditHk, %Hk%
    		If (Hk = HotkeyLimit) {
    			gosub GuiBuild
    			Gui, Add, Button, x10 y%ButtonHeight% w90 H20 gHkAdd, Add
    			Gui, Add, Text, x110 y%ButtonTxtHeight%,Add
    			Gui, Add, Edit, x140 y%ButtonHeight% w20 h20 vHotkeyAdd
    			Gui, Add, Text, x170 y%ButtonTxtHeight%,Hotkey(s)
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gRecordHk Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gSetHk, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Hotkey Configuration
    			Break
    		}
    	H+= 1
    	Hk+= 1
    	}
    	Hk := 0
    Return
    ;======================================================
    RecordWriteHk:
    	loop, 7 {
    		if (Hkey%Hk%Type%A_Index% = 1) {
    			Hkey%Hk%Type := A_Index
    			IniWrite, % Hkey%Hk%Toggle, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%Hk%Toggle
    			IniWrite, % Hkey%Hk%Type, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%Hk%Type
    			IniWrite, % Hkey%Hk%Shortcut, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%Hk%Shortcut
    			if (Hkey%Hk%Shortcut != "" AND Hkey%Hk%Toggle = 1) {
    				Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    			}
    		}
    	}
    return
    ;======================================================
    RecordHk:
    	gosub GuiSD
    	Hk:= 1
    	RecordToggle:= 1
    	Loop, %HotkeyLimit% {
    		gosub RecordWriteHk
    		Hk+= 1
    	}
    	Hk:= 1
    	gosub HkeyEdit
    Return
    ;======================================================
    HkAdd:
    	gosub GuiSD
    	HotkeyLimit+= %HotkeyAdd%
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub RecordWriteHk
    		Hk+= 1
    	}
    	gosub HkeyEdit
    Return
    
    SetHk:
    	gosub GuiSD
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub RecordWriteHk
    		Hk+= 1
    	}
    	Hk:= 1
    	gosub HkTypeConfigLoop
    Return
    ;======================================================
    EditHk:
    	A_GuiControlHk:= A_GuiControl
    	Hk:= A_GuiControl
    	If (Hkey%Hk%Toggle = 0)
    		Hkey%Hk%Toggle = 1
    	gosub GuiSD
    	gosub HkTypeConfigRouting
    	gosub RecordWriteHk
    Return
    ;======================================================
    HkTypeConfigLoop:
    	Loop, HotkeyLimit {
    		If (Hkey%Hk%Toggle = 0) {
    			gosub HkTypeConfigRouting
    			break
    		}
    	}
    	Reload
    Return
    ;======================================================
    HkTypeConfigRouting:
    	loop, 7 {
    		If (Hkey%Hk%Type = A_Index) {
    			Gosub ConfigType%A_Index%
    			Break
    		}
    	}
    Return
    ;======================================================End of HotkeyConfig======================================================
    Code:
    ;======================================================HotkeyRouting======================================================
    Hotkey1:
    	Hk:= 1
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey2:
    	Hk:= 2
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey3:
    	Hk:= 3
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey4:
    	Hk:= 4
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey5:
    	Hk:= 5
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey6:
    	Hk:= 6
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey7:
    	Hk:= 7
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey8:
    	Hk:= 8
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey9:
    	Hk:= 9
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey10:
    	Hk:= 10
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey11:
    	Hk:= 11
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey12:
    	Hk:= 12
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey13:
    	Hk:= 13
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey14:
    	Hk:= 14
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey15:
    	Hk:= 15
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey16:
    	Hk:= 16
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey17:
    	Hk:= 17
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey18:
    	Hk:= 18
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey19:
    	Hk:= 19
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey20:
    	Hk:= 20
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey21:
    	Hk:= 21
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey22:
    	Hk:= 22
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey23:
    	Hk:= 23
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey24:
    	Hk:= 24
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey25:
    	Hk:= 25
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey26:
    	Hk:= 26
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey27:
    	Hk:= 27
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey28:
    	Hk:= 28
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey29:
    	Hk:= 29
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey30:
    	Hk:= 30
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey31:
    	Hk:= 31
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey32:
    	Hk:= 32
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey33:
    	Hk:= 33
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey34:
    	Hk:= 34
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey35:
    	Hk:= 35
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey36:
    	Hk:= 36
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey37:
    	Hk:= 37
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey38:
    	Hk:= 38
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey39:
    	Hk:= 39
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey40:
    	Hk:= 40
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey41:
    	Hk:= 41
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey42:
    	Hk:= 42
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey43:
    	Hk:= 43
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey44:
    	Hk:= 44
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey45:
    	Hk:= 45
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey46:
    	Hk:= 46
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey47:
    	Hk:= 47
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey48:
    	Hk:= 48
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey49:
    	Hk:= 49
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey50:
    	Hk:= 50
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey51:
    	Hk:= 51
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey52:
    	Hk:= 52
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey53:
    	Hk:= 53
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey54:
    	Hk:= 54
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey55:
    	Hk:= 55
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey56:
    	Hk:= 56
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey57:
    	Hk:= 57
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey58:
    	Hk:= 58
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey59:
    	Hk:= 59
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey60:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey61:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey62:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey63:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey64:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey65:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey66:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey67:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey68:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey69:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey70:
    	Hk:= 70
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey71:
    	Hk:= 71
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey72:
    	Hk:= 72
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey73:
    	Hk:= 73
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey74:
    	Hk:= 74
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey75:
    	Hk:= 75
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey76:
    	Hk:= 76
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey77:
    	Hk:= 77
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey78:
    	Hk:= 78
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey79:
    	Hk:= 79
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey80:
    	Hk:= 80
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey81:
    	Hk:= 81
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey82:
    	Hk:= 82
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey83:
    	Hk:= 83
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey84:
    	Hk:= 84
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey85:
    	Hk:= 85
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey86:
    	Hk:= 86
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey87:
    	Hk:= 87
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey88:
    	Hk:= 88
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey89:
    	Hk:= 89
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey90:
    	Hk:= 90
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey91:
    	Hk:= 91
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey92:
    	Hk:= 92
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey93:
    	Hk:= 93
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey94:
    	Hk:= 94
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey95:
    	Hk:= 95
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey96:
    	Hk:= 96
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey97:
    	Hk:= 97
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey98:
    	Hk:= 98
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey99:
    	Hk:= 99
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey100:
    	Hk:= 100
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey101:
    	Hk:= 101
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey102:
    	Hk:= 102
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey103:
    	Hk:= 103
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey104:
    	Hk:= 104
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey105:
    	Hk:= 105
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey106:
    	Hk:= 106
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey107:
    	Hk:= 107
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey108:
    	Hk:= 108
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey109:
    	Hk:= 109
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey110:
    	Hk:= 110
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey111:
    	Hk:= 111
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey112:
    	Hk:= 112
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey113:
    	Hk:= 113
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey114:
    	Hk:= 114
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey115:
    	Hk:= 115
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey116:
    	Hk:= 116
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey117:
    	Hk:= 117
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey118:
    	Hk:= 118
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey119:
    	Hk:= 119
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey120:
    	Hk:= 120
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey121:
    	Hk:= 121
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey122:
    	Hk:= 122
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey123:
    	Hk:= 123
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey124:
    	Hk:= 124
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey125:
    	Hk:= 125
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey126:
    	Hk:= 126
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey127:
    	Hk:= 127
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey128:
    	Hk:= 128
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey129:
    	Hk:= 129
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey130:
    	Hk:= 130
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey131:
    	Hk:= 131
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey132:
    	Hk:= 132
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey133:
    	Hk:= 133
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey134:
    	Hk:= 134
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey135:
    	Hk:= 135
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey136:
    	Hk:= 136
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey137:
    	Hk:= 137
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey138:
    	Hk:= 138
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey139:
    	Hk:= 139
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey140:
    	Hk:= 140
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey141:
    	Hk:= 141
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey142:
    	Hk:= 142
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey143:
    	Hk:= 143
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey144:
    	Hk:= 144
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey145:
    	Hk:= 145
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey146:
    	Hk:= 146
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey147:
    	Hk:= 147
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey148:
    	Hk:= 148
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey149:
    	Hk:= 149
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey150:
    	Hk:= 150
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey151:
    	Hk:= 151
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey152:
    	Hk:= 152
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey153:
    	Hk:= 153
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey154:
    	Hk:= 154
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey155:
    	Hk:= 155
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey156:
    	Hk:= 156
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey157:
    	Hk:= 157
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey158:
    	Hk:= 158
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey159:
    	Hk:= 159
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey160:
    	Hk:= 160
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey170:
    	Hk:= 170
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey171:
    	Hk:= 171
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey172:
    	Hk:= 172
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey173:
    	Hk:= 173
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey174:
    	Hk:= 174
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey175:
    	Hk:= 175
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey176:
    	Hk:= 176
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey177:
    	Hk:= 177
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey178:
    	Hk:= 178
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey179:
    	Hk:= 179
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey180:
    	Hk:= 180
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey181:
    	Hk:= 181
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey182:
    	Hk:= 182
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey183:
    	Hk:= 183
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey184:
    	Hk:= 184
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey185:
    	Hk:= 185
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey186:
    	Hk:= 186
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey187:
    	Hk:= 187
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey188:
    	Hk:= 188
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey189:
    	Hk:= 189
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey190:
    	Hk:= 190
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey191:
    	Hk:= 191
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey192:
    	Hk:= 192
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey193:
    	Hk:= 193
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey194:
    	Hk:= 194
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey195:
    	Hk:= 195
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey196:
    	Hk:= 196
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey197:
    	Hk:= 197
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey198:
    	Hk:= 198
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey199:
    	Hk:= 199
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey200:
    	Hk:= 200
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    ;======================================================End of HotkeyRouting======================================================
    Code:
    ;======================================================DelayConfig======================================================
    DelayConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 220
    	GuiHeight:= 160
    	gosub GuiBuild
    	Gui, Add, Text, x10 y13, Server Latency (ms)
    	Gui, Add, Edit, x140 y10 w30 h20 vDelay, %Delay%
    	Gui, Add, Text, x10 y43, Maximum Frame Time (Ms)
    	Gui, Add, Edit, x140 y40 w30 h20 vFrameTime, %FrameTime%
    	Gui, Add, Text, x10 y73, Keyboard Delays (Ms)
    	Gui, Add, Edit, x140 y70 w30 h20 vKeyDelay1, %KeyDelay1%
    	Gui, Add, Edit, x180 y70 w30 h20 vKeyDelayPress, %KeyDelayPress%
    	Gui, Add, Text, x10 y103, Mouse Delay (Ms)
    	Gui, Add, Edit, x140 y100 w30 h20 vMouseDelay, %MouseDelay%
    	Gui, Add, Button, x20 y130 w90 h20 gDelayConfigRecord Default, Record
    	Gui, Add, Button, x120 y130 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Delay configuration
    Return
    ;======================================================
    DelayWrite:
    	gosub GuiSD
    	IniWrite, %Delay%, UnrapeKitConfig.ini, Delay%LineSpacing2%, Delay
    	IniWrite, %FrameTime%, UnrapeKitConfig.ini, Delay%LineSpacing2%, FrameTime
    	IniWrite, %KeyDelay1%, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelay1
    	IniWrite, %KeyDelayPress%, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelayPress
    	IniWrite, %MouseDelay%, UnrapeKitConfig.ini, Delay%LineSpacing2%, MouseDelay
    return
    ;======================================================
    DelayConfigRecord:
    	gosub DelayWrite
    	Reload
    Return
    ;======================================================
    Delay:
    		MouseGetPos, Xpos, Ypos
    		GuiWidth:= 220
    		GuiHeight:= 160
    		gosub GuiBuild
    		Gui, Add, Text, x10 y13, Server Latency (ms)
    		Gui, Add, Edit, x140 y10 w30 h20 vDelay, %Delay%
    		Gui, Add, Text, x10 y43, Maximum Frame Time (Ms)
    		Gui, Add, Edit, x140 y40 w30 h20 vFrameTime, %FrameTime%
    		Gui, Add, Text, x10 y73, Keyboard Delays (Ms)
    		Gui, Add, Edit, x140 y70 w30 h20 vKeyDelay1, %KeyDelay1%
    		Gui, Add, Edit, x180 y70 w30 h20 vKeyDelayPress, %KeyDelayPress%
    		Gui, Add, Text, x10 y103, Mouse Delay (Ms)
    		Gui, Add, Edit, x140 y100 w30 h20 vMouseDelay, %MouseDelay%
    		Gui, Add, Button, x20 y130 w90 h20 gDelayRecord Default, Record
    		Gui, Add, Button, x120 y130 w90 h20 gCancel, Reload
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Server Latency
    Return
    ;======================================================
    DelayRecord:
    		gosub DelayWrite
    Return
    ;======================================================End of DelayConfig======================================================
    Code:
    ;======================================================ScreenCapture======================================================
    ScreenCapture:
        C1_X:= 1443
        C2_X:= 1508
        C3_X:= 1573
        L1_Y:= 900
        L2_Y:= 835
        L3_Y:= 770
        L4_Y:= 705
        L5_Y:= 640
        L6_Y:= 575
        L7_Y:= 510
    	Section = ScreenCapture--------------------------------------------------------------------------------------------------
    	GuiWidth:= 310
    	GuiHeight:= 150
        gosub LoadScanSettings
    	MouseGetPos, Xpos, Ypos
    	gosub GuiBuild
        Gui, Add, Text, x10 y10, Controls for capture and UI coordinates.
        Gui, Add, Text, x10 y30, Spell menu suffix: line number bottom to top.
        Gui, Add, Text, x10 y50, keyboard shortcut suffix: "_MButton"', "_R"', etc
        Gui, Add, Text, x10 y70, Buff icons: manual Printscreen with suffix "Timer1" to "Timer8"
        Gui, Add, Checkbox, x10 y90 VScreenCapturePos Checked%ScreenCapturePos%, Checked: spell menu, unchecked: keyboard shortcuts.
        Gui, Add, Button, x10 y120 w90 gCaptureControls, PrtSc controls
        Gui, Add, Button, x110 y120 w90 gCancel, Cancel
        Gui, Add, Button, x210 y120 w90 gScreenCapture1 Default, Continue
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, Capture Gui positioning
    Return
    ;======================================================
    CaptureControls:
    	gosub GuiSD
        IniWrite, %ScreenCapturePos%, UnrapeKitConfig.ini, %Section%, ScreenCapturePos
    	GuiWidth:= 300
    	GuiHeight:= 380
    	gosub GuiBuild
        Gui, Add, Text, x10 y10 w280, Enter the Windows hotkeys for your specific language here
        Gui, Add, Text, x10 y25 w280, Hotkey syntax: ^ (Ctrl), ! (Alt), + (Shift), # (Win).
        Gui, Add, Text, x10 y40 w280,  Examples: ^!c for Ctrl+Alt+C
        Gui, Add, Edit, x10 y70 w100 h20 vSaveHotkey, % SaveHotkey
        Gui, Add, Text, % "x" 120 " y" 73, SaveHotkey
        Gui, Add, Edit, x10 y100 w100 h20 vSaveAsHotkey, % SaveAsHotkey
        Gui, Add, Text, % "x" 120 " y" 103, SaveAsHotkey
        Gui, Add, Edit, x10 y130 w100 h20 vCloseHotkey, % CloseHotkey
        Gui, Add, Text, % "x" 120 " y" 133, CloseHotkey
        Gui, Add, Edit, x10 y160 w100 h20 vYesHotkey, % YesHotkey
        Gui, Add, Text, % "x" 120 " y" 163, YesHotkey
        Gui, Add, Edit, x10 y190 w100 h20 vAddressBarHotkey, % AddressBarHotkey
        Gui, Add, Text, % "x" 120 " y" 193, AddressBarHotkey
        Gui, Add, Edit, x10 y220 w100 h20 vSaveAsWindowName, % SaveAsWindowName
        Gui, Add, Text, % "x" 120 " y" 223, SaveAsWindowName
        Gui, Add, Edit, x10 y250 w100 h20 vConfirmSaveAsWindowName, % ConfirmSaveAsWindowName
        Gui, Add, Text, % "x" 120 " y" 253, ConfirmSaveAsWindowName
        Gui, Add, Edit, x10 y280 w100 h20 vSnippingToolWindowName, % SnippingToolWindowName
        Gui, Add, Text, % "x" 120 " y" 283, SnippingToolWindowName
        Gui, Add, Edit, x10 y310 w100 h20 vSnippingToolPath, % SnippingToolPath
        Gui, Add, Text, % "x" 120 " y" 313, SnippingToolPath
    ; Run on PowerShell as admin: "Get-AppXPackage *Microsoft.ScreenSketch* -AllUsers" , then paste the directory on a browser to navigate to the correct directory (these might not work well though).
    
        Gui, Add, Button, x10 y350 w135 gCaptureSave Default, Save and Continue
        Gui, Add, Button, x155 y350 w135 gCancel, Cancel
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, Language Settings and top-left snip coordinates
    Return
    ;======================================================
    CaptureSave:
    	gosub GuiSD
    	gosub WriteScanSettings
    	gosub ScreenCapture
    Return
    ;======================================================
    ScreenCapture1:
        if (ScreenCapturePos = 1) {
            IniRead, TempName, UnrapeKitConfig.ini, %Section%, TempName
            IniRead, TempLine, UnrapeKitConfig.ini, %Section%, TempLine
            IniRead, TempColumn, UnrapeKitConfig.ini, %Section%, TempColumn
            N := ScanCount + 1
            GuiWidth:= 210
            GuiHeight:= 130
            gosub GuiBuild
            Gui, Add, Text, x10 y10 w190, lines: 1 to 7`, columns: 1 to 3
            Gui, Add, Text, x10 y40, name                                   line    Column
            Gui, Add, Edit, x10 y60 w120 h20 vTempName, %TempName%
            Gui, Add, Edit, x+10 w20 h20 vTempLine, %TempLine%
            Gui, Add, Edit, x+10 w20 h20 vTempColumn, %TempColumn%
            Gui, Add, Button, x10 y100 w90 h20 gCaptureSave1 Default, Ok
            Gui, Add, Button, x110 y100 w90 h20 gCancel, Reload
            Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, name`, menu line and column coordinates
        }
        if (ScreenCapturePos = 0) {
        IniRead, TempName, UnrapeKitConfig.ini, %Section%, TempName
        IniRead, TempLine, UnrapeKitConfig.ini, %Section%, TempLine
        IniRead, TempColumn, UnrapeKitConfig.ini, %Section%, TempColumn
        N := ScanCount + 1
    	GuiWidth:= 210
    	GuiHeight:= 160
        gosub GuiBuild
        Gui, Add, Text, x10 y10 w190, column is the shortcut: : "_LButton"'
        Gui, Add, Text, x10 y50, name                                    Keyboard shortcut
        Gui, Add, Edit, x10 y7 w120 h20 vTempName, %TempName%
        Gui, Add, Edit, x+10 w70 h20 vTempLine, %TempLine%
        Gui, Add, Button, x10 y100 w90 h20 gCaptureSave1 Default, Ok
        Gui, Add, Button, x110 y100 w90 h20 gCancel, Reload
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, name', keyboard shortcut
        }
    return
    ;======================================================
    CaptureSave1:
        gosub GuiSD
        IniWrite, % TempName, UnrapeKitConfig.ini, %Section%, TempName
        IniWrite, % TempLine, UnrapeKitConfig.ini, %Section%, TempLine
        CaptureName := TempName TempLine
        if (ScreenCapturePos = 1) {
            IniWrite, % TempColumn, UnrapeKitConfig.ini, %Section%, TempColumn
            gosub SpellMenuUp
        } else {
            Gosub SnippingTool
        }
    return
    ;======================================================
    SpellMenuUp:
        loop {
            sleep, 50
            ImageSearch,,, C1_X - 10, L1_Y - 10, C3_X + 10, L1_Y + 10, *10 CloseMenu1.png
    ;        pixelsearch,,, 1439, 495, 1439, 495, 0x6490AB, 0, fast
                if (ErrorLevel = 0) {
                    break
                } else {
                    click,, 1440, 1037
                    sleep, 300
                }
        }
        Gosub SnippingTool
    return
    ;======================================================
    SnippingTool:
        if (ScreenCapturePos = 1) {
            loop, 3 {
                if (TempColumn = A_Index) {
                    CaptureX:= % C%A_Index%_X
                    break
                }
            }
            loop, 7 {
                if (TempLine = A_Index) {
                    CaptureY:= % L%A_Index%_Y
                    break
                }
            }
        } else {
            if (TempColumn = "Q") {
    			CaptureX:= 1438
    			CaptureY:= 1047
    		}
    		if (TempColumn = "W") {
    			CaptureX:= 1494
    			CaptureY:= 1047
    		}
    		if (TempColumn = "E") {
    			CaptureX:= 1550
    			CaptureY:= 1047
    		}
    		if (TempColumn = "R") {
    			CaptureX:= 1606
    			CaptureY:= 1047
    		}
    		if (TempColumn = "T") {
    			CaptureX:= 1662
    			CaptureY:= 1047
    		}
    		if (TempColumn = "LButton") {
    			CaptureX:= 1549
    			CaptureY:= 978
    		}
    		if (TempColumn = "MButton") {
    			CaptureX:= 1605
    			CaptureY:= 978
    		}
    		if (TempColumn = "RButton") {
    			CaptureX:= 1660
    			CaptureY:= 978
    		}
        }
        CenterDistance:= 13
        CaptureX1:= CaptureX - CenterDistance
        CaptureX2:= CaptureX + CenterDistance
        CaptureY1:= CaptureY - CenterDistance
        CaptureY2:= CaptureY + CenterDistance
        SendInput {PrintScreen}
        sleep, 500
        Send, #+s
        sleep, 400
        BlockInput, MouseMove
    	MouseClickDrag, L, CaptureX1, CaptureY1, CaptureX2, CaptureY2, 2
        sleep, 100
        BlockInput, MouseMoveOff
        sleep, 100
    ;    run C:\Program Files\WindowsApps\Microsoft.ScreenSketch_11.2407.3.0_x64__8wekyb3d8bbwe\SnippingTool\SnippingTool.exe
        sleep, 100
        Mousemove, 1750, 800, 2
        sleep, 500
        MouseClick, L
        sleep, 1000
        WinActivate, %SnippingToolWindowName%
        WinMaximize, %SnippingToolWindowName%
     ;   WinActivate, Snipping Tool
     ;   WinMaximize, Snipping Tool
        sleep, 300
    	MouseClick, L, 150, 20
        sleep, 300
        tooltip, Send, %SaveAsHotkey%
        Send, %SaveAsHotkey%
        sleep, 300
        tooltip, WinWait, %SaveAsWindowName%
        WinWait, %SaveAsWindowName%
        sleep, 300
        tooltip, SendInput %CaptureName%.png
        SendInput %CaptureName%.png
        sleep, 300
        tooltip, Send, %AddressBarHotkey%
        Send, %AddressBarHotkey%
        sleep, 300
        tooltip, SendInput %A_ScriptDir%
        SendInput %A_ScriptDir%
        sleep, 300
        tooltip, SendInput {Enter}
        SendInput {Enter}
        sleep, 300
        Send, %SaveHotkey%
    ;    Send, !s
        sleep, 300
        IfWinExist, %ConfirmSaveAsWindowName%
        {
            Send, %YesHotkey%
            ImageRepeat := 1
        } else {
            ImageRepeat := 0
        }
        sleep, 300
    ;    Send, !F4
    ;    MouseClick, L, 1910, 10
    ;    WinClose, Snipping Tool
        WinClose, %SnippingToolWindowName%
        if (ScreenCapturePos = 1) {
            gosub Cooldown1
        } else {
            gosub Icon1
        }
    return
    ;======================================================
    Icon1:
        CaptureX1 -= 5
        CaptureY1 -= 5
        CaptureX2 += 5
        CaptureY2 += 5
        SetMouseDelay, %MouseDelay%
        SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
        tooltip, gosub Icon2
        SetTimer, RemoveToolTip, -500
        gosub Icon2
    return
    ;======================================================
    Icon2:
        ImageSearch, %CaptureName%X, %CaptureName%Y, %CaptureX1%, %CaptureY1%, %CaptureX2%, %CaptureY2%, *10 %CaptureName%.png
            if (ErrorLevel = 2) {
                ToolTip, Could Not perform scan
            }
            else if (ErrorLevel = 1) {
                ToolTip, Could Not Find Scan %CaptureName%.png
            } else {
                ToolTip, %CaptureName%.png found
            }
        SetTimer, RemoveToolTip, -1000
        Section = BuffIconCoordinates--------------------------------------------------------------------------------------------------
        IniWrite, % CaptureX1, UnrapeKitConfig.ini, %Section%, %CaptureName%X
        IniWrite, % CaptureY1, UnrapeKitConfig.ini, %Section%, %CaptureName%Y
    return
    ;======================================================
    Cooldown1:
        if (CaptureX1 >= 1410 and CaptureX2 <= 1605 and CaptureY1 >= 410 and CaptureY2 <= 925) {
            CaptureX1 -= 5
            CaptureY1 -= 5
            CaptureX2 += 5
            CaptureY2 += 5
            SetMouseDelay, %MouseDelay%
            SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
            tooltip, gosub Cooldown2
            SetTimer, RemoveToolTip, -500
            gosub Cooldown2
        } Else {
            tooltip, Capture coordinates out of bounds
            SetTimer, RemoveToolTip, -1000
            reload
        }
    return
    ;======================================================
    Cooldown2:
        if (ImageRepeat = 1) {
            Loop, 8 {  ; replaces a hotkey capture
                if (CaptureName = TempName%A_Index%) {
                    N := A_Index
                    break
                }
            }
        } else {
            ScanCount += 1
            N := ScanCount
        }
        Name%N%:= TempName
        Line%N%:= TempLine
        IconToggle%N%:= 1
        IniWrite, %ScanCount%, UnrapeKitConfig.ini, Configuration, ScanCount
        gosub Cooldown3
    return
    ;======================================================
    Cooldown3:
    	Mousemove, 1600, 1000, 2
        Sleep, 100
    	MouseClick
        Sleep, 1000
        ImageSearch, %TempName%X, %TempName%Y, %CaptureX1%, %CaptureY1%, %CaptureX2%, %CaptureY2%, *10 %CaptureName%.png
            if (ErrorLevel = 2) {
                ToolTip, Could Not perform scan
            }
            else if (ErrorLevel = 1) {
                ToolTip, Could Not Find Scan %CaptureName%.png
            } else {
                ToolTip, %CaptureName%.png found
            }
        SetTimer, RemoveToolTip, -1000
    	Section = ScanCoordinates--------------------------------------------------------------------------------------------------
        IniWrite, % CaptureX1, UnrapeKitConfig.ini, %Section%, %TempName%X
        IniWrite, % CaptureY1, UnrapeKitConfig.ini, %Section%, %TempName%Y
        IniWrite, % Name%N%, UnrapeKitConfig.ini, %Section%, Name%N%
        IniWrite, % Line%N%, UnrapeKitConfig.ini, %Section%, Line%N%
        IniWrite, % IconToggle%N%, UnrapeKitConfig.ini, %Section%, IconToggle%N%
    return
    ;======================================================End of ScreenCapture======================================================
    Code:
    ;======================================================ScanConfig======================================================
    ScanConfig:
    	Section = ScanCoordinates%LineSpacing2%
    	IniRead, ScanCount, UnrapeKitConfig.ini, Configuration, ScanCount
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y5 w200 h26, Icons Count:
    	Gui, Add, Text, x10 y33 w120 h26, Scans:
    	Gui, Add, Edit, x145 y30 w30 h21 vScanCount, %ScanCount%
    	Gui, Add, Button, x10 y70 w90 h20 gScanDefinitions Default, Definitions
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Scan Count
    Return
    ;======================================================
    ScanDefinitions:
    	gosub GuiSD
    	IniWrite, %ScanCount%, UnrapeKitConfig.ini, Configuration, ScanCount
    		Loop, %ScanCount% {
    			IniRead, Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    			IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    			IniRead, Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    			NameN:= % Name%A_Index%
    			LineN:= % Line%A_Index%
    		}
    	H:= 1
    	W:= 1
    	HMax:= 1
    	SysGet, SGW, 71
    	MouseGetPos, Xpos, Ypos
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, X5 Y10, Toggle       SpellName       Line# (Bottom to Top)
    	Loop, %ScanCount% {
    		GuiY:= 50 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 95
    			If (GuiY > ScreenHeight) {
    					W+= 1
    					HMax:= H
    					H= 1
    			}
    		Y1:= 18 + 30 * H
    		Y2:= 15 + 30 * H
    		GuiWidth:= 240 * W
    			If (W = 1) {
    				GuiHeight:= 105 + 30 * H
    				AddHeight:= 48 + 30 * H
    				AddButtonHeight:= 45 + 30 * H
    				ButtonHeight:= 75 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 105 + 30 * HMax
    				AddHeight:= 48 + 30 * HMax
    				AddButtonHeight:= 45 + 30 * HMax
    				ButtonHeight:= 75 + 30 * HMax
    			}
    		Button1Width:= GuiWidth - 200
    		Button2Width:= GuiWidth - 100
    		TextWidth:= GuiWidth - 215
    		CheckboxWidth:= GuiWidth - 230
    		NameWidth:= GuiWidth - 200
    		LineWidth:= GuiWidth - 60
    		Gui, Add, Text, x%TextWidth% Y%Y1%, %A_Index%
    		Gui, Add, Checkbox, % " x" CheckboxWidth " y" Y1 " h13 w13 vIconToggle" A_Index " Checked" IconToggle%A_Index%
    		Gui, Add, Edit, x%NameWidth% y%Y2% w130 h20 vName%A_Index%, % Name%A_Index%
    		Gui, Add, Edit, x%LineWidth% y%Y2% w50 h20 vLine%A_Index%, % Line%A_Index%
    			If (A_Index = ScanCount) {
    				X_Offset:= GuiWidth/2
    				Y_Offset:= GuiHeight/2
    				X_Limit:= A_ScreenWidth - X_Offset
    				Y_Limit:= A_ScreenHeight - Y_Offset
    				Mouse_X:= Xpos - X_Offset
    				Mouse_Y:= Ypos - Y_Offset
    					If Xpos between 0 and %X_Offset%
    						Move_X:= 0
    					If Xpos between %X_Offset% and %X_Limit%
    						Move_X:= Mouse_X
    					If Xpos between %X_Limit% and %A_ScreenWidth%
    						Move_X:= A_ScreenWidth - GuiWidth
    					If Ypos between 0 and %Y_Offset%
    						Move_Y:= 0
    					If Ypos between %Y_Offset% and %Y_Limit%
    						Move_Y:= Mouse_Y
    					If Ypos between %Y_Limit% and %A_ScreenHeight%
    						Move_Y:= A_ScreenHeight - GuiHeight - 30
    				Gui, Add, Button, x10 y%AddButtonHeight% w90 h20 gAddScan, Add
    				Gui, Add, Text, x110 y%AddHeight%, Add
    				Gui, Add, Edit, x140 y%AddButtonHeight% w30 h20 vXDefinitions
    				Gui, Add, Text, x180 y%AddHeight%, Definition(s)
    				Gui, Add, Button, x%Button1Width% y%ButtonHeight% w90 h20 gScanWrite Default, Record
    				Gui, Add, Button, x%Button2Width% y%ButtonHeight% w90 h20 gCancel, Reload
    				Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Scan Configuration
    				Break
    			}
    		H+= 1
    	}
    Return
    ;======================================================
    AddScan:
    	gosub, GuiSD
    	N:= 1
    	Loop, %ScanCount% {
    		IniWrite, % IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    		IniWrite, % Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    		IniWrite, % Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    		N+=1
    	}
    	ScanCount+= %XDefinitions%
    	Gosub ScanDefinitions
    Return
    ;======================================================
    ScanWrite:
    	gosub, GuiSD
    	Loop, %ScanCount% {
    		IniWrite, % IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    		IniWrite, % Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    		IniWrite, % Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    	}
    	Gosub SpellScan
    Return
    ;======================================================End of ScanConfig======================================================
    Code:
    ;======================================================SpellScan======================================================
    SpellScan:
    Section = ScanCoordinates--------------------------------------------------------------------------------------------------
    ScanToolTip:= ""
    ScanMessage:= ""
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, 1660, 1025 ; t
    	MouseClick, , 1660, 1025 ; t
    	ToolTipIndex:= 1
    	Loop, %ScanCount% {
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    		If (IconToggle%A_Index% = 1) {
    			ToolTipIndex += 1
    			IniRead, Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    			IniRead, Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    			NameN:= % Name%A_Index%
    			LineN:= % Line%A_Index%
    			CaptureName%A_Index%:= % Name%A_Index% "" Line%A_Index%
    			sleep, %Delay%
    			;sleep, 50
    			ImageSearch, %NameN%X, %NameN%Y, 1410, 410, 1605, 925, *10 %NameN%%LineN%.png
    				If(ErrorLevel = 0) {
    					ScanMessage:= % CaptureName%A_Index% ":= " %NameN%X "x, " %NameN%Y "y `n"
    					ScanToolTip.= ScanMessage
    					Tooltip, % ScanToolTip, 1700, 1050, 5
    					SetTimer, RemoveToolTip5, -9500
    					IniWrite, % %NameN%X, UnrapeKitConfig.ini, %Section%, %NameN%X
    					IniWrite, % %NameN%Y, UnrapeKitConfig.ini, %Section%, %NameN%Y
    				}
    				If(ErrorLevel = 1) {
    					ScanMessage:= % "----------------------`n" CaptureName%A_Index% " not found `n----------------------`n"
    					ScanToolTip.= ScanMessage
    					Tooltip, % ScanToolTip, 1700, 1050, 5
    					SetTimer, RemoveToolTip5, -5000
    				}
    				If(ErrorLevel = 2) {
    					ScanMessage:= % CaptureName%A_Index% ": Error `n"
    					ScanToolTip.= ScanMessage
    					Tooltip, % ScanToolTip, 1700, 1050, 5
    					SetTimer, RemoveToolTip5, -5000
    				}
    		}
    	}
    	Send, {Esc}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	MouseMove, Xpos, Ypos
    	SetTimer, RemoveTooltip, -1000
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of SpellScan======================================================
    Code:
    ;======================================================Type1======================================================
    Type1:
    	If (Hkey%Hk%T1V = 1) {
    		Gosub V1Loop
    		return
    	}
    	If (Hkey%Hk%T1V = 2) or (Hkey%Hk%T1V = 3){
    		Loop {
    			If (HKey%Hk%Key%A_Index% = "LButton") {
    				HKey%Hk%Tx%A_Index%:= 1549
    				HKey%Hk%Ty%A_Index%:= 952
    			}
    			If (HKey%Hk%Key%A_Index% = "MButton") {
    				HKey%Hk%Tx%A_Index%:= 1604
    				HKey%Hk%Ty%A_Index%:= 952
    			}
    			If (HKey%Hk%Key%A_Index% = "RButton") {
    				HKey%Hk%Tx%A_Index%:= 1660
    				HKey%Hk%Ty%A_Index%:= 952
    			}
    			If (HKey%Hk%Key%A_Index% = "Q") {
    				HKey%Hk%Tx%A_Index%:= 1438
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "W") {
    				HKey%Hk%Tx%A_Index%:= 1493
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "E") {
    				HKey%Hk%Tx%A_Index%:= 1549
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "R") {
    				HKey%Hk%Tx%A_Index%:= 1605
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "T") {
    				HKey%Hk%Tx%A_Index%:= 1661
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			PixelGetColor, HKey%Hk%color%A_Index%, HKey%Hk%Tx%A_Index%, HKey%Hk%Ty%A_Index%
    			if (A_Index = (HKey%Hk%TriggeredCount + 1))
    				break
    		}
    		If (Hkey%Hk%T1V = 2) {
    			HKey%Hk%TrigN:= 1
    			Gosub V2Loop
    			return
    		}
    		If (Hkey%Hk%T1V = 3){
    			HKey%Hk%TrigN:= 1
    			Gosub V3Loop
    			return
    		}
    		return
    	}
    Return
    ;======================================================
    V1Loop:
    	HkV1:= Hk
    	HKey%HkV1%TrigN:= 1
    	TrigNV1:= 1
    	HKey%HkV1%Trig:= 0
    	TrigV1:= 0
    	HKey%HkV1%TickToggle%TrigN%:= false
    	HKey%HkV1%KeyToggle:= !HKey%HkV1%KeyToggle
    	While (HKey%HkV1%KeyToggle) {
    		if (Hkey%HkV1%TriggerToggle%TrigNV1%) and (HKey%HkV1%KeyToggle) {
    			gosub BuffScan
    				if (HKey%HkV1%Cooldown%TrigNV1% < A_TickCount - HKey%HkV1%Tick%TrigNV1%) and (HKey%HkV1%KeyToggle) {
    					Gosub, Shortcut1
    					HKey%HkV1%Tick%TrigNV1% := A_TickCount
    				}
    		}
    		if (HKey%HkV1%TrigNV1 > HKey%HkV1%TriggeredCount) and (HKey%HkV1%KeyToggle)
    			HKey%HkV1%TrigNV1:= 0
    		HKey%HkV1%TrigNV1+= 1
    		Sleep, % HKey%HkV1%ScanDelay
    	}
    	if !(HKey%HkV1%KeyToggle) {
    		ToolTip, Toggled off, HKey%HkV1%Timerx - 20, HKey%HkV1%TimerY + 40, 2
    		SetTimer, RemoveTooltip2, -3000
    	}
    	HKey%HkV1%TrigNV1:= 1
    Return
    ;======================================================
    BuffScan:
    	loop, 8 {
    		ImageSearch, HKey%HkV1%TimerX, HKey%HkV1%TimerY, 0, 0, 1000, 90, % "*10 " HKey%HkV1%Spell%TrigNV1% "Timer" A_Index ".png"
    		If (ErrorLevel = 0) {
    			ToolTip, % "Timer" A_Index, HKey%HkV1%Timerx - 20, HKey%HkV1%TimerY + 40, 2
    				SetTimer, RemoveTooltip2, -100
    			HKey%HkV1%Tick%TrigNV1%:= A_TickCount
    			TrigV1:= A_Index
    			break
    		} else {
    ;			ToolTip, not found, Timerx - 20, TimerY + 60, 3
    ;				SetTimer, RemoveTooltip3, % - 50
    			if (A_Index = 8) {
    				break
    			}
    		}
    	}
    	SetTimer, RemoveTooltip, 2
    Return
    ;======================================================
    Shortcut1:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , U
    	BlockInput, MouseMove
    	send, {LCtrl Down}
    	loop {
    		sleep, %Delay%
    		Send % "{" HKey%HkV1%Key%TrigNV1% "}"
    		ImageSearch, HKey%HkV1%TimerX, HKey%HkV1%TimerY, 0, 0, 1000, 90, % "*10 " HKey%HkV1%Spell%TrigNV1% "Timer" TrigV1 ".png"
    		If (ErrorLevel = 0)
    			break
    		if (A_Index = 8) {
    			break
    		}
    	}
    	send, {LCtrl Up}
    	BlockInput, MouseMoveoff
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , D
    	MouseMove, Xpos, Ypos
    	BlockInput, MouseMoveOff
    Return
    ;======================================================
    V2Loop:
    	HkV2:= Hk
    	HKey%HkV2%TrigN:= 1
    	TrigNV2:= 1
    	HKey%HkV2%KeyToggle:= !HKey%HkV2%KeyToggle
    	While HKey%HkV2%KeyToggle {
    		sleep, %Delay%
    		;sleep, 50
    		PixelSearch, , , HKey%HkV2%Tx%TrigNV2%, HKey%HkV2%Ty%TrigNV2%, HKey%HkV2%Tx%TrigNV2%, HKey%HkV2%Ty%TrigNV2%, HKey%HkV2%Color%TrigNV2%, 0
    		If (ErrorLevel = 0) {
    			gosub SendShortcut2
    		}
    	}
    	ToolTip, Toggled off, HKey%HkV2%Tx%TrigNV2% - 20, HKey%HkV2%Tx%TrigNV2% + 40, 3
    		SetTimer, RemoveTooltip3, -3000
    Return
    ;======================================================
    SendShortcut2:
    	Cooldown:= % Hkey%HkV2%Cooldown%TrigNV2%
    	Tooltip, % "Ctrl-" HKey%HkV2%Key%TrigNV2% " Toggle: " HKey%HkV2%CtrlKeyToggle%TrigNV2% "`nCooldown = " Hkey%HkV2%Cooldown%TrigNV2% , 1880, 950
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , U
    	BlockInput, on
    	if ((HKey%HkV2%CtrlKeyToggle%TrigNV2%) = 1) {
    		send, {LCtrl Down}
    		sleep, %Delay%
    		;sleep, 50
    	}
    	Send % "{" HKey%HkV2%Key%TrigNV2% "}"
    	if ((HKey%HkV2%CtrlKeyToggle%TrigNV2%) = 1) {
    		send, {LCtrl up}
    	}
    	BlockInput, off
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    	MouseClick, , , , , , D
    	sleep % Hkey%HkV2%Cooldown%TrigNV2%
    	HKey%HkV2%TrigNV2++
    	if (HKey%HkV2%TrigNV2 > ((HKey%HkV2%TriggeredCount) + 1)) {
    		HKey%HkV2%TrigNV2:= 1
    	}
    Return
    ;======================================================
    ;======================================================
    V3Loop:
    	TrigN:= 1
    	HKeyHkT1Spell1:= HKey%HkT1%Spell1
    	HKeyHkT1KeyTrigN:= % HKey%HkT1%Key%TrigN%
    	HKey%HkT1%KeyToggle%TrigN%:= !HKey%HkT1%KeyToggle%TrigN%
    	Tooltip, % "Toggle State : " HKey%HkT1%KeyToggle%TrigN%  "`nCtrl-" HKeyHkT1KeyTrigN "`nToggle: " HKey%HkT1%CtrlKeyToggle%TrigN%, 1880, 1050
    	SetTimer, RemoveToolTip, -500
    	While HKey%HkT1%KeyToggle%TrigN% {
    		ImageSearch, T1X, T1Y, 0, 0, 1000, 80, % "*40 " HKey%HkT1%Spell%TrigN% "Timer" A_Index ".png"
    ;			If (ErrorLevel = 2) {
    ;				msgbox, error
    ;			}
    ;			If (ErrorLevel = 1) {
    ;				msgbox, not found
    ;			}
    			If (ErrorLevel = 0) {
    				Tooltip, found at %T1X%x %T1Y%Y, T1X, T1Y +40
    					SetTimer, RemoveToolTip, -1000
    				i:= A_Index
    				loop {
    					ImageSearch, , , T1X -5, T1Y -5, T1X + 50, T1Y + 50, % "*40 " HKey%HkT1%Spell%TrigN% "Timer" i ".png"
    						If (ErrorLevel = 1) {
    								Tooltip, HKey%HkT1%Spell%TrigN%: %Cooldown%ms, T1X, T1Y +40
    								SetTimer, RemoveToolTip, -1000
    							GoSub SendShortcut3
    							break
    						}
    				}
    			}
    		if (A_Index = 8)
    			break
    	}
    Return
    ;======================================================
    SendShortcut3:
    	HKeyHkT1KeyTrigN:= HKey%HkT1%Key%TrigN%
    	Sleep, %Cooldown%
    	BlockInput, on
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	If (HKey%HkT1%CtrlKeyToggle%TrigN% = 0) {
    		BlockInput, on
    		send, {%HKeyHkT1KeyTrigN%}
    		BlockInput, off
    	}
    	If (HKey%HkT1%CtrlKeyToggle%TrigN% = 1) {
    		BlockInput, on
    		Send, {Ctrl Down}
    		sleep, 40
    		Send, {%HKeyHkT1KeyTrigN%}{Ctrl Up}
    		BlockInput, off
    	}
    	If LButtonState = D
    		MouseClick, , , , , , D
    	BlockInput, Off
    
    ;		loop {
    ;			If (HKey%HkT1%CtrlKeyToggle = 1) {
    ;				GetKeyState, CtrlState, Ctrl, P
    ;					If CtrlState = D
    ;						Send, {Ctrl Up}
    ;				Send, {Ctrl down}
    ;				Sleep, 50
    ;			}
    ;			GetKeyState, LButtonState, LButton, P
    ;				If LButtonState = D
    ;					MouseClick, , , , , , U
    ;			send, {%HKeyHkT1KeyTrigN%}
    ;			If LButtonState = D
    ;				MouseClick, , , , , , D
    ;			Send, {Ctrl Up}
    ;			ImageSearch, , , T1X -5, T1Y -5, T1X + 50, T1Y + 50, % HKey%HkT1%Spell%TrigN% "Timer" i ".png"
    ;				If (ErrorLevel = 0) {
    ;					Break
    ;				}
    ;		}
    return
    ;======================================================End of Type1======================================================
    Code:
    ;======================================================ConfigType1======================================================
    ConfigType1:
    	Section := "Type1Hotkey" . Hk . "" . LineSpacing2
    	gosub Type1Load
    	GuiWidth:= 250
    	GuiHeight:= 60
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 1"
    	Gui, Add, Button, x10 y30 w50 h20 gV1, v1
    	Gui, Add, Button, x70 y30 w50 h20 gV2, v2
    	Gui, Add, Button, x130 y30 w50 h20 gV3, v3
    	if (Hkey%Hk%T1V = 1) {
    		Gui, Add, Button, x10 y30 w50 h20 gV1 Default, v1
    	} else if (Hkey%Hk%T1V = 2) {
    		Gui, Add, Button, x70 y30 w50 h20 gV2 Default, v2
    	} else {
    		Gui, Add, Button, x130 y30 w50 h20 gV3 Default, v3
    	}
    	Gui, Add, Button, x190 y30 w50 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    ;============================================================================================================
    V1:
    	Hkey%Hk%T1V:= 1
    	gosub GuiSD
    	Gui, Add, Text, 0x80 x10 y10, Additional Spells:
    	Gui, Add, Edit, x100 y7 w40 h20 vHkey%Hk%TriggeredCount, % Hkey%Hk%TriggeredCount
    	Gui, Add, Text, x160 y10, Scan Delay:
    	Gui, Add, Edit, x230 y7 w40 h20 vHkey%Hk%ScanDelay, % Hkey%Hk%ScanDelay
    	Loop  {
    		Y1:= 30 * A_Index + 33
    		Y2:= 30 * A_Index + 30
    		Y3:= 30 * A_Index + 3
    		Y4:= 30 * A_Index
    		Gui, Add, Text, x20 y40, Toggle           Spell Name                     Shortcut Key    Cooldown (ms)
    		Gui, Add, Text, x10 y%Y1%, %A_Index%
    		Gui, Add, Checkbox, % "x30 y" Y1 " h13 w13 vHkey" Hk "TriggerToggle" A_Index " Checked" Hkey%Hk%TriggerToggle%A_Index%
    		Gui, Add, Edit, x51 y%Y2% w140 h20 vHkey%Hk%Spell%A_Index%, % Hkey%Hk%Spell%A_Index%
    		Gui, Add, Edit, x201 y%Y2% w70 h20 vHkey%Hk%Key%A_Index%, % Hkey%Hk%Key%A_Index%
    		Gui, Add, Edit, x281 y%Y2% w40 h20 vHkey%Hk%Cooldown%A_Index%, % Hkey%Hk%Cooldown%A_Index%
    			If (A_Index > Hkey%Hk%TriggeredCount) {
    				GuiWidth:= 350
    				GuiHeight:= 100 + 30 * A_Index
    				ButtonHeight:= 30 * A_Index + 70
    				gosub Guibuild
    				Gui, Add, Button, x50 y%ButtonHeight% w90 h20 gTriggeredAdd1, Add
    				Gui, Add, Button, x150 y%ButtonHeight% w90 h20 gTriggeredWrite1 Default, Record
    				Gui, Add, Button, x250 y%ButtonHeight% w90 h20 gCancel, Cancel
    				Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk " (" Hkey%Hk%Shortcut ")"
    				Break
    			}
    	}
    Return
    ;======================================================
    TriggeredAdd1:
    gosub GuiSD
    IniWrite, % Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount
    gosub V1
    Return
    ;======================================================
    TriggeredWrite1:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%T1V, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1V
    	IniWrite, % Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount
    	IniWrite, % Hkey%Hk%ScanDelay, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanDelay
    	Loop {
    		IniWrite, % Hkey%Hk%TriggerToggle%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggerToggle%A_Index%
    		IniWrite, % Hkey%Hk%Spell%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%A_Index%
    		IniWrite, % Hkey%Hk%Key%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%
    		IniWrite, % Hkey%Hk%Cooldown%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%A_Index%
    		HKey%Hk%TrigN:= A_Index
    		Gosub KeyWrite1
    		If (A_Index > Hkey%Hk%TriggeredCount)
    			Break
    	}
    Return
    ;============================================================================================================
    V2:
    	gosub GuiSD
    	Hkey%Hk%T1V:= 2
    	TrigN:= 1
    	GuiWidth:= 210
    	GuiHeight:= 200
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut%TrigN% " - V2"
    	HKeyHkT1CtrlKeyToggleTrigN := HKey%HkT1%CtrlKeyToggle%TrigN%
    	Gui, Add, Checkbox, % "x10 y43 h13 w13 vHKey" Hk "CtrlKeyToggle" TrigN " Checked" HKey%Hk%CtrlKeyToggle%TrigN%
    	Gui, Add, Text, x30 y43, Ctrl
    	Gui, Add, Edit, x60 y40 w70 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    	Gui, Add, Text, x140 y43, Shortcut
    	Gui, Add, Edit, x10 y70 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y73, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y100 w30 h20 vHkey%Hk%Cooldown%TrigN%, % Hkey%Hk%Cooldown%TrigN%
    	Gui, Add, Text, x50 y103, Spell 1 Cooldown, ms
    	Gui, Add, Edit, x10 y130 w40 h20 vHkey%Hk%TriggeredCount, % Hkey%Hk%TriggeredCount
    	Gui, Add, Text, x60 y133, Extra Triggered Spells
    	Gui, Add, Button, x10 y160 w90 h20 gTriggered2 Default, Define
    	Gui, Add, Button, x110 y160 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    ;======================================================
    Triggered2:
    	gosub GuiSD
    	T1%Hk%:= 2
    	IniWrite, % Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount
    	IniWrite, % Hkey%Hk%T1V, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1V
    	IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    	IniWrite, % HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%
    	IniWrite, % Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%
    	If (TriggeredCount%Hk% = 0) {
    		gosub TriggeredWrite2
    	} else {
    		TrigN:= 2
    		Loop {
    			Y1:= 30 * TrigN - 27
    			Y2:= 30 * TrigN - 30
    			Y3:= 30 * TrigN + 3
    			Y4:= 30 * TrigN
    			Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional shortcuts"
    			Gui, Add, Text, x10 y%Y1%, % "Ctrl"
    			Gui, Add, Checkbox, % "x30 y" Y1 " h13 w13 vHKey" Hk "CtrlKeyToggle" TrigN " Checked" HKey%Hk%CtrlKeyToggle%TrigN%
    			Gui, Add, Text, x50 y%Y1%, % " key" TrigN ":"
    			Gui, Add, Edit, x90 y%Y2% w60 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    			Gui, Add, Text, x170 y%Y1%, % " Cooldown"
    			Gui, Add, Edit, x230 y%Y2% w40 h20 vHkey%Hk%Cooldown%TrigN%, % Hkey%Hk%Cooldown%TrigN%
    			Gui, Add, Text, x275 y%Y1%, ms
    				If (A_Index = Hkey%Hk%TriggeredCount) {
    					GuiWidth:= 300
    					GuiHeight:= 40 + 30 * TrigN
    					ButtonHeight:= 30 * TrigN + 10
    					gosub Guibuild
    					Gui, Add, Button, x100 y%ButtonHeight% w90 h20 gTriggeredWrite2 Default, Record
    					Gui, Add, Button, x200 y%ButtonHeight% w90 h20 gCancel, Reload
    					Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%,
    					Break
    				}
    			TrigN+= 1
    		}
    		TrigN:= 1
    	}
    
    Return
    ;======================================================
    TriggeredWrite2:
    	gosub GuiSD
    		IniWrite, % Hkey%Hk%Key1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key1
    	TrigN:= 2
    	Loop, % TriggeredCount%Hk% {
    		IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    		IniWrite, % HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%
    		IniWrite, % Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%
    		TrigN+=1
    	}
    	TrigN:= 1
    	Gosub KeyWrite1
    Return
    ;============================================================================================================
    V3:
    	gosub GuiSD
    	Hkey%Hk%T1V:= 3
    	TrigN:= 1
    	GuiWidth:= 210
    	GuiHeight:= 230
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, Toggle for Ctrl hotkey
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell%TrigN%, % Hkey%Hk%Spell%TrigN%
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Checkbox, % "x10 y73 h13 w13 vHKey" Hk "CtrlKeyToggle" TrigN " Checked" HKey%Hk%CtrlKeyToggle%TrigN%
    	Gui, Add, Edit, x30 y70 w70 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    	Gui, Add, Text, x110 y73, Shortcut Key
    	Gui, Add, Edit, x10 y100 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y103, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y130 w30 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    	Gui, Add, Text, x50 y133, Spell 1 Cooldown, ms
    	Gui, Add, Edit, x10 y160 w40 h20 vTriggeredCount%Hk%, % TriggeredCount%Hk%
    	Gui, Add, Text, x60 y163, Extra Triggered Spells
    	Gui, Add, Button, x10 y190 w90 h20 gTriggered3 Default, Define
    	Gui, Add, Button, x110 y190 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - V3"
    Return
    ;======================================================
    Triggered3:
    	gosub GuiSD
    	IniWrite, % Hkey%HkT1%T1V, UnrapeKitConfig.ini, %Section%, Hkey%HkT1%T1V
    	IniWrite, % TriggeredCount%Hk%, UnrapeKitConfig.ini, %Section%, TriggeredCount%Hk%
    	IniWrite, % Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%
    	IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    	IniWrite, % HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%
    	IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1Cooldown%TrigN%
    	If (TriggeredCount%Hk% = 0) {
    			gosub TriggeredWrite3
    	} else {
    		TrigN:= 2
    		Loop {
    			Y1:= 30 * TrigN - 27
    			Y2:= 30 * TrigN - 30
    			Y3:= 30 * TrigN + 3
    			Y4:= 30 * TrigN
    			Gui, Add, Text, 0x80 x10 y10, Toggle for Ctrl hotkey
    			Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell%TrigN%, % Hkey%Hk%Spell%TrigN%
    			Gui, Add, Text, x160 y43, Spell 1
    			Gui, Add, Checkbox, % "x10 y" Y2 " h13 w13 vHKey" HkT1 "CtrlKeyToggle" TrigN " Checked" HKey%HkT1%CtrlKeyToggle%TrigN%
    			Gui, Add, Edit, x41 y%Y2% w140 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    			Gui, Add, Text, x191 y%Y1%, % "Spell " TrigN ", Cooldown" (Toggle for Ctrl)
    			Gui, Add, Edit, x291 y%Y2% w40 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    			Gui, Add, Text, x341 y%Y1%, ms
    				If (A_Index = TriggeredCount%Hk%) {
    					GuiWidth:= 370
    					GuiHeight:= 40 + 30 * TrigN
    					ButtonHeight:= 30 * TrigN + 10
    					gosub Guibuild
    					Gui, Add, Button, x170 y%ButtonHeight% w90 h20 gTriggeredWrite3 Default, Record
    					Gui, Add, Button, x270 y%ButtonHeight% w90 h20 gCancel, Reload
    					Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional shortcuts"
    					Break
    				}
    			TrigN+= 1
    		}
    		TrigN:= 1
    	}
    Return
    ;======================================================
    TriggeredWrite3:
    	gosub GuiSD
    	TrigN:= 2
    	Loop, % Hkey%Hk%TriggeredCount {
    		IniWrite, % Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%
    		IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    		IniWrite, % HKey%HkT1%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%HkT1%CtrlKeyToggle%TrigN%
    		IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1Cooldown%TrigN%
    		TrigN+=1
    	}
    	TrigN:= 1
    	Gosub KeyWrite1
    Return
    ;======================================================End of ConfigType1======================================================
    Code:
    ;======================================================Type2======================================================
    Type2:
    	HkeyHkSpell1:= Hkey%Hk%Spell1
    	HkeyHkSpell2:= Hkey%Hk%Spell2
    	HkeyHkKey:= Hkey%Hk%Key
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , U
    	if (Hkey%Hk%AltEquiptoggle)
    		Send, {X}
    	MouseMove, Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	sleep, %Delay%
    	MouseClick, , Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseMove, %HkeyHkSpell1%X, %HkeyHkSpell1%Y
    	sleep, %Delay%
    	MouseClick, ,  %HkeyHkSpell1%X, %HkeyHkSpell1%Y
    		if (Hkey%Hk%MoveToggle)
    			MouseMove, Xpos, Ypos
    		if (Hkey%Hk%ShiftToggle) {
    			Send, {LShift Down}
    			sleep, 50
    		}
    	SendInput, % "{" Hkey%Hk%Key "}"
    		if (Hkey%Hk%ShiftToggle)
    			Send, {LShift Up}
    	MouseMove, Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseClick, , Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseMove, %HkeyHkSpell2%X, %HkeyHkSpell2%Y
    	MouseClick, , %HkeyHkSpell2%X, %HkeyHkSpell2%Y
    	if (Hkey%Hk%AltEquiptoggle)
    		Send, {X}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState2, LButton, P
    		if LButtonState2 = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of Type2======================================================
    Code:
    ;======================================================ConfigType2======================================================
    ConfigType2:
    	Section = Type2Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 210
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 2"
    	Gui, Add, Edit, x30 y40 W110 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x30 y70 W110 h20 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Text, x160 y73, Spell 2
    	Gui, Add, Edit, x10 y100 W70 h20 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y103, Shortcut Key
    	Gui, Add, Checkbox, % "x10 y130 h13 w13 vHkey" Hk "MoveToggle Checked" Hkey%Hk%MoveToggle
    	Gui, Add, Text, x30 y130, replace cursor
    	Gui, Add, Checkbox, % "x+10 y130 h13 w13 vHkey" Hk "ShiftToggle Checked" Hkey%Hk%ShiftToggle
    	Gui, Add, Text, x+10 y130, Hold Shift
    	Gui, Add, Checkbox, % " x10 y160 vHkey" Hk "AltEquiptoggle checked" Hkey%Hk%AltEquiptoggle, Alternate equipment
    	Gui, Add, Button, x10 y180 w90 h20 gWrite2 Default, Define
    	Gui, Add, Button, x110 y180 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Swap Caster
    Return
    ;======================================================
    Write2:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key
    	IniWrite, % Hkey%Hk%MoveToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MoveToggle
    	IniWrite, % Hkey%Hk%ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShiftToggle
    	IniWrite, % Hkey%Hk%AltEquiptoggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%AltEquiptoggle
    	Gosub KeyWrite
    Return
    ;======================================================End of ConfigType2======================================================
    Code:
    ;======================================================Type3======================================================
    Type3:
    	HkeyHkKey:= Hkey%Hk%Key
    	Hkey%Hk%Keytoggle:= !Hkey%Hk%Keytoggle
    	CastTime1:= Hkey%Hk%Cast1Time + Delay + 2 * FrameTime
    	CastTime2:= Hkey%Hk%Cast2Time + Delay + 2 * FrameTime
    	if Hkey%Hk%Keytoggle {
    		HkeyHkSpell:= Hkey%Hk%Spell1
    		i:= 1
    		gosub SpellCast
    	}
    	if !Hkey%Hk%Keytoggle {
    		HkeyHkSpell:= Hkey%Hk%Spell2
    		i:= 2
    		gosub SpellCast
    	}
    Return
    ;======================================================End of Type3======================================================
    Code:
    ;======================================================ConfigType3======================================================
    ConfigType3:
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 220
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x70 y10, Spell                       Cast Time
    	Gui, Add, Text, x10 y43, 1
    	Gui, Add, Edit, x20 y40 W140 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Edit, x170 y40 W30 vHkey%Hk%Cast1Time, % Hkey%Hk%Cast1Time
    	Gui, Add, Text, x10 y73, 2
    	Gui, Add, Edit, x20 y70 W140 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Edit, x170 y70 W30 vHkey%Hk%Cast2Time, % Hkey%Hk%Cast2Time
    	Gui, Add, Text, x10 y103, Shortcut key
    	Gui, Add, Edit, x90 y100 W70 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Checkbox, % "x10 y130 h13 w13 vHkey" Hk "Cast1ShiftToggle Checked" Hkey%Hk%Cast1ShiftToggle
    	Gui, Add, Text, x+10 y130, Shift
    	Gui, Add, Checkbox, % "x+10 y130 h13 w13 vHkey" Hk "Cast1Toggle Checked" Hkey%Hk%Cast1Toggle
    	Gui, Add, Text, x+10 y130, Cast Spell 1
    	Gui, Add, Checkbox, % "x10 y160 h13 w13 vHkey" Hk "Cast2ShiftToggle Checked" Hkey%Hk%Cast2ShiftToggle
    	Gui, Add, Text, x+10 y160, Shift
    	Gui, Add, Checkbox, % "x+10 y160 h13 w13 vHkey" Hk "Cast2Toggle Checked" Hkey%Hk%Cast2Toggle
    	Gui, Add, Text, x+10 y160, Cast Spell 2
    	Gui, Add, Button, x10 y190 w90 h20 gWrite3 Default, Define
    	Gui, Add, Button, x110 y190 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk " Type 3: " Hkey%Hk%Shortcut
    Return
    ;======================================================
    Write3:
    	Section = Type3Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time
    	IniWrite, % Hkey%Hk%Cast2Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Time
    	IniWrite, % Hkey%Hk%Cast1ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1ShiftToggle
    	IniWrite, % Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle
    	IniWrite, % Hkey%Hk%Cast2ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2ShiftToggle
    	IniWrite, % Hkey%Hk%Cast2Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Toggle
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key
    	Gosub KeyWrite
    Return
    ;======================================================End of ConfigType3======================================================
    Code:
    ;======================================================Type4======================================================
    Type4:
    	HkeyHkSpell:= Hkey%Hk%Spell1
    	CastTime1:= Hkey%Hk%Cast1Time + Delay + 2 * FrameTime
    	ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%Hk%Spell1 "_" Hkey%Hk%Key ".png"
    		If ErrorLevel = 0
    			SendInput, "{" Hkey%Hk%Key "}"
    		If (ErrorLevel = 1) {
    			gosub SpellCast
    		}
    Return
    ;======================================================End of Type4======================================================
    Code:
    ;======================================================End of ConfigType4======================================================
    ConfigType4:
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 170
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x70 y10, Spell                       Cast Time
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell1T4, % Hkey%Hk%Spell1
    	Gui, Add, Edit, x160 y40 W30 vHkey%Hk%Cast1Time, % Hkey%Hk%Cast1Time
    	Gui, Add, Text, x10 y73, Shortcut key
    	Gui, Add, Edit, x90 y70 W70 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Checkbox, % "x10 y100 h13 w13 vHkey" Hk "Cast1Toggle Checked" Hkey%Hk%Cast1Toggle
    	Gui, Add, Text, x40 y100, Cast Spell 1
    	Gui, Add, Button, x10 y140 w90 h20 gWrite4 Default, Define
    	Gui, Add, Button, x110 y140 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, "Hotkey " Hk " Type 4: " Hkey%Hk%Shortcut
    Return
    ;======================================================
    Write4:
    	Section = Type4Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time
    	IniWrite, % Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key
    	Gosub KeyWrite
    Return
    ;======================================================End of ConfigType4======================================================
    Code:
    ;======================================================Type5======================================================
    Type5:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %Delay%
    	MouseClick, Right, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    	Sleep, %Delay%
    	if (Hkey%Hk%GemSwapTab = 1) {
    		MouseMove, Hkey%Hk%GemSwap2_X, Hkey%Hk%GemSwap2_Y
    		MouseClick, Left, Hkey%Hk%GemSwap2_X, Hkey%Hk%GemSwap2_Y
    		MouseMove, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    		MouseClick, Left, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    	}
    	if (Hkey%Hk%GemSwapTab = 2) {
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%GemSwap2Alt_X, Hkey%Hk%GemSwap2Alt_Y
    		MouseClick, , Hkey%Hk%GemSwap2Alt_X, Hkey%Hk%GemSwap2Alt_Y
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    		MouseClick, , Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    	}
    	SendInput, {i}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of Type5======================================================
    Code:
    ;======================================================Type6======================================================
    Type6:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %Delay%
    	MouseClick, Right, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    	Sleep, %Delay%
    	if (Hkey%Hk%EquipSwapTab = 1) {
    		MouseMove, Hkey%Hk%EquipSwap2_X, Hkey%Hk%EquipSwap2_Y
    		MouseClick, Left, Hkey%Hk%EquipSwap2_X, Hkey%Hk%EquipSwap2_Y
    		MouseMove, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    		MouseClick, Left, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    	}
    	if (Hkey%Hk%EquipSwapTab = 2) {
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%EquipSwap2Alt_X, Hkey%Hk%EquipSwap2Alt_Y
    		MouseClick, , Hkey%Hk%EquipSwap2Alt_X, Hkey%Hk%EquipSwap2Alt_Y
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    		MouseClick, , Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    	}
    	SendInput, {i}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of Type6======================================================
    Code:
    ;======================================================ConfigType5&6======================================================
    ConfigType5:
    	Section:= "Type5Hotkey5--------------------------------------------------------------------------------------------------"
    	Gosub GemSwap1
    Return
    
    ConfigType6:
    	Section:= "Type6Hotkey5--------------------------------------------------------------------------------------------------"
    	Gosub EquipSwap1
    Return
    
    GemSwap1:
    	Swap:= "GemSwap1"
    	Gosub Swap1
    Return
    
    GemSwap2:
    	Swap:= "GemSwap2"
    	Gosub Swap2
    return
    
    EquipSwap1:
    	Swap:= "EquipSwap1"
    	GoSub Swap1
    Return
    
    EquipSwap2:
    	Swap:= "EquipSwap2"
    	GoSub Swap2
    Return
    ;======================================================
    Swap1:
    	Gosub InvRead
    	gosub LoadSocketLists
    	gosub EquipRead
    	gosub AltEquipRead
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 830
    	If (Swap = "GemSwap1") {
    		Hkey%Hk%GemSwapTab:=  1
    	}
    	If (Swap = "EquipSwap2") {
    		Hkey%Hk%EquipSwapTab:=  1
    	}
    	Gui, Add, Picture, x3 y27, InventoryEquip.png
    	Gui, Color, 0x050505
    
    	gosub GuiBuild
    	gosub InvRadio
    	gosub EquipRadio
    	Gui, Add, Button, x550 y800 w90 h20 gCancel, Reload
    	Gui, Add, Button, x450 y800 w90 h20 gSwapCoord Default, Select
    	If (Swap = "GemSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipped Gem Swap"
    	If (Swap = "EquipSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipment Swap"
    Return
    ;======================================================
    Swap2:
    	Gosub InvRead
    	gosub LoadSocketLists
    	gosub EquipRead
    	gosub AltEquipRead
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 830
    	If (Swap = "GemSwap2") {
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight%, 1||2
    	}
    	If (Swap = "EquipSwap2") {
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight%, 1||2
    	}
    	Gui, Tab, 1
    		Gui, Add, Picture, x0 y27, InventoryEquip.png
    		Gui, Color, 0x050505
    		gosub GuiBuild
    		gosub InvRadio
    		gosub EquipRadio
    		Gui, Add, Button, x550 y800 w90 h20 gCancel, Reload
    		Gui, Add, Button, x450 y800 w90 h20 gSwapCoord Default, Select
    	Gui, Tab, 2
    		gosub GuiTab
    		Gui, Add, Picture, x33 y30, AlternateEquipment.png
    		Gui, Color, 0x050505
    		gosub AltEquipRadio
    		Gui, Add, Button, x50 y800 w90 h20 gCancel, Reload
    		Gui, Add, Button, x150 y800 w90 h20 gSwapCoord Default, Select
    	Gui, Tab
    		if (Swap = "GemSwap2")
    			Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipped Gem Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    		if (Swap = "EquipSwap2")
    			Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipment Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    Return
    ;======================================================
    GuiTab:
    	if (Swap = "GemSwap2") {
    		Hkey%Hk%GemSwapTab:= 2
    		GemSwapTab:= Hkey%Hk%GemSwapTab
    	}
    	if (Swap = "EquipSwap2") {
    		Hkey%Hk%EquipSwapTab:= 2
    		EquipSwapTab:= Hkey%Hk%EquipSwapTab
    	}
    Return
    ;======================================================
    SwapCoord:
    	gosub guiSD
    	Gosub InvWriteDelete
    	gosub EquipWriteDelete
    	gosub EquipCoord
    	gosub SwapRouting
    Return
    ;======================================================
    InvRead:
    	L:= 0
    	Loop, 5 {
    		L+= 1
    		C:= 0
    		loop, 12 {
    			C += 1
    			IniRead, Hkey%Hk%%Swap%RadioL%L%C%C%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%RadioL%L%C%C%, %A_Space%
    			var2 = Hkey%Hk%%Swap%RadioL%L%C%C%
    			var3:= % %var2%
    		}
    	}
    	C:= 0
    	L:= 0
    Return
    ;======================================================
    InvWriteDelete:
    	L:= 0
    	Loop, 5 {
    		L+= 1
    		C:= 0
    		loop, 12 {
    			C += 1
    			var2 = Hkey%Hk%%Swap%RadioL%L%C%C%
    			var3:= % %var2%
    			if (var3 = 1) {
    				IniWrite, % Hkey%Hk%%Swap%RadioL%L%C%C%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%RadioL%L%C%C%
    			} else {
    				IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%RadioL%L%C%C%
    			}
    			Hkey%Hk%%Swap%X:= 1240 + (C*53)
    			Hkey%Hk%%Swap%Y:= 560 + (L*54)
    		}
    	}
    	C:= 0
    	L:= 0
    Return
    ;======================================================
    InvRadio:
    	L:= 0
    	Loop, 5 {
    		L+= 1
    		C:= 0
    		loop, 12 {
    			C += 1
    			RadioCX:= -27 + C*53
    			RadioCY:= 489 + L*53
    			var2 = Hkey%Hk%%Swap%RadioL%L%C%C%
    			var3:= % %var2%
    			if (var3 = "")
    				var3 := 0
    			Gui, Add, Radio, % "x" RadioCX " y" RadioCY " h13 w13 v" var2 " Checked" var3
    		}
    	}
    	C:= 0
    	L:= 0
    return
    ;======================================================
    AltEquipRadio:
    	for each, AltSocket in AltSocketList {
    	varX:= % AltSocket.2
    	varY:= % AltSocket.3
    	var1 := % AltSocket.1
    	var2 = Hkey%Hk%%Swap%Alt%var1%
    	var3 := % %var2%
    	if (var3 = "")
    		var3 := 0
    	Gui, Add, Radio, % "x" varX " y" varY " h13 w13 v" var2 " Checked" var3
    }
    return
    ;======================================================
    EquipRadio:
    	for each, Socket in SocketList {
    		varX:= % Socket.2
    		varY:= % Socket.3
    		var1 := % Socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3 := % %var2%
    		if (var3 = "")
    			var3 := 0
    		Gui, Add, Radio, % "x" varX " y" varY " h13 w13 v" var2 " Checked" var3
    	}
    return
    ;======================================================
    SwapRouting:
    	If (Swap = "GemSwap2" AND GemSwapTab = 2) OR (Swap = "EquipSwap2" AND EquipSwapTab = 2) {
    		gosub AltEquipDelete
    		gosub AltEquipWriteDelete
    		gosub AltEquipCoord
    	}
    	If (Swap = "GemSwap1") {
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    		Gosub GemSwap2
    	Return
    	}
    	If (Swap = "EquipSwap1") {
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    		Gosub EquipSwap2
    	Return
    	}
    	If (Swap = "GemSwap2" AND GemSwapTab = 1) {
    		IniWrite, % Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    	Return
    	}
    	If (Swap = "EquipSwap2" AND EquipSwapTab = 1) {
    		IniWrite, % Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    	Return
    	}
    	If (Swap = "GemSwap2" AND GemSwapTab = 2) {
    		IniWrite, % Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab
    		IniWrite, % Hkey%Hk%%Swap%Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_X
    		IniWrite, % Hkey%Hk%%Swap%Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_Y
    	Return
    	}
    	If (Swap = "EquipSwap2" AND EquipSwapTab = 2) {
    		IniWrite, % Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab
    		IniWrite, % Hkey%Hk%%Swap%Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_X
    		IniWrite, % Hkey%Hk%%Swap%Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_Y
    	Return
    	}
    return
    ;======================================================End of ConfigType5&6======================================================
    Code:
    ;======================================================Type7======================================================
    Type7:
    	T7:= 1
    	MouseGetPos, Xpos, Ypos
    	Loop, % Hkey%Hk%Iterations {
    			If (Hkey%Hk%Iteration%T7% = "SpellScan") {
    				Gosub SpellScan
    			}
    			If (Hkey%Hk%Iteration%T7% = "ImageSearch") {
    				gosub T7ImageSearch
    			}
    			If (Hkey%Hk%Iteration%T7% = "Spell") {
    				gosub T7Spell
    			}
    			If (Hkey%Hk%Iteration%T7% = "SendInput") {
    				gosub T7SendInput
    			}
    			If (Hkey%Hk%Iteration%T7% = "GetMousePos") {
    				gosub T7GetMouse
    			}
    			If (Hkey%Hk%Iteration%T7% = "GoMousePos") {
    				gosub T7GoMouse
    			}
    			If (Hkey%Hk%Iteration%T7% = "MouseMove") {
    				gosub T7MouseMove
    			}
    			If (Hkey%Hk%Iteration%T7% = "Delay") {
    				Sleep, % HKey%Hk%DelayIteration%T7%
    			}
    			If (Hkey%Hk%Iteration%T7% = "GemSwap") {
    				gosub T7GemSwap
    			}
    			If (Hkey%Hk%Iteration%T7% = "EquipmentSwap") {
    				gosub T7EquipSwap
    			}
    		T7+= 1
    	}
    	MouseMove, Xpos, Ypos
    Return
    
    T7Routing:
    Return
    
    T7ImageSearch:
    	;BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LuttonState = D
    			MouseClick, , , , , , U
    	MouseMove, A_ScreenWidth, A_ScreenHeight
    	Loop {
    		ImageSearch, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, % "*" ShadeVariationHotkey%Hk%Iteration%T7% " " ImageNameHotkey%Hk%Iteration%T7% ".png"
    			If (ErrorLevel = 2) {
    				MsgBox % "Search Failed for image " ImageNameHotkey%Hk%Iteration%T7%
    				break
    			}
    			If (ErrorLevel = 1) {
    				MsgBox % "Search could not find image " ImageNameHotkey%Hk%Iteration%T7%
    				break
    			}
    			If (ErrorLevel = 0) {
    				ToolTip, % HKey%Hk%MouseXPosIteration%T7% ", " HKey%Hk%MouseYPosIteration%T7%
    				SetTimer, RemoveToolTip, 500
    				break
    			}
    	}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    ;			BlockInput, MouseMoveOff
    return
    
    T7Spell:
    	HKeyHkSpellIterationT7:= HKey%Hk%SpellIteration%T7%
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, KeyX_%Hk%Iteration%T7%, KeyY_%Hk%Iteration%T7%
    	Sleep, %FrameTime%
    	MouseClick, ,  KeyX_%Hk%Iteration%T7%, KeyY_%Hk%Iteration%T7%
    	Sleep, %FrameTime%
    	MouseMove, %HKeyHkSpellIterationT7%X, %HKeyHkSpellIterationT7%Y
    	SetMouseDelay, 40
    	MouseClick, , %HKeyHkSpellIterationT7%X, %HKeyHkSpellIterationT7%Y
    	SetMouseDelay, %MouseDelay%
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7SendInput:
    	HKeyHkSendIterationT7:= HKey%Hk%SendIteration%T7%
    	SendInput, {%HKeyHkSendIterationT7%}
    return
    
    T7GetMouse:
    	If (Hkey%Hk%GetMousePosToggleIteration%T7% = 1) {
    		BlockInput, MouseMove
    		GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    		MouseGetPos, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%
    			SetTimer, RemoveToolTip, -500
    		GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	}
    return
    
    T7GoMouse:
    	MouseT7:= HKey%Hk%GoMousePosIteration%T7%
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, HKey%Hk%MouseXPosIteration%MouseT7%, HKey%Hk%MouseYPosIteration%MouseT7%
    	Tooltip, % "x: " HKey%Hk%MouseXPosIteration%MouseT7% ", y: "HKey%Hk%MouseYPosIteration%MouseT7%
    		SetTimer, RemoveToolTip, -500
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7MouseMove:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%
    	Tooltip, % "x: " HKey%Hk%MouseXPosIteration%T7% ", y: "HKey%Hk%MouseYPosIteration%T7%
    		SetTimer, RemoveToolTip, -500
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    				MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7GemSwap:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, 40
    	MouseClick, Right, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, %MouseDelay%
    	If (GemSwapTab_%Hk% = 1) {
    		MouseMove, GemSwap2Hotkey%Hk%Iteration%T7%_X, GemSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap2Hotkey%Hk%Iteration%T7%_X, GemSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	If (GemSwapTab_%Hk% = 2) {
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, GemSwap2AltHotkey%Hk%Iteration%T7%_X, GemSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap2AltHotkey%Hk%Iteration%T7%_X, GemSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	SendInput, {i}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7EquipSwap:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, 40
    	MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, %MouseDelay%
    	If (EquipSwapTab_%Hk% = 1) {
    		MouseMove, EquipSwap2Hotkey%Hk%Iteration%T7%_X, EquipSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap2Hotkey%Hk%Iteration%T7%_X, EquipSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	If (EquipSwapTab_%Hk% = 2) {
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap2AltHotkey%Hk%Iteration%T7%_X, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	SendInput, {i}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    ;======================================================End of Type7======================================================
    Code:
    ;======================================================ConfigType7======================================================
    Type7Config:
    	gosub Type7Load
    	MouseGetPos, Xpos, Ypos
    	Type7ConfigRecord:= 0
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiSD
    	Gui, Add, Text, x40 y10, Type 7 configuration
    	Gui, Add, Edit, x10 y40 w30 h20 vHkey%Hk%Iterations, % Hkey%Hk%Iterations
    	Gui, Add, Text, x50 y43, % "Iterations Hotkey " Hk
    	Gui, Add, Button, x10 y70 w90 h20 gType7Config2 Default, Configure
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Type 7
    Return
    
    Type7Config2:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations
    	MouseGetPos, Xpos, Ypos
    	H:= 1
    	W:= 1
    	HMax:= 1
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, x10 y10, Options:
    	Gui, Add, Text, x10 y40, Choose any of these or skip
    	Gui, Add, Text, x10 y70,
    	Gui, Add, Text, x10 y100, ImageSearch
    	Gui, Add, Text, x10 y130, GetMousePos
    	Gui, Add, Text, x10 y160, GoMousePos
    	Gui, Add, Text, x10 y190, SpellScan
    	Gui, Add, Text, x10 y220, Spell
    	Gui, Add, Text, x10 y250, SendInput
    	Gui, Add, Text, x10 y280, MouseMove
    	Gui, Add, Text, x10 y310, Delay
    	Gui, Add, Text, x10 y340, GemSwap
    	Gui, Add, Text, x10 y370, EquipmentSwap
    	Gui, Add, Text, x10 y400, Add
    	Gui, Add, Edit, x110 y400 w20 h20 vHkey%Hk%7Iterations
    	Gui, Add, Text, x140 y403, Iteration(s)
    	Gui, Add, Button, x10 y400 w90 h20 gType7ConfigAdd, Add
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		GuiY:= 60 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    		If (GuiY > ScreenHeight) {
    			W+= 1
    			HMax:= H
    			H= 1
    		}
    		Y1:= 8 + 30 * H
    		Y2:= 5 + 30 * H
    		GuiWidth:= 160 + 360 * W
    		If (W = 1) {
    			GuiHeight:= 70 + 30 * H
    			ButtonHeight:= 40 + 30 * H
    		}
    		If (W > 1) {
    			GuiHeight:= 70 + 30 * HMax
    			ButtonHeight:= 40 + 30 * HMax
    		}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		CheckboxX:= GuiWidth - 310
    		EditButtonX:= GuiWidth - 100
    		EditX:= GuiWidth - 280
    		TextX:= GuiWidth - 170
    		var1= Hkey%Hk%Iteration%T7%Toggle
    		Gui, Add, Edit, x%EditX% y%Y2% w100 h20 vHkey%Hk%Iteration%T7%, % Hkey%Hk%Iteration%T7%
    		Gui, Add, Text, x%TextX% y%Y1%, % "Iteration " T7
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditT7, %T7%
    		If (T7 = Hkey%Hk%Iterations) {
    			If ButtonHeight < 400
    				ButtonHeight = 400
    			If GuiHeight < 430
    				GuiHeight = 430
    			gosub GuiBuild
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gType7ConfigRecord Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gType7Config3, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Iteration Configuration
    			Break
    		}
    		T7+= 1
    		H+= 1
    	}
    Return
    
    EditT7:
    	A_GuiControlT7:= A_GuiControl
    	T7:= A_GuiControlT7
    	gosub GuiSD
    	gosub Type7Write2
    	Gosub Type7Config4
    Return
    
    Type7ConfigRecord:
    	gosub GuiSD
    	gosub Type7Write
    	Gosub Type7Config2
    Return
    
    Type7ConfigAdd:
    	gosub GuiSD
    	gosub Type7Write2
    	Hkey%Hk%Iterations+= % Hkey%Hk%7Iterations
    	Gosub Type7Config2
    Return
    
    Type7Config3:
    	gosub GuiSD
    	T7 := 1
    	gosub Type7Write2
    	T7 := 1
    	Gosub Type7Config4
    Return
    
    Type7Config4:
    	gosub GuiSD
    	If (A_GuiControlT7 > 0)
    		A_GuiControlType7Config4:= A_GuiControlT7
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations
    	Loop {
    		If (Hkey%Hk%Iteration%T7% = "ImageSearch") {
    			Gosub Type7ImageSearch
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GetMousePos") {
    			Gosub Type7GetMousePos
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GoMousePos") {
    			Gosub Type7GoMousePos
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "SpellScan") {
    			Gosub Type7LoopAdd
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "Spell") {
    			Gosub Type7Spell
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "SendInput") {
    			Gosub Type7Send
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "MouseMove") {
    			Gosub Type7MouseMove
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "Delay") {
    			Gosub Type7DelayConfig
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GemSwap") {
    			Gosub Type7GemSwap1
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "EquipmentSwap") {
    			Gosub Type7EquipSwap1
    			Break
    		}
    		If (T7 >= Hkey%Hk%Iterations) {
    			Hk += 1
    			Gosub HkTypeConfigLoop
    			Break
    		}
    	}
    Return
    
    Type7Msg:
    	MsgBox, % "Iteration " T7 " = " Hkey%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7LoopAdd:
    	gosub GuiSD
    	If (A_GuiControlType7Config4 > 0) {
    		A_GuiControlT7:= 0
    		gosub Type7Config2
    	} Else {
    		T7+= 1
    		Gosub Type7Config4
    	}
    Return
    
    Type7LoopSubtract:
    	gosub GuiSD
    	A_GuiControlT7:= 0
    	Loop {
    		T7-= 1
    		If (T7 = 0) {
    			T7:= 1
    			Gosub Type7Config4
    			Break
    		}
    	}
    Return
    
    Type7ImageSearch:
    	gosub GuiSD
    	gosub GuiBuild
    	Gui, Add, Edit, x10 y10 w30 h20 vScanCoordinatesHotkey%Hk%Iteration%T7%_L, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L
    	Gui, Add, Edit, x50 y10 w30 h20 vScanCoordinatesHotkey%Hk%Iteration%T7%_T, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T
    	Gui, Add, Edit, x90 y10 W30 H20 vScanCoordinatesHotkey%Hk%Iteration%T7%_R, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R
    	Gui, Add, Edit, x130 y10 W30 H20 vScanCoordinateHotkey%Hk%Iteration%T7%_B, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B
    	Gui, Add, Edit, x10 y40 W110 H20 vShadeVariationHotkey%Hk%Iteration%T7%, % ShadeVariationHotkey%Hk%Iteration%T7%
    	Gui, Add, Edit, x10 y70 w110 h20 vImageNameHotkey%Hk%Iteration%T7%, % ImageNameHotkey%Hk%Iteration%T7%
    	Gui, Add, Text, x170 y13, Left, Top, Right and Bottom Scan Coordinates
    	Gui, Add, Text, x130 y43, Scan Color Shade Variation and Optional Parameters
    	Gui, Add, Text, x130 y73, Scan Image Name
    	Gui, Add, Button, x310 y100 w90 h20 gType7ImageSearchWrite Default, Define
    	Gui, Add, Button, x210 y100 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y100 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y100 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Image Scan
    Return
    
    Type7ImageSearchWrite:
    	gosub GuiSD
    	Hkey%Hk%GetMousePosToggleIteration%T7%:= 1
    	IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B
    	IniWrite, % ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%
    	IniWrite, % ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GetMousePos:
    	GuiWidth:= 410
    	GuiHeight:= 100
    	gosub GuiBuild
    	If (Hkey%Hk%MouseXPosIteration%T7% is Integer Hkey%Hk%MouseYPosIteration%T7% is Integer) {
    		MouseMove, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	} Else {
    		MouseMove, 960, 540
    	}
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, x10 y13, Hotkey %Hk% Iteration %T7%: Move the mouse to the position to be saved and press ENTER
    	Gui, Add, Checkbox, % "x10 y40 h13 w13 vHkey" Hk "GetMousePosToggleIteration" T7 " Checked" Hkey%Hk%GetMousePosToggleIteration%T7%, Cancel Saving and get position during hotkey execution
    	Gui, Add, Button, x310 y70 w90 h20 gType7GetMousePosWrite Default, Define
    	Gui, Add, Button, x210 y70 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y70 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Get Mouse Position
    Return
    
    Type7GetMousePosWrite:
    	gosub GuiSD
    	If (Hkey%Hk%GetMousePosToggleIteration%T7% = 0) {
    		MouseGetPos, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%Type7MouseYPosIteration%T7%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseXPosIteration%T7%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseYPosIteration%T7%
    	}
    	IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GoMousePos:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	Gui, Add, Edit, x200 y10 w20 h20 vHkey%Hk%GoMousePosIteration%T7%, % Hkey%Hk%GoMousePosIteration%T7%
    	Gui, Add, Text, x10 y13, Move to Mouse Position from Iteration:
    	Gui, Add, Button, x310 y40 w90 h20 gType7GoMousePosWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%:Mouse Position
    Return
    
    Type7GoMousePosWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GoMousePosIteration%T7%
    	Gosub Type7Config2
    Return
    
    Type7MouseMove:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	If (Hkey%Hk%MouseXPosIteration%T7% is Integer) and (Hkey%Hk%MouseYPosIteration%T7% is Integer) {
    		MouseMove, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	} Else {
    		MouseMove, 960, 540
    	}
    	Gui, Add, Text, x10 y13, Hotkey %Hk% Iteration %T7%: Move the mouse to the position to be saved and press ENTER
    	Gui, Add, Button, x310 y40 w90 h20 gType7MouseMoveWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Mouse Position
    Return
    
    Type7MouseMoveWrite:
    	gosub GuiSD
    	MouseGetPos, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseXPosIteration%T7%
    	IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseYPosIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7Spell:
    	GuiWidth:= 410
    	GuiHeight:= 140
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, % Type 7 - "Iteration " T7 " Spell Configuration"
    	Gui, Add, Edit, x10 y40 w110 h20 vHkey%Hk%SpellIteration%T7%, % Hkey%Hk%SpellIteration%T7%
    	Gui, Add, Text, x130 y43, % "Spell - Hotkey " Hk
    	Gui, Add, Edit, x10 y70 W70 H20 vHkey%Hk%KeyIteration%T7%, % Hkey%Hk%KeyIteration%T7%
    	Gui, Add, Text, x90 y73, % "Key - Hotkey " Hk
    	Gui, Add, Button, x310 y110 w90 h20 gType7SpellWrite Default, Define
    	Gui, Add, Button, x210 y110 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y110 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y110 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Type 7 Spell Configuration
    Return
    
    Type7SpellWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, type7HotkeySpells, Hkey%Hk%SpellIteration%T7%
    	IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, type7HotkeyKey, Hkey%Hk%KeyIteration%T7%
    	Gosub Type7Key
    Return
    
    Type7Key:
    	If (Hkey%Hk%KeyIteration%T7% = "Q") {
    		KeyX_%Hk%Iteration%T7%:= 1440
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "W") {
    		KeyX_%Hk%Iteration%T7%:= 1495
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "E") {
    		KeyX_%Hk%Iteration%T7%:= 1550
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "R") {
    		KeyX_%Hk%Iteration%T7%:= 1605
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "T") {
    		KeyX_%Hk%Iteration%T7%:= 1655
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "LButton") {
    		KeyX_%Hk%Iteration%T7%:= 1550
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "MButton") {
    		KeyX_%Hk%Iteration%T7%:= 1600
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "RButton") {
    		KeyX_%Hk%Iteration%T7%:= 1650
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	IniWrite, % KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%
    	IniWrite, % KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7Send:
    	GuiWidth:= 410
    	GuiHeight:= 110
    	gosub GuiBuild
    	Gui, Add, Text, x185 y10, % "Hotkey " Hk
    	Gui, Add, Edit, x10 y40 w70 h20 vHkey%Hk%SendIteration%T7%, % Hkey%Hk%SendIteration%T7%
    	Gui, Add, Text, x90 y43, % "Iteration " T7 " Send"
    	Gui, Add, Button, x310 y80 w90 h20 gType7SendWrite Default, Define
    	Gui, Add, Button, x210 y80 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y80 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y80 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Send Config
    Return
    
    Type7SendWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, type7Send, Hkey%Hk%SendIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7DelayConfig:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	Gui, Add, Edit, x10 y10 w130 h20 vHkey%Hk%DelayIteration%T7%, % Hkey%Hk%DelayIteration%T7%
    	Gui, Add, Text, x150 y13, % "Iteration " T7 " Delay"
    	Gui, Add, Button, x310 y40 w90 h20 gType7DelayWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk
    Return
    
    Type7DelayWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, type7Delay, Hkey%Hk%DelayIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GemSwap1:
    	Swap:= "7GemSwap1"
    	GoSub Type7Swap
    Return
    
    Type7GemSwap2:
    	Swap:= "7GemSwap2"
    	GoSub Type7Swap
    Return
    
    Type7EquipSwap1:
    	Swap:= "7EquipSwap1"
    	GoSub Type7Swap
    Return
    
    Type7EquipSwap2:
    	Swap:= "7EquipSwap2"
    	GoSub Type7Swap
    Return
    
    Type7Swap:
    	Gosub Type7LCAdd
    	gosub Type7SwapRead1
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 800
    	If (Swap = "7GemSwap2") {
    		GemSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit v7GemSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	If (Swap = "7EquipSwap2") {
    		EquipSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit v7EquipSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	Gui, Color, 0x050505
    	Gui, Add, Picture, x0 y0, InventoryEquip.png
    	gosub GuiBuild
    	gosub Type7Radio1
    	gosub Type7Radio3
    	Gui, Add, Button, x550 y770 w90 h20 gType7SwapCoord Default, Select
    	Gui, Add, Button, x450 y770 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x350 y770 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y770 w90 h20 gCancel, Reload
    	If (Swap = "7GemSwap2") OR (Swap = "7EquipSwap2") {
    		GuiWidth:= 650
    		GuiHeight:= 800
    		gosub GuiBuild
    		Gui, Tab, 2
    		gosub Type7Radio2
    		Gui, Add, Button, x550 y770 w90 h20 gType7SwapCoord Default, Select
    		Gui, Add, Button, x450 y770 w90 h20 gType7LoopAdd, Skip
    		Gui, Add, Button, x350 y770 w90 h20 gType7LoopSubtract, Go Back
    		Gui, Add, Button, x10 y770 w90 h20 gCancel, Reload
    	}
    	If (Swap = "7GemSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipped Gem Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "7EquipSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipment Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "7GemSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipped Gem Swap - Iteration " T7
    	If (Swap = "7EquipSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipment Swap - Iteration " T7
    Return
    
    Type7LCAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		IniRead, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Swap%PositionType7, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7SwapCoord:
    	gosub GuiSD
    	Gosub Type7LCCoordAdd
    	Gosub Type7SwapWrite1
    	Gosub Type7SwapCoord1
    	gosub Type7SwapRouting
    Return
    
    Type7LCCoordAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		If (RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7% = 1) {
    			IniWrite, % RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Swap%PositionType7, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    			%Swap%Hotkey%Hk%Iteration%T7%_X:= 1240 + (C*53)
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:= 560 + (L*54)
    		}
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7Radio1:
    	L:= 1
    	C:= 1
    	RadioCX:= -10
    	RadioCY:= 459 + L*52
    	Loop {
    		RadioCX += 39
    		var2 = RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    		var3:= % var2
    		Gui, Add, Radio, % "x" RadioCX " y" RadioCY " h13 w13 v" var3 " Checked" var3
    		If (C = 5) or (c = 9) {
    			RadioCX += 1
    		}
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7Radio2:
    	For _, socket in SocketList1 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    return
    
    
    Type7Radio3:
    	For _, socket in SocketList1 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    	For _, socket in SocketList2 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    	For _, socket in SocketList3 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    return
    
    Type7SwapRouting:
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 2) OR (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 2) {
    		gosub Type7SwapWrite2
    		gosub Type7SwapCoord2
    	}
    	If (Swap = "7GemSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    		Gosub Type7GemSwap2
    	}
    	If (Swap = "7EquipSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    		Gosub Type7EquipSwap2
    	}
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 1) {
    		IniWrite, % 7GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7GemSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 1) {
    		IniWrite, % 7EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7EquipSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 2) {
    		IniWrite, % 7GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7GemSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 2) {
    		IniWrite, % 7EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7EquipSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    return
    
    Type7SwapCoord1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    return
    
    Type7SwapCoord2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%AltHotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%AltHotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    Return
    
    Type7SwapRead1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapRead2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapWrite1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapWrite2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    ;======================================================End of ConfigType7======================================================
    Code:
    ;======================================================UnrapeKitConfig======================================================
    [Configuration]
    ScanCount=28
    HotkeyLimit=7
    [ScreenCapture--------------------------------------------------------------------------------------------------]
    SaveHotkey=!s
    SaveAsHotkey=^s
    CloseHotkey=!f4
    YesHotkey=!y
    AddressBarHotkey=!d
    SaveAsWindowName=Save As
    ConfirmSaveAsWindowName=Confirm Save As
    SnippingToolWindowName=Snipping Tool
    SnippingToolPath=
    ScreenCapturePos=1
    TempName=OrderToMe
    TempLine=3
    TempColumn=1
    [ScanCoordinates--------------------------------------------------------------------------------------------------]
    Name1=FireTrap
    Line1=5
    FireTrapX=1488
    FireTrapY=613
    IconToggle1=0
    Name2=OrbOfStorms
    Line2=1
    OrbOfStormsX=1424
    OrbOfStormsY=873
    IconToggle2=0
    TempestShieldX=1422
    TempestShieldY=680
    Name3=TempestShield
    Line3=4
    IconToggle3=0
    Name4=RollingMagma
    Line4=3
    IconToggle4=0
    RollingMagmaX=1431
    RollingMagmaY=750
    WitherX=1551
    WitherY=812
    Name5=Wither
    Line5=2
    IconToggle5=0
    SummonSkeletonsX=1495
    SummonSkeletonsY=822
    Name6=SummonSkeletons
    Line6=4
    IconToggle6=1
    IconToggle7=1
    Name7=RaiseZombie
    Line7=4
    RaiseZombieX=1495
    RaiseZombieY=563
    Name8=SummonSkeletons
    Line8=5
    IconToggle8=1
    DetonateDeadX=1490
    DetonateDeadY=622
    Name9=DetonateDead
    Line9=5
    IconToggle9=1
    ExplosiveTrapX=1555
    ExplosiveTrapY=622
    Name10=ExplosiveTrap
    Line10=2
    IconToggle10=1
    PurifyingFlameX=1424
    PurifyingFlameY=618
    Name11=PurifyingFlame
    Line11=4
    IconToggle11=1
    BlightX=1488
    BlightY=750
    Name12=Blight
    Line12=4
    IconToggle12=1
    Name13=PurifyingFlame
    Line13=3
    IconToggle13=1
    Name14=Blight
    Line14=3
    IconToggle14=1
    Name15=RaiseZombie
    Line15=5
    IconToggle15=1
    Name16=RaiseZombie
    Line16=3
    IconToggle16=1
    Name17=DetonateDead
    Line17=2
    IconToggle17=1
    Name18=DefaultAttack
    Line18=6
    IconToggle18=1
    DefaultAttackX=1430
    DefaultAttackY=562
    EssenceDrainX=1560
    EssenceDrainY=692
    Name19=EssenceDrain
    Line19=6
    IconToggle19=1
    Name20=EssenceDrain
    Line20=4
    IconToggle20=1
    Name21=SummonSkeletons
    Line21=2
    IconToggle21=1
    Name22=ExplosiveTrap
    Line22=5
    IconToggle22=1
    ContagionX=1560
    ContagionY=563
    Name23=Contagion
    Line23=3
    IconToggle23=1
    OrderToMeX=1430
    OrderToMeY=692
    Name25=OrderToMe
    Line25=4
    IconToggle25=1
    CloseMenuX=1434
    CloseMenuY=891
    Name26=CloseMenu
    Line26=1
    IconToggle26=1
    Name27=EssenceDrain
    Line27=3
    IconToggle27=1
    Name28=OrderToMe
    Line28=3
    IconToggle28=1
    [BuffIconCoordinates--------------------------------------------------------------------------------------------------]
    TempestShieldTimer1X=23
    TempestShieldTimer1Y=20
    [Delay--------------------------------------------------------------------------------------------------]
    Delay=25
    FrameTime=20
    KeyDelay1=10
    KeyDelayPress=10
    MouseDelay=10
    [Hotkeys=========================================================================================================]
    HotkeyConfig=XButton1 & NumLock
    ScanConfig=XButton1 & PgUp
    SpellScan=XButton1 & PgDn
    ScreenCapture=XButton1 & Ins
    DelayConfig=XButton1 & Del
    Hkey1Toggle=0
    Hkey2Toggle=1
    Hkey3Toggle=0
    Hkey4Toggle=0
    Hkey5Toggle=1
    Hkey6Toggle=0
    Hkey7Toggle=1
    Hkey1Type=1
    Hkey2Type=2
    Hkey3Type=3
    Hkey4Type=3
    Hkey5Type=5
    Hkey6Type=2
    Hkey7Type=2
    Hkey1Shortcut=Xbutton1 & 1
    Hkey2Shortcut=Xbutton1 & R
    Hkey3Shortcut=Xbutton1 & LButton
    Hkey4Shortcut=Xbutton1 & Mbutton
    Hkey5Shortcut=Xbutton1 & Q
    Hkey6Shortcut=Xbutton1 & Rbutton
    Hkey7Shortcut=Xbutton1 & LButton
    [Type1Hotkey2--------------------------------------------------------------------------------------------------]
    TriggeredCount2=2
    Hkey2T1V=2
    Hkey2Key1=R
    HKey2CtrlKeyToggle1=0
    ScanDelay2=1
    Hkey2T1Cooldown1=4000
    Hkey2Key2=T
    HKey2CtrlKeyToggle2=1
    Hkey2T1Cooldown2=4000
    Hkey2KeyX=
    Hkey2KeyY=
    [Type1Hotkey1--------------------------------------------------------------------------------------------------]
    Hkey1TriggeredCount=0
    Hkey1T1V=2
    Hkey1TriggerToggle1=1
    Hkey1Spell1=ArcaneCloak
    Hkey1Key1=T
    Hkey1Key1X=1655
    Hkey1Key1Y=1045
    Hkey1TriggerToggle2=0
    Hkey1Spell2=MoltenShell
    Hkey1Key2=T
    Hkey1Cooldown2=4000
    Hkey1Key2X=1655
    Hkey1Key2Y=1045
    Hkey1ScanDelay=190
    Hkey1Cooldown1=4000
    HKey1CtrlKeyToggle1=0
    ScanDelay1=10
    [Type2Hotkey3--------------------------------------------------------------------------------------------------]
    Hkey3Spell1=OrbOfStorms
    Hkey3Spell2=FireTrap
    Hkey3Key=E
    Hkey3MoveToggle=1
    Hkey2ShiftToggle=1
    Hkey3AltEquiptoggle=1
    Hkey3KeyX=1550
    Hkey3KeyY=1045
    [Type2Hotkey2--------------------------------------------------------------------------------------------------]
    Hkey2Spell1=RaiseZombie
    Hkey2Spell2=SummonSkeletons
    Hkey2Key=R
    Hkey2MoveToggle=1
    Hkey2ShiftToggle=1
    Hkey2AltEquiptoggle=0
    Hkey2KeyX=1605
    Hkey2KeyY=1045
    [Type3Hotkey3--------------------------------------------------------------------------------------------------]
    Hkey3Spell1=EssenceDrain
    Hkey3Spell2=DefaultAttack
    Hkey3Key=LButton
    Hkey3KeyX=1550
    Hkey3KeyY=975
    Hkey3Cast1ShiftToggle=1
    Hkey3Cast1Toggle=1
    Hkey3Cast2ShiftToggle=1
    Hkey3Cast2Toggle=1
    Hkey3Cast1Time=67
    Hkey3Cast2Time=91
    [Type3Hotkey4--------------------------------------------------------------------------------------------------]
    Hkey4Spell1=PurifyingFlame
    Hkey4Spell2=Blight
    Hkey4Cast1Time=45
    Hkey4Cast2Time=45
    Hkey3Cast1ShiftToggle=1
    Hkey4Cast1Toggle=1
    Hkey3Cast2ShiftToggle=0
    Hkey4Cast2Toggle=0
    Hkey4Key=MButton
    Hkey4KeyX=1600
    Hkey4KeyY=975
    [Type5Hotkey5--------------------------------------------------------------------------------------------------]
    Hkey5GemSwap1_X=1765
    Hkey5GemSwap1_Y=200
    Hkey5GemSwapTab=2
    Hkey5GemSwap2Alt_X=1355
    Hkey5GemSwap2Alt_Y=200
    Hkey5GemSwap2AltRightWeaponTopRightSocket=1
    Hkey5GemSwap1LeftHandTopCenterSocket=1
    [Type6Hotkey5--------------------------------------------------------------------------------------------------]
    Hkey6EquipSwap1LeftHandTopCenterSocket=1
    Hkey6EquipSwap1_X=1765
    Hkey6EquipSwap1_Y=200
    Hkey6EquipSwapTab=2
    Hkey6EquipSwap2Alt_X=1355
    Hkey6EquipSwap2Alt_Y=200
    Hkey6EquipSwap2RightWeaponTopRightSocket=1
    Hkey6EquipSwap2AltRightWeaponTopRightSocket=1
    [Type3Hotkey7--------------------------------------------------------------------------------------------------]
    Hkey7Spell1=EssenceDrain
    Hkey7Spell2=DefaultAttack
    Hkey7Cast1Time=67
    Hkey7Cast2Time=67
    Hkey3Cast1ShiftToggle=0
    Hkey7Cast1Toggle=0
    Hkey3Cast2ShiftToggle=0
    Hkey7Cast2Toggle=1
    Hkey7Key=LButton
    Hkey7KeyX=1550
    Hkey7KeyY=975
    [Type2Hotkey7--------------------------------------------------------------------------------------------------]
    Hkey7Spell1=PurifyingFlame
    Hkey7Spell2=EssenceDrain
    Hkey7Key=LButton
    Hkey7MoveToggle=1
    Hkey2ShiftToggle=1
    Hkey7AltEquiptoggle=0
    Hkey7KeyX=1550
    Hkey7KeyY=975
    Hkey7ShiftToggle=1
    [Type2Hotkey6--------------------------------------------------------------------------------------------------]
    Hkey6Spell1=OrderToMe
    Hkey6Spell2=Contagion
    Hkey6Key=RButton
    Hkey6MoveToggle=1
    Hkey6ShiftToggle=1
    Hkey6AltEquiptoggle=0
    Hkey6KeyX=1650
    Hkey6KeyY=975
    Here's the dump file:
    Code:
    ;======================================================Loading======================================================
    
    ToolTip, Loading
    
    ;=====================================INITIALIZATION
    #s ingleInstance , force
    WinActivate Path of Exile
    #IfWinActive  Path of Exile
    #MaxThreadsperHotkey  2
    ;------------------------------------------Settings
    SetTitleMatchMode, 2
    CoordMode, Mouse
    SetWorkingDir, %A_ScriptDir%
    SetBatchLines, -1
    SetDefaultMouseSpeed, 1
    SetKeyDelay, 20, 20
    SetMouseDelay, 20
    Hk := 1
    T7:= 1
    GuiToggle := 0
    LineSpacing1 = =========================================================================================================
    LineSpacing2 = --------------------------------------------------------------------------------------------------
    ;------------------------------------------Setup
    gosub IniLoad
    gosub HotkeyLoadLoop
    gosub DelayRead
    ;------------------------------------------Tooltip
    ToolTip, Load Complete
    SetTimer, RemoveToolTip, -500
    ;------------------------------------------Include
    #Include , GeneralFunctions.ahk
    #Include , IniSettings.ahk
    #Include , HotkeyConfig.ahk
    #Include , HotkeyRouting.ahk
    #Include , DelayConfig.ahk
    #Include , ScreenCapture.ahk
    #Include , ScanConfig.ahk
    #Include , SpellScan.ahk
    #Include , ConfigType1.ahk
    #Include , ConfigType2.ahk
    #Include , ConfigType3.ahk
    #Include , ConfigType4.ahk
    #Include , ConfigType5&6.ahk
    #Include , ConfigType7.ahk
    #Include , Type1.ahk
    #Include , Type2.ahk
    #Include , Type3.ahk
    #Include , Type4.ahk
    #Include , Type5.ahk
    #Include , Type6.ahk
    #Include , Type7.ahk
    Return
    ;======================================================End of Loading======================================================
    
    
    ;======================================================GeneralFunctions======================================================
    RCtrl & F9::
    	GuiWidth:= 270
    	GuiHeight:= 270
    	MouseGetPos, Xpos, Ypos
    	gosub GuiBuild
    	Gui, Add, Text, X10 Y10, Configuration Hotkeys:
    	Gui, Add, Edit, X10 Y40 H21 W140 vHotkeyConfig, %HotkeyConfig%
    	Gui, Add, Edit, X10 Y70 H21 W140 vScanConfig, %ScanConfig%
    	Gui, Add, Edit, X10 Y100 H21 W140 vSpellScan, %SpellScan%
    	Gui, Add, Edit, X10 Y130 H21 W140 vScreenCapture, %ScreenCapture%
    	Gui, Add, Edit, X10 Y160 H21 W140 vDelayConfig, %DelayConfig%
    	Gui, Add, Text, X160 Y43, Hotkey Configuration
    	Gui, Add, Text, X160 Y73, Scan Configuration
    	Gui, Add, Text, X160 Y103, Spell Scan
    	Gui, Add, Text, X160 Y133, Screen Capture
    	Gui, Add, Text, X160 Y163, Delay Configuration
    	Gui, Add, Button, x70 y200 w90 h20 gSetupConfig Default, Ok
    	Gui, Add, Button, x170 y200 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Configuration
    Return
    ;======================================================
    HotkeyLoadLoop:
    gosub hotkeySetupRead
    Hk:= 1
    	Loop, %HotKeyLimit% {
    		if (Hkey%Hk%Toggle = 0) {
    			Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    			loop, 7 {
    				if (Hkey%Hk%Type = A_Index) {
    					gosub Type%A_Index%Load
    					break
    				}
    			}
    		}
    	Hk += 1
    	}
    	Hk:= 1
    return
    ;======================================================
    F4::
    	WinClose, Path of Exile
    return
    F7::
    return
    RCtrl & F10::
    	Gui, Cancel
    	Reload
    Return
    RCtrl & F11:: Pause
    RCtrl & F12:: ExitApp
    ;======================================================
    Cancel:
    	Reload
    Return
    ;======================================================
    HotkeyRouting:
    	loop, 7 {
    		If (Hkey%Hk%Type = A_Index) {
    			Gosub Type%A_Index%
    		Return
    		}
    	}
    Return
    ;======================================================
    GuiBuild:
    	if (GuiToggle = 1)
    		gosub guiSD
    	GuiToggle := 1
        X_Offset := GuiWidth / 2
        Y_Offset := GuiHeight / 2
        If (Xpos < X_Offset)
            Move_X := 0
        Else If (Xpos < A_ScreenWidth - X_Offset)
            Move_X := Xpos - X_Offset
        Else
            Move_X := A_ScreenWidth - GuiWidth
        If (Ypos < Y_Offset)
            Move_Y := 0
        Else If (Ypos < A_ScreenHeight - Y_Offset)
            Move_Y := Ypos - Y_Offset
        Else
            Move_Y := A_ScreenHeight - GuiHeight - 30
        Gui, -0x80000 AlwaysOnTop
    return
    ;======================================================
    SpellCast:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	LButtonState:= GetKeyState(LButton, P)
    		if (LButtonState = D)
    			MouseClick, , , , , , U
    	MouseMove, Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseClick
    	MouseMove, %HkeyHkSpell%X, %HkeyHkSpell%Y
    	MouseClick
    	MouseMove, Xpos, Ypos
    	if (Hkey%Hk%Cast%i%Toggle) {
    
    		if (Hkey%Hk%Cast%i%ShiftToggle) {
    			send, {LShift Down}
    		}
    			sleep, %Delay%
    		SendInput, % "{" Hkey%Hk%Key "}"
    		if (Hkey%Hk%Cast%i%ShiftToggle)
    			send, {LShift Up}
    	}
    ;	if (Hkey%Hk%Cast%i%ShiftToggle) {
    ;		sleep, % CastTime%i%
    	GetKeyState, LButtonState, LButton, P
    		if (LButtonState = D) {
    			MouseClick, , , , , , D
    			if (Hkey%Hk%Key = LButton)
    				MouseClick, , , , , , U
    		}
    	BlockInput, MouseMoveOff
    	j:= i
    return
    ;======================================================
    KeyWrite:
    		if (Hkey%Hk%Key = "Q") {
    			Hkey%Hk%KeyX:= 1440
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "W") {
    			Hkey%Hk%KeyX:= 1495
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "E") {
    			Hkey%Hk%KeyX:= 1550
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "R") {
    			Hkey%Hk%KeyX:= 1605
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "T") {
    			Hkey%Hk%KeyX:= 1655
    			Hkey%Hk%KeyY:= 1045
    		}
    		if (Hkey%Hk%Key = "LButton") {
    			Hkey%Hk%KeyX:= 1550
    			Hkey%Hk%KeyY:= 975
    		}
    		if (Hkey%Hk%Key = "MButton") {
    			Hkey%Hk%KeyX:= 1600
    			Hkey%Hk%KeyY:= 975
    		}
    		if (Hkey%Hk%Key = "RButton") {
    			Hkey%Hk%KeyX:= 1650
    			Hkey%Hk%KeyY:= 975
    		}
    	IniWrite, % Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX
    	IniWrite, % Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY
    	gosub KeywriteRouting
    Return
    ;======================================================
    KeyWrite1:
    		if (Hkey%Hk%Key%TrigN% = "Q") {
    			Hkey%Hk%Key%TrigN%X:= 1440
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "W") {
    			Hkey%Hk%Key%TrigN%X:= 1495
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "E") {
    			Hkey%Hk%Key%TrigN%X:= 1550
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "R") {
    			Hkey%Hk%Key%TrigN%X:= 1605
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "T") {
    			Hkey%Hk%Key%TrigN%X:= 1655
    			Hkey%Hk%Key%TrigN%Y:= 1045
    		}
    		if (Hkey%Hk%Key%TrigN% = "LButton") {
    			Hkey%Hk%Key%TrigN%X:= 1550
    			Hkey%Hk%Key%TrigN%Y:= 975
    		}
    		if (Hkey%Hk%Key%TrigN% = "MButton") {
    			Hkey%Hk%Key%TrigN%X:= 1600
    			Hkey%Hk%Key%TrigN%Y:= 975
    		}
    		if (Hkey%Hk%Key%TrigN% = "RButton") {
    			Hkey%Hk%Key%TrigN%X:= 1650
    			Hkey%Hk%Key%TrigN%Y:= 975
    		}
    	IniWrite, % Hkey%Hk%Key%TrigN%X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%X
    	IniWrite, % Hkey%Hk%Key%TrigN%Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%Y
    Return
    ;======================================================
    KeywriteRouting:
    	if (A_GuiControlHk is Integer) {
    		Hk := 0
    		A_GuiControlHk := ""
    		Gosub HkeyEdit
    	} else {
    		Hk += 1
    		Gosub HkTypeConfigRouting
    	}
    Return
    ;======================================================
    GuiSD:
        Gui, Submit
        Gui, Destroy
    	GuiToggle := 0
    Return
    ;======================================================
    LoadSocketLists:
    	SocketList := [ ["6SocketWeaponTopRightSocket",     72,  80 ]
    				  , ["6SocketWeaponTopCenterSocket",    149, 80 ]
    				  , ["6SocketWeaponMiddleRightSocket",  71,  155]
    				  , ["6SocketWeaponMiddleCenterSocket", 149, 155]
    				  , ["6SocketWeaponBottomRightSocket",  72,  230]
    				  , ["6SocketWeaponBottomCenterSocket", 149, 230]
    				  , ["RightWeaponTopSocket",            111, 80 ]
    				  , ["RightWeaponMiddleSocket",         111, 155]
    				  , ["RightWeaponBottomSocket",         111, 230]
    				  , ["RightWeaponTopRightSocket",       84,  118]
    				  , ["RightWeaponTopCenterSocket",      137, 118]
    				  , ["RightWeaponBottomCenterSocket",   137, 193]
    				  , ["LeftHandTopSocket",               523, 80 ]
    				  , ["LeftHandMiddleSocket",            523, 155]
    				  , ["LeftHandBottomSocket",            523, 230]
    				  , ["LeftHandTopCenterSocket",         496, 118]
    				  , ["LeftHandTopLeftSocket",           550, 118]
    				  , ["LeftHandBottomLeftSocket",        550, 193]
    				  , ["LeftHandMiddleCenterSocket",      485, 155]
    				  , ["LeftHandMiddleLeftSocket",        561, 155]
    				  , ["HelmetTopRightSocket",            279, 51 ]
    				  , ["HelmetTopLeftSocket",             355, 51 ]
    				  , ["HelmetBottomRightSocket",         279, 127]
    				  , ["HelmetBottomLeftSocket",          355, 127]
    				  , ["HelmetMiddleRightSocket",         279, 87 ]
    				  , ["HelmetMiddleLeftSocket",          355, 87 ]
    				  , ["HelmetMiddleSocket",              317, 87 ]
    				  , ["GlovesTopRightSocket",            151, 287]
    				  , ["GlovesTopCenterSocket",           224, 287]
    				  , ["GlovesBottomRightSocket",         151, 362]
    				  , ["GlovesBottomCenterSocket",        224, 362]
    				  , ["GlovesMiddleRightSocket",         151, 324]
    				  , ["GlovesMiddleCenterSocket",        224, 324]
    				  , ["GlovesMiddleSocket",              187, 324]
    				  , ["4SocketArmorTopRightSocket",      293, 202]
    				  , ["4SocketArmorTopLeftSocket",       343, 202]
    				  , ["4SocketArmorBottomRightSocket",   293, 265]
    				  , ["4SocketArmorBottomLeftSocket",    343, 265]
    				  , ["6SocketArmorTopRightSocket",      281, 170]
    				  , ["6SocketArmorTopLeftSocket",       355, 170]
    				  , ["6SocketArmorMiddleRightSocket",   281, 233]
    				  , ["6SocketArmorMiddleLeftSocket",    355, 233]
    				  , ["6SocketArmorBottomRightSocket",   281, 296]
    				  , ["6SocketArmorBottomLeftSocket",    355, 296]
    				  , ["1SocketArmorMiddleSocket",        317, 234]
    				  , ["BootsTopCenterSocket",            411, 287]
    				  , ["BootsTopLeftSocket",              484, 287]
    				  , ["BootsBottomCenterSocket",         411, 362]
    				  , ["BootsBottomLeftSocket",           484, 362]
    				  , ["BootsMiddleCenterSocket",         411, 324]
    				  , ["BootsMiddleLeftSocket",           484, 324]
    				  , ["BootsMiddleSocket",               447, 324]
    				  , ["RightFingerSocket",               213, 232]
    				  , ["LeftFingerSocket",                421, 232]
    				  , ["AmuletSocket",                    421, 167]
    				  , ["BeltRightSocket",                 293, 350]
    				  , ["BeltCenterSocket",                317, 350]
    				  , ["BeltLeftSocket",                  343, 350]
    				  , ["Flask1",                          218, 440]
    				  , ["Flask2",                          270, 440]
    				  , ["Flask3",                          322, 440]
    				  , ["Flask4",                          375, 440]
    				  , ["Flask5",                          427, 440] ]
    	SocketCoordList := [ ["6SocketWeaponTopRightSocket",     1355, 170]
    					   , ["6SocketWeaponTopCenterSocket",    1405, 170]
    					   , ["6SocketWeaponMiddleRightSocket",  1355, 225]
    					   , ["6SocketWeaponMiddleCenterSocket", 1405, 225]
    					   , ["6SocketWeaponBottomRightSocket",  1355, 280]
    					   , ["6SocketWeaponBottomCenterSocket", 1405, 280]
    					   , ["RightWeaponTopSocket",            1380, 170]
    					   , ["RightWeaponMiddleSocket",         1380, 225]
    					   , ["RightWeaponBottomSocket",         1380, 280]
    					   , ["RightWeaponTopRightSocket",       1355, 200]
    					   , ["RightWeaponTopCenterSocket",      1405, 200]
    					   , ["RightWeaponBottomCenterSocket",   1405, 250]
    					   , ["LeftHandTopSocket",               1795, 170]
    					   , ["LeftHandMiddleSocket",            1795, 225]
    					   , ["LeftHandBottomSocket",            1795, 280]
    					   , ["LeftHandTopCenterSocket",         1765, 200]
    					   , ["LeftHandTopLeftSocket",           1820, 200]
    					   , ["LeftHandBottomLeftSocket",        1820, 250]
    					   , ["LeftHandMiddleCenterSocket",      1770, 225]
    					   , ["LeftHandMiddleLeftSocket",        1820, 225]
    					   , ["HelmetTopRightSocket",            1560, 135]
    					   , ["HelmetTopLeftSocket",             1615, 135]
    					   , ["HelmetBottomRightSocket",         1560, 185]
    					   , ["HelmetBottomLeftSocket",          1615, 185]
    					   , ["HelmetMiddleRightSocket",         1560, 160]
    					   , ["HelmetMiddleLeftSocket",          1615, 160]
    					   , ["HelmetMiddleSocket",              1690, 160]
    					   , ["GlovesTopRightSocket",            1430, 370]
    					   , ["GlovesTopCenterSocket",           1485, 370]
    					   , ["GlovesBottomRightSocket",         1430, 420]
    					   , ["GlovesBottomCenterSocket",        1485, 420]
    					   , ["GlovesMiddleRightSocket",         1430, 395]
    					   , ["GlovesMiddleCenterSocket",        1485, 395]
    					   , ["GlovesMiddleSocket",              1455, 395]
    					   , ["4SocketArmorTopRightSocket",      1560, 275]
    					   , ["4SocketArmorTopLeftSocket",       1615, 275]
    					   , ["4SocketArmorBottomRightSocket",   1560, 333]
    					   , ["4SocketArmorBottomLeftSocket",    1615, 333]
    					   , ["6SocketArmorTopRightSocket",      1560, 250]
    					   , ["6SocketArmorTopLeftSocket",       1615, 250]
    					   , ["6SocketArmorMiddleRightSocket",   1560, 305]
    					   , ["6SocketArmorMiddleLeftSocket",    1615, 305]
    					   , ["6SocketArmorBottomRightSocket",   1560, 360]
    					   , ["6SocketArmorBottomLeftSocket",    1615, 360]
    					   , ["1SocketArmorMiddleSocket",        1585, 305]
    					   , ["BootsTopCenterSocket",            1690, 370]
    					   , ["BootsTopLeftSocket",              1740, 370]
    					   , ["BootsBottomCenterSocket",         1690, 420]
    					   , ["BootsBottomLeftSocket",           1740, 420]
    					   , ["BootsMiddleCenterSocket",         1690, 395]
    					   , ["BootsMiddleLeftSocket",           1740, 395]
    					   , ["BootsMiddleSocket",               1715, 395]
    					   , ["RightFingerSocket",               1485, 305]
    					   , ["LeftFingerSocket",                1690, 305]
    					   , ["AmuletSocket",                    1690, 245]
    					   , ["BeltRightSocket",                 1565, 420]
    					   , ["BeltCenterSocket",                1585, 420]
    					   , ["BeltLeftSocket",                  1605, 420]
    					   , ["Flask1",                          1487, 515]
    					   , ["Flask2",                          1540, 515]
    					   , ["Flask3",                          1592, 515]
    					   , ["Flask4",                          1645, 515]
    					   , ["Flask5",                          1697, 515] ]
    
    	AltSocketList := [ ["6SocketWeaponTopRightSocket",     72,  80,  1355, 170]
    					 , ["6SocketWeaponTopCenterSocket",    149, 80,  1405, 170]
    					 , ["6SocketWeaponMiddleRightSocket",  71,  155, 1355, 225]
    					 , ["6SocketWeaponMiddleCenterSocket", 149, 155, 1405, 225]
    					 , ["6SocketWeaponBottomRightSocket",  72,  230, 1355, 280]
    					 , ["6SocketWeaponBottomCenterSocket", 149, 230, 1405, 280]
    					 , ["RightWeaponTopSocket",            111, 80,  1380, 170]
    					 , ["RightWeaponMiddleSocket",         111, 155, 1380, 225]
    					 , ["RightWeaponBottomSocket",         111, 230, 1380, 280]
    					 , ["RightWeaponTopRightSocket",       84,  118, 1355, 200]
    					 , ["RightWeaponTopCenterSocket",      137, 118, 1405, 200]
    					 , ["RightWeaponBottomCenterSocket",   137, 193, 1405, 250]
    					 , ["LeftHandTopSocket",               523, 80,  1795, 170]
    					 , ["LeftHandMiddleSocket",            523, 155, 1795, 225]
    					 , ["LeftHandBottomSocket",            523, 230, 1795, 280]
    					 , ["LeftHandTopCenterSocket",         496, 118, 1765, 200]
    					 , ["LeftHandTopLeftSocket",           550, 118, 1820, 200]
    					 , ["LeftHandBottomLeftSocket",        550, 193, 1820, 250]
    					 , ["LeftHandMiddleCenterSocket",      485, 155, 1770, 225]
    					 , ["LeftHandMiddleLeftSocket",        561, 155, 1820, 225] ]
    return
    ;======================================================
    EquipRead:
    	for each, Socket in SocketList {
    		var1 := % socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		IniRead, %var2%, UnrapeKitConfig.ini, %Section%, %var2%, %A_Space%
    	}
    Return
    ;======================================================
    EquipWriteDelete:
    	for each, Socket in SocketList {
    		var1 := % Socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			IniWrite, % Hkey%Hk%%Swap%%var1%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%%var1%
    		} else {
    			IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%%var1%
    		}
    	}
    Return
    ;======================================================
    AltEquipRead:
    	for each, AltSocket in AltSocketList {
    		var1 := % AltSocket.1
    		var2 = Hkey%Hk%%Swap%Alt%var1%
    		var3:= % %var2%
    		IniRead, Hkey%Hk%%Swap%Alt%var1%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt%var1%, %A_Space%
    	}
    Return
    ;======================================================
    AltEquipWriteDelete:
    	for each, AltSocket in AltSocketList {
    		var1 := % AltSocket.1
    		var2 = Hkey%Hk%%Swap%Alt%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			IniWrite, % Hkey%Hk%%Swap%Alt%var1%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt%var1%
    		} else {
    			IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt%var1%
    		}
    	}
    Return
    ;======================================================
    AltEquipDelete:
    	for each, Socket in SocketList {
    		var1 := % Socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3:= % %var2%
    		IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%%var1%
    	}
    Return
    ;======================================================
    EquipCoord:
    	for each, SocketCoord in SocketCoordList {
    		var1 := % SocketCoord.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			Hkey%Hk%%Swap%_X := % socketCoord.2
    			Hkey%Hk%%Swap%_Y := % socketCoord.3
    		}
    	}
    Return
    ;======================================================
    AltEquipCoord:
    	for each, AltSocket in AltSocketList {
    		var1 := % AltSocket.1
    		var2 = Hkey%Hk%%Swap%Alt%var1%
    		var3:= % %var2%
    		if (var3 = 1) {
    			Hkey%Hk%%Swap%Alt_X := % Altsocket.4
    			Hkey%Hk%%Swap%Alt_Y := % Altsocket.5
    		}
    	}
    Return
    ;======================================================
    RemoveToolTip:
        ToolTip
    Return
    RemoveToolTip1:
        ToolTip,,,, 1
    Return
    RemoveToolTip2:
    	ToolTip,,,, 2
    return
    RemoveToolTip3:
    	ToolTip,,,, 3
    return
    RemoveToolTip4:
    	ToolTip,,,, 4
    return
    RemoveToolTip5:
    	ToolTip,,,, 5
    return
    RemoveToolTip6:
    	ToolTip,,,, 6
    return
    RemoveToolTip7:
    	ToolTip,,,, 7
    return
    RemoveToolTip8:
    	ToolTip,,,, 8
    return
    RemoveToolTip9:
    	ToolTip,,,, 9
    return
    RemoveToolTip10:
    	ToolTip,,,, 10
    return
    RemoveToolTip11:
    	ToolTip,,,, 11
    return
    RemoveToolTip12:
    	ToolTip,,,, 12
    return
    RemoveToolTip13:
    	ToolTip,,,, 13
    return
    RemoveToolTip14:
    	ToolTip,,,, 14
    return
    RemoveToolTip15:
    	ToolTip,,,, 15
    return
    RemoveToolTip16:
    	ToolTip,,,, 16
    return
    RemoveToolTip17:
    	ToolTip,,,, 17
    return
    RemoveToolTip18:
    	ToolTip,,,, 18
    return
    RemoveToolTip19:
    	ToolTip,,,, 19
    return
    RemoveToolTip20:
    	ToolTip,,,, 20
    return
    ;======================================================End of GeneralFunctions======================================================
    
    
    
    ;======================================================IniSettings======================================================
    IniLoad:
    	IniRead, ScanCount, UnrapeKitConfig.ini, Configuration, ScanCount, %A_Space%
    	IniRead, HotkeyLimit, UnrapeKitConfig.ini, Configuration, HotkeyLimit, %A_Space%
    	IniRead, HotkeyConfig, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, HotkeyConfig, %A_Space%
    	IniRead, ScanConfig, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScanConfig, %A_Space%
    	IniRead, SpellScan, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, SpellScan, %A_Space%
    	IniRead, ScreenCapture, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScreenCapture, %A_Space%
    	IniRead, DelayConfig, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, DelayConfig, %A_Space%
    	IniRead, CaptureName, UnrapeKitConfig.ini, Scan, CaptureName, %A_Space%
    	Hotkey, %HotkeyConfig%, HotkeyConfig
    	Hotkey, %ScanConfig%, ScanConfig
    	Hotkey, %SpellScan%, SpellScan
    	Hotkey, %ScreenCapture%, ScreenCapture
    	Hotkey, %DelayConfig%, DelayConfig
    return
    ;======================================================
    SetupConfig:
    	gosub GuiSD
    	IniWrite, %ScanCount%, UnrapeKitConfig.ini, Configuration, ScanCount
    	IniWrite, %HotkeyConfig%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, HotkeyConfig
    	IniWrite, %ScanConfig%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScanConfig
    	IniWrite, %SpellScan%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, SpellScan
    	IniWrite, %ScreenCapture%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, ScreenCapture
    	IniWrite, %DelayConfig%, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, DelayConfig
    	Hotkey, %HotkeyConfig%, HotkeyConfig
    	Hotkey, %ScanConfig%, ScanConfig
    	Hotkey, %SpellScan%, SpellScan
    	Hotkey, %ScreenCapture%, ScreenCapture
    	Hotkey, %DelayConfig%, DelayConfig
    	Reload
    Return
    ;======================================================
    HotkeySetupRead:
        Loop, %HotKeyLimit% {
    		IniRead, Hkey%A_Index%Toggle, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%A_Index%Toggle, %A_Space%
    		IniRead, Hkey%A_Index%Type, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%A_Index%Type, %A_Space%
    		IniRead, Hkey%A_Index%Shortcut, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%A_Index%Shortcut, %A_Space%
    	}
    return
    ;======================================================
    LoadScanSettings:
        IniRead, ScreenCapturePos, UnrapeKitConfig.ini, %Section%, ScreenCapturePos, %A_Space%
        IniRead, SaveHotkey, UnrapeKitConfig.ini, %Section%, SaveHotkey, %A_Space%
        IniRead, SaveAsHotkey, UnrapeKitConfig.ini, %Section%, SaveAsHotkey, %A_Space%
        IniRead, CloseHotkey, UnrapeKitConfig.ini, %Section%, CloseHotkey, %A_Space%
        IniRead, YesHotkey, UnrapeKitConfig.ini, %Section%, YesHotkey, %A_Space%
        IniRead, AddressBarHotkey, UnrapeKitConfig.ini, %Section%, AddressBarHotkey, %A_Space%
        IniRead, SaveAsWindowName, UnrapeKitConfig.ini, %Section%, SaveAsWindowName, %A_Space%
        IniRead, ConfirmSaveAsWindowName, UnrapeKitConfig.ini, %Section%, ConfirmSaveAsWindowName, %A_Space%
        IniRead, SnippingToolWindowName, UnrapeKitConfig.ini, %Section%, SnippingToolWindowName, %A_Space%
        IniRead, SnippingToolPath, UnrapeKitConfig.ini, %Section%, SnippingToolPath, %A_Space%
    return
    ;======================================================
    ScanReadLoad:
    	Loop, %ScanCount% {
    		IniRead, Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%, %A_Space%
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%, %A_Space%
    		IniRead, Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%, %A_Space%
    		NameN:= % Name%A_Index%
    		IconToggleN:= % IconToggle%A_Index%
    		LineN:= % Line%A_Index%
    		CaptureName%A_Index%:= % Name%A_Index% "" Line%A_Index%
    		IniRead, %NameN%X, UnrapeKitConfig.ini, %Section%, %NameN%X, %A_Space%
    		IniRead, %NameN%Y, UnrapeKitConfig.ini, %Section%, %NameN%Y, %A_Space%
    	}
    return
    ;======================================================
    WriteScanSettings:
        IniWrite, %SaveAsHotkey%, UnrapeKitConfig.ini, %Section%, SaveAsHotkey
        IniWrite, %CloseHotkey%, UnrapeKitConfig.ini, %Section%, CloseHotkey
        IniWrite, %YesHotkey%, UnrapeKitConfig.ini, %Section%, YesHotkey
        IniWrite, %AddressBarHotkey%, UnrapeKitConfig.ini, %Section%, AddressBarHotkey
        IniWrite, %SaveAsWindowName%, UnrapeKitConfig.ini, %Section%, SaveAsWindowName
        IniWrite, %ConfirmSaveAsWindowName%, UnrapeKitConfig.ini, %Section%, ConfirmSaveAsWindowName
        IniWrite, %SnippingToolWindowName%, UnrapeKitConfig.ini, %Section%, SnippingToolWindowName
        IniWrite, %SnippingToolPath%, UnrapeKitConfig.ini, %Section%, SnippingToolPath
    return
    ;======================================================
    DelayRead:
    	IniRead, Delay, UnrapeKitConfig.ini, Delay%LineSpacing2%, Delay, %A_Space%
    	IniRead, FrameTime, UnrapeKitConfig.ini, Delay%LineSpacing2%, FrameTime, %A_Space%
    	IniRead, KeyDelay1, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelay1, %A_Space%
    	IniRead, KeyDelayPress, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelayPress, %A_Space%
    	IniRead, MouseDelay, UnrapeKitConfig.ini, Delay%LineSpacing2%, MouseDelay, %A_Space%
    	SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
    	SetMouseDelay, %MouseDelay%
    return
    ;======================================================
    Type1Load:
    	Section = Type1Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%T1V, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1V, %A_Space%
    	If (Hkey%Hk%T1V = 1) {
    		IniRead, Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount, %A_Space%
    		IniRead, Hkey%Hk%ScanDelay, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanDelay
    		Loop {
    			IniRead, Hkey%Hk%Spell%A_Index%, UnrapeKitConfig.ini, % Section, Hkey%Hk%Spell%A_Index%, %A_Space%
    			Spell:= Hkey%Hk%Spell%A_Index%
    			IniRead, %Spell%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell%X, %A_Space%
    			IniRead, %Spell%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell%Y, %A_Space%
    			IniRead, Hkey%Hk%TriggerToggle%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggerToggle%A_Index%, %A_Space%
    			Iniread, Hkey%Hk%Key%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%, %A_Space%
    			IniRead, Hkey%Hk%Key%A_Index%X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%X, %A_Space%
    			IniRead, Hkey%Hk%Key%A_Index%Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%Y, %A_Space%
    			IniRead, Hkey%Hk%Cooldown%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%A_Index%, %A_Space%
    			If (A_Index > Hkey%Hk%TriggeredCount)
    				Break
    		}
    	}
    	If (Hkey%Hk%T1V = 2) {
    		TrigN:= 1
    		Iniread, T1%Hk%, UnrapeKitConfig.ini, %Section%, T1%Hk%, %A_Space%
    		Iniread, Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount, %A_Space%
    		IniRead, ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%, %A_Space%
    		Loop, % (Hkey%Hk%TriggeredCount + 1) {
    			Iniread, HHkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%, %A_Space%
    			Iniread, HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%, %A_Space%
    		}
    		TrigN:= 1
    	}
    	If (Hkey%Hk%T1V = 3) {
    		TrigN:= 1
    		Iniread, TriggeredCount%Hk%, UnrapeKitConfig.ini, %Section%, TriggeredCount%Hk%, %A_Space%
    		IniRead, ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%, %A_Space%
    		Loop, % (TriggeredCount%Hk% + 1) {
    			Iniread, HHkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%, %A_Space%
    			Iniread, HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%, %A_Space%
    			Iniread, Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%, %A_Space%
    			TrigN+= 1
    		}
    		TrigN:= 1
    	}
    Return
    ;======================================================
    Type2Load:
    	Section = Type2Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key, %A_Space%
    	IniRead, Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX, %A_Space%
    	IniRead, Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY, %A_Space%
    	IniRead, Hkey%Hk%MoveToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MoveToggle, %A_Space%
    	IniRead, Hkey%Hk%ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShiftToggle, %A_Space%
    	IniRead, Hkey%Hk%AltEquiptoggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%AltEquiptoggle, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%Y, %A_Space%
    return
    ;======================================================
    Type3Load:
    	Section = Type3Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1, %A_Space%
    	IniRead, Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2, %A_Space%
    	IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key, %A_Space%
    	IniRead, Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX, %A_Space%
    	IniRead, Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY, %A_Space%
    	IniRead, Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time, %A_Space%
    	IniRead, Hkey%Hk%Cast2Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Time, %A_Space%
    	IniRead, Hkey%Hk%Cast1ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1ShiftToggle, %A_Space%
    	IniRead, Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle, %A_Space%
    	IniRead, Hkey%Hk%Cast2Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Toggle, %A_Space%
    	IniRead, Hkey%Hk%Cast2ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2ShiftToggle, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	Spell2:= Hkey%Hk%Spell2
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%Y, %A_Space%
    return
    ;======================================================
    Type4Load:
    	Section = Type4Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniRead, Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time
    	IniRead, Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle
    	IniRead, Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key, %A_Space%
    	IniRead, Hkey%Hk%KeyX, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX, %A_Space%
    	IniRead, Hkey%Hk%KeyY, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY, %A_Space%
    	Spell1:= Hkey%Hk%Spell1
    	IniRead, %Spell1%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%X, %A_Space%
    	IniRead, %Spell1%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell1%Y, %A_Space%
    	IniRead, %Spell2%X, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%X, %A_Space%
    	IniRead, %Spell2%Y, UnrapeKitConfig.ini, ScanCoordinates%LineSpacing2%, %Spell2%Y, %A_Space%
    return
    ;======================================================
    Type5Load:
    	Section = Type5Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab, %A_Space%
    	IniRead, Hkey%Hk%GemSwap1_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1_X, %A_Space%
    	IniRead, Hkey%Hk%GemSwap1_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1_Y, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2_X, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2_Y, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Alt_X, %A_Space%
    	IniRead, Hkey%Hk%GemSwap2Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Alt_Y, %A_Space%
    return
    ;======================================================
    Type6Load:
    	Section = Type6Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap1_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1_X, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap1_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1_Y, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2_X, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2_Y, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Alt_X, %A_Space%
    	IniRead, Hkey%Hk%EquipSwap2Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Alt_Y, %A_Space%
    return
    ;======================================================
    Type7Load:
    	Section = Type7Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations, %A_Space%
    	IniRead, Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, SwapTabs, Hkey%Hk%GemSwapTab, %A_Space%
    	IniRead, Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, SwapTabs, Hkey%Hk%EquipSwapTab, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniRead, Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniRead, Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_L, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_L, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_T, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_T, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_R, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_R, %A_Space%
    		IniRead, Hkey%Hk%ScanCoordinatesIteration%T7%_B, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_B, %A_Space%
    		IniRead, Hkey%Hk%ImageNameIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ImageNameIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%ShadeVariationIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShadeVariationIteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%GemSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%GemSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%GemSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_X, %A_Space%
    		IniRead, Hkey%Hk%EquipSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_Y, %A_Space%
    		IniRead, Hkey%Hk%KeyX_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX_Iteration%T7%, %A_Space%
    		IniRead, Hkey%Hk%KeyY_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY_Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    ;======================================================
    Type7Write:
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iterations, %A_Space%
    	IniWrite, % Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab, %A_Space%
    	IniWrite, % Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab, %A_Space%
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%DelayIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%Toggle, %A_Space%
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SpellIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%SendIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseXPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MouseYPosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GoMousePosIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GetMousePosToggleIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_L, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_L, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_T, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_T, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_R, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_R, %A_Space%
    		IniWrite, % Hkey%Hk%ScanCoordinatesIteration%T7%_B, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanCoordinatesIteration%T7%_B, %A_Space%
    		IniWrite, % Hkey%Hk%ImageNameIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ImageNameIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%ShadeVariationIteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShadeVariationIteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap1Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%GemSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwap2AltIteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap1Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap1Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap1Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2Iteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2Iteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2Iteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2AltIteration%T7%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_X, %A_Space%
    		IniWrite, % Hkey%Hk%EquipSwap2AltIteration%T7%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwap2AltIteration%T7%_Y, %A_Space%
    		IniWrite, % Hkey%Hk%KeyX_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyX_Iteration%T7%, %A_Space%
    		IniWrite, % Hkey%Hk%KeyY_Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%KeyY_Iteration%T7%, %A_Space%
    		T7 += 1
    	}
    	T7:= 1
    return
    ;======================================================
    Type7Write2:
    	Loop, % Hkey%Hk%Iterations {
    		IniWrite, % Hkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Iteration%T7%
    	}
    return
    ;======================================================End of IniSettings======================================================
    
    
    ;======================================================HotkeyConfig======================================================
    HotkeyConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, Hotkeys wanted:
    	Gui, Add, Text, x50 y33, 200 Hotkeys Maximum
    	Gui, Add, Edit, x10 y30 w30 h20 vHotkeyLimit, %HotkeyLimit%
    	Gui, Add, Button, x10 y70 w90 h20 gHkeyEdit Default, Hotkeys
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Hotkey Count
    Return
    ;======================================================
    HkeyEdit:
    	gosub GuiSD
        if (HotkeyLimit < 1 or HotkeyLimit > 200) {
    		msgbox Invalid entry: reloading script
    		SetTimer, RemoveToolTip2, -1000
    		Reload
    	}
    	gosub GuiSD
    	IniWrite, %HotkeyLimit%, UnrapeKitConfig.ini, Configuration, HotkeyLimit
    	H:= 1
    	W:= 1
    	HMax:= 1
    	Hk:= 1
    	MouseGetPos, Xpos, Ypos
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Loop, %HotkeyLimit% {
    		GuiY:= 120 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    			If (GuiY > ScreenHeight) {
    				W+= 1
    				HMax:= H
    				H= 1
    			}
    		Y0:= 14 + 30 * H
    		Y1:= 13 + 30 * H
    		Y2:= 10 + 30 * H
    		GuiWidth:= 610 * W
    			If (W = 1) {
    				GuiHeight:= 80 + 30 * H
    				ButtonHeight:= 50 + 30 * H
    				ButtonTxtHeight:= 53 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 80 + 30 * HMax
    				ButtonHeight:= 50 + 30 * HMax
    				ButtonTxtHeight:= 53 + 30 * HMax
    			}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		Text1X:= GuiWidth - 550
    		Radio0X:= GuiWidth - 590
    		loop, 7 {
    			Radio%A_Index%X:= GuiWidth - (560 - (40 * A_Index))
    		}
    		EditX:= GuiWidth - 240
    		EditButtonX:= GuiWidth -100
    		Radio0Txt:= GuiWidth - 600
    		loop, 7 {
    			Radio%A_Index%Txt:= GuiWidth - (570 - (40 * A_Index))
    		}
    		EditTxt:= GuiWidth - 220
    		EditButtonTxt:= GuiWidth -85
    		Gui, Add, Text, x%Radio0Txt% y20,Disable  Index
    		loop, 7 {
    			RadioTxt:= Radio%A_Index%Txt
    			Gui, Add, Text, x%RadioTxt% y20,Type %A_Index%
    		}
    		Gui, Add, Text, x%EditTxt% y20, Hotkey Shortcut
    		Gui, Add, Text, x%EditButtonTxt% y20, Hotkey Edit
    		Gui, Add, Text, x%Text1X% y%Y1%, %Hk%
    		Gui, Add, checkbox, % "X" Radio0x " Y" Y0 " h13 w13 vHkey" Hk "Toggle Checked" Hkey%Hk%Toggle
    		loop, 7 {
    			RadioX := Radio%A_Index%X
    			if (Hkey%Hk%Type = A_Index) {
    				HkeyType := 1
    			} else {
    				HkeyType := 0
    			}
    			Gui, Add, Radio, % "x" RadioX " y" Y1 " h13 w13 vHkey" Hk "Type" A_Index " Checked" HkeyType, A_Index
    		}
    		Gui, Add, Edit, x%EditX% y%Y2% w120 h20 vHkey%Hk%Shortcut, % Hkey%Hk%Shortcut
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditHk, %Hk%
    		If (Hk = HotkeyLimit) {
    			gosub GuiBuild
    			Gui, Add, Button, x10 y%ButtonHeight% w90 H20 gHkAdd, Add
    			Gui, Add, Text, x110 y%ButtonTxtHeight%,Add
    			Gui, Add, Edit, x140 y%ButtonHeight% w20 h20 vHotkeyAdd
    			Gui, Add, Text, x170 y%ButtonTxtHeight%,Hotkey(s)
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gRecordHk Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gSetHk, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Hotkey Configuration
    			Break
    		}
    	H+= 1
    	Hk+= 1
    	}
    	Hk := 0
    Return
    ;======================================================
    RecordWriteHk:
    	loop, 7 {
    		if (Hkey%Hk%Type%A_Index% = 1) {
    			Hkey%Hk%Type := A_Index
    			IniWrite, % Hkey%Hk%Toggle, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%Hk%Toggle
    			IniWrite, % Hkey%Hk%Type, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%Hk%Type
    			IniWrite, % Hkey%Hk%Shortcut, UnrapeKitConfig.ini, Hotkeys%LineSpacing1%, Hkey%Hk%Shortcut
    			if (Hkey%Hk%Shortcut != "" AND Hkey%Hk%Toggle = 1) {
    				Hotkey, % Hkey%Hk%Shortcut, Hotkey%Hk%
    			}
    		}
    	}
    return
    ;======================================================
    RecordHk:
    	gosub GuiSD
    	Hk:= 1
    	RecordToggle:= 1
    	Loop, %HotkeyLimit% {
    		gosub RecordWriteHk
    		Hk+= 1
    	}
    	Hk:= 1
    	gosub HkeyEdit
    Return
    ;======================================================
    HkAdd:
    	gosub GuiSD
    	HotkeyLimit+= %HotkeyAdd%
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub RecordWriteHk
    		Hk+= 1
    	}
    	gosub HkeyEdit
    Return
    
    SetHk:
    	gosub GuiSD
    	Hk:= 1
    	Loop, %HotkeyLimit% {
    		gosub RecordWriteHk
    		Hk+= 1
    	}
    	Hk:= 1
    	gosub HkTypeConfigLoop
    Return
    ;======================================================
    EditHk:
    	A_GuiControlHk:= A_GuiControl
    	Hk:= A_GuiControl
    	If (Hkey%Hk%Toggle = 0)
    		Hkey%Hk%Toggle = 1
    	gosub GuiSD
    	gosub HkTypeConfigRouting
    	gosub RecordWriteHk
    Return
    ;======================================================
    HkTypeConfigLoop:
    	Loop, HotkeyLimit {
    		If (Hkey%Hk%Toggle = 0) {
    			gosub HkTypeConfigRouting
    			break
    		}
    	}
    	Reload
    Return
    ;======================================================
    HkTypeConfigRouting:
    	loop, 7 {
    		If (Hkey%Hk%Type = A_Index) {
    			Gosub ConfigType%A_Index%
    			Break
    		}
    	}
    Return
    ;======================================================End of HotkeyConfig======================================================
    
    
    ;======================================================HotkeyRouting======================================================
    Hotkey1:
    	Hk:= 1
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey2:
    	Hk:= 2
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey3:
    	Hk:= 3
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey4:
    	Hk:= 4
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey5:
    	Hk:= 5
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey6:
    	Hk:= 6
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey7:
    	Hk:= 7
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey8:
    	Hk:= 8
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey9:
    	Hk:= 9
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey10:
    	Hk:= 10
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey11:
    	Hk:= 11
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey12:
    	Hk:= 12
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey13:
    	Hk:= 13
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey14:
    	Hk:= 14
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey15:
    	Hk:= 15
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey16:
    	Hk:= 16
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey17:
    	Hk:= 17
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey18:
    	Hk:= 18
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey19:
    	Hk:= 19
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey20:
    	Hk:= 20
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey21:
    	Hk:= 21
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey22:
    	Hk:= 22
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey23:
    	Hk:= 23
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey24:
    	Hk:= 24
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey25:
    	Hk:= 25
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey26:
    	Hk:= 26
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey27:
    	Hk:= 27
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey28:
    	Hk:= 28
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey29:
    	Hk:= 29
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey30:
    	Hk:= 30
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey31:
    	Hk:= 31
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey32:
    	Hk:= 32
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey33:
    	Hk:= 33
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey34:
    	Hk:= 34
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey35:
    	Hk:= 35
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey36:
    	Hk:= 36
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey37:
    	Hk:= 37
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey38:
    	Hk:= 38
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey39:
    	Hk:= 39
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey40:
    	Hk:= 40
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey41:
    	Hk:= 41
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey42:
    	Hk:= 42
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey43:
    	Hk:= 43
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey44:
    	Hk:= 44
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey45:
    	Hk:= 45
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey46:
    	Hk:= 46
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey47:
    	Hk:= 47
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey48:
    	Hk:= 48
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey49:
    	Hk:= 49
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey50:
    	Hk:= 50
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey51:
    	Hk:= 51
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey52:
    	Hk:= 52
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey53:
    	Hk:= 53
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey54:
    	Hk:= 54
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey55:
    	Hk:= 55
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey56:
    	Hk:= 56
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey57:
    	Hk:= 57
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey58:
    	Hk:= 58
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey59:
    	Hk:= 59
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey60:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey61:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey62:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey63:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey64:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey65:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey66:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey67:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey68:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey69:
    	Hk:= 60
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey70:
    	Hk:= 70
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey71:
    	Hk:= 71
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey72:
    	Hk:= 72
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey73:
    	Hk:= 73
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey74:
    	Hk:= 74
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey75:
    	Hk:= 75
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey76:
    	Hk:= 76
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey77:
    	Hk:= 77
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey78:
    	Hk:= 78
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey79:
    	Hk:= 79
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey80:
    	Hk:= 80
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey81:
    	Hk:= 81
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey82:
    	Hk:= 82
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey83:
    	Hk:= 83
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey84:
    	Hk:= 84
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey85:
    	Hk:= 85
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey86:
    	Hk:= 86
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey87:
    	Hk:= 87
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey88:
    	Hk:= 88
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey89:
    	Hk:= 89
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey90:
    	Hk:= 90
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey91:
    	Hk:= 91
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey92:
    	Hk:= 92
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey93:
    	Hk:= 93
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey94:
    	Hk:= 94
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey95:
    	Hk:= 95
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey96:
    	Hk:= 96
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey97:
    	Hk:= 97
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey98:
    	Hk:= 98
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey99:
    	Hk:= 99
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey100:
    	Hk:= 100
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey101:
    	Hk:= 101
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey102:
    	Hk:= 102
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey103:
    	Hk:= 103
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey104:
    	Hk:= 104
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey105:
    	Hk:= 105
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey106:
    	Hk:= 106
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey107:
    	Hk:= 107
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey108:
    	Hk:= 108
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey109:
    	Hk:= 109
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey110:
    	Hk:= 110
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey111:
    	Hk:= 111
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey112:
    	Hk:= 112
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey113:
    	Hk:= 113
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey114:
    	Hk:= 114
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey115:
    	Hk:= 115
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey116:
    	Hk:= 116
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey117:
    	Hk:= 117
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey118:
    	Hk:= 118
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey119:
    	Hk:= 119
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey120:
    	Hk:= 120
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey121:
    	Hk:= 121
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey122:
    	Hk:= 122
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey123:
    	Hk:= 123
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey124:
    	Hk:= 124
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey125:
    	Hk:= 125
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey126:
    	Hk:= 126
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey127:
    	Hk:= 127
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey128:
    	Hk:= 128
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey129:
    	Hk:= 129
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey130:
    	Hk:= 130
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey131:
    	Hk:= 131
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey132:
    	Hk:= 132
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey133:
    	Hk:= 133
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey134:
    	Hk:= 134
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey135:
    	Hk:= 135
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey136:
    	Hk:= 136
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey137:
    	Hk:= 137
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey138:
    	Hk:= 138
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey139:
    	Hk:= 139
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey140:
    	Hk:= 140
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey141:
    	Hk:= 141
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey142:
    	Hk:= 142
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey143:
    	Hk:= 143
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey144:
    	Hk:= 144
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey145:
    	Hk:= 145
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey146:
    	Hk:= 146
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey147:
    	Hk:= 147
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey148:
    	Hk:= 148
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey149:
    	Hk:= 149
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey150:
    	Hk:= 150
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey151:
    	Hk:= 151
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey152:
    	Hk:= 152
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey153:
    	Hk:= 153
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey154:
    	Hk:= 154
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey155:
    	Hk:= 155
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey156:
    	Hk:= 156
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey157:
    	Hk:= 157
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey158:
    	Hk:= 158
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey159:
    	Hk:= 159
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey160:
    	Hk:= 160
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    
    Hotkey170:
    	Hk:= 170
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey171:
    	Hk:= 171
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey172:
    	Hk:= 172
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey173:
    	Hk:= 173
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey174:
    	Hk:= 174
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey175:
    	Hk:= 175
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey176:
    	Hk:= 176
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey177:
    	Hk:= 177
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey178:
    	Hk:= 178
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey179:
    	Hk:= 179
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey180:
    	Hk:= 180
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey181:
    	Hk:= 181
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey182:
    	Hk:= 182
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey183:
    	Hk:= 183
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey184:
    	Hk:= 184
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey185:
    	Hk:= 185
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey186:
    	Hk:= 186
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey187:
    	Hk:= 187
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey188:
    	Hk:= 188
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey189:
    	Hk:= 189
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey190:
    	Hk:= 190
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey191:
    	Hk:= 191
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey192:
    	Hk:= 192
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey193:
    	Hk:= 193
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey194:
    	Hk:= 194
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey195:
    	Hk:= 195
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey196:
    	Hk:= 196
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey197:
    	Hk:= 197
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey198:
    	Hk:= 198
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey199:
    	Hk:= 199
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    
    Hotkey200:
    	Hk:= 200
    ;	Msgbox, % "Hotkey " Hk " is " Hkey%Hk%Shortcut
    	Gosub HotkeyRouting
    Return
    ;======================================================End of HotkeyRouting======================================================
    
    
    ;======================================================DelayConfig======================================================
    DelayConfig:
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 220
    	GuiHeight:= 160
    	gosub GuiBuild
    	Gui, Add, Text, x10 y13, Server Latency (ms)
    	Gui, Add, Edit, x140 y10 w30 h20 vDelay, %Delay%
    	Gui, Add, Text, x10 y43, Maximum Frame Time (Ms)
    	Gui, Add, Edit, x140 y40 w30 h20 vFrameTime, %FrameTime%
    	Gui, Add, Text, x10 y73, Keyboard Delays (Ms)
    	Gui, Add, Edit, x140 y70 w30 h20 vKeyDelay1, %KeyDelay1%
    	Gui, Add, Edit, x180 y70 w30 h20 vKeyDelayPress, %KeyDelayPress%
    	Gui, Add, Text, x10 y103, Mouse Delay (Ms)
    	Gui, Add, Edit, x140 y100 w30 h20 vMouseDelay, %MouseDelay%
    	Gui, Add, Button, x20 y130 w90 h20 gDelayConfigRecord Default, Record
    	Gui, Add, Button, x120 y130 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Delay configuration
    Return
    ;======================================================
    DelayWrite:
    	gosub GuiSD
    	IniWrite, %Delay%, UnrapeKitConfig.ini, Delay%LineSpacing2%, Delay
    	IniWrite, %FrameTime%, UnrapeKitConfig.ini, Delay%LineSpacing2%, FrameTime
    	IniWrite, %KeyDelay1%, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelay1
    	IniWrite, %KeyDelayPress%, UnrapeKitConfig.ini, Delay%LineSpacing2%, KeyDelayPress
    	IniWrite, %MouseDelay%, UnrapeKitConfig.ini, Delay%LineSpacing2%, MouseDelay
    return
    ;======================================================
    DelayConfigRecord:
    	gosub DelayWrite
    	Reload
    Return
    ;======================================================
    Delay:
    		MouseGetPos, Xpos, Ypos
    		GuiWidth:= 220
    		GuiHeight:= 160
    		gosub GuiBuild
    		Gui, Add, Text, x10 y13, Server Latency (ms)
    		Gui, Add, Edit, x140 y10 w30 h20 vDelay, %Delay%
    		Gui, Add, Text, x10 y43, Maximum Frame Time (Ms)
    		Gui, Add, Edit, x140 y40 w30 h20 vFrameTime, %FrameTime%
    		Gui, Add, Text, x10 y73, Keyboard Delays (Ms)
    		Gui, Add, Edit, x140 y70 w30 h20 vKeyDelay1, %KeyDelay1%
    		Gui, Add, Edit, x180 y70 w30 h20 vKeyDelayPress, %KeyDelayPress%
    		Gui, Add, Text, x10 y103, Mouse Delay (Ms)
    		Gui, Add, Edit, x140 y100 w30 h20 vMouseDelay, %MouseDelay%
    		Gui, Add, Button, x20 y130 w90 h20 gDelayRecord Default, Record
    		Gui, Add, Button, x120 y130 w90 h20 gCancel, Reload
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Server Latency
    Return
    ;======================================================
    DelayRecord:
    		gosub DelayWrite
    Return
    ;======================================================End of DelayConfig======================================================
    
    
    
    ;======================================================ScreenCapture======================================================
    ScreenCapture:
        C1_X:= 1443
        C2_X:= 1508
        C3_X:= 1573
        L1_Y:= 900
        L2_Y:= 835
        L3_Y:= 770
        L4_Y:= 705
        L5_Y:= 640
        L6_Y:= 575
        L7_Y:= 510
    	Section = ScreenCapture--------------------------------------------------------------------------------------------------
    	GuiWidth:= 310
    	GuiHeight:= 150
        gosub LoadScanSettings
    	MouseGetPos, Xpos, Ypos
    	gosub GuiBuild
        Gui, Add, Text, x10 y10, Controls for capture and UI coordinates.
        Gui, Add, Text, x10 y30, Spell menu suffix: line number bottom to top.
        Gui, Add, Text, x10 y50, keyboard shortcut suffix: "_MButton"', "_R"', etc
        Gui, Add, Text, x10 y70, Buff icons: manual Printscreen with suffix "Timer1" to "Timer8"
        Gui, Add, Checkbox, x10 y90 VScreenCapturePos Checked%ScreenCapturePos%, Checked: spell menu, unchecked: keyboard shortcuts.
        Gui, Add, Button, x10 y120 w90 gCaptureControls, PrtSc controls
        Gui, Add, Button, x110 y120 w90 gCancel, Cancel
        Gui, Add, Button, x210 y120 w90 gScreenCapture1 Default, Continue
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, Capture Gui positioning
    Return
    ;======================================================
    CaptureControls:
    	gosub GuiSD
        IniWrite, %ScreenCapturePos%, UnrapeKitConfig.ini, %Section%, ScreenCapturePos
    	GuiWidth:= 300
    	GuiHeight:= 380
    	gosub GuiBuild
        Gui, Add, Text, x10 y10 w280, Enter the Windows hotkeys for your specific language here
        Gui, Add, Text, x10 y25 w280, Hotkey syntax: ^ (Ctrl), ! (Alt), + (Shift), # (Win).
        Gui, Add, Text, x10 y40 w280,  Examples: ^!c for Ctrl+Alt+C
        Gui, Add, Edit, x10 y70 w100 h20 vSaveHotkey, % SaveHotkey
        Gui, Add, Text, % "x" 120 " y" 73, SaveHotkey
        Gui, Add, Edit, x10 y100 w100 h20 vSaveAsHotkey, % SaveAsHotkey
        Gui, Add, Text, % "x" 120 " y" 103, SaveAsHotkey
        Gui, Add, Edit, x10 y130 w100 h20 vCloseHotkey, % CloseHotkey
        Gui, Add, Text, % "x" 120 " y" 133, CloseHotkey
        Gui, Add, Edit, x10 y160 w100 h20 vYesHotkey, % YesHotkey
        Gui, Add, Text, % "x" 120 " y" 163, YesHotkey
        Gui, Add, Edit, x10 y190 w100 h20 vAddressBarHotkey, % AddressBarHotkey
        Gui, Add, Text, % "x" 120 " y" 193, AddressBarHotkey
        Gui, Add, Edit, x10 y220 w100 h20 vSaveAsWindowName, % SaveAsWindowName
        Gui, Add, Text, % "x" 120 " y" 223, SaveAsWindowName
        Gui, Add, Edit, x10 y250 w100 h20 vConfirmSaveAsWindowName, % ConfirmSaveAsWindowName
        Gui, Add, Text, % "x" 120 " y" 253, ConfirmSaveAsWindowName
        Gui, Add, Edit, x10 y280 w100 h20 vSnippingToolWindowName, % SnippingToolWindowName
        Gui, Add, Text, % "x" 120 " y" 283, SnippingToolWindowName
        Gui, Add, Edit, x10 y310 w100 h20 vSnippingToolPath, % SnippingToolPath
        Gui, Add, Text, % "x" 120 " y" 313, SnippingToolPath
    ; Run on PowerShell as admin: "Get-AppXPackage *Microsoft.ScreenSketch* -AllUsers" , then paste the directory on a browser to navigate to the correct directory (these might not work well though).
    
        Gui, Add, Button, x10 y350 w135 gCaptureSave Default, Save and Continue
        Gui, Add, Button, x155 y350 w135 gCancel, Cancel
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, Language Settings and top-left snip coordinates
    Return
    ;======================================================
    CaptureSave:
    	gosub GuiSD
    	gosub WriteScanSettings
    	gosub ScreenCapture
    Return
    ;======================================================
    ScreenCapture1:
        if (ScreenCapturePos = 1) {
            IniRead, TempName, UnrapeKitConfig.ini, %Section%, TempName
            IniRead, TempLine, UnrapeKitConfig.ini, %Section%, TempLine
            IniRead, TempColumn, UnrapeKitConfig.ini, %Section%, TempColumn
            N := ScanCount + 1
            GuiWidth:= 210
            GuiHeight:= 130
            gosub GuiBuild
            Gui, Add, Text, x10 y10 w190, lines: 1 to 7`, columns: 1 to 3
            Gui, Add, Text, x10 y40, name                                   line    Column
            Gui, Add, Edit, x10 y60 w120 h20 vTempName, %TempName%
            Gui, Add, Edit, x+10 w20 h20 vTempLine, %TempLine%
            Gui, Add, Edit, x+10 w20 h20 vTempColumn, %TempColumn%
            Gui, Add, Button, x10 y100 w90 h20 gCaptureSave1 Default, Ok
            Gui, Add, Button, x110 y100 w90 h20 gCancel, Reload
            Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, name`, menu line and column coordinates
        }
        if (ScreenCapturePos = 0) {
        IniRead, TempName, UnrapeKitConfig.ini, %Section%, TempName
        IniRead, TempLine, UnrapeKitConfig.ini, %Section%, TempLine
        IniRead, TempColumn, UnrapeKitConfig.ini, %Section%, TempColumn
        N := ScanCount + 1
    	GuiWidth:= 210
    	GuiHeight:= 160
        gosub GuiBuild
        Gui, Add, Text, x10 y10 w190, column is the shortcut: : "_LButton"'
        Gui, Add, Text, x10 y50, name                                    Keyboard shortcut
        Gui, Add, Edit, x10 y7 w120 h20 vTempName, %TempName%
        Gui, Add, Edit, x+10 w70 h20 vTempLine, %TempLine%
        Gui, Add, Button, x10 y100 w90 h20 gCaptureSave1 Default, Ok
        Gui, Add, Button, x110 y100 w90 h20 gCancel, Reload
        Gui, Show, % "w" GuiWidth " h" GuiHeight " X" Move_X " Y" Move_Y, name', keyboard shortcut
        }
    return
    ;======================================================
    CaptureSave1:
        gosub GuiSD
        IniWrite, % TempName, UnrapeKitConfig.ini, %Section%, TempName
        IniWrite, % TempLine, UnrapeKitConfig.ini, %Section%, TempLine
        CaptureName := TempName TempLine
        if (ScreenCapturePos = 1) {
            IniWrite, % TempColumn, UnrapeKitConfig.ini, %Section%, TempColumn
            gosub SpellMenuUp
        } else {
            Gosub SnippingTool
        }
    return
    ;======================================================
    SpellMenuUp:
        loop {
            sleep, 50
            ImageSearch,,, C1_X - 10, L1_Y - 10, C3_X + 10, L1_Y + 10, *10 CloseMenu1.png
    ;        pixelsearch,,, 1439, 495, 1439, 495, 0x6490AB, 0, fast
                if (ErrorLevel = 0) {
                    break
                } else {
                    click,, 1440, 1037
                    sleep, 300
                }
        }
        Gosub SnippingTool
    return
    ;======================================================
    SnippingTool:
        if (ScreenCapturePos = 1) {
            loop, 3 {
                if (TempColumn = A_Index) {
                    CaptureX:= % C%A_Index%_X
                    break
                }
            }
            loop, 7 {
                if (TempLine = A_Index) {
                    CaptureY:= % L%A_Index%_Y
                    break
                }
            }
        } else {
            if (TempColumn = "Q") {
    			CaptureX:= 1438
    			CaptureY:= 1047
    		}
    		if (TempColumn = "W") {
    			CaptureX:= 1494
    			CaptureY:= 1047
    		}
    		if (TempColumn = "E") {
    			CaptureX:= 1550
    			CaptureY:= 1047
    		}
    		if (TempColumn = "R") {
    			CaptureX:= 1606
    			CaptureY:= 1047
    		}
    		if (TempColumn = "T") {
    			CaptureX:= 1662
    			CaptureY:= 1047
    		}
    		if (TempColumn = "LButton") {
    			CaptureX:= 1549
    			CaptureY:= 978
    		}
    		if (TempColumn = "MButton") {
    			CaptureX:= 1605
    			CaptureY:= 978
    		}
    		if (TempColumn = "RButton") {
    			CaptureX:= 1660
    			CaptureY:= 978
    		}
        }
        CenterDistance:= 13
        CaptureX1:= CaptureX - CenterDistance
        CaptureX2:= CaptureX + CenterDistance
        CaptureY1:= CaptureY - CenterDistance
        CaptureY2:= CaptureY + CenterDistance
        SendInput {PrintScreen}
        sleep, 500
        Send, #+s
        sleep, 400
        BlockInput, MouseMove
    	MouseClickDrag, L, CaptureX1, CaptureY1, CaptureX2, CaptureY2, 2
        sleep, 100
        BlockInput, MouseMoveOff
        sleep, 100
    ;    run C:\Program Files\WindowsApps\Microsoft.ScreenSketch_11.2407.3.0_x64__8wekyb3d8bbwe\SnippingTool\SnippingTool.exe
        sleep, 100
        Mousemove, 1750, 800, 2
        sleep, 500
        MouseClick, L
        sleep, 1000
        WinActivate, %SnippingToolWindowName%
        WinMaximize, %SnippingToolWindowName%
     ;   WinActivate, Snipping Tool
     ;   WinMaximize, Snipping Tool
        sleep, 300
    	MouseClick, L, 150, 20
        sleep, 300
        tooltip, Send, %SaveAsHotkey%
        Send, %SaveAsHotkey%
        sleep, 300
        tooltip, WinWait, %SaveAsWindowName%
        WinWait, %SaveAsWindowName%
        sleep, 300
        tooltip, SendInput %CaptureName%.png
        SendInput %CaptureName%.png
        sleep, 300
        tooltip, Send, %AddressBarHotkey%
        Send, %AddressBarHotkey%
        sleep, 300
        tooltip, SendInput %A_ScriptDir%
        SendInput %A_ScriptDir%
        sleep, 300
        tooltip, SendInput {Enter}
        SendInput {Enter}
        sleep, 300
        Send, %SaveHotkey%
    ;    Send, !s
        sleep, 300
        IfWinExist, %ConfirmSaveAsWindowName%
        {
            Send, %YesHotkey%
            ImageRepeat := 1
        } else {
            ImageRepeat := 0
        }
        sleep, 300
    ;    Send, !F4
    ;    MouseClick, L, 1910, 10
    ;    WinClose, Snipping Tool
        WinClose, %SnippingToolWindowName%
        if (ScreenCapturePos = 1) {
            gosub Cooldown1
        } else {
            gosub Icon1
        }
    return
    ;======================================================
    Icon1:
        CaptureX1 -= 5
        CaptureY1 -= 5
        CaptureX2 += 5
        CaptureY2 += 5
        SetMouseDelay, %MouseDelay%
        SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
        tooltip, gosub Icon2
        SetTimer, RemoveToolTip, -500
        gosub Icon2
    return
    ;======================================================
    Icon2:
        ImageSearch, %CaptureName%X, %CaptureName%Y, %CaptureX1%, %CaptureY1%, %CaptureX2%, %CaptureY2%, *10 %CaptureName%.png
            if (ErrorLevel = 2) {
                ToolTip, Could Not perform scan
            }
            else if (ErrorLevel = 1) {
                ToolTip, Could Not Find Scan %CaptureName%.png
            } else {
                ToolTip, %CaptureName%.png found
            }
        SetTimer, RemoveToolTip, -1000
        Section = BuffIconCoordinates--------------------------------------------------------------------------------------------------
        IniWrite, % CaptureX1, UnrapeKitConfig.ini, %Section%, %CaptureName%X
        IniWrite, % CaptureY1, UnrapeKitConfig.ini, %Section%, %CaptureName%Y
    return
    ;======================================================
    Cooldown1:
        if (CaptureX1 >= 1410 and CaptureX2 <= 1605 and CaptureY1 >= 410 and CaptureY2 <= 925) {
            CaptureX1 -= 5
            CaptureY1 -= 5
            CaptureX2 += 5
            CaptureY2 += 5
            SetMouseDelay, %MouseDelay%
            SetKeyDelay, %KeyDelay1%, %KeyDelayPress%
            tooltip, gosub Cooldown2
            SetTimer, RemoveToolTip, -500
            gosub Cooldown2
        } Else {
            tooltip, Capture coordinates out of bounds
            SetTimer, RemoveToolTip, -1000
            reload
        }
    return
    ;======================================================
    Cooldown2:
        if (ImageRepeat = 1) {
            Loop, 8 {  ; replaces a hotkey capture
                if (CaptureName = TempName%A_Index%) {
                    N := A_Index
                    break
                }
            }
        } else {
            ScanCount += 1
            N := ScanCount
        }
        Name%N%:= TempName
        Line%N%:= TempLine
        IconToggle%N%:= 1
        IniWrite, %ScanCount%, UnrapeKitConfig.ini, Configuration, ScanCount
        gosub Cooldown3
    return
    ;======================================================
    Cooldown3:
    	Mousemove, 1600, 1000, 2
        Sleep, 100
    	MouseClick
        Sleep, 1000
        ImageSearch, %TempName%X, %TempName%Y, %CaptureX1%, %CaptureY1%, %CaptureX2%, %CaptureY2%, *10 %CaptureName%.png
            if (ErrorLevel = 2) {
                ToolTip, Could Not perform scan
            }
            else if (ErrorLevel = 1) {
                ToolTip, Could Not Find Scan %CaptureName%.png
            } else {
                ToolTip, %CaptureName%.png found
            }
        SetTimer, RemoveToolTip, -1000
    	Section = ScanCoordinates--------------------------------------------------------------------------------------------------
        IniWrite, % CaptureX1, UnrapeKitConfig.ini, %Section%, %TempName%X
        IniWrite, % CaptureY1, UnrapeKitConfig.ini, %Section%, %TempName%Y
        IniWrite, % Name%N%, UnrapeKitConfig.ini, %Section%, Name%N%
        IniWrite, % Line%N%, UnrapeKitConfig.ini, %Section%, Line%N%
        IniWrite, % IconToggle%N%, UnrapeKitConfig.ini, %Section%, IconToggle%N%
    return
    ;======================================================End of ScreenCapture======================================================
    
    
    ;======================================================ScanConfig======================================================
    ScanConfig:
    	Section = ScanCoordinates%LineSpacing2%
    	IniRead, ScanCount, UnrapeKitConfig.ini, Configuration, ScanCount
    	MouseGetPos, Xpos, Ypos
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiBuild
    	Gui, Add, Text, x10 y5 w200 h26, Icons Count:
    	Gui, Add, Text, x10 y33 w120 h26, Scans:
    	Gui, Add, Edit, x145 y30 w30 h21 vScanCount, %ScanCount%
    	Gui, Add, Button, x10 y70 w90 h20 gScanDefinitions Default, Definitions
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Scan Count
    Return
    ;======================================================
    ScanDefinitions:
    	gosub GuiSD
    	IniWrite, %ScanCount%, UnrapeKitConfig.ini, Configuration, ScanCount
    		Loop, %ScanCount% {
    			IniRead, Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    			IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    			IniRead, Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    			NameN:= % Name%A_Index%
    			LineN:= % Line%A_Index%
    		}
    	H:= 1
    	W:= 1
    	HMax:= 1
    	SysGet, SGW, 71
    	MouseGetPos, Xpos, Ypos
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, X5 Y10, Toggle       SpellName       Line# (Bottom to Top)
    	Loop, %ScanCount% {
    		GuiY:= 50 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 95
    			If (GuiY > ScreenHeight) {
    					W+= 1
    					HMax:= H
    					H= 1
    			}
    		Y1:= 18 + 30 * H
    		Y2:= 15 + 30 * H
    		GuiWidth:= 240 * W
    			If (W = 1) {
    				GuiHeight:= 105 + 30 * H
    				AddHeight:= 48 + 30 * H
    				AddButtonHeight:= 45 + 30 * H
    				ButtonHeight:= 75 + 30 * H
    			}
    			If (W > 1) {
    				GuiHeight:= 105 + 30 * HMax
    				AddHeight:= 48 + 30 * HMax
    				AddButtonHeight:= 45 + 30 * HMax
    				ButtonHeight:= 75 + 30 * HMax
    			}
    		Button1Width:= GuiWidth - 200
    		Button2Width:= GuiWidth - 100
    		TextWidth:= GuiWidth - 215
    		CheckboxWidth:= GuiWidth - 230
    		NameWidth:= GuiWidth - 200
    		LineWidth:= GuiWidth - 60
    		Gui, Add, Text, x%TextWidth% Y%Y1%, %A_Index%
    		Gui, Add, Checkbox, % " x" CheckboxWidth " y" Y1 " h13 w13 vIconToggle" A_Index " Checked" IconToggle%A_Index%
    		Gui, Add, Edit, x%NameWidth% y%Y2% w130 h20 vName%A_Index%, % Name%A_Index%
    		Gui, Add, Edit, x%LineWidth% y%Y2% w50 h20 vLine%A_Index%, % Line%A_Index%
    			If (A_Index = ScanCount) {
    				X_Offset:= GuiWidth/2
    				Y_Offset:= GuiHeight/2
    				X_Limit:= A_ScreenWidth - X_Offset
    				Y_Limit:= A_ScreenHeight - Y_Offset
    				Mouse_X:= Xpos - X_Offset
    				Mouse_Y:= Ypos - Y_Offset
    					If Xpos between 0 and %X_Offset%
    						Move_X:= 0
    					If Xpos between %X_Offset% and %X_Limit%
    						Move_X:= Mouse_X
    					If Xpos between %X_Limit% and %A_ScreenWidth%
    						Move_X:= A_ScreenWidth - GuiWidth
    					If Ypos between 0 and %Y_Offset%
    						Move_Y:= 0
    					If Ypos between %Y_Offset% and %Y_Limit%
    						Move_Y:= Mouse_Y
    					If Ypos between %Y_Limit% and %A_ScreenHeight%
    						Move_Y:= A_ScreenHeight - GuiHeight - 30
    				Gui, Add, Button, x10 y%AddButtonHeight% w90 h20 gAddScan, Add
    				Gui, Add, Text, x110 y%AddHeight%, Add
    				Gui, Add, Edit, x140 y%AddButtonHeight% w30 h20 vXDefinitions
    				Gui, Add, Text, x180 y%AddHeight%, Definition(s)
    				Gui, Add, Button, x%Button1Width% y%ButtonHeight% w90 h20 gScanWrite Default, Record
    				Gui, Add, Button, x%Button2Width% y%ButtonHeight% w90 h20 gCancel, Reload
    				Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Scan Configuration
    				Break
    			}
    		H+= 1
    	}
    Return
    ;======================================================
    AddScan:
    	gosub, GuiSD
    	N:= 1
    	Loop, %ScanCount% {
    		IniWrite, % IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    		IniWrite, % Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    		IniWrite, % Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    		N+=1
    	}
    	ScanCount+= %XDefinitions%
    	Gosub ScanDefinitions
    Return
    ;======================================================
    ScanWrite:
    	gosub, GuiSD
    	Loop, %ScanCount% {
    		IniWrite, % IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    		IniWrite, % Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    		IniWrite, % Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    	}
    	Gosub SpellScan
    Return
    ;======================================================End of ScanConfig======================================================
    
    
    ;======================================================SpellScan======================================================
    SpellScan:
    Section = ScanCoordinates--------------------------------------------------------------------------------------------------
    ScanToolTip:= ""
    ScanMessage:= ""
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, 1660, 1025 ; t
    	MouseClick, , 1660, 1025 ; t
    	ToolTipIndex:= 1
    	Loop, %ScanCount% {
    		IniRead, IconToggle%A_Index%, UnrapeKitConfig.ini, %Section%, IconToggle%A_Index%
    		If (IconToggle%A_Index% = 1) {
    			ToolTipIndex += 1
    			IniRead, Name%A_Index%, UnrapeKitConfig.ini, %Section%, Name%A_Index%
    			IniRead, Line%A_Index%, UnrapeKitConfig.ini, %Section%, Line%A_Index%
    			NameN:= % Name%A_Index%
    			LineN:= % Line%A_Index%
    			CaptureName%A_Index%:= % Name%A_Index% "" Line%A_Index%
    			sleep, %Delay%
    			;sleep, 50
    			ImageSearch, %NameN%X, %NameN%Y, 1410, 410, 1605, 925, *10 %NameN%%LineN%.png
    				If(ErrorLevel = 0) {
    					ScanMessage:= % CaptureName%A_Index% ":= " %NameN%X "x, " %NameN%Y "y `n"
    					ScanToolTip.= ScanMessage
    					Tooltip, % ScanToolTip, 1700, 1050, 5
    					SetTimer, RemoveToolTip5, -9500
    					IniWrite, % %NameN%X, UnrapeKitConfig.ini, %Section%, %NameN%X
    					IniWrite, % %NameN%Y, UnrapeKitConfig.ini, %Section%, %NameN%Y
    				}
    				If(ErrorLevel = 1) {
    					ScanMessage:= % "----------------------`n" CaptureName%A_Index% " not found `n----------------------`n"
    					ScanToolTip.= ScanMessage
    					Tooltip, % ScanToolTip, 1700, 1050, 5
    					SetTimer, RemoveToolTip5, -5000
    				}
    				If(ErrorLevel = 2) {
    					ScanMessage:= % CaptureName%A_Index% ": Error `n"
    					ScanToolTip.= ScanMessage
    					Tooltip, % ScanToolTip, 1700, 1050, 5
    					SetTimer, RemoveToolTip5, -5000
    				}
    		}
    	}
    	Send, {Esc}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	MouseMove, Xpos, Ypos
    	SetTimer, RemoveTooltip, -1000
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of SpellScan======================================================
    
    
    ;======================================================Type1======================================================
    Type1:
    	If (Hkey%Hk%T1V = 1) {
    		Gosub V1Loop
    		return
    	}
    	If (Hkey%Hk%T1V = 2) or (Hkey%Hk%T1V = 3){
    		Loop {
    			If (HKey%Hk%Key%A_Index% = "LButton") {
    				HKey%Hk%Tx%A_Index%:= 1549
    				HKey%Hk%Ty%A_Index%:= 952
    			}
    			If (HKey%Hk%Key%A_Index% = "MButton") {
    				HKey%Hk%Tx%A_Index%:= 1604
    				HKey%Hk%Ty%A_Index%:= 952
    			}
    			If (HKey%Hk%Key%A_Index% = "RButton") {
    				HKey%Hk%Tx%A_Index%:= 1660
    				HKey%Hk%Ty%A_Index%:= 952
    			}
    			If (HKey%Hk%Key%A_Index% = "Q") {
    				HKey%Hk%Tx%A_Index%:= 1438
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "W") {
    				HKey%Hk%Tx%A_Index%:= 1493
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "E") {
    				HKey%Hk%Tx%A_Index%:= 1549
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "R") {
    				HKey%Hk%Tx%A_Index%:= 1605
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			If (HKey%Hk%Key%A_Index% = "T") {
    				HKey%Hk%Tx%A_Index%:= 1661
    				HKey%Hk%Ty%A_Index%:= 1021
    			}
    			PixelGetColor, HKey%Hk%color%A_Index%, HKey%Hk%Tx%A_Index%, HKey%Hk%Ty%A_Index%
    			if (A_Index = (HKey%Hk%TriggeredCount + 1))
    				break
    		}
    		If (Hkey%Hk%T1V = 2) {
    			HKey%Hk%TrigN:= 1
    			Gosub V2Loop
    			return
    		}
    		If (Hkey%Hk%T1V = 3){
    			HKey%Hk%TrigN:= 1
    			Gosub V3Loop
    			return
    		}
    		return
    	}
    Return
    ;======================================================
    V1Loop:
    	HkV1:= Hk
    	HKey%HkV1%TrigN:= 1
    	TrigNV1:= 1
    	HKey%HkV1%Trig:= 0
    	TrigV1:= 0
    	HKey%HkV1%TickToggle%TrigN%:= false
    	HKey%HkV1%KeyToggle:= !HKey%HkV1%KeyToggle
    	While (HKey%HkV1%KeyToggle) {
    		if (Hkey%HkV1%TriggerToggle%TrigNV1%) and (HKey%HkV1%KeyToggle) {
    			gosub BuffScan
    				if (HKey%HkV1%Cooldown%TrigNV1% < A_TickCount - HKey%HkV1%Tick%TrigNV1%) and (HKey%HkV1%KeyToggle) {
    					Gosub, Shortcut1
    					HKey%HkV1%Tick%TrigNV1% := A_TickCount
    				}
    		}
    		if (HKey%HkV1%TrigNV1 > HKey%HkV1%TriggeredCount) and (HKey%HkV1%KeyToggle)
    			HKey%HkV1%TrigNV1:= 0
    		HKey%HkV1%TrigNV1+= 1
    		Sleep, % HKey%HkV1%ScanDelay
    	}
    	if !(HKey%HkV1%KeyToggle) {
    		ToolTip, Toggled off, HKey%HkV1%Timerx - 20, HKey%HkV1%TimerY + 40, 2
    		SetTimer, RemoveTooltip2, -3000
    	}
    	HKey%HkV1%TrigNV1:= 1
    Return
    ;======================================================
    BuffScan:
    	loop, 8 {
    		ImageSearch, HKey%HkV1%TimerX, HKey%HkV1%TimerY, 0, 0, 1000, 90, % "*10 " HKey%HkV1%Spell%TrigNV1% "Timer" A_Index ".png"
    		If (ErrorLevel = 0) {
    			ToolTip, % "Timer" A_Index, HKey%HkV1%Timerx - 20, HKey%HkV1%TimerY + 40, 2
    				SetTimer, RemoveTooltip2, -100
    			HKey%HkV1%Tick%TrigNV1%:= A_TickCount
    			TrigV1:= A_Index
    			break
    		} else {
    ;			ToolTip, not found, Timerx - 20, TimerY + 60, 3
    ;				SetTimer, RemoveTooltip3, % - 50
    			if (A_Index = 8) {
    				break
    			}
    		}
    	}
    	SetTimer, RemoveTooltip, 2
    Return
    ;======================================================
    Shortcut1:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , U
    	BlockInput, MouseMove
    	send, {LCtrl Down}
    	loop {
    		sleep, %Delay%
    		Send % "{" HKey%HkV1%Key%TrigNV1% "}"
    		ImageSearch, HKey%HkV1%TimerX, HKey%HkV1%TimerY, 0, 0, 1000, 90, % "*10 " HKey%HkV1%Spell%TrigNV1% "Timer" TrigV1 ".png"
    		If (ErrorLevel = 0)
    			break
    		if (A_Index = 8) {
    			break
    		}
    	}
    	send, {LCtrl Up}
    	BlockInput, MouseMoveoff
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , D
    	MouseMove, Xpos, Ypos
    	BlockInput, MouseMoveOff
    Return
    ;======================================================
    V2Loop:
    	HkV2:= Hk
    	HKey%HkV2%TrigN:= 1
    	TrigNV2:= 1
    	HKey%HkV2%KeyToggle:= !HKey%HkV2%KeyToggle
    	While HKey%HkV2%KeyToggle {
    		sleep, %Delay%
    		;sleep, 50
    		PixelSearch, , , HKey%HkV2%Tx%TrigNV2%, HKey%HkV2%Ty%TrigNV2%, HKey%HkV2%Tx%TrigNV2%, HKey%HkV2%Ty%TrigNV2%, HKey%HkV2%Color%TrigNV2%, 0
    		If (ErrorLevel = 0) {
    			gosub SendShortcut2
    		}
    	}
    	ToolTip, Toggled off, HKey%HkV2%Tx%TrigNV2% - 20, HKey%HkV2%Tx%TrigNV2% + 40, 3
    		SetTimer, RemoveTooltip3, -3000
    Return
    ;======================================================
    SendShortcut2:
    	Cooldown:= % Hkey%HkV2%Cooldown%TrigNV2%
    	Tooltip, % "Ctrl-" HKey%HkV2%Key%TrigNV2% " Toggle: " HKey%HkV2%CtrlKeyToggle%TrigNV2% "`nCooldown = " Hkey%HkV2%Cooldown%TrigNV2% , 1880, 950
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , U
    	BlockInput, on
    	if ((HKey%HkV2%CtrlKeyToggle%TrigNV2%) = 1) {
    		send, {LCtrl Down}
    		sleep, %Delay%
    		;sleep, 50
    	}
    	Send % "{" HKey%HkV2%Key%TrigNV2% "}"
    	if ((HKey%HkV2%CtrlKeyToggle%TrigNV2%) = 1) {
    		send, {LCtrl up}
    	}
    	BlockInput, off
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    	MouseClick, , , , , , D
    	sleep % Hkey%HkV2%Cooldown%TrigNV2%
    	HKey%HkV2%TrigNV2++
    	if (HKey%HkV2%TrigNV2 > ((HKey%HkV2%TriggeredCount) + 1)) {
    		HKey%HkV2%TrigNV2:= 1
    	}
    Return
    ;======================================================
    ;======================================================
    V3Loop:
    	TrigN:= 1
    	HKeyHkT1Spell1:= HKey%HkT1%Spell1
    	HKeyHkT1KeyTrigN:= % HKey%HkT1%Key%TrigN%
    	HKey%HkT1%KeyToggle%TrigN%:= !HKey%HkT1%KeyToggle%TrigN%
    	Tooltip, % "Toggle State : " HKey%HkT1%KeyToggle%TrigN%  "`nCtrl-" HKeyHkT1KeyTrigN "`nToggle: " HKey%HkT1%CtrlKeyToggle%TrigN%, 1880, 1050
    	SetTimer, RemoveToolTip, -500
    	While HKey%HkT1%KeyToggle%TrigN% {
    		ImageSearch, T1X, T1Y, 0, 0, 1000, 80, % "*40 " HKey%HkT1%Spell%TrigN% "Timer" A_Index ".png"
    ;			If (ErrorLevel = 2) {
    ;				msgbox, error
    ;			}
    ;			If (ErrorLevel = 1) {
    ;				msgbox, not found
    ;			}
    			If (ErrorLevel = 0) {
    				Tooltip, found at %T1X%x %T1Y%Y, T1X, T1Y +40
    					SetTimer, RemoveToolTip, -1000
    				i:= A_Index
    				loop {
    					ImageSearch, , , T1X -5, T1Y -5, T1X + 50, T1Y + 50, % "*40 " HKey%HkT1%Spell%TrigN% "Timer" i ".png"
    						If (ErrorLevel = 1) {
    								Tooltip, HKey%HkT1%Spell%TrigN%: %Cooldown%ms, T1X, T1Y +40
    								SetTimer, RemoveToolTip, -1000
    							GoSub SendShortcut3
    							break
    						}
    				}
    			}
    		if (A_Index = 8)
    			break
    	}
    Return
    ;======================================================
    SendShortcut3:
    	HKeyHkT1KeyTrigN:= HKey%HkT1%Key%TrigN%
    	Sleep, %Cooldown%
    	BlockInput, on
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	If (HKey%HkT1%CtrlKeyToggle%TrigN% = 0) {
    		BlockInput, on
    		send, {%HKeyHkT1KeyTrigN%}
    		BlockInput, off
    	}
    	If (HKey%HkT1%CtrlKeyToggle%TrigN% = 1) {
    		BlockInput, on
    		Send, {Ctrl Down}
    		sleep, 40
    		Send, {%HKeyHkT1KeyTrigN%}{Ctrl Up}
    		BlockInput, off
    	}
    	If LButtonState = D
    		MouseClick, , , , , , D
    	BlockInput, Off
    
    ;		loop {
    ;			If (HKey%HkT1%CtrlKeyToggle = 1) {
    ;				GetKeyState, CtrlState, Ctrl, P
    ;					If CtrlState = D
    ;						Send, {Ctrl Up}
    ;				Send, {Ctrl down}
    ;				Sleep, 50
    ;			}
    ;			GetKeyState, LButtonState, LButton, P
    ;				If LButtonState = D
    ;					MouseClick, , , , , , U
    ;			send, {%HKeyHkT1KeyTrigN%}
    ;			If LButtonState = D
    ;				MouseClick, , , , , , D
    ;			Send, {Ctrl Up}
    ;			ImageSearch, , , T1X -5, T1Y -5, T1X + 50, T1Y + 50, % HKey%HkT1%Spell%TrigN% "Timer" i ".png"
    ;				If (ErrorLevel = 0) {
    ;					Break
    ;				}
    ;		}
    return
    ;======================================================End of Type1======================================================
    
    
    ;======================================================ConfigType1======================================================
    ConfigType1:
    	Section := "Type1Hotkey" . Hk . "" . LineSpacing2
    	gosub Type1Load
    	GuiWidth:= 250
    	GuiHeight:= 60
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 1"
    	Gui, Add, Button, x10 y30 w50 h20 gV1, v1
    	Gui, Add, Button, x70 y30 w50 h20 gV2, v2
    	Gui, Add, Button, x130 y30 w50 h20 gV3, v3
    	if (Hkey%Hk%T1V = 1) {
    		Gui, Add, Button, x10 y30 w50 h20 gV1 Default, v1
    	} else if (Hkey%Hk%T1V = 2) {
    		Gui, Add, Button, x70 y30 w50 h20 gV2 Default, v2
    	} else {
    		Gui, Add, Button, x130 y30 w50 h20 gV3 Default, v3
    	}
    	Gui, Add, Button, x190 y30 w50 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    ;============================================================================================================
    V1:
    	Hkey%Hk%T1V:= 1
    	gosub GuiSD
    	Gui, Add, Text, 0x80 x10 y10, Additional Spells:
    	Gui, Add, Edit, x100 y7 w40 h20 vHkey%Hk%TriggeredCount, % Hkey%Hk%TriggeredCount
    	Gui, Add, Text, x160 y10, Scan Delay:
    	Gui, Add, Edit, x230 y7 w40 h20 vHkey%Hk%ScanDelay, % Hkey%Hk%ScanDelay
    	Loop  {
    		Y1:= 30 * A_Index + 33
    		Y2:= 30 * A_Index + 30
    		Y3:= 30 * A_Index + 3
    		Y4:= 30 * A_Index
    		Gui, Add, Text, x20 y40, Toggle           Spell Name                     Shortcut Key    Cooldown (ms)
    		Gui, Add, Text, x10 y%Y1%, %A_Index%
    		Gui, Add, Checkbox, % "x30 y" Y1 " h13 w13 vHkey" Hk "TriggerToggle" A_Index " Checked" Hkey%Hk%TriggerToggle%A_Index%
    		Gui, Add, Edit, x51 y%Y2% w140 h20 vHkey%Hk%Spell%A_Index%, % Hkey%Hk%Spell%A_Index%
    		Gui, Add, Edit, x201 y%Y2% w70 h20 vHkey%Hk%Key%A_Index%, % Hkey%Hk%Key%A_Index%
    		Gui, Add, Edit, x281 y%Y2% w40 h20 vHkey%Hk%Cooldown%A_Index%, % Hkey%Hk%Cooldown%A_Index%
    			If (A_Index > Hkey%Hk%TriggeredCount) {
    				GuiWidth:= 350
    				GuiHeight:= 100 + 30 * A_Index
    				ButtonHeight:= 30 * A_Index + 70
    				gosub Guibuild
    				Gui, Add, Button, x50 y%ButtonHeight% w90 h20 gTriggeredAdd1, Add
    				Gui, Add, Button, x150 y%ButtonHeight% w90 h20 gTriggeredWrite1 Default, Record
    				Gui, Add, Button, x250 y%ButtonHeight% w90 h20 gCancel, Cancel
    				Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk " (" Hkey%Hk%Shortcut ")"
    				Break
    			}
    	}
    Return
    ;======================================================
    TriggeredAdd1:
    gosub GuiSD
    IniWrite, % Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount
    gosub V1
    Return
    ;======================================================
    TriggeredWrite1:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%T1V, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1V
    	IniWrite, % Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount
    	IniWrite, % Hkey%Hk%ScanDelay, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ScanDelay
    	Loop {
    		IniWrite, % Hkey%Hk%TriggerToggle%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggerToggle%A_Index%
    		IniWrite, % Hkey%Hk%Spell%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%A_Index%
    		IniWrite, % Hkey%Hk%Key%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%A_Index%
    		IniWrite, % Hkey%Hk%Cooldown%A_Index%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%A_Index%
    		HKey%Hk%TrigN:= A_Index
    		Gosub KeyWrite1
    		If (A_Index > Hkey%Hk%TriggeredCount)
    			Break
    	}
    Return
    ;============================================================================================================
    V2:
    	gosub GuiSD
    	Hkey%Hk%T1V:= 2
    	TrigN:= 1
    	GuiWidth:= 210
    	GuiHeight:= 200
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut%TrigN% " - V2"
    	HKeyHkT1CtrlKeyToggleTrigN := HKey%HkT1%CtrlKeyToggle%TrigN%
    	Gui, Add, Checkbox, % "x10 y43 h13 w13 vHKey" Hk "CtrlKeyToggle" TrigN " Checked" HKey%Hk%CtrlKeyToggle%TrigN%
    	Gui, Add, Text, x30 y43, Ctrl
    	Gui, Add, Edit, x60 y40 w70 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    	Gui, Add, Text, x140 y43, Shortcut
    	Gui, Add, Edit, x10 y70 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y73, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y100 w30 h20 vHkey%Hk%Cooldown%TrigN%, % Hkey%Hk%Cooldown%TrigN%
    	Gui, Add, Text, x50 y103, Spell 1 Cooldown, ms
    	Gui, Add, Edit, x10 y130 w40 h20 vHkey%Hk%TriggeredCount, % Hkey%Hk%TriggeredCount
    	Gui, Add, Text, x60 y133, Extra Triggered Spells
    	Gui, Add, Button, x10 y160 w90 h20 gTriggered2 Default, Define
    	Gui, Add, Button, x110 y160 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Auto Caster
    Return
    ;======================================================
    Triggered2:
    	gosub GuiSD
    	T1%Hk%:= 2
    	IniWrite, % Hkey%Hk%TriggeredCount, UnrapeKitConfig.ini, %Section%, Hkey%Hk%TriggeredCount
    	IniWrite, % Hkey%Hk%T1V, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1V
    	IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    	IniWrite, % HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%
    	IniWrite, % Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%
    	If (TriggeredCount%Hk% = 0) {
    		gosub TriggeredWrite2
    	} else {
    		TrigN:= 2
    		Loop {
    			Y1:= 30 * TrigN - 27
    			Y2:= 30 * TrigN - 30
    			Y3:= 30 * TrigN + 3
    			Y4:= 30 * TrigN
    			Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional shortcuts"
    			Gui, Add, Text, x10 y%Y1%, % "Ctrl"
    			Gui, Add, Checkbox, % "x30 y" Y1 " h13 w13 vHKey" Hk "CtrlKeyToggle" TrigN " Checked" HKey%Hk%CtrlKeyToggle%TrigN%
    			Gui, Add, Text, x50 y%Y1%, % " key" TrigN ":"
    			Gui, Add, Edit, x90 y%Y2% w60 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    			Gui, Add, Text, x170 y%Y1%, % " Cooldown"
    			Gui, Add, Edit, x230 y%Y2% w40 h20 vHkey%Hk%Cooldown%TrigN%, % Hkey%Hk%Cooldown%TrigN%
    			Gui, Add, Text, x275 y%Y1%, ms
    				If (A_Index = Hkey%Hk%TriggeredCount) {
    					GuiWidth:= 300
    					GuiHeight:= 40 + 30 * TrigN
    					ButtonHeight:= 30 * TrigN + 10
    					gosub Guibuild
    					Gui, Add, Button, x100 y%ButtonHeight% w90 h20 gTriggeredWrite2 Default, Record
    					Gui, Add, Button, x200 y%ButtonHeight% w90 h20 gCancel, Reload
    					Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%,
    					Break
    				}
    			TrigN+= 1
    		}
    		TrigN:= 1
    	}
    
    Return
    ;======================================================
    TriggeredWrite2:
    	gosub GuiSD
    		IniWrite, % Hkey%Hk%Key1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key1
    	TrigN:= 2
    	Loop, % TriggeredCount%Hk% {
    		IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    		IniWrite, % HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%
    		IniWrite, % Hkey%Hk%Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cooldown%TrigN%
    		TrigN+=1
    	}
    	TrigN:= 1
    	Gosub KeyWrite1
    Return
    ;============================================================================================================
    V3:
    	gosub GuiSD
    	Hkey%Hk%T1V:= 3
    	TrigN:= 1
    	GuiWidth:= 210
    	GuiHeight:= 230
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, Toggle for Ctrl hotkey
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell%TrigN%, % Hkey%Hk%Spell%TrigN%
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Checkbox, % "x10 y73 h13 w13 vHKey" Hk "CtrlKeyToggle" TrigN " Checked" HKey%Hk%CtrlKeyToggle%TrigN%
    	Gui, Add, Edit, x30 y70 w70 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    	Gui, Add, Text, x110 y73, Shortcut Key
    	Gui, Add, Edit, x10 y100 w30 h20 vScanDelay%Hk%, % ScanDelay%Hk%
    	Gui, Add, Text, x50 y103, Scan Loop Delay, ms
    	Gui, Add, Edit, x10 y130 w30 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    	Gui, Add, Text, x50 y133, Spell 1 Cooldown, ms
    	Gui, Add, Edit, x10 y160 w40 h20 vTriggeredCount%Hk%, % TriggeredCount%Hk%
    	Gui, Add, Text, x60 y163, Extra Triggered Spells
    	Gui, Add, Button, x10 y190 w90 h20 gTriggered3 Default, Define
    	Gui, Add, Button, x110 y190 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - V3"
    Return
    ;======================================================
    Triggered3:
    	gosub GuiSD
    	IniWrite, % Hkey%HkT1%T1V, UnrapeKitConfig.ini, %Section%, Hkey%HkT1%T1V
    	IniWrite, % TriggeredCount%Hk%, UnrapeKitConfig.ini, %Section%, TriggeredCount%Hk%
    	IniWrite, % Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%
    	IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    	IniWrite, % HKey%Hk%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%Hk%CtrlKeyToggle%TrigN%
    	IniWrite, % ScanDelay%Hk%, UnrapeKitConfig.ini, %Section%, ScanDelay%Hk%
    	IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1Cooldown%TrigN%
    	If (TriggeredCount%Hk% = 0) {
    			gosub TriggeredWrite3
    	} else {
    		TrigN:= 2
    		Loop {
    			Y1:= 30 * TrigN - 27
    			Y2:= 30 * TrigN - 30
    			Y3:= 30 * TrigN + 3
    			Y4:= 30 * TrigN
    			Gui, Add, Text, 0x80 x10 y10, Toggle for Ctrl hotkey
    			Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell%TrigN%, % Hkey%Hk%Spell%TrigN%
    			Gui, Add, Text, x160 y43, Spell 1
    			Gui, Add, Checkbox, % "x10 y" Y2 " h13 w13 vHKey" HkT1 "CtrlKeyToggle" TrigN " Checked" HKey%HkT1%CtrlKeyToggle%TrigN%
    			Gui, Add, Edit, x41 y%Y2% w140 h20 vHkey%Hk%Key%TrigN%, % Hkey%Hk%Key%TrigN%
    			Gui, Add, Text, x191 y%Y1%, % "Spell " TrigN ", Cooldown" (Toggle for Ctrl)
    			Gui, Add, Edit, x291 y%Y2% w40 h20 vHkey%Hk%T1Cooldown%TrigN%, % Hkey%Hk%T1Cooldown%TrigN%
    			Gui, Add, Text, x341 y%Y1%, ms
    				If (A_Index = TriggeredCount%Hk%) {
    					GuiWidth:= 370
    					GuiHeight:= 40 + 30 * TrigN
    					ButtonHeight:= 30 * TrigN + 10
    					gosub Guibuild
    					Gui, Add, Button, x170 y%ButtonHeight% w90 h20 gTriggeredWrite3 Default, Record
    					Gui, Add, Button, x270 y%ButtonHeight% w90 h20 gCancel, Reload
    					Gui, Show, W%GuiWidth% H%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk ": " Hkey%Hk%Shortcut ": Additional shortcuts"
    					Break
    				}
    			TrigN+= 1
    		}
    		TrigN:= 1
    	}
    Return
    ;======================================================
    TriggeredWrite3:
    	gosub GuiSD
    	TrigN:= 2
    	Loop, % Hkey%Hk%TriggeredCount {
    		IniWrite, % Hkey%Hk%Spell%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell%TrigN%
    		IniWrite, % Hkey%Hk%Key%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key%TrigN%
    		IniWrite, % HKey%HkT1%CtrlKeyToggle%TrigN%, UnrapeKitConfig.ini, %Section%, HKey%HkT1%CtrlKeyToggle%TrigN%
    		IniWrite, % Hkey%Hk%T1Cooldown%TrigN%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%T1Cooldown%TrigN%
    		TrigN+=1
    	}
    	TrigN:= 1
    	Gosub KeyWrite1
    Return
    ;======================================================End of ConfigType1======================================================
    
    
    ;======================================================Type2======================================================
    Type2:
    	HkeyHkSpell1:= Hkey%Hk%Spell1
    	HkeyHkSpell2:= Hkey%Hk%Spell2
    	HkeyHkKey:= Hkey%Hk%Key
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		if LButtonState = D
    			MouseClick, , , , , , U
    	if (Hkey%Hk%AltEquiptoggle)
    		Send, {X}
    	MouseMove, Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	sleep, %Delay%
    	MouseClick, , Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseMove, %HkeyHkSpell1%X, %HkeyHkSpell1%Y
    	sleep, %Delay%
    	MouseClick, ,  %HkeyHkSpell1%X, %HkeyHkSpell1%Y
    		if (Hkey%Hk%MoveToggle)
    			MouseMove, Xpos, Ypos
    		if (Hkey%Hk%ShiftToggle) {
    			Send, {LShift Down}
    			sleep, 50
    		}
    	SendInput, % "{" Hkey%Hk%Key "}"
    		if (Hkey%Hk%ShiftToggle)
    			Send, {LShift Up}
    	MouseMove, Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseClick, , Hkey%Hk%KeyX, Hkey%Hk%KeyY
    	MouseMove, %HkeyHkSpell2%X, %HkeyHkSpell2%Y
    	MouseClick, , %HkeyHkSpell2%X, %HkeyHkSpell2%Y
    	if (Hkey%Hk%AltEquiptoggle)
    		Send, {X}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState2, LButton, P
    		if LButtonState2 = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of Type2======================================================
    
    
    ;======================================================ConfigType2======================================================
    ConfigType2:
    	Section = Type2Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 210
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x10 y10, % "Hotkey " Hk ": " Hkey%Hk%Shortcut " - Type 2"
    	Gui, Add, Edit, x30 y40 W110 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Text, x160 y43, Spell 1
    	Gui, Add, Edit, x30 y70 W110 h20 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Text, x160 y73, Spell 2
    	Gui, Add, Edit, x10 y100 W70 h20 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Text, x90 y103, Shortcut Key
    	Gui, Add, Checkbox, % "x10 y130 h13 w13 vHkey" Hk "MoveToggle Checked" Hkey%Hk%MoveToggle
    	Gui, Add, Text, x30 y130, replace cursor
    	Gui, Add, Checkbox, % "x+10 y130 h13 w13 vHkey" Hk "ShiftToggle Checked" Hkey%Hk%ShiftToggle
    	Gui, Add, Text, x+10 y130, Hold Shift
    	Gui, Add, Checkbox, % " x10 y160 vHkey" Hk "AltEquiptoggle checked" Hkey%Hk%AltEquiptoggle, Alternate equipment
    	Gui, Add, Button, x10 y180 w90 h20 gWrite2 Default, Define
    	Gui, Add, Button, x110 y180 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Swap Caster
    Return
    ;======================================================
    Write2:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key
    	IniWrite, % Hkey%Hk%MoveToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%MoveToggle
    	IniWrite, % Hkey%Hk%ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%ShiftToggle
    	IniWrite, % Hkey%Hk%AltEquiptoggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%AltEquiptoggle
    	Gosub KeyWrite
    Return
    ;======================================================End of ConfigType2======================================================
    
    
    ;======================================================Type3======================================================
    Type3:
    	HkeyHkKey:= Hkey%Hk%Key
    	Hkey%Hk%Keytoggle:= !Hkey%Hk%Keytoggle
    	CastTime1:= Hkey%Hk%Cast1Time + Delay + 2 * FrameTime
    	CastTime2:= Hkey%Hk%Cast2Time + Delay + 2 * FrameTime
    	if Hkey%Hk%Keytoggle {
    		HkeyHkSpell:= Hkey%Hk%Spell1
    		i:= 1
    		gosub SpellCast
    	}
    	if !Hkey%Hk%Keytoggle {
    		HkeyHkSpell:= Hkey%Hk%Spell2
    		i:= 2
    		gosub SpellCast
    	}
    Return
    ;======================================================End of Type3======================================================
    
    
    ;======================================================ConfigType3======================================================
    ConfigType3:
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 220
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x70 y10, Spell                       Cast Time
    	Gui, Add, Text, x10 y43, 1
    	Gui, Add, Edit, x20 y40 W140 h20 vHkey%Hk%Spell1, % Hkey%Hk%Spell1
    	Gui, Add, Edit, x170 y40 W30 vHkey%Hk%Cast1Time, % Hkey%Hk%Cast1Time
    	Gui, Add, Text, x10 y73, 2
    	Gui, Add, Edit, x20 y70 W140 vHkey%Hk%Spell2, % Hkey%Hk%Spell2
    	Gui, Add, Edit, x170 y70 W30 vHkey%Hk%Cast2Time, % Hkey%Hk%Cast2Time
    	Gui, Add, Text, x10 y103, Shortcut key
    	Gui, Add, Edit, x90 y100 W70 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Checkbox, % "x10 y130 h13 w13 vHkey" Hk "Cast1ShiftToggle Checked" Hkey%Hk%Cast1ShiftToggle
    	Gui, Add, Text, x+10 y130, Shift
    	Gui, Add, Checkbox, % "x+10 y130 h13 w13 vHkey" Hk "Cast1Toggle Checked" Hkey%Hk%Cast1Toggle
    	Gui, Add, Text, x+10 y130, Cast Spell 1
    	Gui, Add, Checkbox, % "x10 y160 h13 w13 vHkey" Hk "Cast2ShiftToggle Checked" Hkey%Hk%Cast2ShiftToggle
    	Gui, Add, Text, x+10 y160, Shift
    	Gui, Add, Checkbox, % "x+10 y160 h13 w13 vHkey" Hk "Cast2Toggle Checked" Hkey%Hk%Cast2Toggle
    	Gui, Add, Text, x+10 y160, Cast Spell 2
    	Gui, Add, Button, x10 y190 w90 h20 gWrite3 Default, Define
    	Gui, Add, Button, x110 y190 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk " Type 3: " Hkey%Hk%Shortcut
    Return
    ;======================================================
    Write3:
    	Section = Type3Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Spell2, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell2
    	IniWrite, % Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time
    	IniWrite, % Hkey%Hk%Cast2Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Time
    	IniWrite, % Hkey%Hk%Cast1ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1ShiftToggle
    	IniWrite, % Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle
    	IniWrite, % Hkey%Hk%Cast2ShiftToggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2ShiftToggle
    	IniWrite, % Hkey%Hk%Cast2Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast2Toggle
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key
    	Gosub KeyWrite
    Return
    ;======================================================End of ConfigType3======================================================
    
    
    ;======================================================Type4======================================================
    Type4:
    	HkeyHkSpell:= Hkey%Hk%Spell1
    	CastTime1:= Hkey%Hk%Cast1Time + Delay + 2 * FrameTime
    	ImageSearch, , , 1575, 1020, 1630, 1075, % "*10 " HKey%Hk%Spell1 "_" Hkey%Hk%Key ".png"
    		If ErrorLevel = 0
    			SendInput, "{" Hkey%Hk%Key "}"
    		If (ErrorLevel = 1) {
    			gosub SpellCast
    		}
    Return
    ;======================================================End of Type4======================================================
    
    
    ;======================================================End of ConfigType4======================================================
    ConfigType4:
    	SysGet, SGW, 71
    	GuiWidth:= 210
    	GuiHeight:= 170
    	gosub GuiBuild
    	Gui, Add, Text, 0x80 x70 y10, Spell                       Cast Time
    	Gui, Add, Edit, x10 y40 w140 h20 vHkey%Hk%Spell1T4, % Hkey%Hk%Spell1
    	Gui, Add, Edit, x160 y40 W30 vHkey%Hk%Cast1Time, % Hkey%Hk%Cast1Time
    	Gui, Add, Text, x10 y73, Shortcut key
    	Gui, Add, Edit, x90 y70 W70 vHkey%Hk%Key, % Hkey%Hk%Key
    	Gui, Add, Checkbox, % "x10 y100 h13 w13 vHkey" Hk "Cast1Toggle Checked" Hkey%Hk%Cast1Toggle
    	Gui, Add, Text, x40 y100, Cast Spell 1
    	Gui, Add, Button, x10 y140 w90 h20 gWrite4 Default, Define
    	Gui, Add, Button, x110 y140 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, "Hotkey " Hk " Type 4: " Hkey%Hk%Shortcut
    Return
    ;======================================================
    Write4:
    	Section = Type4Hotkey%Hk%--------------------------------------------------------------------------------------------------
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Spell1, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Spell1
    	IniWrite, % Hkey%Hk%Cast1Time, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Time
    	IniWrite, % Hkey%Hk%Cast1Toggle, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Cast1Toggle
    	IniWrite, % Hkey%Hk%Key, UnrapeKitConfig.ini, %Section%, Hkey%Hk%Key
    	Gosub KeyWrite
    Return
    ;======================================================End of ConfigType4======================================================
    
    
    
    ;======================================================Type5======================================================
    Type5:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %Delay%
    	MouseClick, Right, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    	Sleep, %Delay%
    	if (Hkey%Hk%GemSwapTab = 1) {
    		MouseMove, Hkey%Hk%GemSwap2_X, Hkey%Hk%GemSwap2_Y
    		MouseClick, Left, Hkey%Hk%GemSwap2_X, Hkey%Hk%GemSwap2_Y
    		MouseMove, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    		MouseClick, Left, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    	}
    	if (Hkey%Hk%GemSwapTab = 2) {
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%GemSwap2Alt_X, Hkey%Hk%GemSwap2Alt_Y
    		MouseClick, , Hkey%Hk%GemSwap2Alt_X, Hkey%Hk%GemSwap2Alt_Y
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    		MouseClick, , Hkey%Hk%GemSwap1_X, Hkey%Hk%GemSwap1_Y
    	}
    	SendInput, {i}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of Type5======================================================
    
    
    ;======================================================Type6======================================================
    Type6:
    	MouseGetPos, Xpos, Ypos
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %Delay%
    	MouseClick, Right, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    	Sleep, %Delay%
    	if (Hkey%Hk%EquipSwapTab = 1) {
    		MouseMove, Hkey%Hk%EquipSwap2_X, Hkey%Hk%EquipSwap2_Y
    		MouseClick, Left, Hkey%Hk%EquipSwap2_X, Hkey%Hk%EquipSwap2_Y
    		MouseMove, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    		MouseClick, Left, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    	}
    	if (Hkey%Hk%EquipSwapTab = 2) {
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%EquipSwap2Alt_X, Hkey%Hk%EquipSwap2Alt_Y
    		MouseClick, , Hkey%Hk%EquipSwap2Alt_X, Hkey%Hk%EquipSwap2Alt_Y
    		SendInput, {x}
    		Sleep, %Delay%
    		MouseMove, Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    		MouseClick, , Hkey%Hk%EquipSwap1_X, Hkey%Hk%EquipSwap1_Y
    	}
    	SendInput, {i}
    	MouseMove, Xpos, Ypos
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    Return
    ;======================================================End of Type6======================================================
    
    
    ;======================================================ConfigType5&6======================================================
    ConfigType5:
    	Section:= "Type5Hotkey5--------------------------------------------------------------------------------------------------"
    	Gosub GemSwap1
    Return
    
    ConfigType6:
    	Section:= "Type6Hotkey5--------------------------------------------------------------------------------------------------"
    	Gosub EquipSwap1
    Return
    
    GemSwap1:
    	Swap:= "GemSwap1"
    	Gosub Swap1
    Return
    
    GemSwap2:
    	Swap:= "GemSwap2"
    	Gosub Swap2
    return
    
    EquipSwap1:
    	Swap:= "EquipSwap1"
    	GoSub Swap1
    Return
    
    EquipSwap2:
    	Swap:= "EquipSwap2"
    	GoSub Swap2
    Return
    ;======================================================
    Swap1:
    	Gosub InvRead
    	gosub LoadSocketLists
    	gosub EquipRead
    	gosub AltEquipRead
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 830
    	If (Swap = "GemSwap1") {
    		Hkey%Hk%GemSwapTab:=  1
    	}
    	If (Swap = "EquipSwap2") {
    		Hkey%Hk%EquipSwapTab:=  1
    	}
    	Gui, Add, Picture, x3 y27, InventoryEquip.png
    	Gui, Color, 0x050505
    
    	gosub GuiBuild
    	gosub InvRadio
    	gosub EquipRadio
    	Gui, Add, Button, x550 y800 w90 h20 gCancel, Reload
    	Gui, Add, Button, x450 y800 w90 h20 gSwapCoord Default, Select
    	If (Swap = "GemSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipped Gem Swap"
    	If (Swap = "EquipSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipment Swap"
    Return
    ;======================================================
    Swap2:
    	Gosub InvRead
    	gosub LoadSocketLists
    	gosub EquipRead
    	gosub AltEquipRead
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 830
    	If (Swap = "GemSwap2") {
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight%, 1||2
    	}
    	If (Swap = "EquipSwap2") {
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight%, 1||2
    	}
    	Gui, Tab, 1
    		Gui, Add, Picture, x0 y27, InventoryEquip.png
    		Gui, Color, 0x050505
    		gosub GuiBuild
    		gosub InvRadio
    		gosub EquipRadio
    		Gui, Add, Button, x550 y800 w90 h20 gCancel, Reload
    		Gui, Add, Button, x450 y800 w90 h20 gSwapCoord Default, Select
    	Gui, Tab, 2
    		gosub GuiTab
    		Gui, Add, Picture, x33 y30, AlternateEquipment.png
    		Gui, Color, 0x050505
    		gosub AltEquipRadio
    		Gui, Add, Button, x50 y800 w90 h20 gCancel, Reload
    		Gui, Add, Button, x150 y800 w90 h20 gSwapCoord Default, Select
    	Gui, Tab
    		if (Swap = "GemSwap2")
    			Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipped Gem Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    		if (Swap = "EquipSwap2")
    			Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Equipment Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    Return
    ;======================================================
    GuiTab:
    	if (Swap = "GemSwap2") {
    		Hkey%Hk%GemSwapTab:= 2
    		GemSwapTab:= Hkey%Hk%GemSwapTab
    	}
    	if (Swap = "EquipSwap2") {
    		Hkey%Hk%EquipSwapTab:= 2
    		EquipSwapTab:= Hkey%Hk%EquipSwapTab
    	}
    Return
    ;======================================================
    SwapCoord:
    	gosub guiSD
    	Gosub InvWriteDelete
    	gosub EquipWriteDelete
    	gosub EquipCoord
    	gosub SwapRouting
    Return
    ;======================================================
    InvRead:
    	L:= 0
    	Loop, 5 {
    		L+= 1
    		C:= 0
    		loop, 12 {
    			C += 1
    			IniRead, Hkey%Hk%%Swap%RadioL%L%C%C%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%RadioL%L%C%C%, %A_Space%
    			var2 = Hkey%Hk%%Swap%RadioL%L%C%C%
    			var3:= % %var2%
    		}
    	}
    	C:= 0
    	L:= 0
    Return
    ;======================================================
    InvWriteDelete:
    	L:= 0
    	Loop, 5 {
    		L+= 1
    		C:= 0
    		loop, 12 {
    			C += 1
    			var2 = Hkey%Hk%%Swap%RadioL%L%C%C%
    			var3:= % %var2%
    			if (var3 = 1) {
    				IniWrite, % Hkey%Hk%%Swap%RadioL%L%C%C%, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%RadioL%L%C%C%
    			} else {
    				IniDelete, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%RadioL%L%C%C%
    			}
    			Hkey%Hk%%Swap%X:= 1240 + (C*53)
    			Hkey%Hk%%Swap%Y:= 560 + (L*54)
    		}
    	}
    	C:= 0
    	L:= 0
    Return
    ;======================================================
    InvRadio:
    	L:= 0
    	Loop, 5 {
    		L+= 1
    		C:= 0
    		loop, 12 {
    			C += 1
    			RadioCX:= -27 + C*53
    			RadioCY:= 489 + L*53
    			var2 = Hkey%Hk%%Swap%RadioL%L%C%C%
    			var3:= % %var2%
    			if (var3 = "")
    				var3 := 0
    			Gui, Add, Radio, % "x" RadioCX " y" RadioCY " h13 w13 v" var2 " Checked" var3
    		}
    	}
    	C:= 0
    	L:= 0
    return
    ;======================================================
    AltEquipRadio:
    	for each, AltSocket in AltSocketList {
    	varX:= % AltSocket.2
    	varY:= % AltSocket.3
    	var1 := % AltSocket.1
    	var2 = Hkey%Hk%%Swap%Alt%var1%
    	var3 := % %var2%
    	if (var3 = "")
    		var3 := 0
    	Gui, Add, Radio, % "x" varX " y" varY " h13 w13 v" var2 " Checked" var3
    }
    return
    ;======================================================
    EquipRadio:
    	for each, Socket in SocketList {
    		varX:= % Socket.2
    		varY:= % Socket.3
    		var1 := % Socket.1
    		var2 = Hkey%Hk%%Swap%%var1%
    		var3 := % %var2%
    		if (var3 = "")
    			var3 := 0
    		Gui, Add, Radio, % "x" varX " y" varY " h13 w13 v" var2 " Checked" var3
    	}
    return
    ;======================================================
    SwapRouting:
    	If (Swap = "GemSwap2" AND GemSwapTab = 2) OR (Swap = "EquipSwap2" AND EquipSwapTab = 2) {
    		gosub AltEquipDelete
    		gosub AltEquipWriteDelete
    		gosub AltEquipCoord
    	}
    	If (Swap = "GemSwap1") {
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    		Gosub GemSwap2
    	Return
    	}
    	If (Swap = "EquipSwap1") {
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    		Gosub EquipSwap2
    	Return
    	}
    	If (Swap = "GemSwap2" AND GemSwapTab = 1) {
    		IniWrite, % Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    	Return
    	}
    	If (Swap = "EquipSwap2" AND EquipSwapTab = 1) {
    		IniWrite, % Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab
    		IniWrite, % Hkey%Hk%%Swap%_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_X
    		IniWrite, % Hkey%Hk%%Swap%_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%_Y
    	Return
    	}
    	If (Swap = "GemSwap2" AND GemSwapTab = 2) {
    		IniWrite, % Hkey%Hk%GemSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%GemSwapTab
    		IniWrite, % Hkey%Hk%%Swap%Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_X
    		IniWrite, % Hkey%Hk%%Swap%Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_Y
    	Return
    	}
    	If (Swap = "EquipSwap2" AND EquipSwapTab = 2) {
    		IniWrite, % Hkey%Hk%EquipSwapTab, UnrapeKitConfig.ini, %Section%, Hkey%Hk%EquipSwapTab
    		IniWrite, % Hkey%Hk%%Swap%Alt_X, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_X
    		IniWrite, % Hkey%Hk%%Swap%Alt_Y, UnrapeKitConfig.ini, %Section%, Hkey%Hk%%Swap%Alt_Y
    	Return
    	}
    return
    ;======================================================End of ConfigType5&6======================================================
    
    
    
    ;======================================================Type7======================================================
    Type7:
    	T7:= 1
    	MouseGetPos, Xpos, Ypos
    	Loop, % Hkey%Hk%Iterations {
    			If (Hkey%Hk%Iteration%T7% = "SpellScan") {
    				Gosub SpellScan
    			}
    			If (Hkey%Hk%Iteration%T7% = "ImageSearch") {
    				gosub T7ImageSearch
    			}
    			If (Hkey%Hk%Iteration%T7% = "Spell") {
    				gosub T7Spell
    			}
    			If (Hkey%Hk%Iteration%T7% = "SendInput") {
    				gosub T7SendInput
    			}
    			If (Hkey%Hk%Iteration%T7% = "GetMousePos") {
    				gosub T7GetMouse
    			}
    			If (Hkey%Hk%Iteration%T7% = "GoMousePos") {
    				gosub T7GoMouse
    			}
    			If (Hkey%Hk%Iteration%T7% = "MouseMove") {
    				gosub T7MouseMove
    			}
    			If (Hkey%Hk%Iteration%T7% = "Delay") {
    				Sleep, % HKey%Hk%DelayIteration%T7%
    			}
    			If (Hkey%Hk%Iteration%T7% = "GemSwap") {
    				gosub T7GemSwap
    			}
    			If (Hkey%Hk%Iteration%T7% = "EquipmentSwap") {
    				gosub T7EquipSwap
    			}
    		T7+= 1
    	}
    	MouseMove, Xpos, Ypos
    Return
    
    T7Routing:
    Return
    
    T7ImageSearch:
    	;BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LuttonState = D
    			MouseClick, , , , , , U
    	MouseMove, A_ScreenWidth, A_ScreenHeight
    	Loop {
    		ImageSearch, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%, ScanCoordinatesHotkey%Hk%Iteration%T7%_L, ScanCoordinatesHotkey%Hk%Iteration%T7%_T, ScanCoordinatesHotkey%Hk%Iteration%T7%_R, ScanCoordinatesHotkey%Hk%Iteration%T7%_B, % "*" ShadeVariationHotkey%Hk%Iteration%T7% " " ImageNameHotkey%Hk%Iteration%T7% ".png"
    			If (ErrorLevel = 2) {
    				MsgBox % "Search Failed for image " ImageNameHotkey%Hk%Iteration%T7%
    				break
    			}
    			If (ErrorLevel = 1) {
    				MsgBox % "Search could not find image " ImageNameHotkey%Hk%Iteration%T7%
    				break
    			}
    			If (ErrorLevel = 0) {
    				ToolTip, % HKey%Hk%MouseXPosIteration%T7% ", " HKey%Hk%MouseYPosIteration%T7%
    				SetTimer, RemoveToolTip, 500
    				break
    			}
    	}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    ;			BlockInput, MouseMoveOff
    return
    
    T7Spell:
    	HKeyHkSpellIterationT7:= HKey%Hk%SpellIteration%T7%
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, KeyX_%Hk%Iteration%T7%, KeyY_%Hk%Iteration%T7%
    	Sleep, %FrameTime%
    	MouseClick, ,  KeyX_%Hk%Iteration%T7%, KeyY_%Hk%Iteration%T7%
    	Sleep, %FrameTime%
    	MouseMove, %HKeyHkSpellIterationT7%X, %HKeyHkSpellIterationT7%Y
    	SetMouseDelay, 40
    	MouseClick, , %HKeyHkSpellIterationT7%X, %HKeyHkSpellIterationT7%Y
    	SetMouseDelay, %MouseDelay%
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7SendInput:
    	HKeyHkSendIterationT7:= HKey%Hk%SendIteration%T7%
    	SendInput, {%HKeyHkSendIterationT7%}
    return
    
    T7GetMouse:
    	If (Hkey%Hk%GetMousePosToggleIteration%T7% = 1) {
    		BlockInput, MouseMove
    		GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    		MouseGetPos, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%
    			SetTimer, RemoveToolTip, -500
    		GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    		BlockInput, MouseMoveOff
    	}
    return
    
    T7GoMouse:
    	MouseT7:= HKey%Hk%GoMousePosIteration%T7%
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, HKey%Hk%MouseXPosIteration%MouseT7%, HKey%Hk%MouseYPosIteration%MouseT7%
    	Tooltip, % "x: " HKey%Hk%MouseXPosIteration%MouseT7% ", y: "HKey%Hk%MouseYPosIteration%MouseT7%
    		SetTimer, RemoveToolTip, -500
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7MouseMove:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	MouseMove, HKey%Hk%MouseXPosIteration%T7%, HKey%Hk%MouseYPosIteration%T7%
    	Tooltip, % "x: " HKey%Hk%MouseXPosIteration%T7% ", y: "HKey%Hk%MouseYPosIteration%T7%
    		SetTimer, RemoveToolTip, -500
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    				MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7GemSwap:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, 40
    	MouseClick, Right, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, %MouseDelay%
    	If (GemSwapTab_%Hk% = 1) {
    		MouseMove, GemSwap2Hotkey%Hk%Iteration%T7%_X, GemSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap2Hotkey%Hk%Iteration%T7%_X, GemSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	If (GemSwapTab_%Hk% = 2) {
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, GemSwap2AltHotkey%Hk%Iteration%T7%_X, GemSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap2AltHotkey%Hk%Iteration%T7%_X, GemSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , GemSwap1Hotkey%Hk%Iteration%T7%_X, GemSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	SendInput, {i}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    return
    
    T7EquipSwap:
    	BlockInput, MouseMove
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , U
    	SendInput, {i}
    	Sleep, %FrameTime%
    	MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, 40
    	MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    	SetMouseDelay, %MouseDelay%
    	If (EquipSwapTab_%Hk% = 1) {
    		MouseMove, EquipSwap2Hotkey%Hk%Iteration%T7%_X, EquipSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap2Hotkey%Hk%Iteration%T7%_X, EquipSwap2Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	If (EquipSwapTab_%Hk% = 2) {
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, EquipSwap2AltHotkey%Hk%Iteration%T7%_X, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap2AltHotkey%Hk%Iteration%T7%_X, EquipSwap2AltHotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    		SendInput, {x}
    		Sleep, %FrameTime%
    		MouseMove, EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, 40
    		MouseClick, , EquipSwap1Hotkey%Hk%Iteration%T7%_X, EquipSwap1Hotkey%Hk%Iteration%T7%_Y
    		SetMouseDelay, %MouseDelay%
    	}
    	SendInput, {i}
    	GetKeyState, LButtonState, LButton, P
    		If LButtonState = D
    			MouseClick, , , , , , D
    	BlockInput, MouseMoveOff
    ;======================================================End of Type7======================================================
    
    
    ;======================================================ConfigType7======================================================
    returnType7Config:
    	gosub Type7Load
    	MouseGetPos, Xpos, Ypos
    	Type7ConfigRecord:= 0
    	GuiWidth:= 210
    	GuiHeight:= 100
    	gosub GuiSD
    	Gui, Add, Text, x40 y10, Type 7 configuration
    	Gui, Add, Edit, x10 y40 w30 h20 vHkey%Hk%Iterations, % Hkey%Hk%Iterations
    	Gui, Add, Text, x50 y43, % "Iterations Hotkey " Hk
    	Gui, Add, Button, x10 y70 w90 h20 gType7Config2 Default, Configure
    	Gui, Add, Button, x110 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Type 7
    Return
    
    Type7Config2:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations
    	MouseGetPos, Xpos, Ypos
    	H:= 1
    	W:= 1
    	HMax:= 1
    	SysGet, SGW, 71
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, x10 y10, Options:
    	Gui, Add, Text, x10 y40, Choose any of these or skip
    	Gui, Add, Text, x10 y70,
    	Gui, Add, Text, x10 y100, ImageSearch
    	Gui, Add, Text, x10 y130, GetMousePos
    	Gui, Add, Text, x10 y160, GoMousePos
    	Gui, Add, Text, x10 y190, SpellScan
    	Gui, Add, Text, x10 y220, Spell
    	Gui, Add, Text, x10 y250, SendInput
    	Gui, Add, Text, x10 y280, MouseMove
    	Gui, Add, Text, x10 y310, Delay
    	Gui, Add, Text, x10 y340, GemSwap
    	Gui, Add, Text, x10 y370, EquipmentSwap
    	Gui, Add, Text, x10 y400, Add
    	Gui, Add, Edit, x110 y400 w20 h20 vHkey%Hk%7Iterations
    	Gui, Add, Text, x140 y403, Iteration(s)
    	Gui, Add, Button, x10 y400 w90 h20 gType7ConfigAdd, Add
    	T7:= 1
    	Loop, % Hkey%Hk%Iterations {
    		GuiY:= 60 + 30 * H
    		ScreenHeight:= A_ScreenHeight - 45
    		If (GuiY > ScreenHeight) {
    			W+= 1
    			HMax:= H
    			H= 1
    		}
    		Y1:= 8 + 30 * H
    		Y2:= 5 + 30 * H
    		GuiWidth:= 160 + 360 * W
    		If (W = 1) {
    			GuiHeight:= 70 + 30 * H
    			ButtonHeight:= 40 + 30 * H
    		}
    		If (W > 1) {
    			GuiHeight:= 70 + 30 * HMax
    			ButtonHeight:= 40 + 30 * HMax
    		}
    		Button1X:= GuiWidth - 300
    		Button2X:= GuiWidth - 200
    		Button3X:= GuiWidth - 100
    		CheckboxX:= GuiWidth - 310
    		EditButtonX:= GuiWidth - 100
    		EditX:= GuiWidth - 280
    		TextX:= GuiWidth - 170
    		var1= Hkey%Hk%Iteration%T7%Toggle
    		Gui, Add, Edit, x%EditX% y%Y2% w100 h20 vHkey%Hk%Iteration%T7%, % Hkey%Hk%Iteration%T7%
    		Gui, Add, Text, x%TextX% y%Y1%, % "Iteration " T7
    		Gui, Add, Button, x%EditButtonX% y%Y2% w90 h20 gEditT7, %T7%
    		If (T7 = Hkey%Hk%Iterations) {
    			If ButtonHeight < 400
    				ButtonHeight = 400
    			If GuiHeight < 430
    				GuiHeight = 430
    			gosub GuiBuild
    			Gui, Add, Button, x%Button1X% y%ButtonHeight% w90 h20 gType7ConfigRecord Default, Record
    			Gui, Add, Button, x%Button2X% y%ButtonHeight% w90 h20 gType7Config3, Configure
    			Gui, Add, Button, x%Button3X% y%ButtonHeight% w90 h20 gCancel, Reload
    			Gui, Show, x%Move_X% y%Move_Y% w%GuiWidth% h%GuiHeight%, Iteration Configuration
    			Break
    		}
    		T7+= 1
    		H+= 1
    	}
    Return
    
    EditT7:
    	A_GuiControlT7:= A_GuiControl
    	T7:= A_GuiControlT7
    	gosub GuiSD
    	gosub Type7Write2
    	Gosub Type7Config4
    Return
    
    Type7ConfigRecord:
    	gosub GuiSD
    	gosub Type7Write
    	Gosub Type7Config2
    Return
    
    Type7ConfigAdd:
    	gosub GuiSD
    	gosub Type7Write2
    	Hkey%Hk%Iterations+= % Hkey%Hk%7Iterations
    	Gosub Type7Config2
    Return
    
    Type7Config3:
    	gosub GuiSD
    	T7 := 1
    	gosub Type7Write2
    	T7 := 1
    	Gosub Type7Config4
    Return
    
    Type7Config4:
    	gosub GuiSD
    	If (A_GuiControlT7 > 0)
    		A_GuiControlType7Config4:= A_GuiControlT7
    	IniRead, Hkey%Hk%Iterations, UnrapeKitConfig.ini, Type7Hotkey%Hk%, Hkey%Hk%Iterations
    	Loop {
    		If (Hkey%Hk%Iteration%T7% = "ImageSearch") {
    			Gosub Type7ImageSearch
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GetMousePos") {
    			Gosub Type7GetMousePos
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GoMousePos") {
    			Gosub Type7GoMousePos
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "SpellScan") {
    			Gosub Type7LoopAdd
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "Spell") {
    			Gosub Type7Spell
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "SendInput") {
    			Gosub Type7Send
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "MouseMove") {
    			Gosub Type7MouseMove
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "Delay") {
    			Gosub Type7DelayConfig
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "GemSwap") {
    			Gosub Type7GemSwap1
    			Break
    		}
    		If (Hkey%Hk%Iteration%T7% = "EquipmentSwap") {
    			Gosub Type7EquipSwap1
    			Break
    		}
    		If (T7 >= Hkey%Hk%Iterations) {
    			Hk += 1
    			Gosub HkTypeConfigLoop
    			Break
    		}
    	}
    Return
    
    Type7Msg:
    	MsgBox, % "Iteration " T7 " = " Hkey%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7LoopAdd:
    	gosub GuiSD
    	If (A_GuiControlType7Config4 > 0) {
    		A_GuiControlT7:= 0
    		gosub Type7Config2
    	} Else {
    		T7+= 1
    		Gosub Type7Config4
    	}
    Return
    
    Type7LoopSubtract:
    	gosub GuiSD
    	A_GuiControlT7:= 0
    	Loop {
    		T7-= 1
    		If (T7 = 0) {
    			T7:= 1
    			Gosub Type7Config4
    			Break
    		}
    	}
    Return
    
    Type7ImageSearch:
    	gosub GuiSD
    	gosub GuiBuild
    	Gui, Add, Edit, x10 y10 w30 h20 vScanCoordinatesHotkey%Hk%Iteration%T7%_L, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L
    	Gui, Add, Edit, x50 y10 w30 h20 vScanCoordinatesHotkey%Hk%Iteration%T7%_T, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T
    	Gui, Add, Edit, x90 y10 W30 H20 vScanCoordinatesHotkey%Hk%Iteration%T7%_R, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R
    	Gui, Add, Edit, x130 y10 W30 H20 vScanCoordinateHotkey%Hk%Iteration%T7%_B, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B
    	Gui, Add, Edit, x10 y40 W110 H20 vShadeVariationHotkey%Hk%Iteration%T7%, % ShadeVariationHotkey%Hk%Iteration%T7%
    	Gui, Add, Edit, x10 y70 w110 h20 vImageNameHotkey%Hk%Iteration%T7%, % ImageNameHotkey%Hk%Iteration%T7%
    	Gui, Add, Text, x170 y13, Left, Top, Right and Bottom Scan Coordinates
    	Gui, Add, Text, x130 y43, Scan Color Shade Variation and Optional Parameters
    	Gui, Add, Text, x130 y73, Scan Image Name
    	Gui, Add, Button, x310 y100 w90 h20 gType7ImageSearchWrite Default, Define
    	Gui, Add, Button, x210 y100 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y100 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y100 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Image Scan
    Return
    
    Type7ImageSearchWrite:
    	gosub GuiSD
    	Hkey%Hk%GetMousePosToggleIteration%T7%:= 1
    	IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_L, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_L
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_T, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_T
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_R, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_R
    	IniWrite, % ScanCoordinatesHotkey%Hk%Iteration%T7%_B, UnrapeKitConfig.ini, ScanType7, ScanCoordinatesHotkey%Hk%Iteration%T7%_B
    	IniWrite, % ImageNameHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ImageNameHotkey%Hk%Iteration%T7%
    	IniWrite, % ShadeVariationHotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, ScanType7, ShadeVariationHotkey%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GetMousePos:
    	GuiWidth:= 410
    	GuiHeight:= 100
    	gosub GuiBuild
    	If (Hkey%Hk%MouseXPosIteration%T7% is Integer Hkey%Hk%MouseYPosIteration%T7% is Integer) {
    		MouseMove, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	} Else {
    		MouseMove, 960, 540
    	}
    	Gui, -0x80000 AlwaysOnTop
    	Gui, Add, Text, x10 y13, Hotkey %Hk% Iteration %T7%: Move the mouse to the position to be saved and press ENTER
    	Gui, Add, Checkbox, % "x10 y40 h13 w13 vHkey" Hk "GetMousePosToggleIteration" T7 " Checked" Hkey%Hk%GetMousePosToggleIteration%T7%, Cancel Saving and get position during hotkey execution
    	Gui, Add, Button, x310 y70 w90 h20 gType7GetMousePosWrite Default, Define
    	Gui, Add, Button, x210 y70 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y70 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y70 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Get Mouse Position
    Return
    
    Type7GetMousePosWrite:
    	gosub GuiSD
    	If (Hkey%Hk%GetMousePosToggleIteration%T7% = 0) {
    		MouseGetPos, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%Type7MouseYPosIteration%T7%
    		IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseXPosIteration%T7%
    		IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseYPosIteration%T7%
    	}
    	IniWrite, % Hkey%Hk%GetMousePosToggleIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GetMousePosToggleIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GoMousePos:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	Gui, Add, Edit, x200 y10 w20 h20 vHkey%Hk%GoMousePosIteration%T7%, % Hkey%Hk%GoMousePosIteration%T7%
    	Gui, Add, Text, x10 y13, Move to Mouse Position from Iteration:
    	Gui, Add, Button, x310 y40 w90 h20 gType7GoMousePosWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%:Mouse Position
    Return
    
    Type7GoMousePosWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%GoMousePosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%GoMousePosIteration%T7%
    	Gosub Type7Config2
    Return
    
    Type7MouseMove:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	If (Hkey%Hk%MouseXPosIteration%T7% is Integer) and (Hkey%Hk%MouseYPosIteration%T7% is Integer) {
    		MouseMove, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	} Else {
    		MouseMove, 960, 540
    	}
    	Gui, Add, Text, x10 y13, Hotkey %Hk% Iteration %T7%: Move the mouse to the position to be saved and press ENTER
    	Gui, Add, Button, x310 y40 w90 h20 gType7MouseMoveWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%,  Type 7 - Hotkey %Hk% Iteration %T7%: Mouse Position
    Return
    
    Type7MouseMoveWrite:
    	gosub GuiSD
    	MouseGetPos, Hkey%Hk%MouseXPosIteration%T7%, Hkey%Hk%MouseYPosIteration%T7%
    	IniWrite, % Hkey%Hk%MouseXPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseXPosIteration%T7%
    	IniWrite, % Hkey%Hk%MouseYPosIteration%T7%, UnrapeKitConfig.ini, type7MousePos, Hkey%Hk%MouseYPosIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7Spell:
    	GuiWidth:= 410
    	GuiHeight:= 140
    	gosub GuiBuild
    	Gui, Add, Text, x10 y10, % Type 7 - "Iteration " T7 " Spell Configuration"
    	Gui, Add, Edit, x10 y40 w110 h20 vHkey%Hk%SpellIteration%T7%, % Hkey%Hk%SpellIteration%T7%
    	Gui, Add, Text, x130 y43, % "Spell - Hotkey " Hk
    	Gui, Add, Edit, x10 y70 W70 H20 vHkey%Hk%KeyIteration%T7%, % Hkey%Hk%KeyIteration%T7%
    	Gui, Add, Text, x90 y73, % "Key - Hotkey " Hk
    	Gui, Add, Button, x310 y110 w90 h20 gType7SpellWrite Default, Define
    	Gui, Add, Button, x210 y110 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y110 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y110 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Type 7 Spell Configuration
    Return
    
    Type7SpellWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%SpellIteration%T7%, UnrapeKitConfig.ini, type7HotkeySpells, Hkey%Hk%SpellIteration%T7%
    	IniWrite, % Hkey%Hk%KeyIteration%T7%, UnrapeKitConfig.ini, type7HotkeyKey, Hkey%Hk%KeyIteration%T7%
    	Gosub Type7Key
    Return
    
    Type7Key:
    	If (Hkey%Hk%KeyIteration%T7% = "Q") {
    		KeyX_%Hk%Iteration%T7%:= 1440
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "W") {
    		KeyX_%Hk%Iteration%T7%:= 1495
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "E") {
    		KeyX_%Hk%Iteration%T7%:= 1550
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "R") {
    		KeyX_%Hk%Iteration%T7%:= 1605
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "T") {
    		KeyX_%Hk%Iteration%T7%:= 1655
    		KeyY_%Hk%Iteration%T7%:= 1045
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "LButton") {
    		KeyX_%Hk%Iteration%T7%:= 1550
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "MButton") {
    		KeyX_%Hk%Iteration%T7%:= 1600
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	If (Hkey%Hk%KeyIteration%T7% = "RButton") {
    		KeyX_%Hk%Iteration%T7%:= 1650
    		KeyY_%Hk%Iteration%T7%:= 975
    	}
    	IniWrite, % KeyX_%Hk%Iteration%T7%, UnrapeKitConfig.ini, Type7KeyCoordinates, KeyX_%Hk%Iteration%T7%
    	IniWrite, % KeyY_%Hk%Iteration%T7%, UnrapeKitConfig.ini, type7KeyCoordinates, KeyY_%Hk%Iteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7Send:
    	GuiWidth:= 410
    	GuiHeight:= 110
    	gosub GuiBuild
    	Gui, Add, Text, x185 y10, % "Hotkey " Hk
    	Gui, Add, Edit, x10 y40 w70 h20 vHkey%Hk%SendIteration%T7%, % Hkey%Hk%SendIteration%T7%
    	Gui, Add, Text, x90 y43, % "Iteration " T7 " Send"
    	Gui, Add, Button, x310 y80 w90 h20 gType7SendWrite Default, Define
    	Gui, Add, Button, x210 y80 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y80 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y80 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, Send Config
    Return
    
    Type7SendWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%SendIteration%T7%, UnrapeKitConfig.ini, type7Send, Hkey%Hk%SendIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7DelayConfig:
    	GuiWidth:= 410
    	GuiHeight:= 70
    	gosub GuiBuild
    	Gui, Add, Edit, x10 y10 w130 h20 vHkey%Hk%DelayIteration%T7%, % Hkey%Hk%DelayIteration%T7%
    	Gui, Add, Text, x150 y13, % "Iteration " T7 " Delay"
    	Gui, Add, Button, x310 y40 w90 h20 gType7DelayWrite Default, Define
    	Gui, Add, Button, x210 y40 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x110 y40 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y40 w90 h20 gCancel, Reload
    	Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % "Hotkey " Hk
    Return
    
    Type7DelayWrite:
    	gosub GuiSD
    	IniWrite, % Hkey%Hk%DelayIteration%T7%, UnrapeKitConfig.ini, type7Delay, Hkey%Hk%DelayIteration%T7%
    	Gosub Type7LoopAdd
    Return
    
    Type7GemSwap1:
    	Swap:= "7GemSwap1"
    	GoSub Type7Swap
    Return
    
    Type7GemSwap2:
    	Swap:= "7GemSwap2"
    	GoSub Type7Swap
    Return
    
    Type7EquipSwap1:
    	Swap:= "7EquipSwap1"
    	GoSub Type7Swap
    Return
    
    Type7EquipSwap2:
    	Swap:= "7EquipSwap2"
    	GoSub Type7Swap
    Return
    
    Type7Swap:
    	Gosub Type7LCAdd
    	gosub Type7SwapRead1
    	SysGet, SGW, 71
    	GuiWidth:= 650
    	GuiHeight:= 800
    	If (Swap = "7GemSwap2") {
    		GemSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit v7GemSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	If (Swap = "7EquipSwap2") {
    		EquipSwapTab:= 1
    		Gui, Add, Tab2, w%GuiWidth% h%GuiHeight% AltSubmit v7EquipSwapTab_%Hk%, 1||2
    		Gui, Tab, 1
    	}
    	Gui, Color, 0x050505
    	Gui, Add, Picture, x0 y0, InventoryEquip.png
    	gosub GuiBuild
    	gosub Type7Radio1
    	gosub Type7Radio3
    	Gui, Add, Button, x550 y770 w90 h20 gType7SwapCoord Default, Select
    	Gui, Add, Button, x450 y770 w90 h20 gType7LoopAdd, Skip
    	Gui, Add, Button, x350 y770 w90 h20 gType7LoopSubtract, Go Back
    	Gui, Add, Button, x10 y770 w90 h20 gCancel, Reload
    	If (Swap = "7GemSwap2") OR (Swap = "7EquipSwap2") {
    		GuiWidth:= 650
    		GuiHeight:= 800
    		gosub GuiBuild
    		Gui, Tab, 2
    		gosub Type7Radio2
    		Gui, Add, Button, x550 y770 w90 h20 gType7SwapCoord Default, Select
    		Gui, Add, Button, x450 y770 w90 h20 gType7LoopAdd, Skip
    		Gui, Add, Button, x350 y770 w90 h20 gType7LoopSubtract, Go Back
    		Gui, Add, Button, x10 y770 w90 h20 gCancel, Reload
    	}
    	If (Swap = "7GemSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipped Gem Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "7EquipSwap2")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipment Swap: Ctrl + Tab/PgUp/PgDn To Alternate Equipment"
    	If (Swap = "7GemSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipped Gem Swap - Iteration " T7
    	If (Swap = "7EquipSwap1")
    		Gui, Show, w%GuiWidth% h%GuiHeight% X%Move_X% Y%Move_Y%, % Hkey%Hk%Shortcut " - Type 7: Equipment Swap - Iteration " T7
    Return
    
    Type7LCAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		IniRead, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Swap%PositionType7, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7SwapCoord:
    	gosub GuiSD
    	Gosub Type7LCCoordAdd
    	Gosub Type7SwapWrite1
    	Gosub Type7SwapCoord1
    	gosub Type7SwapRouting
    Return
    
    Type7LCCoordAdd:
    	L:= 1
    	C:= 1
    	Loop {
    		If (RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7% = 1) {
    			IniWrite, % RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%, UnrapeKitConfig.ini, %Swap%PositionType7, RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    			%Swap%Hotkey%Hk%Iteration%T7%_X:= 1240 + (C*53)
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:= 560 + (L*54)
    		}
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7Radio1:
    	L:= 1
    	C:= 1
    	RadioCX:= -10
    	RadioCY:= 459 + L*52
    	Loop {
    		RadioCX += 39
    		var2 = RadioL%L%C%C%%Swap%Hotkey%Hk%Iteration%T7%
    		var3:= % var2
    		Gui, Add, Radio, % "x" RadioCX " y" RadioCY " h13 w13 v" var3 " Checked" var3
    		If (C = 5) or (c = 9) {
    			RadioCX += 1
    		}
    		If (C = 12) {
    			C:= 0
    			L+= 1
    			If (L > 5)
    				Break
    		}
    		C+= 1
    	}
    	C:= 1
    	L:= 1
    Return
    
    Type7Radio2:
    	For _, socket in SocketList1 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    return
    
    
    Type7Radio3:
    	For _, socket in SocketList1 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    	For _, socket in SocketList2 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    	For _, socket in SocketList3 {
    		var2 = % socket.name
    		var3 = %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		RadioCX:= % socket.x
    		RadioCY:= % socket.y
    		Gui, Add, Radio, % "x" RadioCX " y"RadioCY " w13 h13 v" var3 " Checked" var3
    	}
    return
    
    Type7SwapRouting:
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 2) OR (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 2) {
    		gosub Type7SwapWrite2
    		gosub Type7SwapCoord2
    	}
    	If (Swap = "7GemSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    		Gosub Type7GemSwap2
    	}
    	If (Swap = "7EquipSwap1") {
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    		Gosub Type7EquipSwap2
    	}
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 1) {
    		IniWrite, % 7GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7GemSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 1) {
    		IniWrite, % 7EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7EquipSwapTab_%Hk%
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%Hotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%Hotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7GemSwap2" AND 7GemSwapTab_%Hk% = 2) {
    		IniWrite, % 7GemSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7GemSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    	If (Swap = "7EquipSwap2" AND 7EquipSwapTab_%Hk% = 2) {
    		IniWrite, % 7EquipSwapTab_%Hk%, UnrapeKitConfig.ini, SwapTabs, 7EquipSwapTab_%Hk%
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_X, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_X
    		IniWrite, % %Swap%AltHotkey%Hk%Iteration%T7%_Y, UnrapeKitConfig.ini, %Swap%CoordinatesType7, %Swap%AltHotkey%Hk%Iteration%T7%_Y
    	Return
    	}
    return
    
    Type7SwapCoord1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%Hotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%Hotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    return
    
    Type7SwapCoord2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		var4:= % var3
    		If (var4 = 1) {
    			%Swap%AltHotkey%Hk%Iteration%T7%_X:=  % socket.coordX
    			%Swap%AltHotkey%Hk%Iteration%T7%_Y:=  % socket.coordY
    		}
    	}
    Return
    
    Type7SwapRead1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapRead2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		IniRead, %var3%, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapWrite1:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList2 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    	for _, socket in SocketList3 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%Hotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    
    Type7SwapWrite2:
    	for _, socket in SocketList1 {
    		var2:= % socket.name
    		var3=  %var2%%Swap%AltHotkey%Hk%Iteration%T7%
    		var4:= % var3
    		if (var4 = 1)
    			IniWrite, % var4, UnrapeKitConfig.ini, %Swap%PositionType7, %var3%, %A_Space%
    	}
    return
    ;======================================================End of ConfigType7======================================================
    Last edited by nimb777; 1 Day Ago at 11:31 PM.

All times are GMT -5. The time now is 10:30 AM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search