Jump to content

Menu is not executing


 Share

Recommended Posts

I'm having trouble getting a script to work properly. I think its in the Select, but I can't figure it out. Basically, the menu File section isn't working. It does not execute the code that it is set to do. However, when I take the PowerFisher Functions and components and run them seperatly they work fine. I am not sure why this is. If anyone can find whats wrong, it would be greatly appreciated. And yes, I did use the help file, but im lost.

NOTE: This is in no way complete, however I want the basic components to work before I get the scanning and customization complete. Please do not commment on its incompleteness.

The WHOLE THING (PowerFisher Menu Doesn't Work)

#include <GUIConstants.au3>
#Include <Misc.au3>

;COMPLEX v1.0
;By John Harris (Inline853)
;Last Update: 9/22/07
#Region ;ABOUT

#Endregion
;
;
;
#Region ;SELECTION GLOBALS
Global $selection
Global $username = ""
Global $password = ""
#EndRegion

#Region ;AUTO FIGHTER GLOBALS

#EndRegion

#Region ;HYBERMINER GLOBALS
Global $HMCurrentColor = "9003840" ;<== Sets the Current Color to a HEX or RBG Color Code
Global $HMCurrentDropColor = "0xDE7D37" ;<== Sets the Current Drop Color to a HEX or RBG Color Code
Global $HMDropColor = $HMCurrentDropColor ;<== Sets the Drop Color to the Current Drop Color
Global $HMStartX = IniRead("MineData.ini", "Pos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Ore Finder from an .Ini file.
Global $HMStartY = IniRead("MineData.ini", "Pos", "Y", 0) ;<== ;<== Reads a Default Starting Y Coordinate for the Ore Finder from an .Ini file.
Global $HMsmallStartX = IniRead("MineData.ini", "DropPos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Drop Finder from an .Ini file.
Global $HMsmallStartY = IniRead("MineData.ini", "DropPos", "Y", 0) ;<== Reads a Default Starting Y Coordinate for the Drop Finder from an .Ini file.
Global $HMx = $HMStartX, $HMy = $HMStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $HMsmallx = $HMsmallStartX, $HMsmally = $HMsmallStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $HMScanWidth = 110, $HMScanHeight = 45 ;<== Sets the Scan Width and Height for the Ore Finder.
Global $HMSmallScanWidth = 40, $HMSmallScanHeight = 40 ;<== Sets the Scan Width and Height for the Drop Finder.
Global $HMT1[5], $HMT2[5] ;<== Creates the Array Storage for the Check Interval and Mining Interval time Values.
Global $HMSleepCheck = 500, $HMSleepMine = 6000, $HMSleepDrop = 1500    ;<== Sets Sleep() time variables for the Check, Mining, and Dropping Functions.
Global $HMIdle = 0 ;<== Sets Idle to 0
Global $HMMoveMode = True ;<== Sets $MoveMode to True
Global $HMSmallMoveMode = True  ;<== Sets $smallMoveMode to True
Global $HMAppTitle = "RS - HYBERMINER" ;<== Sets the Application Title to "RS - HYBERMINER"
Global $HMColorClay = IniRead("MineData.ini", "Colors", "Clay", "?") ;<== Reads the Color for Clay for the Ore Finder.
Global $HMColorCopper = IniRead("MineData.ini", "Colors", "Copper", 9003840) ;<== Reads the Color for Copper for the Ore Finder.
Global $HMColorTin = IniRead("MineData.ini", "Colors", "Tin", 7432553);<== Reads the Color for Tin for the Ore Finder.
Global $HMColorIron = IniRead("MineData.ini", "Colors", "Iron", 4072732);<== Reads the Color for Iron for the Ore Finder.
Global $HMColorSilver = IniRead("MineData.ini", "Colors", "Silver", 16777215);<== Reads the Silver for Clay for the Ore Finder.
Global $HMColorCoal = IniRead("MineData.ini", "Colors", "Coal", 3815975) ;<== Reads the Color for Coal for the Ore Finder.
Global $HMColorGold = IniRead("MineData.ini", "Colors", "Gold", 10193720) ;<== Reads the Color for Gold for the Ore Finder.
Global $HMColorMithril = IniRead("MineData.ini", "Colors", "Mithril", 5329529) ;<== Reads the Color for Mithril for the Ore Finder.
Global $HMColorAddy = IniRead("MineData.ini", "Colors", "Addy", "?") ;<== Reads the Color for Adamantite for the Ore Finder.
Global $HMColorRunite = IniRead("MineData.ini", "Colors", "Runite", "?") ;<== Reads the Color for Runite for the Ore Finder.
Global $HMDropColorClay = IniRead("MineData.ini", "DropColors", "Clay", "?") ;<== Reads the Color for Clay for the Drop Finder.
Global $HMDropColorCopper = IniRead("MineData.ini", "DropColors", "Copper", 0xDF813B) ;<== Reads the Color for Copper for the Drop Finder.
Global $HMDropColorTin = IniRead("MineData.ini", "DropColors", "Tin", 0x8C8284) ;<== Reads the Color for Tin for the Drop Finder.
Global $HMDropColorIron = IniRead("MineData.ini", "DropColors", "Iron", 0x321F17) ;<== Reads the Color for Iron for the Drop Finder.
Global $HMDropColorSilver = IniRead("MineData.ini", "DropColors", "Silver", 0xB2B2BB) ;<== Reads the Color for Silver for the Drop Finder.
Global $HMDropColorCoal = IniRead("MineData.ini", "DropColors", "Coal", 0x3B3B27) ;<== Reads the Color for Coal for the Drop Finder.
Global $HMDropColorGold = IniRead("MineData.ini", "DropColors", "Gold", 0x977B11) ;<== Reads the Color for Gold for the Drop Finder.
Global $HMDropColorMithril = IniRead("MineData.ini", "DropColors", "Mithril", 0x48496B) ;<== Reads the Color for Mithril for the Drop Finder.
Global $HMDropColorAddy = IniRead("MineData.ini", "DropColors", "Addy", 0x4E634F) ;<== Reads the Color for Adamantite for the Drop Finder.
Global $HMDropColorRunite = IniRead("MineData.ini", "DropColors", "Runite", 0x4C6A74) ;<== Reads the Color for Runite for the Drop Finder.
Global $HMSens = IniRead("MineData.ini", "Beta", "Sensitifity", 8) ;<== Reads the Sensitivity for the Color Dedtection from and .Ini file.
Global $HMAverageX, $HMAverageY, $HMi ;<== Initializes the variables $AverageX, $AverageY, and $i

#EndRegion

#Region ;POWER CUTTER GLOBALS
Global $PCCurrentColor = "9003840" ;<== Sets the Current Color to a HEX or RBG Color Code
Global $PCCurrentDropColor = "0xDE7D37" ;<== Sets the Current Drop Color to a HEX or RBG Color Code
Global $PCDropColor = $PCCurrentDropColor ;<== Sets the Drop Color to the Current Drop Color
Global $PCStartX = IniRead("MineData.ini", "Pos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Ore Finder from an .Ini file.
Global $PCStartY = IniRead("MineData.ini", "Pos", "Y", 0) ;<== ;<== Reads a Default Starting Y Coordinate for the Ore Finder from an .Ini file.
Global $PCsmallStartX = IniRead("MineData.ini", "DropPos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Drop Finder from an .Ini file.
Global $PCsmallStartY = IniRead("MineData.ini", "DropPos", "Y", 0) ;<== Reads a Default Starting Y Coordinate for the Drop Finder from an .Ini file.
Global $PCx = $PCStartX, $PCy = $PCStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $PCsmallx = $PCsmallStartX, $PCsmally = $PCsmallStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $PCScanWidth = 110, $PCScanHeight = 45 ;<== Sets the Scan Width and Height for the Ore Finder.
Global $PCSmallScanWidth = 40, $PCSmallScanHeight = 40 ;<== Sets the Scan Width and Height for the Drop Finder.
Global $PCT1[5], $PCT2[5] ;<== Creates the Array Storage for the Check Interval and Mining Interval time Values.
Global $PCSleepCheck = 500, $PCSleepMine = 6000, $PCSleepDrop = 1500    ;<== Sets Sleep() time variables for the Check, Mining, and Dropping Functions.
Global $PCIdle = 0 ;<== Sets Idle to 0
Global $PCMoveMode = True ;<== Sets $MoveMode to True
Global $PCSmallMoveMode = True  ;<== Sets $smallMoveMode to True
Global $PCAppTitle = "RS - HYBERMINER" ;<== Sets the Application Title to "RS - HYBERMINER"
Global $PCSens = IniRead("MineData.ini", "Beta", "Sensitifity", 8) ;<== Reads the Sensitivity for the Color Dedtection from and .Ini file.
Global $PCAverageX, $PCAverageY, $PCi ;<== Initializes the variables $AverageX, $AverageY, and $i

#EndRegion

#Region ;POWER FISHER GLOBALS
Global $PFCurrentColor = "9003840" ;<== Sets the Current Color to a HEX or RBG Color Code
Global $PFCurrentDropColor = "0xDE7D37" ;<== Sets the Current Drop Color to a HEX or RBG Color Code
Global $PFDropColor = $PFCurrentDropColor ;<== Sets the Drop Color to the Current Drop Color
Global $PFStartX = IniRead("MineData.ini", "Pos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Ore Finder from an .Ini file.
Global $PFStartY = IniRead("MineData.ini", "Pos", "Y", 0) ;<== ;<== Reads a Default Starting Y Coordinate for the Ore Finder from an .Ini file.
Global $PFsmallStartX = IniRead("MineData.ini", "DropPos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Drop Finder from an .Ini file.
Global $PFsmallStartY = IniRead("MineData.ini", "DropPos", "Y", 0) ;<== Reads a Default Starting Y Coordinate for the Drop Finder from an .Ini file.
Global $PFx = $PFStartX, $PFy = $PFStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $PFsmallx = $PFsmallStartX, $PFsmally = $PFsmallStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $PFScanWidth = 110, $PFScanHeight = 45 ;<== Sets the Scan Width and Height for the Ore Finder.
Global $PFSmallScanWidth = 40, $PFSmallScanHeight = 40 ;<== Sets the Scan Width and Height for the Drop Finder.
Global $PFT1[5], $PFT2[5] ;<== Creates the Array Storage for the Check Interval and Mining Interval time Values.
Global $PFSleepCheck = 500, $PFSleepMine = 6000, $PFSleepDrop = 1500    ;<== Sets Sleep() time variables for the Check, Mining, and Dropping Functions.
Global $PFIdle = 0 ;<== Sets Idle to 0
Global $PFMoveMode = True ;<== Sets $MoveMode to True
Global $PFSmallMoveMode = True  ;<== Sets $smallMoveMode to True
Global $PFSens = IniRead("MineData.ini", "Beta", "Sensitifity", 8) ;<== Reads the Sensitivity for the Color Dedtection from and .Ini file.
Global $PFAverageX, $PFAverageY, $PFi ;<== Initializes the variables $AverageX, $AverageY, and $i

#EndRegion




;
;
;
#Region ;SELECTION GUI

$SELECTGUI = GUICreate("COMPLEX v1.0", 301, 160, 359, 202)
GUISetBkColor(0x000000)
GUISetState(@SW_HIDE, $SELECTGUI)

$UsernameInput = GUICtrlCreateInput("", 112, 40, 145, 21)
$PasswordInput = GUICtrlCreateInput("", 112, 72, 145, 21, BitOR($ES_PASSWORD,$ES_AUTOHSCROLL))

$UsernameLabel = GUICtrlCreateLabel("Username:", 52, 40, 60, 20)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x0F0000)

$PasswordLabel = GUICtrlCreateLabel("Password:", 52, 74, 60, 20)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x0F0000)

$COMPLEXLabel = GUICtrlCreateLabel("COMPLEX", 104, 8, 87, 23)
GUICtrlSetFont(-1, 14, 400, 0, "Narkisim")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x0F0000)

$HMButton = GUICtrlCreateButton("HYBERMINER", 162, 135, 100, 20)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUISetState()

$PCButton = GUICtrlCreateButton("POWER Cutter", 162, 110, 100, 20)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")

GUISetState()

$AFButton = GUICtrlCreateButton("AUTO Fighter", 52, 110, 100, 20)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUISetState()


$PFButton = GUICtrlCreateButton("POWER Fisher", 52, 135, 100, 20)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUISetState()


#EndRegion

#Region ;AUTO FIGHTER GUI
    
$AFGUI = GUICreate("AUTO Fighter", 266, 351, 359, 202)
GUISetFont(8, 400, 0, "@Arial Unicode MS")
GUISetBkColor(0x000000)
$AFCaptionStatus = GUICtrlCreateLabel("Status:", 5, 30, 38, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFLabelStatus = GUICtrlCreateLabel("Stopped", 50, 30, 44, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFPrimaryColor = GUICtrlCreateLabel("Primary Color", 150, 30, 70, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFStartButton = GUICtrlCreateButton("Start (Ctrl - Z)", 24, 288, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$AFStopButton = GUICtrlCreateButton("Stop (Ctrl - X)", 128, 288, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$AFCaptionCheckInterval = GUICtrlCreateLabel("Check Interval:", 5, 70, 78, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFCaptionAttackInterval = GUICtrlCreateLabel("Attack Interval:", 5, 110, 77, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFLabelCheckInterval = GUICtrlCreateLabel("N/A", 95, 70, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFLableAttackInterval = GUICtrlCreateLabel("N/A", 95, 110, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFSecondaryColor = GUICtrlCreateLabel("Secondary Color", 150, 60, 86, 19, $SS_CENTER)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFEatLabel = GUICtrlCreateLabel("Eat?", 30, 150, 26, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFEatCheckbox = GUICtrlCreateCheckbox("AFEatCheckbox", 10, 150, 17, 17)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$AFPrimaryPickup = GUICtrlCreateLabel("Primary Pickup", 150, 110, 77, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFSecondaryPickup = GUICtrlCreateLabel("Secondary Pickup", 150, 140, 93, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFFood = GUICtrlCreateLabel("Food Color", 150, 190, 58, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFBones = GUICtrlCreateLabel("Bone Color", 150, 220, 58, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFDropBonesCheckbox = GUICtrlCreateCheckbox("EatCheckbox", 10, 210, 17, 17)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$AFDropBonesLabel = GUICtrlCreateLabel("Drop Bones?", 30, 210, 68, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFPickupBonesCheckbox = GUICtrlCreateCheckbox("EatCheckbox", 10, 180, 17, 17)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$AFPickupBonesLabel = GUICtrlCreateLabel("Pickup Bones?", 30, 180, 77, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFPickupCoinsCheckbox = GUICtrlCreateCheckbox("EatCheckbox", 10, 240, 17, 17)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0xFFFFFF)
$AFPickupCoinsLabel = GUICtrlCreateLabel("Pickup Coins?", 30, 240, 74, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$AFMenuFile = GUICtrlCreateMenu("&File")
$AFMenuStart = GUICtrlCreateMenuItem("Start!", $AFMenuFile)
$AFMenuStop = GUICtrlCreateMenuItem("Stop", $AFMenuFile)
$AFSelection = GUICtrlCreateMenuItem("Selection Menu", $AFMenuFile)
$AFMenuPreferences = GUICtrlCreateMenuItem("Preferences", $AFMenuFile)
$AFMenuExit = GUICtrlCreateMenuItem("Exit", $AFMenuFile)
$AFMenuOptions = GUICtrlCreateMenu("&Options")
$AFMenuSpriteFinder = GUICtrlCreateMenu("Sprite Finder", $AFMenuOptions)
$AFMenuMoveSpriteFinder = GUICtrlCreateMenuItem("Move", $AFMenuSpriteFinder)
$AFMenuResizeSpriteFinder = GUICtrlCreateMenuItem("Resize", $AFMenuSpriteFinder)
$AFMenuBoneFinder = GUICtrlCreateMenu("Bone Finder", $AFMenuOptions)
$AFMenuMoveDropFinder = GUICtrlCreateMenuItem("Move", $AFMenuBoneFinder)
$AFMenuChooseColors = GUICtrlCreateMenu("Choose Colors", $AFMenuOptions)
$AFMenuChooseColorsSpriteFinder = GUICtrlCreateMenu("Sprite Finder", $AFMenuChooseColors)
$AFMenuChooseColorsPrimarySprite = GUICtrlCreateMenu("Primary Sprite Finder", $AFMenuChooseColorsSpriteFinder)
$AFMenuChooseColorsPrimarySpriteByColor = GUICtrlCreateMenuItem("By Color", $AFMenuChooseColorsPrimarySprite)
$AFMenuChooseColorsPrimarySpriteBySprite = GUICtrlCreateMenu("By Sprite", $AFMenuChooseColorsPrimarySprite)
$AFMenuChooseColorsPrimarySpriteBySpriteGoblin = GUICtrlCreateMenuItem("Goblin", $AFMenuChooseColorsPrimarySpriteBySprite)
$AFMenuChooseColorsSecondarySprite = GUICtrlCreateMenu("Secondary Sprite Finder", $AFMenuChooseColorsSpriteFinder)
$AFMenuChooseColorsSecondarySpriteByColor = GUICtrlCreateMenuItem("By Color", $AFMenuChooseColorsSecondarySprite)
$AFMenuChooseColorsSecondarySpriteBySprite = GUICtrlCreateMenu("By Sprite", $AFMenuChooseColorsSecondarySprite)
$AFMenuChooseColorsSecondarySpriteBySpriteGoblin = GUICtrlCreateMenuItem("Goblin", $AFMenuChooseColorsSecondarySpriteBySprite)
$AFMenuChooseColorsBoneFinder = GUICtrlCreateMenu("Bone Finder", $AFMenuChooseColors)
$AFMenuChooseColorsBonesByColor = GUICtrlCreateMenuItem("By Color", $AFMenuChooseColorsBoneFinder)
$AFMenuChooseColorsBonesByBone = GUICtrlCreateMenu("By Bone", $AFMenuChooseColorsBoneFinder)
$AFMenuChooseColorsBoneByBoneNormalBones = GUICtrlCreateMenuItem("Normal Bones", $AFMenuChooseColorsBonesByBone)
$AFMenuChooseColorsBoneByBoneBigBones = GUICtrlCreateMenuItem("Big Bones", $AFMenuChooseColorsBonesByBone)
$AFMenuChooseColorsFood = GUICtrlCreateMenu("Food", $AFMenuChooseColors)
$AFMenuChooseColorsSecondaryBonesByColor = GUICtrlCreateMenuItem("By Color", $AFMenuChooseColorsFood)
$AFMenuChooseColorsFoodByFood = GUICtrlCreateMenu("By Food", $AFMenuChooseColorsFood)
$AFMenuChooseColorsFoodByFoodCake = GUICtrlCreateMenuItem("Cake", $AFMenuChooseColorsFoodByFood)
$AFMenuChooseColorsFoodByFoodLobster = GUICtrlCreateMenuItem("Lobster", $AFMenuChooseColorsFoodByFood)
$AFMenuChooseColorsFoodByFoodShark = GUICtrlCreateMenuItem("Shark", $AFMenuChooseColorsFoodByFood)
$AFCheckIntervalMenu = GUICtrlCreateMenu("Check Interval", $AFMenuOptions)
$AFMenuCheckInterval2 = GUICtrlCreateMenuItem("2000(ms)", $AFCheckIntervalMenu)
$AFMenuCheckInterval4 = GUICtrlCreateMenuItem("4000(ms)", $AFCheckIntervalMenu)
$AFMenuCheckInterval6 = GUICtrlCreateMenuItem("6000(ms)", $AFCheckIntervalMenu)
$AFMenuCheckIntervalCustom = GUICtrlCreateMenuItem("Custom", $AFCheckIntervalMenu)
$AFAttackingIntervalMenu = GUICtrlCreateMenu("Attacking Interval", $AFMenuOptions)
$AFMenuAttackingIntervalMenuAttackingInterval2 = GUICtrlCreateMenuItem("2000(ms)", $AFAttackingIntervalMenu)
$AFMenuAttackingIntervalMenuAttackingInterval4 = GUICtrlCreateMenuItem("4000(ms)", $AFAttackingIntervalMenu)
$AFMenuAttackingIntervalMenuAttackingInterval6 = GUICtrlCreateMenuItem("6000(ms)", $AFAttackingIntervalMenu)
$AFMenuAttackingIntervalMenuAttackingIntervalCustom = GUICtrlCreateMenuItem("Custom", $AFAttackingIntervalMenu)
$AFMenuHelp = GUICtrlCreateMenu("&Help")
$AFMenuInstructions = GUICtrlCreateMenuItem("Instructions", $AFMenuHelp)
$AFMenuHotkeys = GUICtrlCreateMenu("HotKeys", $AFMenuHelp)
$AFMenuHotKeyStart = GUICtrlCreateMenuItem("Start (Ctrl - Z)", $AFMenuHotkeys)
$AFMenuHotKeyStop = GUICtrlCreateMenuItem("Stop (Ctrl - Z)", $AFMenuHotkeys)
$AFMenuHotKeyMove = GUICtrlCreateMenuItem("Move Ore Finder (Ctrl - A)", $AFMenuHotkeys)
$AFMenuHotKeyEmergencyStop = GUICtrlCreateMenuItem("Emeregency Stop (Ctrl + Alt - X)", $AFMenuHotkeys)

#EndRegion

#Region ;HYBERMINER GUI

$HMGUI = GUICreate("HYBERMINER v2.3", 301, 186, 359, 202)
GUISetBkColor(0x000000)
$HMCaptionStatus = GUICtrlCreateLabel("Status:", 5, 15, 38, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMLabelStatus = GUICtrlCreateLabel("Stopped", 48, 15, 44, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMDropColorDisplay = GUICtrlCreateLabel("Drop Finder Color", 176, 40, 91, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMCurrentColorDisplay = GUICtrlCreateLabel("Ore Finder Color", 175, 13, 86, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMStartButton = GUICtrlCreateButton("Start (Ctrl - Z)", 48, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$HMStopButton = GUICtrlCreateButton("Stop (Ctrl - X)", 152, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$HMCaptionCheckInterval = GUICtrlCreateLabel("Check Interval:", 5, 48, 78, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMCaptionMineInterval = GUICtrlCreateLabel("Mine Interval: ", 5, 80, 69, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMLabelCheckInterval = GUICtrlCreateLabel("N/A", 95, 48, 75, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMLabelMineInterval = GUICtrlCreateLabel("N/A", 95, 80, 75, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$HMMenuFile = GUICtrlCreateMenu("&File")
$HMMenuStart = GUICtrlCreateMenuItem("Start!", $HMMenuFile)
$HMMenuStop = GUICtrlCreateMenuItem("Stop", $HMMenuFile)
$HMSelection = GUICtrlCreateMenuItem("Selection Menu", $HMMenuFile)
$HMMenuPreferences = GUICtrlCreateMenuItem("Preferences", $HMMenuFile)
$HMMenuExit = GUICtrlCreateMenuItem("Exit", $HMMenuFile)
$HMMenuOptions = GUICtrlCreateMenu("&Options")
$HMMenuOreFinder = GUICtrlCreateMenu("Ore Finder", $HMMenuOptions)
$HMMenuMoveOreFinder = GUICtrlCreateMenuItem("Move", $HMMenuOreFinder)
$HMMenuResizeOreFinder = GUICtrlCreateMenuItem("Resize", $HMMenuOreFinder)
$HMMenuHideOreFinder = GUICtrlCreateMenuItem("Hide", $HMMenuOreFinder) ;<== Creates MenuItem Hide in the Ore Finder Menu
$HMMenuDropFinder = GUICtrlCreateMenu("Drop Finder", $HMMenuOptions)
$HMMenuMoveDropFinder = GUICtrlCreateMenuItem("Move", $HMMenuDropFinder)
$HMMenuHideDropFinder = GUICtrlCreateMenuItem("Hide", $HMMenuDropFinder) ;<== Creates MenuItem Hide in the Drop Finder Menu
$HMMenuChooseColors = GUICtrlCreateMenu("Choose Colors", $HMMenuOptions)
$HMMenuChooseColorsOre = GUICtrlCreateMenu("Ore Finder", $HMMenuChooseColors)
$HMMenuChooseColorsOreByColor = GUICtrlCreateMenuItem("By Color", $HMMenuChooseColorsOre)
$HMMenuChooseColorsOreByOre = GUICtrlCreateMenu("By Ore", $HMMenuChooseColorsOre)
$HMMenuOreTin = GUICtrlCreateMenuItem("Tin", $HMMenuChooseColorsOreByOre)
$HMMenuOreCopper = GUICtrlCreateMenuItem("Copper", $HMMenuChooseColorsOreByOre)
$HMMenuOreIron = GUICtrlCreateMenuItem("Iron", $HMMenuChooseColorsOreByOre)
$HMMenuOreCoal = GUICtrlCreateMenuItem("Coal", $HMMenuChooseColorsOreByOre)
$HMMenuOreGold = GUICtrlCreateMenuItem("Gold", $HMMenuChooseColorsOreByOre)
$HMMenuOreMithril = GUICtrlCreateMenuItem("Mithril", $HMMenuChooseColorsOreByOre)
$HMMenuOreAdamantite = GUICtrlCreateMenuItem("Adamantite", $HMMenuChooseColorsOreByOre)
$HMMenuOreRunite = GUICtrlCreateMenuItem("Runite", $HMMenuChooseColorsOreByOre)
$HMMenuChooseColorsDrop = GUICtrlCreateMenu("Drop Finder", $HMMenuChooseColors)
$HMMenuChooseColorsDropByColor = GUICtrlCreateMenuItem("By Color", $HMMenuChooseColorsDrop)
$HMMenuChooseColorsDroByOre = GUICtrlCreateMenu("By Ore", $HMMenuChooseColorsDrop)
$HMMenuDropTin = GUICtrlCreateMenuItem("Tin", $HMMenuChooseColorsDroByOre)
$HMMenuDropCopper = GUICtrlCreateMenuItem("Copper", $HMMenuChooseColorsDroByOre)
$HMMenuDropIron = GUICtrlCreateMenuItem("Iron", $HMMenuChooseColorsDroByOre)
$HMMenuDropCoal = GUICtrlCreateMenuItem("Coal", $HMMenuChooseColorsDroByOre)
$HMMenuDropGold = GUICtrlCreateMenuItem("Gold", $HMMenuChooseColorsDroByOre)
$HMMenuDropMithril = GUICtrlCreateMenuItem("Mithril", $HMMenuChooseColorsDroByOre)
$HMMenuDropAdamantite = GUICtrlCreateMenuItem("Adamantite", $HMMenuChooseColorsDroByOre)
$HMMenuDropRunite = GUICtrlCreateMenuItem("Runite", $HMMenuChooseColorsDroByOre)
$HMCheckIntervalMenu = GUICtrlCreateMenu("Check Interval", $HMMenuOptions)
$HMT1[0] = GUICtrlCreateMenuItem("200(ms)", $HMCheckIntervalMenu)
$HMT1[1] = GUICtrlCreateMenuItem("500(ms)", $HMCheckIntervalMenu)
$HMT1[2] = GUICtrlCreateMenuItem("1000(ms)", $HMCheckIntervalMenu)
$HMT1[3] = GUICtrlCreateMenuItem("2000(ms)", $HMCheckIntervalMenu)
$HMT1[4] = GUICtrlCreateMenuItem("Custom", $HMCheckIntervalMenu)
$HMMiningCheckIntervalMenu = GUICtrlCreateMenu("Mining Interval", $HMMenuOptions)
$HMT2[0] = GUICtrlCreateMenuItem("1000(ms)", $HMMiningCheckIntervalMenu)
$HMT2[1] = GUICtrlCreateMenuItem("2000(ms)", $HMMiningCheckIntervalMenu)
$HMT2[2] = GUICtrlCreateMenuItem("4000(ms)", $HMMiningCheckIntervalMenu)
$HMT2[3] = GUICtrlCreateMenuItem("6000(ms)", $HMMiningCheckIntervalMenu)
$HMT2[4] = GUICtrlCreateMenuItem("Custom", $HMMiningCheckIntervalMenu)
$HMMenuHelp = GUICtrlCreateMenu("&Help")  
$HMMenuInstructions = GUICtrlCreateMenuItem("Instructions", $HMMenuHelp)
$HMMenuHotkeys = GUICtrlCreateMenu("HotKeys", $HMMenuHelp)
$HMMenuHotKeyStart = GUICtrlCreateMenuItem("Start (Ctrl - Z)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Start (Ctrl - Z) in the Hotkeys Menu
$HMMenuHotKeyStop = GUICtrlCreateMenuItem("Stop (Ctrl - X)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Stop (Ctrl - X) in the Hotkeys Menu
$HMMenuHotKeyMove = GUICtrlCreateMenuItem("Move Ore Finder (Ctrl - A)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Move Ore Finder (Ctrl - A) in the Hotkeys Menu
$HMMenuHotKeySmallMove = GUICtrlCreateMenuItem("Move Drop Finder (Ctrl - Q)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Move Drop Finder (Ctrl - Q) in the Hotkeys Menu
$HMMenuHotKeyHide = GUICtrlCreateMenuItem("Hide Red Boxes (Ctrl - W)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - W) in the Hotkeys Menu
$HMMenuHotKeyShow = GUICtrlCreateMenuItem("Show Red Boxes (Ctrl - S)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - S) in the Hotkeys Menu
$HMMenuHotKeyEmergencyStop = GUICtrlCreateMenuItem("Emeregency Stop (Ctrl + Alt - X)", $HMMenuHotkeys) ;<== Cretaes the MenuItem Emeregency Stop (Ctrl + Alt - X) in the Hotkeys Menu
;Draws the Top of the Ore Finder Box
$HMTop = GUICreate("Top Line", $HMScanWidth, 2, $HMx, $HMy, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Ore Finder Box
$HMLeft = GUICreate("Left Line", 2, $HMScanHeight, $HMx, $HMy, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Ore Finder Box
$HMRight = GUICreate("Right Line", 2, $HMScanHeight, $HMx + $HMScanWidth, $HMy, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Ore Finder Box
$HMBottom = GUICreate("Bottom Line", $HMScanWidth, 2, $HMx, $HMy + $HMScanHeight, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Top of the Drop Finder Box
$HMsmallTop = GUICreate("Top Line", $HMSmallScanWidth, 2, $HMsmallx, $HMsmally, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Drop Finder Box
$HMsmallLeft = GUICreate("Left Line", 2, $HMSmallScanHeight, $HMsmallx, $HMsmally, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Drop Finder Box
$HMsmallRight = GUICreate("Right Line", 2, $HMSmallScanHeight, $HMsmallx + $HMSmallScanWidth - 2, $HMsmally, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Drop Finder Box
$HMsmallBottom = GUICreate("Bottom Line", $HMSmallScanWidth, 2, $HMsmallx, $HMsmally + $HMSmallScanHeight, $WS_POPUP, -1, $HMGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)

#EndRegion

#Region ;POWER CUTTER GUI

$PCGUI = GUICreate("POWER Cutter", 301, 186, 359, 202)
GUISetBkColor(0x000000)
$PCCaptionStatus = GUICtrlCreateLabel("Status:", 5, 15, 38, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCLabelStatus = GUICtrlCreateLabel("Stopped", 48, 15, 44, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCDropColorDisplay = GUICtrlCreateLabel("Drop Finder Color", 176, 40, 91, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCCurrentColorDisplay = GUICtrlCreateLabel("Tree Finder Color", 175, 13, 90, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCStartButton = GUICtrlCreateButton("Start (Ctrl - Z)", 48, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$PCStopButton = GUICtrlCreateButton("Stop (Ctrl - X)", 152, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$PCCaptionCheckInterval = GUICtrlCreateLabel("Check Interval:", 5, 48, 78, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCCaptioncutInterval = GUICtrlCreateLabel("Cutting Interval:", 5, 80, 80, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCLabelCheckInterval = GUICtrlCreateLabel("N/A", 95, 48, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCLableCutInterval = GUICtrlCreateLabel("N/A", 95, 80, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PCMenuFile = GUICtrlCreateMenu("&File")
$PCMenuStart = GUICtrlCreateMenuItem("Start!", $PCMenuFile)
$PCMenuStop = GUICtrlCreateMenuItem("Stop", $PCMenuFile)
$PCSelection = GUICtrlCreateMenuItem("Selection Menu", $PCMenuFile)
$PCMenuPreferences = GUICtrlCreateMenuItem("Preferences", $PCMenuFile)
$PCMenuExit = GUICtrlCreateMenuItem("Exit", $PCMenuFile)
$PCMenuOptions = GUICtrlCreateMenu("&Options")
$PCMenuTreeFinder = GUICtrlCreateMenu("Tree Finder", $PCMenuOptions)
$PCMenuMoveTreeFinder = GUICtrlCreateMenuItem("Move", $PCMenuTreeFinder)
$PCMenuHideTreeFinder = GUICtrlCreateMenuItem("Hide", $PCMenuTreeFinder) ;<== Creates MenuItem Hide in the Tree Finder Menu
$PCMenuResizeTreeFinder = GUICtrlCreateMenuItem("Resize", $PCMenuTreeFinder)
$PCMenuDropFinder = GUICtrlCreateMenu("Drop Finder", $PCMenuOptions)
$PCMenuMoveDropFinder = GUICtrlCreateMenuItem("Move", $PCMenuDropFinder)
$PCMenuHideDropFinder = GUICtrlCreateMenuItem("Hide", $PCMenuDropFinder) ;<== Creates MenuItem Hide in the Drop Finder Menu
$PCMenuChooseColors = GUICtrlCreateMenu("Choose Colors", $PCMenuOptions)
$PCMenuChooseColorsTree = GUICtrlCreateMenu("Tree Finder", $PCMenuChooseColors)
$PCMenuChooseColorsTreeByColor = GUICtrlCreateMenuItem("By Color", $PCMenuChooseColorsTree)
$PCMenuChooseColorsByTree = GUICtrlCreateMenu("By Tree", $PCMenuChooseColorsTree)
$PCMenuTreeNormal = GUICtrlCreateMenuItem("Normal", $PCMenuChooseColorsByTree)
$PCMenuTreeOak = GUICtrlCreateMenuItem("Oak", $PCMenuChooseColorsByTree)
$PCMenuTreeWillow = GUICtrlCreateMenuItem("Willow", $PCMenuChooseColorsByTree)
$PCMenuTreeMaple = GUICtrlCreateMenuItem("Maple", $PCMenuChooseColorsByTree)
$PCMenuTreeYew = GUICtrlCreateMenuItem("Yew", $PCMenuChooseColorsByTree)
$PCMenuTreeMagic = GUICtrlCreateMenuItem("Magic", $PCMenuChooseColorsByTree)
$PCMenuChooseColorsDrop = GUICtrlCreateMenu("Drop Finder", $PCMenuChooseColors)
$PCMenuChooseColorsDropByColor = GUICtrlCreateMenuItem("By Color", $PCMenuChooseColorsDrop)
$PCMenuChooseColorsDroByTree = GUICtrlCreateMenu("By Tree", $PCMenuChooseColorsDrop)
$PCMenuDropNormal = GUICtrlCreateMenuItem("Normal", $PCMenuChooseColorsDroByTree)
$PCMenuDropOak = GUICtrlCreateMenuItem("Oak", $PCMenuChooseColorsDroByTree)
$PCMenuDropWillow = GUICtrlCreateMenuItem("Willow", $PCMenuChooseColorsDroByTree)
$PCMenuDropMaple = GUICtrlCreateMenuItem("Maple", $PCMenuChooseColorsDroByTree)
$PCMenuDropYew = GUICtrlCreateMenuItem("Yew", $PCMenuChooseColorsDroByTree)
$PCMenuDropMagic = GUICtrlCreateMenuItem("Magic", $PCMenuChooseColorsDroByTree)
$PCCheckIntervalMenu = GUICtrlCreateMenu("Check Interval", $PCMenuOptions)
$PCMenuCheckInterval2 = GUICtrlCreateMenuItem("2000(ms)", $PCCheckIntervalMenu)
$PCMenuCheckInterval4 = GUICtrlCreateMenuItem("4000(ms)", $PCCheckIntervalMenu)
$PCMenuCheckInterval6 = GUICtrlCreateMenuItem("6000(ms)", $PCCheckIntervalMenu)
$PCMenuCheckIntervalCustom = GUICtrlCreateMenuItem("Custom", $PCCheckIntervalMenu)
$PCCuttingIntervalMenu = GUICtrlCreateMenu("Cutting Interval", $PCMenuOptions)
$PCMenuCuttingInterval2 = GUICtrlCreateMenuItem("2000(ms)", $PCCuttingIntervalMenu)
$PCMenuCuttingInterval4 = GUICtrlCreateMenuItem("4000(ms)", $PCCuttingIntervalMenu)
$PCMenuCuttingInterval6 = GUICtrlCreateMenuItem("6000(ms)", $PCCuttingIntervalMenu)
$PCMenuCuttingIntervalCustom = GUICtrlCreateMenuItem("Custom", $PCCuttingIntervalMenu)
$PCMenuHelp = GUICtrlCreateMenu("&Help")
$PCMenuInstructions = GUICtrlCreateMenuItem("Instructions", $PCMenuHelp)
$PCMenuHotkeys = GUICtrlCreateMenu("HotKeys", $PCMenuHelp)
$PCMenuHotKeyStart = GUICtrlCreateMenuItem("Start (Ctrl - Z)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Start (Ctrl - Z) in the Hotkeys Menu
$PCMenuHotKeyStop = GUICtrlCreateMenuItem("Stop (Ctrl - X)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Stop (Ctrl - X) in the Hotkeys Menu
$PCMenuHotKeyMove = GUICtrlCreateMenuItem("Move Tree Finder (Ctrl - A)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Move Ore Finder (Ctrl - A) in the Hotkeys Menu
$PCMenuHotKeySmallMove = GUICtrlCreateMenuItem("Move Drop Finder (Ctrl - Q)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Move Drop Finder (Ctrl - Q) in the Hotkeys Menu
$PCMenuHotKeyHide = GUICtrlCreateMenuItem("Hide Red Boxes (Ctrl - W)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - W) in the Hotkeys Menu
$PCMenuHotKeyShow = GUICtrlCreateMenuItem("Show Red Boxes (Ctrl - S)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - S) in the Hotkeys Menu
$PCMenuHotKeyEmergencyStop = GUICtrlCreateMenuItem("Emeregency Stop (Ctrl + Alt - X)", $PCMenuHotkeys) ;<== Cretaes the MenuItem Emeregency Stop (Ctrl + Alt - X) in the Hotkeys Menu
;Draws the Top of the Ore Finder Box
$PCTop = GUICreate("Top Line", $PCScanWidth, 2, $PCx, $PCy, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Ore Finder Box
$PCLeft = GUICreate("Left Line", 2, $PCScanHeight, $PCx, $PCy, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Ore Finder Box
$PCRight = GUICreate("Right Line", 2, $PCScanHeight, $PCx + $PCScanWidth, $PCy, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Ore Finder Box
$PCBottom = GUICreate("Bottom Line", $PCScanWidth, 2, $PCx, $PCy + $PCScanHeight, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Top of the Drop Finder Box
$PCsmallTop = GUICreate("Top Line", $PCSmallScanWidth, 2, $PCsmallx, $PCsmally, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Drop Finder Box
$PCsmallLeft = GUICreate("Left Line", 2, $PCSmallScanHeight, $PCsmallx, $PCsmally, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Drop Finder Box
$PCsmallRight = GUICreate("Right Line", 2, $PCSmallScanHeight, $PCsmallx + $PCSmallScanWidth - 2, $PCsmally, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Drop Finder Box
$PCsmallBottom = GUICreate("Bottom Line", $PCSmallScanWidth, 2, $PCsmallx, $PCsmally + $PCSmallScanHeight, $WS_POPUP, -1, $PCGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)


#EndRegion

#Region ;POWER FISHER GUI

$PFGUI = GUICreate("POWER Fisher", 327, 186, 359, 202)
GUISetBkColor(0x000000)
$PFCaptionStatus = GUICtrlCreateLabel("Status:", 5, 15, 38, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFLabelStatus = GUICtrlCreateLabel("Stopped", 48, 15, 44, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFDropColorDisplay = GUICtrlCreateLabel("Drop Finder Color", 176, 40, 91, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFCurrentColorDisplay = GUICtrlCreateLabel("Fishing Spot Finder Color", 175, 13, 127, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFStartButton = GUICtrlCreateButton("Start (Ctrl - Z)", 48, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$PFStopButton = GUICtrlCreateButton("Stop (Ctrl - X)", 160, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$PFCaptionCheckInterval = GUICtrlCreateLabel("Check Interval:", 5, 48, 78, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFCaptioncutInterval = GUICtrlCreateLabel("Fishing Interval:", 5, 80, 81, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFLabelCheckInterval = GUICtrlCreateLabel("N/A", 95, 48, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFLableFishInterval = GUICtrlCreateLabel("N/A", 95, 80, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFSecondDropColorDisplay = GUICtrlCreateLabel("Secondary Drop Finder Color", 176, 66, 147, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFMenuFile = GUICtrlCreateMenu("&File")
$PFMenuStart = GUICtrlCreateMenuItem("Start!", $PFMenuFile)
$PFMenuStop = GUICtrlCreateMenuItem("Stop", $PFMenuFile)
$PFSelection = GUICtrlCreateMenuItem("Selection Menu", $PFMenuFile)
$PFMenuPreferences = GUICtrlCreateMenuItem("Preferences", $PFMenuFile)
$PFMenuExit = GUICtrlCreateMenuItem("Exit", $PFMenuFile)
$PFMenuOptions = GUICtrlCreateMenu("&Options")
$PFMenuFishFinder = GUICtrlCreateMenu("Fish Finder", $PFMenuOptions)
$PFMenuMoveFishFinder = GUICtrlCreateMenuItem("Move", $PFMenuFishFinder)
$PFMenuHideFishFinder = GUICtrlCreateMenuItem("Hide", $PFMenuFishFinder) ;<== Creates MenuItem Hide in the Fish Finder Menu
$PFMenuResizeFishFinder = GUICtrlCreateMenuItem("Resize", $PFMenuFishFinder)
$PFMenuDropFinder = GUICtrlCreateMenu("Drop Finder", $PFMenuOptions)
$PFMenuMoveDropFinder = GUICtrlCreateMenuItem("Move", $PFMenuDropFinder)
$PFMenuHideDropFinder = GUICtrlCreateMenuItem("Hide", $PFMenuDropFinder) ;<== Creates MenuItem Hide in the Drop Finder Menu
$PFMenuChooseColors = GUICtrlCreateMenu("Choose Colors", $PFMenuOptions)
$PFMenuChooseColorsFish = GUICtrlCreateMenu("Fish Finder", $PFMenuChooseColors)
$PFMenuChooseColorsFishByColor = GUICtrlCreateMenuItem("By Color", $PFMenuChooseColorsFish)
$PFMenuChooseColorsFishByFish = GUICtrlCreateMenu("By Fish", $PFMenuChooseColorsFish)
$PFMenuFishShrimp= GUICtrlCreateMenuItem("Shrimp", $PFMenuChooseColorsFishByFish)
$PFMenuFishTrout = GUICtrlCreateMenuItem("Trout", $PFMenuChooseColorsFishByFish)
$PFMenuFishSalmon = GUICtrlCreateMenuItem("Salmon", $PFMenuChooseColorsFishByFish)
$PFMenuChooseColorsDrop = GUICtrlCreateMenu("Drop Finder", $PFMenuChooseColors)
$PFMenuChooseColorsDropByColor = GUICtrlCreateMenuItem("By Color", $PFMenuChooseColorsDrop)
$PFMenuChooseColorsDropByFish = GUICtrlCreateMenu("By Fish", $PFMenuChooseColorsDrop)
$PFMenuDropShrimp = GUICtrlCreateMenuItem("Shrimp", $PFMenuChooseColorsDropByFish)
$PFMenuDropTrout = GUICtrlCreateMenuItem("Trout", $PFMenuChooseColorsDropByFish)
$PFMenuDropSalmon = GUICtrlCreateMenuItem("Salmon", $PFMenuChooseColorsDropByFish)
$PFCheckIntervalMenu = GUICtrlCreateMenu("Check Interval", $PFMenuOptions)
$PFCheckInterval2 = GUICtrlCreateMenuItem("2000(ms)", $PFCheckIntervalMenu)
$PFCheckInterval4 = GUICtrlCreateMenuItem("4000(ms)", $PFCheckIntervalMenu)
$PFCheckInterval6 = GUICtrlCreateMenuItem("6000(ms)", $PFCheckIntervalMenu)
$PFCheckIntervalCustom = GUICtrlCreateMenuItem("Custom", $PFCheckIntervalMenu)
$PFFishingIntervalMenu = GUICtrlCreateMenu("Fishing Interval", $PFMenuOptions)
$PFFishingInterval2 = GUICtrlCreateMenuItem("2000(ms)", $PFFishingIntervalMenu)
$PFFishingInterval4 = GUICtrlCreateMenuItem("4000(ms)", $PFFishingIntervalMenu)
$PFFishingInterval6 = GUICtrlCreateMenuItem("6000(ms)", $PFFishingIntervalMenu)
$PFFishingIntervalCustom = GUICtrlCreateMenuItem("Custom", $PFFishingIntervalMenu)
$PFMenuHelp = GUICtrlCreateMenu("&Help")
$PFMenuInstructions = GUICtrlCreateMenuItem("Instructions", $PFMenuHelp)
$PFMenuHotkeys = GUICtrlCreateMenu("HotKeys", $PFMenuHelp)
$PFMenuHotKeyStart = GUICtrlCreateMenuItem("Start (Ctrl - Z)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Start (Ctrl - Z) in the Hotkeys Menu
$PFMenuHotKeyStop = GUICtrlCreateMenuItem("Stop (Ctrl - X)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Stop (Ctrl - X) in the Hotkeys Menu
$PFMenuHotKeyMove = GUICtrlCreateMenuItem("Move Ore Finder (Ctrl - A)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Move Ore Finder (Ctrl - A) in the Hotkeys Menu
$PFMenuHotKeySmallMove = GUICtrlCreateMenuItem("Move Drop Finder (Ctrl - Q)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Move Drop Finder (Ctrl - Q) in the Hotkeys Menu
$PFMenuHotKeyHide = GUICtrlCreateMenuItem("Hide Red Boxes (Ctrl - W)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - W) in the Hotkeys Menu
$PFMenuHotKeyShow = GUICtrlCreateMenuItem("Show Red Boxes (Ctrl - S)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - S) in the Hotkeys Menu
$PFMenuHotKeyEmergencyStop = GUICtrlCreateMenuItem("Emeregency Stop (Ctrl + Alt - X)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Emeregency Stop (Ctrl + Alt - X) in the Hotkeys Menu
;Draws the Top of the Ore Finder Box
$PFTop = GUICreate("Top Line", $PFScanWidth, 2, $PFx, $PFy, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Ore Finder Box
$PFLeft = GUICreate("Left Line", 2, $PFScanHeight, $PFx, $PFy, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Ore Finder Box
$PFRight = GUICreate("Right Line", 2, $PFScanHeight, $PFx + $PFScanWidth, $PFy, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Ore Finder Box
$PFBottom = GUICreate("Bottom Line", $PFScanWidth, 2, $PFx, $PFy + $PFScanHeight, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Top of the Drop Finder Box
$PFsmallTop = GUICreate("Top Line", $PFSmallScanWidth, 2, $PFsmallx, $PFsmally, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Drop Finder Box
$PFsmallLeft = GUICreate("Left Line", 2, $PFSmallScanHeight, $PFsmallx, $PFsmally, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Drop Finder Box
$PFsmallRight = GUICreate("Right Line", 2, $PFSmallScanHeight, $PFsmallx + $PFSmallScanWidth - 2, $PFsmally, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Drop Finder Box
$PFsmallBottom = GUICreate("Bottom Line", $PFSmallScanWidth, 2, $PFsmallx, $PFsmally + $PFSmallScanHeight, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)


#EndRegion
;
;
;
#Region ;MAIN LOOP
Do
    $msg = GUIGetMsg(1)

            Selection()
            
Until $msg[0] = $GUI_EVENT_CLOSE
#EndRegion
;
;
;
#Region ;MAIN FUNCTIONS
#EndRegion
#Region ;SELECTION FUNCTIONS

Func Selection()
    Do
        WinSetOnTop($SELECTGUI, "", 1)
   $msg = GUIGetMsg(1)
    Select
        
        Case $msg[0] = $AFButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $AFGUI)
        AUTOFIGHTER()
        
        Case $msg[0] = $PCButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $PCGUI)
        POWERCUTTER()
        
        Case $msg[0] = $PFButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $PFGUI)
        GUISwitch($PFGUI)
        POWERFISHER()
        
        Case $msg[0] = $HMButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $HMGUI)
        HYBERMINER()
        
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc 

#EndRegion

#Region ;AUTO FIGHTER FUNCTIONS
Func AUTOFIGHTER()
    Do      
   $msg = GUIGetMsg(1)
    Select
        
        Case $msg[0] = $AFSelection And $msg[1] = $AFGUI
        GUISetState(@SW_HIDE, $AFGUI)
        GUISetState(@SW_SHOW, $SELECTGUI)
        Selection()
        
        Case $msg[0] = $AFMenuExit And $msg[1] = $AFGUI
        $Exitbox = MsgBox(36, "Would you like to quit?", "Select 'Yes' to quit, otherwise click 'No'")
        If $Exitbox = 6 then
            Exit
        Endif
            
        
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc 
#EndRegion

#Region ;HYBERMINER FUNCTIONS
Func HYBERMINER()
    Do      
        WinSetOnTop($HMGUI, "", 1)

HotKeySet("^z", "HMStart")
HotKeySet("^x", "HMStop")
HotKeySet("^a", "HMMove")
HotKeySet("^q", "HMSmallMove")
HotKeySet("^w", "HMHideBoth")
HotKeySet("^s", "HMShowBoth")
HotKeySet("!^x", "Abort")

    $HMdata = PixelSearch($HMsmallx, $HMsmally, $HMsmallx + $HMSmallScanWidth, $HMsmally + $HMSmallScanHeight, $HMDropColor, $HMSens)
    If $HMdata <> 1 Then
        HMDrop()
    EndIf

   $msg = GUIGetMsg(1)
    Select 
        
        Case $msg[0] = $HMStartButton Or $msg[0] = $HMMenuStart Or $msg[0] = $HMMenuHotKeyStart And $msg[1] = $HMGUI
        HMStart()
        
        Case $msg[0] = $HMStopButton Or $msg[0] = $HMMenuStop Or $msg[0] = $HMMenuHotKeyStop
            HMStop()
        
        Case $msg[0] = $HMSelection And $msg[1] = $HMGUI
        HMHideBoth()
        GUISetState(@SW_HIDE, $HMGUI)
        GUISetState(@SW_SHOW, $SELECTGUI)
        Selection()
        
        Case $msg[0] = $HMMenuExit And $msg[1] = $HMGUI
        $Exitbox = MsgBox(36, "Would you like to quit?", "Select 'Yes' to quit, otherwise click 'No'")
        If $Exitbox = 6 then
            Exit
        Endif
            
        Case $msg[0] = $HMMenuMoveOreFinder And $msg[1] = $HMGUI
            HMMove()    
            
        Case $msg[0] = $HMMenuMoveDropFinder And $msg[1] = $HMGUI
            HMSmallMove()
            
        Case $msg[0] = $HMMenuHotKeySmallMove And $msg[1] = $HMGUI
            HMSmallMove()
            
        Case $msg[0] = $HMMenuResizeOreFinder And $msg[1] = $HMGUI
            HMResize()
            HMHide()
            
        Case $msg[0] = $HMMenuHideOreFinder And $msg[1] = $HMGUI
            HMHide()
            
        Case $msg[0] = $HMMenuHideDropFinder And $msg[1] = $HMGUI
            HMSmallHide()
            
        Case $msg[0] = $HMMenuHotKeyHide And $msg[1] = $HMGUI
            HMHideBoth()
            
        Case $msg[0] = $HMMenuHotKeyShow And $msg[1] = $HMGUI
            HMShowBoth()
            
        Case $msg[0] = $HMMenuChooseColorsOreByColor And $msg[1] = $HMGUI
            HMOreFindChooseColor()
            
        Case $msg[0] = $HMMenuChooseColorsDropByColor And $msg[1] = $HMGUI
            HMDropFindChooseColor()
            
        Case $msg[0] = $HMT1[0] And $msg[1] = $HMGUI
            $HMSleepCheck = 200
        Case $msg[0] = $HMT1[1] And $msg[1] = $HMGUI
            $HMSleepCheck = 500
        Case $msg[0] = $HMT1[2] And $msg[1] = $HMGUI
            $HMSleepCheck = 1000
        Case $msg[0] = $HMT1[3] And $msg[1] = $HMGUI
            $HMSleepCheck = 2000
        Case $msg[0] = $HMT1[4] And $msg[1] = $HMGUI
            $Input = Number(InputBox("Custom Checking Time", "How many ms do you want to wait? (1000ms = 1sec)", $HMSleepCheck, "", 200, 162, $HMx + 111, $HMy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $HMSleepCheck = Round($Input)
            Else
                $HMSleepCheck = 500
            EndIf
        Case $msg[0] = $HMT2[0] And $msg[1] = $HMGUI
            $HMSleepMine = 1000
        Case $msg[0] = $HMT2[1] And $msg[1] = $HMGUI
            $HMSleepMine = 2000
        Case $msg[0] = $HMT2[2] And $msg[1] = $HMGUI
            $HMSleepMine = 4000
        Case $msg[0] = $HMT2[3] And $msg[1] = $HMGUI
            $HMSleepMine = 6000
        Case $msg[0] = $HMT2[4] And $msg[1] = $HMGUI
            $Input = Number(InputBox("Custom Mining Time", "How many ms do you want to wait? (1000ms = 1sec)", $HMSleepMine, "", 200, 162, $HMx + 111, $HMy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $HMSleepMine = Round($Input)
            Else
                $HMSleepMine = 4000
            EndIf
            
            
        Case $msg[0] = $HMMenuOreTin And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorTin
            HMSetColor()
        Case $msg[0] = $HMMenuOreCopper And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorCopper
            HMSetColor()
        Case $msg[0] = $HMMenuOreIron And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorIron
            HMSetColor()
        Case $msg[0] = $HMMenuOreCoal And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorCoal
            HMSetColor()
        Case $msg[0] = $HMMenuOreGold And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorGold
            HMSetColor()
        Case $msg[0] = $HMMenuOreMithril And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorMithril
            HMSetColor()
        Case $msg[0] = $HMMenuOreAdamantite And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorAddy
            HMSetColor()
        Case $msg[0] = $HMMenuOreRunite And $msg[1] = $HMGUI
            $HMCurrentColor = $HMColorRunite
            HMSetColor()
            
            
        Case $msg[0] = $HMMenuDropTin And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorTin
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropCopper And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorCopper
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropIron And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorIron
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropCoal And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorCoal
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropGold And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorGold
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropMithril And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorMithril
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropAdamantite And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorAddy
            HMSetDropColor()
        Case $msg[0] = $HMMenuDropRunite And $msg[1] = $HMGUI
            $HMCurrentDropColor = $HMDropColorRunite
            HMSetDropColor()
            
        Case $msg[0] = $HMMenuInstructions And $msg[1] = $HMGUI
            $var = FileExists("ReadMe.txt")
            If $var = 1 Then
                ShellExecuteWait("ReadMe.txt")
            Else
                SplashTextOn("Error:", "File Not Found! You must have deleted it!", 200, 300)
            EndIf
        Case $msg[0] = $HMDropColorDisplay And $msg[1] = $HMGUI
            HMDropFindChooseColor()
        Case $msg[0] = $HMCurrentColorDisplay And $msg[1] = $HMGUI
            HMOreFindChooseColor()  
            
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc 
;
;
;
;

Func HMStart()
    HMShowBoth()
    HMCheck()
    HMSetBothColor()

EndFunc   ;==>Start

Func HMStop()
    HMHideBoth()
    HMReSetColor()
    AdlibDisable()
    GUICtrlSetData($HMLabelStatus, "Stopped")

EndFunc   ;==>Stop

Func HMCheck()
    
    Sleep(Random(0, 500, 1))
    
    $HMPixel = PixelSearch($HMx + 2, $HMy, $HMx + 2 + $HMScanWidth, $HMy + $HMScanHeight, $HMCurrentColor, $HMSens)
    
    If Not @error Then
        
        MouseClick("Left", $HMPixel[0], $HMPixel[1], 1, 2)
        GUICtrlSetData($HMLabelStatus, "Mining")
        $HMIdle = 0
        AdlibEnable("HMCheck", $HMSleepMine)
        
    Else
        
        GUICtrlSetData($HMLabelStatus, "Checking")
        $HMIdle += $HMSleepCheck
        If $HMIdle >= 60000 Then
            MouseClick("Left")
            $HMIdle = 0
        EndIf

        AdlibEnable("HMCheck", $HMSleepCheck)
    EndIf

    GUICtrlSetData($HMLabelCheckInterval, "" & $HMSleepCheck / 1000 & " Seconds")
    GUICtrlSetData($HMLabelMineInterval, "" & $HMSleepMine / 1000 & " Seconds")


EndFunc   ;==>Check

Func HMSetColor()
    GUICtrlSetBkColor($HMCurrentColorDisplay, $HMCurrentColor)
EndFunc   ;==>SetColor

Func HMSetDropColor()
    GUICtrlSetBkColor($HMDropColorDisplay, $HMCurrentDropColor)
EndFunc   ;==>SetDropColor

Func HMSetBothColor()
    GUICtrlSetBkColor($HMCurrentColorDisplay, $HMCurrentColor)
    GUICtrlSetBkColor($HMDropColorDisplay, $HMCurrentDropColor)
EndFunc   ;==>SetBothColor

Func HMReSetColor()
    GUICtrlSetBkColor($HMCurrentColorDisplay, 0x000000)
    GUICtrlSetBkColor($HMDropColorDisplay, 0x000000)
EndFunc   ;==>ReSetColor

Func HMDrop()
    $HMdata = PixelSearch($HMsmallx, $HMsmally, $HMsmallx + $HMSmallScanWidth, $HMsmally + $HMSmallScanHeight, $HMDropColor, $HMSens)
    GUICtrlSetData($HMLabelStatus, "Droping Ores")
    $HMIdle = 0
    
    
    ;Searches the Inventory for the Drop Color
    $HMpos = PixelSearch(810, 350, 990, 570, $HMDropColor, $HMSens)
    ;Makes $pos an Array
    If IsArray($HMpos) Then
        ;Moves Mouse to the Ore that was detected
        MouseMove($HMpos[0], $HMpos[1])
        ;Right Clicks the Ore
        MouseClick("right", $HMpos[0], $HMpos[1])
        ;Left Clicks the D
        ;Moves the Mouse Down to the Drop Option
        MouseMove($HMpos[0], $HMpos[1] + 45)
        ;Left Clicks the Drop Option
        MouseClick("left", $HMpos[0], $HMpos[1] + 45)
        ;Left Clicks the D
    EndIf
    
    AdlibEnable("HMCheck", $HMSleepDrop)
    
EndFunc   ;==>Drop

Func HMMove()
    
    HMShow()
    
    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $HMMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($HMTop, "", $HMMousePos[0], $HMMousePos[1])
        WinMove($HMLeft, "", $HMMousePos[0], $HMMousePos[1])
        WinMove($HMRight, "", $HMMousePos[0] + $HMScanWidth - 2, $HMMousePos[1])
        WinMove($HMBottom, "", $HMMousePos[0], $HMMousePos[1] + $HMScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $HMx = $HMMousePos[0]
        $HMy = $HMMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            HMHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Move

Func HMSmallMove()

    HMSmallShow()

    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $HMMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($HMsmallTop, "", $HMMousePos[0], $HMMousePos[1])
        WinMove($HMsmallLeft, "", $HMMousePos[0], $HMMousePos[1])
        WinMove($HMsmallRight, "", $HMMousePos[0] + $HMSmallScanWidth - 2, $HMMousePos[1])
        WinMove($HMsmallBottom, "", $HMMousePos[0], $HMMousePos[1] + $HMSmallScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $HMsmallx = $HMMousePos[0]
        $HMsmally = $HMMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            HMSmallHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>SmallMove

Func HMHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $HMTop)
    GUISetState(@SW_HIDE, $HMBottom)
    GUISetState(@SW_HIDE, $HMLeft)
    GUISetState(@SW_HIDE, $HMRight)
    
EndFunc   ;==>Hide

Func HMSmallHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $HMsmallTop)
    GUISetState(@SW_HIDE, $HMsmallBottom)
    GUISetState(@SW_HIDE, $HMsmallLeft)
    GUISetState(@SW_HIDE, $HMsmallRight)
    
EndFunc   ;==>SmallHide

Func HMHideBoth()

    Sleep(1000)
    GUISetState(@SW_HIDE, $HMTop)
    GUISetState(@SW_HIDE, $HMBottom)
    GUISetState(@SW_HIDE, $HMLeft)
    GUISetState(@SW_HIDE, $HMRight)

    GUISetState(@SW_HIDE, $HMsmallTop)
    GUISetState(@SW_HIDE, $HMsmallBottom)
    GUISetState(@SW_HIDE, $HMsmallLeft)
    GUISetState(@SW_HIDE, $HMsmallRight)
    
EndFunc   ;==>HideBoth

Func HMShow()

    GUISetState(@SW_SHOW, $HMTop)
    GUISetState(@SW_SHOW, $HMBottom)
    GUISetState(@SW_SHOW, $HMLeft)
    GUISetState(@SW_SHOW, $HMRight)

EndFunc   ;==>Show

Func HMSmallShow()
    
    GUISetState(@SW_SHOW, $HMsmallTop)
    GUISetState(@SW_SHOW, $HMsmallBottom)
    GUISetState(@SW_SHOW, $HMsmallLeft)
    GUISetState(@SW_SHOW, $HMsmallRight)

EndFunc   ;==>SmallShow

Func HMShowBoth()
    
    GUISetState(@SW_SHOW, $HMTop)
    GUISetState(@SW_SHOW, $HMBottom)
    GUISetState(@SW_SHOW, $HMLeft)
    GUISetState(@SW_SHOW, $HMRight)

    GUISetState(@SW_SHOW, $HMsmallTop)
    GUISetState(@SW_SHOW, $HMsmallBottom)
    GUISetState(@SW_SHOW, $HMsmallLeft)
    GUISetState(@SW_SHOW, $HMsmallRight)

EndFunc   ;==>ShowBoth

Func HMResize()
    HMStop()
    $HMMoveMode = True

    HMShow()
    
    While 1
        
        $HMMousePos = MouseGetPos()
        
        WinMove($HMTop, "", $HMx, $HMy, $HMScanWidth, 2)
        WinMove($HMLeft, "", $HMx, $HMy, 2, $HMScanHeight)
        WinMove($HMRight, "", $HMx + $HMScanWidth - 2, $y, 2, $HMScanHeight)
        WinMove($HMBottom, "", $HMx, $HMy + $HMScanHeight, $HMScanWidth, 2)
        
        If Not (($HMMousePos[0] - $HMx + 1) <= 40) Then
            $HMScanWidth = $HMMousePos[0] - $HMx + 1
        EndIf
        If Not (($HMMousePos[1] - $HMy - 39) <= 40) Then
            $HMScanHeight = $HMMousePos[1] - $HMy - 39
        EndIf
        
        If _IsPressed(01) Then
            Sleep(1000)
            HMHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Resize

Func HMOreFindChooseColor()
    $HMNewColor = 0
    While 1
        $HMMousePos = MouseGetPos()
        If Not @error Then
            $HMNewColor = PixelGetColor($HMMousePos[0], $HMMousePos[1])
            GUICtrlSetBkColor($HMCurrentColorDisplay, $HMNewColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $HMNewColor <> -1 Then
                $HMCurrentColor = $HMNewColor
            EndIf
            
            HMSetColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>OreFindChooseColor

Func HMDropFindChooseColor()
    $HMDropColor = 0
    While 1
        $HMMousePos = MouseGetPos()
        If Not @error Then
            $HMDropColor = PixelGetColor($HMMousePos[0], $HMMousePos[1])
            GUICtrlSetBkColor($HMDropColorDisplay, $HMDropColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $HMDropColor <> -1 Then
                $HMCurrentDropColor = $HMDropColor
            EndIf
            
            HMSetDropColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>DropFindChooseColor

;~ Func Preferences()
;~  Stop()
;~  $Pref = GUICreate("Preferences", 453, 462)
;~  
;~  ; Left side
;~  GUICtrlCreateLabel("The colors " & $AppTitle & " looks for are below." & @CRLF & "The color can be a hex or a decimal. To get a color use the ""Select Color > By Screen Color"" mode and press ""Ctrl + F""", 5, 5, 233, 52)
;~  
;~  GUICtrlCreateGroup("Colors", 0, 55, 240, 285)
;~  $InputClay = GUICtrlCreateInput($ColorClay, 105, 75, 121, 21)
;~  GUICtrlCreateLabel("Clay", 10, 80, 43, 17)
;~  $InputCopper = GUICtrlCreateInput($ColorCopper, 105, 100, 121, 21)
;~  GUICtrlCreateLabel("Copper", 10, 105, 53, 17)
;~  $InputTin = GUICtrlCreateInput($ColorTin, 105, 125, 121, 21)
;~  GUICtrlCreateLabel("Tin", 10, 130, 53, 17)
;~  $InputIron = GUICtrlCreateInput($ColorIron, 105, 150, 121, 21)
;~  GUICtrlCreateLabel("Iron", 10, 155, 53, 17)
;~  $InputSilver = GUICtrlCreateInput($ColorSilver, 105, 175, 121, 21)
;~  GUICtrlCreateLabel("Silver", 10, 180, 53, 17)
;~  $InputCoal = GUICtrlCreateInput($ColorCoal, 105, 200, 121, 21)
;~  GUICtrlCreateLabel("Coal", 10, 205, 53, 17)
;~  $InputGold = GUICtrlCreateInput($ColorGold, 105, 225, 121, 21)
;~  GUICtrlCreateLabel("Gold", 10, 230, 53, 17)
;~  $InputMithril = GUICtrlCreateInput($ColorMithril, 105, 250, 121, 21)
;~  GUICtrlCreateLabel("Mithril", 10, 255, 53, 17)
;~  $InputAddy = GUICtrlCreateInput($ColorAddy, 105, 275, 121, 21)
;~  GUICtrlCreateLabel("Adamantite", 10, 280, 53, 17)
;~  $InputRunite = GUICtrlCreateInput($ColorRunite, 105, 300, 121, 21)
;~  GUICtrlCreateLabel("Runite", 10, 305, 53, 17)
;~  
;~  GUICtrlCreateLabel("These represent the starting point for the program. They are also the coordinates used with Ctrl + A.", 0, 345, 239, 47)
;~  
;~  GUICtrlCreateGroup("X and Y", 0, 380, 240, 50)
;~  
;~  $InputX = GUICtrlCreateInput($StartX, 30, 400, 86, 21)
;~  $InputY = GUICtrlCreateInput($StartY, 120, 400, 86, 21)
;~  
;~  ;Right side
;~  
;~  GUICtrlCreateLabel("The right side contains Beta functions only. These are more advanced and may cause unexplainable errors.", 245, 5, 204, 42)
;~  
;~  GUICtrlCreateGroup("Beta Options", 245, 55, 205, 285)
;~  $CenterCheckbox = GUICtrlCreateCheckbox("", 255, 75, 187, 17)
;~  $ColorCheckbox = GUICtrlCreateCheckbox("", 255, 100, 187, 17)
;~  GUICtrlCreateLabel("Color match sensitivity. Move the slider to the left for a harder match.", 255, 125, 179, 27)
;~  $SensSlider = GUICtrlCreateSlider(255, 155, 180, 30)
;~  GUICtrlSetLimit(-1, 20, 1)
;~  GUICtrlSetData(-1, $Sens)
;~  GUICtrlCreateGroup("", -99, -99, 1, 1)
;~  
;~  GUICtrlCreateGroup("Drop Options", 250, 245, 195, 85)
;~  $DropNormal = GUICtrlCreateRadio("Drop Normal", 260, 265, 113, 17)
;~  $DropMagic = GUICtrlCreateRadio("Drop Magic", 260, 285, 113, 17)
;~  $DropNone = GUICtrlCreateRadio("No Drop (Default)", 260, 305, 113, 17)
;~  GUICtrlSetState(-1, $GUI_CHECKED)
;~  GUICtrlCreateGroup("", -99, -99, 1, 1)
;~  
;~  
;~  ;Bottom Buttons
;~  $DefaultButton = GUICtrlCreateButton("Default Values", 5, 435, 135, 25)
;~  $OkButton = GUICtrlCreateButton("OK", 145, 435, 90, 25)
;~  GUICtrlSetState(-1, $GUI_FOCUS)
;~  
;~  GUISetState(@SW_SHOW)
;~  WinSetOnTop($Pref, "", 1)
;~  
;~  While 1
;~      $msg = GUIGetMsg()
;~      Select
;~          Case $msg = $GUI_EVENT_CLOSE
;~              ExitLoop
;~          Case $msg = $OkButton
;~              IniWrite("MineData.ini", "Colors", "Clay", GUICtrlRead($InputClay))
;~              IniWrite("MineData.ini", "Colors", "Copper", GUICtrlRead($InputCopper))
;~              IniWrite("MineData.ini", "Colors", "Tin", GUICtrlRead($InputTin))
;~              IniWrite("MineData.ini", "Colors", "Iron", GUICtrlRead($InputIron))
;~              IniWrite("MineData.ini", "Colors", "Silver", GUICtrlRead($InputSilver))
;~              IniWrite("MineData.ini", "Colors", "Coal", GUICtrlRead($InputCoal))
;~              IniWrite("MineData.ini", "Colors", "Gold", GUICtrlRead($InputGold))
;~              IniWrite("MineData.ini", "Colors", "Mithril", GUICtrlRead($InputMithril))
;~              IniWrite("MineData.ini", "Colors", "Addy", GUICtrlRead($InputAddy))
;~              IniWrite("MineData.ini", "Colors", "Runite", GUICtrlRead($InputRunite))
;~              
;~              IniWrite("MineData.ini", "Pos", "X", GUICtrlRead($InputX))
;~              IniWrite("MineData.ini", "Pos", "Y", GUICtrlRead($InputY))
;~              
;~              $ColorClay = GUICtrlRead($InputClay)
;~              $ColorCopper = GUICtrlRead($InputCopper)
;~              $ColorTin = GUICtrlRead($InputTin)
;~              $ColorIron = GUICtrlRead($InputIron)
;~              $ColorSilver = GUICtrlRead($InputSilver)
;~              $ColorCoal = GUICtrlRead($InputCoal)
;~              $ColorGold = GUICtrlRead($InputGold)
;~              $ColorMithril = GUICtrlRead($InputMithril)
;~              $ColorAddy = GUICtrlRead($InputAddy)
;~              $ColorRunite = GUICtrlRead($InputRunite)
;~              
;~              ;beta below
;~              
;~              If GUICtrlRead($CenterCheckbox) = $GUI_CHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "CenterOnOre", 1)
;~              ElseIf GUICtrlRead($CenterCheckbox) = $GUI_UNCHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "CenterOnOre", 0)
;~              EndIf
;~              
;~              If GUICtrlRead($ColorCheckbox) = $GUI_CHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "ColorAverage", 1)
;~              ElseIf GUICtrlRead($ColorCheckbox) = $GUI_UNCHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "ColorAverage", 0)
;~              EndIf
;~              
;~              $Sens = GUICtrlRead($SensSlider)
;~              IniWrite("MineData.ini", "Beta", "Sensitifity", $Sens)
;~              
;~              ExitLoop
;~          Case $msg = $DefaultButton
;~              FileDelete("MineData.ini")
;~              MsgBox(0, $AppTitle, "Default values set, please restart " & $AppTitle)
;~              Exit
;~      EndSelect
;~  WEnd
;~  GUIDelete()
;~ EndFunc   ;==>Preferences

Func Abort()
    AdlibDisable()
    HotKeySet("!^x")
    GUICtrlSetData($HMLabelStatus, "Ending Program ...")
    SplashTextOn("", "Ending Program ...", 200, 30)
    Sleep(800)
    Exit
EndFunc   ;==>Abort
#EndRegion

Continued in next post

Edited by inline853
Link to comment
Share on other sites

#Region ;POWER CUTTER FUNCTIONS
Func POWERCUTTER()
    Do      
        WinSetOnTop($PCGUI, "", 1)

HotKeySet("^z", "PCStart")
HotKeySet("^x", "PCStop")
HotKeySet("^a", "PCMove")
HotKeySet("^q", "PCSmallMove")
HotKeySet("^w", "PCHideBoth")
HotKeySet("^s", "PCShowBoth")
HotKeySet("!^x", "Abort")

    $PCdata = PixelSearch($PCsmallx, $PCsmally, $PCsmallx + $PCSmallScanWidth, $PCsmally + $PCSmallScanHeight, $PCDropColor, $PCSens)
    If $PCdata <> 1 Then
        PCDrop()
    EndIf

   $msg = GUIGetMsg(1)
    Select 
        
        Case $msg[0] = $PCStartButton Or $msg[0] = $PCMenuStart Or $msg[0] = $PCMenuHotKeyStart And $msg[1] = $PCGUI
        PCStart()
        
        Case $msg[0] = $PCStopButton Or $msg[0] = $PCMenuStop Or $msg[0] = $PCMenuHotKeyStop
            PCStop()
        
        Case $msg[0] = $PCSelection And $msg[1] = $PCGUI
        PCHideBoth()
        GUISetState(@SW_HIDE, $PCGUI)
        GUISetState(@SW_SHOW, $SELECTGUI)
        Selection()
        
        Case $msg[0] = $PCMenuExit And $msg[1] = $PCGUI
        $Exitbox = MsgBox(36, "Would you like to quit?", "Select 'Yes' to quit, otherwise click 'No'")
        If $Exitbox = 6 then
            Exit
        Endif
            
        Case $msg[0] = $PCMenuMoveTreeFinder And $msg[1] = $PCGUI
            PCMove()    
            
        Case $msg[0] = $PCMenuMoveDropFinder And $msg[1] = $PCGUI
            PCSmallMove()
            
        Case $msg[0] = $PCMenuHotKeySmallMove And $msg[1] = $PCGUI
            PCSmallMove()
            
        Case $msg[0] = $PCMenuResizeTreeFinder And $msg[1] = $PCGUI
            PCResize()
            PCHide()
            
        Case $msg[0] = $PCMenuHideTreeFinder And $msg[1] = $PCGUI
            PCHide()
            
        Case $msg[0] = $PCMenuHideDropFinder And $msg[1] = $PCGUI
            PCSmallHide()
            
        Case $msg[0] = $PCMenuHotKeyHide And $msg[1] = $PCGUI
            PCHideBoth()
            
        Case $msg[0] = $PCMenuHotKeyShow And $msg[1] = $PCGUI
            PCShowBoth()
            
        Case $msg[0] = $PCMenuChooseColorsTreeByColor And $msg[1] = $PCGUI
            PCTreeFindChooseColor()
            
        Case $msg[0] = $PCMenuChooseColorsDropByColor And $msg[1] = $PCGUI
            PCDropFindChooseColor()
            
        Case $msg[0] = $PCT1[0] And $msg[1] = $PCGUI
            $PCSleepCheck = 200
        Case $msg[0] = $PCT1[1] And $msg[1] = $PCGUI
            $PCSleepCheck = 500
        Case $msg[0] = $PCT1[2] And $msg[1] = $PCGUI
            $PCSleepCheck = 1000
        Case $msg[0] = $PCT1[3] And $msg[1] = $PCGUI
            $PCSleepCheck = 2000
        Case $msg[0] = $PCT1[4] And $msg[1] = $PCGUI
            $Input = Number(InputBox("Custom Checking Time", "How many ms do you want to wait? (1000ms = 1sec)", $PCSleepCheck, "", 200, 162, $PCx + 111, $PCy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $PCSleepCheck = Round($Input)
            Else
                $PCSleepCheck = 500
            EndIf
        Case $msg[0] = $PCT2[0] And $msg[1] = $PCGUI
            $PCSleepMine = 1000
        Case $msg[0] = $PCT2[1] And $msg[1] = $PCGUI
            $PCSleepMine = 2000
        Case $msg[0] = $PCT2[2] And $msg[1] = $PCGUI
            $PCSleepMine = 4000
        Case $msg[0] = $PCT2[3] And $msg[1] = $PCGUI
            $PCSleepMine = 6000
        Case $msg[0] = $PCT2[4] And $msg[1] = $PCGUI
            $Input = Number(InputBox("Custom Mining Time", "How many ms do you want to wait? (1000ms = 1sec)", $PCSleepMine, "", 200, 162, $PCx + 111, $PCy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $PCSleepMine = Round($Input)
            Else
                $PCSleepMine = 4000
            EndIf
            
        Case $msg[0] = $PCMenuInstructions And $msg[1] = $PCGUI
            $var = FileExists("ReadMe.txt")
            If $var = 1 Then
                ShellExecuteWait("ReadMe.txt")
            Else
                SplashTextOn("Error:", "File Not Found! You must have deleted it!", 200, 300)
            EndIf
        Case $msg[0] = $PCDropColorDisplay And $msg[1] = $PCGUI
            PCDropFindChooseColor()
        Case $msg[0] = $PCCurrentColorDisplay And $msg[1] = $PCGUI
            PCTreeFindChooseColor() 
            
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc 
;
;
;
;

Func PCStart()
    PCShowBoth()
    PCCheck()
    PCSetBothColor()

EndFunc   ;==>Start

Func PCStop()
    PCHideBoth()
    PCReSetColor()
    AdlibDisable()
    GUICtrlSetData($PCLabelStatus, "Stopped")

EndFunc   ;==>Stop

Func PCCheck()
    
    Sleep(Random(0, 500, 1))
    
    $PCPixel = PixelSearch($PCx + 2, $PCy, $PCx + 2 + $PCScanWidth, $PCy + $PCScanHeight, $PCCurrentColor, $PCSens)
    
    If Not @error Then
        
        MouseClick("Left", $PCPixel[0], $PCPixel[1], 1, 2)
        GUICtrlSetData($PCLabelStatus, "Mining")
        $PCIdle = 0
        AdlibEnable("PCCheck", $PCSleepMine)
        
    Else
        
        GUICtrlSetData($PCLabelStatus, "Checking")
        $PCIdle += $PCSleepCheck
        If $PCIdle >= 60000 Then
            MouseClick("Left")
            $PCIdle = 0
        EndIf

        AdlibEnable("PCCheck", $PCSleepCheck)
    EndIf

    GUICtrlSetData($PCLabelCheckInterval, "" & $PCSleepCheck / 1000 & " Seconds")
    GUICtrlSetData($PCLableCutInterval, "" & $PCSleepMine / 1000 & " Seconds")


EndFunc   ;==>Check

Func PCSetColor()
    GUICtrlSetBkColor($PCCurrentColorDisplay, $PCCurrentColor)
EndFunc   ;==>SetColor

Func PCSetDropColor()
    GUICtrlSetBkColor($PCDropColorDisplay, $PCCurrentDropColor)
EndFunc   ;==>SetDropColor

Func PCSetBothColor()
    GUICtrlSetBkColor($PCCurrentColorDisplay, $PCCurrentColor)
    GUICtrlSetBkColor($PCDropColorDisplay, $PCCurrentDropColor)
EndFunc   ;==>SetBothColor

Func PCReSetColor()
    GUICtrlSetBkColor($PCCurrentColorDisplay, 0x000000)
    GUICtrlSetBkColor($PCDropColorDisplay, 0x000000)
EndFunc   ;==>ReSetColor

Func PCDrop()
    $PCdata = PixelSearch($PCsmallx, $PCsmally, $PCsmallx + $PCSmallScanWidth, $PCsmally + $PCSmallScanHeight, $PCDropColor, $PCSens)
    GUICtrlSetData($PCLabelStatus, "Droping Trees")
    $PCIdle = 0
    
    
    ;Searches the Inventory for the Drop Color
    $PCpos = PixelSearch(810, 350, 990, 570, $PCDropColor, $PCSens)
    ;Makes $pos an Array
    If IsArray($PCpos) Then
        ;Moves Mouse to the Tree that was detected
        MouseMove($PCpos[0], $PCpos[1])
        ;Right Clicks the Tree
        MouseClick("right", $PCpos[0], $PCpos[1])
        ;Left Clicks the D
        ;Moves the Mouse Down to the Drop Option
        MouseMove($PCpos[0], $PCpos[1] + 45)
        ;Left Clicks the Drop Option
        MouseClick("left", $PCpos[0], $PCpos[1] + 45)
        ;Left Clicks the D
    EndIf
    
    AdlibEnable("PCCheck", $PCSleepDrop)
    
EndFunc   ;==>Drop

Func PCMove()
    
    PCShow()
    
    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $PCMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($PCTop, "", $PCMousePos[0], $PCMousePos[1])
        WinMove($PCLeft, "", $PCMousePos[0], $PCMousePos[1])
        WinMove($PCRight, "", $PCMousePos[0] + $PCScanWidth - 2, $PCMousePos[1])
        WinMove($PCBottom, "", $PCMousePos[0], $PCMousePos[1] + $PCScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $PCx = $PCMousePos[0]
        $PCy = $PCMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            PCHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Move

Func PCSmallMove()

    PCSmallShow()

    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $PCMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($PCsmallTop, "", $PCMousePos[0], $PCMousePos[1])
        WinMove($PCsmallLeft, "", $PCMousePos[0], $PCMousePos[1])
        WinMove($PCsmallRight, "", $PCMousePos[0] + $PCSmallScanWidth - 2, $PCMousePos[1])
        WinMove($PCsmallBottom, "", $PCMousePos[0], $PCMousePos[1] + $PCSmallScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $PCsmallx = $PCMousePos[0]
        $PCsmally = $PCMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            PCSmallHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>SmallMove

Func PCHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $PCTop)
    GUISetState(@SW_HIDE, $PCBottom)
    GUISetState(@SW_HIDE, $PCLeft)
    GUISetState(@SW_HIDE, $PCRight)
    
EndFunc   ;==>Hide

Func PCSmallHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $PCsmallTop)
    GUISetState(@SW_HIDE, $PCsmallBottom)
    GUISetState(@SW_HIDE, $PCsmallLeft)
    GUISetState(@SW_HIDE, $PCsmallRight)
    
EndFunc   ;==>SmallHide

Func PCHideBoth()

    Sleep(1000)
    GUISetState(@SW_HIDE, $PCTop)
    GUISetState(@SW_HIDE, $PCBottom)
    GUISetState(@SW_HIDE, $PCLeft)
    GUISetState(@SW_HIDE, $PCRight)

    GUISetState(@SW_HIDE, $PCsmallTop)
    GUISetState(@SW_HIDE, $PCsmallBottom)
    GUISetState(@SW_HIDE, $PCsmallLeft)
    GUISetState(@SW_HIDE, $PCsmallRight)
    
EndFunc   ;==>HideBoth

Func PCShow()

    GUISetState(@SW_SHOW, $PCTop)
    GUISetState(@SW_SHOW, $PCBottom)
    GUISetState(@SW_SHOW, $PCLeft)
    GUISetState(@SW_SHOW, $PCRight)

EndFunc   ;==>Show

Func PCSmallShow()
    
    GUISetState(@SW_SHOW, $PCsmallTop)
    GUISetState(@SW_SHOW, $PCsmallBottom)
    GUISetState(@SW_SHOW, $PCsmallLeft)
    GUISetState(@SW_SHOW, $PCsmallRight)

EndFunc   ;==>SmallShow

Func PCShowBoth()
    
    GUISetState(@SW_SHOW, $PCTop)
    GUISetState(@SW_SHOW, $PCBottom)
    GUISetState(@SW_SHOW, $PCLeft)
    GUISetState(@SW_SHOW, $PCRight)

    GUISetState(@SW_SHOW, $PCsmallTop)
    GUISetState(@SW_SHOW, $PCsmallBottom)
    GUISetState(@SW_SHOW, $PCsmallLeft)
    GUISetState(@SW_SHOW, $PCsmallRight)

EndFunc   ;==>ShowBoth

Func PCResize()
    PCStop()
    $PCMoveMode = True

    PCShow()
    
    While 1
        
        $PCMousePos = MouseGetPos()
        
        WinMove($PCTop, "", $PCx, $PCy, $PCScanWidth, 2)
        WinMove($PCLeft, "", $PCx, $PCy, 2, $PCScanHeight)
        WinMove($PCRight, "", $PCx + $PCScanWidth - 2, $y, 2, $PCScanHeight)
        WinMove($PCBottom, "", $PCx, $PCy + $PCScanHeight, $PCScanWidth, 2)
        
        If Not (($PCMousePos[0] - $PCx + 1) <= 40) Then
            $PCScanWidth = $PCMousePos[0] - $PCx + 1
        EndIf
        If Not (($PCMousePos[1] - $PCy - 39) <= 40) Then
            $PCScanHeight = $PCMousePos[1] - $PCy - 39
        EndIf
        
        If _IsPressed(01) Then
            Sleep(1000)
            PCHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Resize

Func PCTreeFindChooseColor()
    $PCNewColor = 0
    While 1
        $PCMousePos = MouseGetPos()
        If Not @error Then
            $PCNewColor = PixelGetColor($PCMousePos[0], $PCMousePos[1])
            GUICtrlSetBkColor($PCCurrentColorDisplay, $PCNewColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $PCNewColor <> -1 Then
                $PCCurrentColor = $PCNewColor
            EndIf
            
            PCSetColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>TreeFindChooseColor

Func PCDropFindChooseColor()
    $PCDropColor = 0
    While 1
        $PCMousePos = MouseGetPos()
        If Not @error Then
            $PCDropColor = PixelGetColor($PCMousePos[0], $PCMousePos[1])
            GUICtrlSetBkColor($PCDropColorDisplay, $PCDropColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $PCDropColor <> -1 Then
                $PCCurrentDropColor = $PCDropColor
            EndIf
            
            PCSetDropColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>DropFindChooseColor

;~ Func Preferences()
;~  Stop()
;~  $Pref = GUICreate("Preferences", 453, 462)
;~  
;~  ; Left side
;~  GUICtrlCreateLabel("The colors " & $AppTitle & " looks for are below." & @CRLF & "The color can be a hex or a decimal. To get a color use the ""Select Color > By Screen Color"" mode and press ""Ctrl + F""", 5, 5, 233, 52)
;~  
;~  GUICtrlCreateGroup("Colors", 0, 55, 240, 285)
;~  $InputClay = GUICtrlCreateInput($ColorClay, 105, 75, 121, 21)
;~  GUICtrlCreateLabel("Clay", 10, 80, 43, 17)
;~  $InputCopper = GUICtrlCreateInput($ColorCopper, 105, 100, 121, 21)
;~  GUICtrlCreateLabel("Copper", 10, 105, 53, 17)
;~  $InputTin = GUICtrlCreateInput($ColorTin, 105, 125, 121, 21)
;~  GUICtrlCreateLabel("Tin", 10, 130, 53, 17)
;~  $InputIron = GUICtrlCreateInput($ColorIron, 105, 150, 121, 21)
;~  GUICtrlCreateLabel("Iron", 10, 155, 53, 17)
;~  $InputSilver = GUICtrlCreateInput($ColorSilver, 105, 175, 121, 21)
;~  GUICtrlCreateLabel("Silver", 10, 180, 53, 17)
;~  $InputCoal = GUICtrlCreateInput($ColorCoal, 105, 200, 121, 21)
;~  GUICtrlCreateLabel("Coal", 10, 205, 53, 17)
;~  $InputGold = GUICtrlCreateInput($ColorGold, 105, 225, 121, 21)
;~  GUICtrlCreateLabel("Gold", 10, 230, 53, 17)
;~  $InputMithril = GUICtrlCreateInput($ColorMithril, 105, 250, 121, 21)
;~  GUICtrlCreateLabel("Mithril", 10, 255, 53, 17)
;~  $InputAddy = GUICtrlCreateInput($ColorAddy, 105, 275, 121, 21)
;~  GUICtrlCreateLabel("Adamantite", 10, 280, 53, 17)
;~  $InputRunite = GUICtrlCreateInput($ColorRunite, 105, 300, 121, 21)
;~  GUICtrlCreateLabel("Runite", 10, 305, 53, 17)
;~  
;~  GUICtrlCreateLabel("These represent the starting point for the program. They are also the coordinates used with Ctrl + A.", 0, 345, 239, 47)
;~  
;~  GUICtrlCreateGroup("X and Y", 0, 380, 240, 50)
;~  
;~  $InputX = GUICtrlCreateInput($StartX, 30, 400, 86, 21)
;~  $InputY = GUICtrlCreateInput($StartY, 120, 400, 86, 21)
;~  
;~  ;Right side
;~  
;~  GUICtrlCreateLabel("The right side contains Beta functions only. These are more advanced and may cause unexplainable errors.", 245, 5, 204, 42)
;~  
;~  GUICtrlCreateGroup("Beta Options", 245, 55, 205, 285)
;~  $CenterCheckbox = GUICtrlCreateCheckbox("", 255, 75, 187, 17)
;~  $ColorCheckbox = GUICtrlCreateCheckbox("", 255, 100, 187, 17)
;~  GUICtrlCreateLabel("Color match sensitivity. Move the slider to the left for a harder match.", 255, 125, 179, 27)
;~  $SensSlider = GUICtrlCreateSlider(255, 155, 180, 30)
;~  GUICtrlSetLimit(-1, 20, 1)
;~  GUICtrlSetData(-1, $Sens)
;~  GUICtrlCreateGroup("", -99, -99, 1, 1)
;~  
;~  GUICtrlCreateGroup("Drop Options", 250, 245, 195, 85)
;~  $DropNormal = GUICtrlCreateRadio("Drop Normal", 260, 265, 113, 17)
;~  $DropMagic = GUICtrlCreateRadio("Drop Magic", 260, 285, 113, 17)
;~  $DropNone = GUICtrlCreateRadio("No Drop (Default)", 260, 305, 113, 17)
;~  GUICtrlSetState(-1, $GUI_CHECKED)
;~  GUICtrlCreateGroup("", -99, -99, 1, 1)
;~  
;~  
;~  ;Bottom Buttons
;~  $DefaultButton = GUICtrlCreateButton("Default Values", 5, 435, 135, 25)
;~  $OkButton = GUICtrlCreateButton("OK", 145, 435, 90, 25)
;~  GUICtrlSetState(-1, $GUI_FOCUS)
;~  
;~  GUISetState(@SW_SHOW)
;~  WinSetOnTop($Pref, "", 1)
;~  
;~  While 1
;~      $msg = GUIGetMsg()
;~      Select
;~          Case $msg = $GUI_EVENT_CLOSE
;~              ExitLoop
;~          Case $msg = $OkButton
;~              IniWrite("MineData.ini", "Colors", "Clay", GUICtrlRead($InputClay))
;~              IniWrite("MineData.ini", "Colors", "Copper", GUICtrlRead($InputCopper))
;~              IniWrite("MineData.ini", "Colors", "Tin", GUICtrlRead($InputTin))
;~              IniWrite("MineData.ini", "Colors", "Iron", GUICtrlRead($InputIron))
;~              IniWrite("MineData.ini", "Colors", "Silver", GUICtrlRead($InputSilver))
;~              IniWrite("MineData.ini", "Colors", "Coal", GUICtrlRead($InputCoal))
;~              IniWrite("MineData.ini", "Colors", "Gold", GUICtrlRead($InputGold))
;~              IniWrite("MineData.ini", "Colors", "Mithril", GUICtrlRead($InputMithril))
;~              IniWrite("MineData.ini", "Colors", "Addy", GUICtrlRead($InputAddy))
;~              IniWrite("MineData.ini", "Colors", "Runite", GUICtrlRead($InputRunite))
;~              
;~              IniWrite("MineData.ini", "Pos", "X", GUICtrlRead($InputX))
;~              IniWrite("MineData.ini", "Pos", "Y", GUICtrlRead($InputY))
;~              
;~              $ColorClay = GUICtrlRead($InputClay)
;~              $ColorCopper = GUICtrlRead($InputCopper)
;~              $ColorTin = GUICtrlRead($InputTin)
;~              $ColorIron = GUICtrlRead($InputIron)
;~              $ColorSilver = GUICtrlRead($InputSilver)
;~              $ColorCoal = GUICtrlRead($InputCoal)
;~              $ColorGold = GUICtrlRead($InputGold)
;~              $ColorMithril = GUICtrlRead($InputMithril)
;~              $ColorAddy = GUICtrlRead($InputAddy)
;~              $ColorRunite = GUICtrlRead($InputRunite)
;~              
;~              ;beta below
;~              
;~              If GUICtrlRead($CenterCheckbox) = $GUI_CHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "CenterOnTree", 1)
;~              ElseIf GUICtrlRead($CenterCheckbox) = $GUI_UNCHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "CenterOnTree", 0)
;~              EndIf
;~              
;~              If GUICtrlRead($ColorCheckbox) = $GUI_CHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "ColorAverage", 1)
;~              ElseIf GUICtrlRead($ColorCheckbox) = $GUI_UNCHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "ColorAverage", 0)
;~              EndIf
;~              
;~              $Sens = GUICtrlRead($SensSlider)
;~              IniWrite("MineData.ini", "Beta", "Sensitifity", $Sens)
;~              
;~              ExitLoop
;~          Case $msg = $DefaultButton
;~              FileDelete("MineData.ini")
;~              MsgBox(0, $AppTitle, "Default values set, please restart " & $AppTitle)
;~              Exit
;~      EndSelect
;~  WEnd
;~  GUIDelete()
;~ EndFunc   ;==>Preferences


#EndRegion

#Region ;POWER FISHER FUNCTIONS
Func POWERFISHER()
    Do      
        WinSetOnTop($PFGUI, "", 1)

HotKeySet("^z", "PFStart")
HotKeySet("^x", "PFStop")
HotKeySet("^a", "PFMove")
HotKeySet("^q", "PFSmallMove")
HotKeySet("^w", "PFHideBoth")
HotKeySet("^s", "PFShowBoth")
HotKeySet("!^x", "Abort")

    $PFdata = PixelSearch($PFsmallx, $PFsmally, $PFsmallx + $PFSmallScanWidth, $PFsmally + $PFSmallScanHeight, $PFDropColor, $PFSens)
    If $PFdata <> 1 Then
        PFDrop()
    EndIf

   $msg = GUIGetMsg(1)
    Select 
        
        Case $msg[0] = $PFStartButton Or $msg[0] = $PFMenuStart Or $msg[0] = $PFMenuHotKeyStart And $msg[1] = $PFGUI
        PFStart()
        
        Case $msg[0] = $PFStopButton Or $msg[0] = $PFMenuStop Or $msg[0] = $PFMenuHotKeyStop
            PFStop()
        
        Case $msg[0] = $PFSelection And $msg[1] = $PFGUI
        PFHideBoth()
        GUISetState(@SW_HIDE, $PFGUI)
        GUISetState(@SW_SHOW, $SELECTGUI)
        Selection()
        
        Case $msg[0] = $PFMenuExit And $msg[1] = $PFGUI
        $Exitbox = MsgBox(36, "Would you like to quit?", "Select 'Yes' to quit, otherwise click 'No'")
        If $Exitbox = 6 then
            Exit
        Endif
            
        Case $msg[0] = $PFMenuMoveFishFinder And $msg[1] = $PFGUI
            PFMove()    
            
        Case $msg[0] = $PFMenuMoveDropFinder And $msg[1] = $PFGUI
            PFSmallMove()
            
        Case $msg[0] = $PFMenuHotKeySmallMove And $msg[1] = $PFGUI
            PFSmallMove()
            
        Case $msg[0] = $PFMenuResizeFishFinder And $msg[1] = $PFGUI
            PFResize()
            PFHide()
            
        Case $msg[0] = $PFMenuHideFishFinder And $msg[1] = $PFGUI
            PFHide()
            
        Case $msg[0] = $PFMenuHideDropFinder And $msg[1] = $PFGUI
            PFSmallHide()
            
        Case $msg[0] = $PFMenuHotKeyHide And $msg[1] = $PFGUI
            PFHideBoth()
            
        Case $msg[0] = $PFMenuHotKeyShow And $msg[1] = $PFGUI
            PFShowBoth()
            
        Case $msg[0] = $PFMenuChooseColorsDropByColor And $msg[1] = $PFGUI
            PFFishFindChooseColor()
            
        Case $msg[0] = $PFMenuChooseColorsDropByColor And $msg[1] = $PFGUI
            PFDropFindChooseColor()
            
        Case $msg[0] = $PFT1[0] And $msg[1] = $PFGUI
            $PFSleepCheck = 200
        Case $msg[0] = $PFT1[1] And $msg[1] = $PFGUI
            $PFSleepCheck = 500
        Case $msg[0] = $PFT1[2] And $msg[1] = $PFGUI
            $PFSleepCheck = 1000
        Case $msg[0] = $PFT1[3] And $msg[1] = $PFGUI
            $PFSleepCheck = 2000
        Case $msg[0] = $PFT1[4] And $msg[1] = $PFGUI
            $Input = Number(InputBox("Custom Checking Time", "How many ms do you want to wait? (1000ms = 1sec)", $PFSleepCheck, "", 200, 162, $PFx + 111, $PFy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $PFSleepCheck = Round($Input)
            Else
                $PFSleepCheck = 500
            EndIf
        Case $msg[0] = $PFT2[0] And $msg[1] = $PFGUI
            $PFSleepMine = 1000
        Case $msg[0] = $PFT2[1] And $msg[1] = $PFGUI
            $PFSleepMine = 2000
        Case $msg[0] = $PFT2[2] And $msg[1] = $PFGUI
            $PFSleepMine = 4000
        Case $msg[0] = $PFT2[3] And $msg[1] = $PFGUI
            $PFSleepMine = 6000
        Case $msg[0] = $PFT2[4] And $msg[1] = $PFGUI
            $Input = Number(InputBox("Custom Mining Time", "How many ms do you want to wait? (1000ms = 1sec)", $PFSleepMine, "", 200, 162, $PFx + 111, $PFy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $PFSleepMine = Round($Input)
            Else
                $PFSleepMine = 4000
            EndIf
            
        Case $msg[0] = $PFMenuInstructions And $msg[1] = $PFGUI
            $var = FileExists("ReadMe.txt")
            If $var = 1 Then
                ShellExecuteWait("ReadMe.txt")
            Else
                SplashTextOn("Error:", "File Not Found! You must have deleted it!", 200, 300)
            EndIf
        Case $msg[0] = $PFDropColorDisplay And $msg[1] = $PFGUI
            PFDropFindChooseColor()
        Case $msg[0] = $PFCurrentColorDisplay And $msg[1] = $PFGUI
            PFTreeFindChooseColor() 
            
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc 
;
;
;
;

Func PFStart()
    PFShowBoth()
    PFCheck()
    PFSetBothColor()

EndFunc   ;==>Start

Func PFStop()
    PFHideBoth()
    PFReSetColor()
    AdlibDisable()
    GUICtrlSetData($PFLabelStatus, "Stopped")

EndFunc   ;==>Stop

Func PFCheck()
    
    Sleep(Random(0, 500, 1))
    
    $PFPixel = PixelSearch($PFx + 2, $PFy, $PFx + 2 + $PFScanWidth, $PFy + $PFScanHeight, $PFCurrentColor, $PFSens)
    
    If Not @error Then
        
        MouseClick("Left", $PFPixel[0], $PFPixel[1], 1, 2)
        GUICtrlSetData($PFLabelStatus, "Mining")
        $PFIdle = 0
        AdlibEnable("PFCheck", $PFSleepMine)
        
    Else
        
        GUICtrlSetData($PFLabelStatus, "Checking")
        $PFIdle += $PFSleepCheck
        If $PFIdle >= 60000 Then
            MouseClick("Left")
            $PFIdle = 0
        EndIf

        AdlibEnable("PFCheck", $PFSleepCheck)
    EndIf

    GUICtrlSetData($PFLabelCheckInterval, "" & $PFSleepCheck / 1000 & " Seconds")
    GUICtrlSetData($PFLableFishInterval, "" & $PFSleepMine / 1000 & " Seconds")


EndFunc   ;==>Check

Func PFSetColor()
    GUICtrlSetBkColor($PFCurrentColorDisplay, $PFCurrentColor)
EndFunc   ;==>SetColor

Func PFSetDropColor()
    GUICtrlSetBkColor($PFDropColorDisplay, $PFCurrentDropColor)
EndFunc   ;==>SetDropColor

Func PFSetBothColor()
    GUICtrlSetBkColor($PFCurrentColorDisplay, $PFCurrentColor)
    GUICtrlSetBkColor($PFDropColorDisplay, $PFCurrentDropColor)
EndFunc   ;==>SetBothColor

Func PFReSetColor()
    GUICtrlSetBkColor($PFCurrentColorDisplay, 0x000000)
    GUICtrlSetBkColor($PFDropColorDisplay, 0x000000)
EndFunc   ;==>ReSetColor

Func PFDrop()
    $PFdata = PixelSearch($PFsmallx, $PFsmally, $PFsmallx + $PFSmallScanWidth, $PFsmally + $PFSmallScanHeight, $PFDropColor, $PFSens)
    GUICtrlSetData($PFLabelStatus, "Droping Trees")
    $PFIdle = 0
    
    
    ;Searches the Inventory for the Drop Color
    $PFpos = PixelSearch(810, 350, 990, 570, $PFDropColor, $PFSens)
    ;Makes $pos an Array
    If IsArray($PFpos) Then
        ;Moves Mouse to the Tree that was detected
        MouseMove($PFpos[0], $PFpos[1])
        ;Right Clicks the Tree
        MouseClick("right", $PFpos[0], $PFpos[1])
        ;Left Clicks the D
        ;Moves the Mouse Down to the Drop Option
        MouseMove($PFpos[0], $PFpos[1] + 45)
        ;Left Clicks the Drop Option
        MouseClick("left", $PFpos[0], $PFpos[1] + 45)
        ;Left Clicks the D
    EndIf
    
    AdlibEnable("PFCheck", $PFSleepDrop)
    
EndFunc   ;==>Drop

Func PFMove()
    
    PFShow()
    
    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $PFMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($PFTop, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFLeft, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFRight, "", $PFMousePos[0] + $PFScanWidth - 2, $PFMousePos[1])
        WinMove($PFBottom, "", $PFMousePos[0], $PFMousePos[1] + $PFScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $PFx = $PFMousePos[0]
        $PFy = $PFMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            PFHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Move

Func PFSmallMove()

    PFSmallShow()

    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $PFMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($PFsmallTop, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFsmallLeft, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFsmallRight, "", $PFMousePos[0] + $PFSmallScanWidth - 2, $PFMousePos[1])
        WinMove($PFsmallBottom, "", $PFMousePos[0], $PFMousePos[1] + $PFSmallScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $PFsmallx = $PFMousePos[0]
        $PFsmally = $PFMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            PFSmallHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>SmallMove

Func PFHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $PFTop)
    GUISetState(@SW_HIDE, $PFBottom)
    GUISetState(@SW_HIDE, $PFLeft)
    GUISetState(@SW_HIDE, $PFRight)
    
EndFunc   ;==>Hide

Func PFSmallHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $PFsmallTop)
    GUISetState(@SW_HIDE, $PFsmallBottom)
    GUISetState(@SW_HIDE, $PFsmallLeft)
    GUISetState(@SW_HIDE, $PFsmallRight)
    
EndFunc   ;==>SmallHide

Func PFHideBoth()

    Sleep(1000)
    GUISetState(@SW_HIDE, $PFTop)
    GUISetState(@SW_HIDE, $PFBottom)
    GUISetState(@SW_HIDE, $PFLeft)
    GUISetState(@SW_HIDE, $PFRight)

    GUISetState(@SW_HIDE, $PFsmallTop)
    GUISetState(@SW_HIDE, $PFsmallBottom)
    GUISetState(@SW_HIDE, $PFsmallLeft)
    GUISetState(@SW_HIDE, $PFsmallRight)
    
EndFunc   ;==>HideBoth

Func PFShow()

    GUISetState(@SW_SHOW, $PFTop)
    GUISetState(@SW_SHOW, $PFBottom)
    GUISetState(@SW_SHOW, $PFLeft)
    GUISetState(@SW_SHOW, $PFRight)

EndFunc   ;==>Show

Func PFSmallShow()
    
    GUISetState(@SW_SHOW, $PFsmallTop)
    GUISetState(@SW_SHOW, $PFsmallBottom)
    GUISetState(@SW_SHOW, $PFsmallLeft)
    GUISetState(@SW_SHOW, $PFsmallRight)

EndFunc   ;==>SmallShow

Func PFShowBoth()
    
    GUISetState(@SW_SHOW, $PFTop)
    GUISetState(@SW_SHOW, $PFBottom)
    GUISetState(@SW_SHOW, $PFLeft)
    GUISetState(@SW_SHOW, $PFRight)

    GUISetState(@SW_SHOW, $PFsmallTop)
    GUISetState(@SW_SHOW, $PFsmallBottom)
    GUISetState(@SW_SHOW, $PFsmallLeft)
    GUISetState(@SW_SHOW, $PFsmallRight)

EndFunc   ;==>ShowBoth

Func PFResize()
    PFStop()
    $PFMoveMode = True

    PFShow()
    
    While 1
        
        $PFMousePos = MouseGetPos()
        
        WinMove($PFTop, "", $PFx, $PFy, $PFScanWidth, 2)
        WinMove($PFLeft, "", $PFx, $PFy, 2, $PFScanHeight)
        WinMove($PFRight, "", $PFx + $PFScanWidth - 2, $y, 2, $PFScanHeight)
        WinMove($PFBottom, "", $PFx, $PFy + $PFScanHeight, $PFScanWidth, 2)
        
        If Not (($PFMousePos[0] - $PFx + 1) <= 40) Then
            $PFScanWidth = $PFMousePos[0] - $PFx + 1
        EndIf
        If Not (($PFMousePos[1] - $PFy - 39) <= 40) Then
            $PFScanHeight = $PFMousePos[1] - $PFy - 39
        EndIf
        
        If _IsPressed(01) Then
            Sleep(1000)
            PFHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Resize

Func PFTreeFindChooseColor()
    $PFNewColor = 0
    While 1
        $PFMousePos = MouseGetPos()
        If Not @error Then
            $PFNewColor = PixelGetColor($PFMousePos[0], $PFMousePos[1])
            GUICtrlSetBkColor($PFCurrentColorDisplay, $PFNewColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $PFNewColor <> -1 Then
                $PFCurrentColor = $PFNewColor
            EndIf
            
            PFSetColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>TreeFindChooseColor

Func PFDropFindChooseColor()
    $PFDropColor = 0
    While 1
        $PFMousePos = MouseGetPos()
        If Not @error Then
            $PFDropColor = PixelGetColor($PFMousePos[0], $PFMousePos[1])
            GUICtrlSetBkColor($PFDropColorDisplay, $PFDropColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $PFDropColor <> -1 Then
                $PFCurrentDropColor = $PFDropColor
            EndIf
            
            PFSetDropColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>DropFindChooseColor


;~ Func Preferences()
;~  Stop()
;~  $Pref = GUICreate("Preferences", 453, 462)
;~  
;~  ; Left side
;~  GUICtrlCreateLabel("The colors " & $AppTitle & " looks for are below." & @CRLF & "The color can be a hex or a decimal. To get a color use the ""Select Color > By Screen Color"" mode and press ""Ctrl + F""", 5, 5, 233, 52)
;~  
;~  GUICtrlCreateGroup("Colors", 0, 55, 240, 285)
;~  $InputClay = GUICtrlCreateInput($ColorClay, 105, 75, 121, 21)
;~  GUICtrlCreateLabel("Clay", 10, 80, 43, 17)
;~  $InputCopper = GUICtrlCreateInput($ColorCopper, 105, 100, 121, 21)
;~  GUICtrlCreateLabel("Copper", 10, 105, 53, 17)
;~  $InputTin = GUICtrlCreateInput($ColorTin, 105, 125, 121, 21)
;~  GUICtrlCreateLabel("Tin", 10, 130, 53, 17)
;~  $InputIron = GUICtrlCreateInput($ColorIron, 105, 150, 121, 21)
;~  GUICtrlCreateLabel("Iron", 10, 155, 53, 17)
;~  $InputSilver = GUICtrlCreateInput($ColorSilver, 105, 175, 121, 21)
;~  GUICtrlCreateLabel("Silver", 10, 180, 53, 17)
;~  $InputCoal = GUICtrlCreateInput($ColorCoal, 105, 200, 121, 21)
;~  GUICtrlCreateLabel("Coal", 10, 205, 53, 17)
;~  $InputGold = GUICtrlCreateInput($ColorGold, 105, 225, 121, 21)
;~  GUICtrlCreateLabel("Gold", 10, 230, 53, 17)
;~  $InputMithril = GUICtrlCreateInput($ColorMithril, 105, 250, 121, 21)
;~  GUICtrlCreateLabel("Mithril", 10, 255, 53, 17)
;~  $InputAddy = GUICtrlCreateInput($ColorAddy, 105, 275, 121, 21)
;~  GUICtrlCreateLabel("Adamantite", 10, 280, 53, 17)
;~  $InputRunite = GUICtrlCreateInput($ColorRunite, 105, 300, 121, 21)
;~  GUICtrlCreateLabel("Runite", 10, 305, 53, 17)
;~  
;~  GUICtrlCreateLabel("These represent the starting point for the program. They are also the coordinates used with Ctrl + A.", 0, 345, 239, 47)
;~  
;~  GUICtrlCreateGroup("X and Y", 0, 380, 240, 50)
;~  
;~  $InputX = GUICtrlCreateInput($StartX, 30, 400, 86, 21)
;~  $InputY = GUICtrlCreateInput($StartY, 120, 400, 86, 21)
;~  
;~  ;Right side
;~  
;~  GUICtrlCreateLabel("The right side contains Beta functions only. These are more advanced and may cause unexplainable errors.", 245, 5, 204, 42)
;~  
;~  GUICtrlCreateGroup("Beta Options", 245, 55, 205, 285)
;~  $CenterCheckbox = GUICtrlCreateCheckbox("", 255, 75, 187, 17)
;~  $ColorCheckbox = GUICtrlCreateCheckbox("", 255, 100, 187, 17)
;~  GUICtrlCreateLabel("Color match sensitivity. Move the slider to the left for a harder match.", 255, 125, 179, 27)
;~  $SensSlider = GUICtrlCreateSlider(255, 155, 180, 30)
;~  GUICtrlSetLimit(-1, 20, 1)
;~  GUICtrlSetData(-1, $Sens)
;~  GUICtrlCreateGroup("", -99, -99, 1, 1)
;~  
;~  GUICtrlCreateGroup("Drop Options", 250, 245, 195, 85)
;~  $DropNormal = GUICtrlCreateRadio("Drop Normal", 260, 265, 113, 17)
;~  $DropMagic = GUICtrlCreateRadio("Drop Magic", 260, 285, 113, 17)
;~  $DropNone = GUICtrlCreateRadio("No Drop (Default)", 260, 305, 113, 17)
;~  GUICtrlSetState(-1, $GUI_CHECKED)
;~  GUICtrlCreateGroup("", -99, -99, 1, 1)
;~  
;~  
;~  ;Bottom Buttons
;~  $DefaultButton = GUICtrlCreateButton("Default Values", 5, 435, 135, 25)
;~  $OkButton = GUICtrlCreateButton("OK", 145, 435, 90, 25)
;~  GUICtrlSetState(-1, $GUI_FOCUS)
;~  
;~  GUISetState(@SW_SHOW)
;~  WinSetOnTop($Pref, "", 1)
;~  
;~  While 1
;~      $msg = GUIGetMsg()
;~      Select
;~          Case $msg = $GUI_EVENT_CLOSE
;~              ExitLoop
;~          Case $msg = $OkButton
;~              IniWrite("MineData.ini", "Colors", "Clay", GUICtrlRead($InputClay))
;~              IniWrite("MineData.ini", "Colors", "Copper", GUICtrlRead($InputCopper))
;~              IniWrite("MineData.ini", "Colors", "Tin", GUICtrlRead($InputTin))
;~              IniWrite("MineData.ini", "Colors", "Iron", GUICtrlRead($InputIron))
;~              IniWrite("MineData.ini", "Colors", "Silver", GUICtrlRead($InputSilver))
;~              IniWrite("MineData.ini", "Colors", "Coal", GUICtrlRead($InputCoal))
;~              IniWrite("MineData.ini", "Colors", "Gold", GUICtrlRead($InputGold))
;~              IniWrite("MineData.ini", "Colors", "Mithril", GUICtrlRead($InputMithril))
;~              IniWrite("MineData.ini", "Colors", "Addy", GUICtrlRead($InputAddy))
;~              IniWrite("MineData.ini", "Colors", "Runite", GUICtrlRead($InputRunite))
;~              
;~              IniWrite("MineData.ini", "Pos", "X", GUICtrlRead($InputX))
;~              IniWrite("MineData.ini", "Pos", "Y", GUICtrlRead($InputY))
;~              
;~              $ColorClay = GUICtrlRead($InputClay)
;~              $ColorCopper = GUICtrlRead($InputCopper)
;~              $ColorTin = GUICtrlRead($InputTin)
;~              $ColorIron = GUICtrlRead($InputIron)
;~              $ColorSilver = GUICtrlRead($InputSilver)
;~              $ColorCoal = GUICtrlRead($InputCoal)
;~              $ColorGold = GUICtrlRead($InputGold)
;~              $ColorMithril = GUICtrlRead($InputMithril)
;~              $ColorAddy = GUICtrlRead($InputAddy)
;~              $ColorRunite = GUICtrlRead($InputRunite)
;~              
;~              ;beta below
;~              
;~              If GUICtrlRead($CenterCheckbox) = $GUI_CHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "CenterOnFish", 1)
;~              ElseIf GUICtrlRead($CenterCheckbox) = $GUI_UNCHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "CenterOnFish", 0)
;~              EndIf
;~              
;~              If GUICtrlRead($ColorCheckbox) = $GUI_CHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "ColorAverage", 1)
;~              ElseIf GUICtrlRead($ColorCheckbox) = $GUI_UNCHECKED Then
;~                  IniWrite("MineData.ini", "Beta", "ColorAverage", 0)
;~              EndIf
;~              
;~              $Sens = GUICtrlRead($SensSlider)
;~              IniWrite("MineData.ini", "Beta", "Sensitifity", $Sens)
;~              
;~              ExitLoop
;~          Case $msg = $DefaultButton
;~              FileDelete("MineData.ini")
;~              MsgBox(0, $AppTitle, "Default values set, please restart " & $AppTitle)
;~              Exit
;~      EndSelect
;~  WEnd
;~  GUIDelete()
;~ EndFunc   ;==>Preferences


#EndRegion

POWERFISHER ALONE

#include <GUIConstants.au3>
#Include <Misc.au3>

;GLOBALS
Global $PFCurrentColor = "9003840" ;<== Sets the Current Color to a HEX or RBG Color Code
Global $PFCurrentDropColor = "0xDE7D37" ;<== Sets the Current Drop Color to a HEX or RBG Color Code
Global $PFDropColor = $PFCurrentDropColor ;<== Sets the Drop Color to the Current Drop Color
Global $PFStartX = IniRead("MineData.ini", "Pos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Ore Finder from an .Ini file.
Global $PFStartY = IniRead("MineData.ini", "Pos", "Y", 0) ;<== ;<== Reads a Default Starting Y Coordinate for the Ore Finder from an .Ini file.
Global $PFsmallStartX = IniRead("MineData.ini", "DropPos", "X", 0) ;<== Reads a Default Starting X Coordinate for the Drop Finder from an .Ini file.
Global $PFsmallStartY = IniRead("MineData.ini", "DropPos", "Y", 0) ;<== Reads a Default Starting Y Coordinate for the Drop Finder from an .Ini file.
Global $PFx = $PFStartX, $PFy = $PFStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $PFsmallx = $PFsmallStartX, $PFsmally = $PFsmallStartY ;<== Sets $x to $StartX so $x can later be manipulated.
Global $PFScanWidth = 110, $PFScanHeight = 45 ;<== Sets the Scan Width and Height for the Ore Finder.
Global $PFSmallScanWidth = 40, $PFSmallScanHeight = 40 ;<== Sets the Scan Width and Height for the Drop Finder.
Global $PFT1[5], $PFT2[5] ;<== Creates the Array Storage for the Check Interval and Mining Interval time Values.
Global $PFSleepCheck = 500, $PFSleepMine = 6000, $PFSleepDrop = 1500    ;<== Sets Sleep() time variables for the Check, Mining, and Dropping Functions.
Global $PFIdle = 0 ;<== Sets Idle to 0
Global $PFMoveMode = True ;<== Sets $MoveMode to True
Global $PFSmallMoveMode = True  ;<== Sets $smallMoveMode to True
Global $PFSens = IniRead("MineData.ini", "Beta", "Sensitifity", 8) ;<== Reads the Sensitivity for the Color Dedtection from and .Ini file.
Global $PFAverageX, $PFAverageY, $PFi ;<== Initializes the variables $AverageX, $AverageY, and $i

;GUI
$PFGUI = GUICreate("POWER Fisher", 327, 186, 359, 202)
GUISetState(@SW_SHOW)
GUISetBkColor(0x000000)
$PFCaptionStatus = GUICtrlCreateLabel("Status:", 5, 15, 38, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFLabelStatus = GUICtrlCreateLabel("Stopped", 48, 15, 44, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFDropColorDisplay = GUICtrlCreateLabel("Drop Finder Color", 176, 40, 91, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFCurrentColorDisplay = GUICtrlCreateLabel("Fishing Spot Finder Color", 175, 13, 127, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFStartButton = GUICtrlCreateButton("Start (Ctrl - Z)", 48, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$PFStopButton = GUICtrlCreateButton("Stop (Ctrl - X)", 160, 120, 90, 25, 0)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
$PFCaptionCheckInterval = GUICtrlCreateLabel("Check Interval:", 5, 48, 78, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFCaptioncutInterval = GUICtrlCreateLabel("Fishing Interval:", 5, 80, 81, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFLabelCheckInterval = GUICtrlCreateLabel("N/A", 95, 48, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFLableFishInterval = GUICtrlCreateLabel("N/A", 95, 80, 22, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFSecondDropColorDisplay = GUICtrlCreateLabel("Secondary Drop Finder Color", 176, 66, 147, 19)
GUICtrlSetFont(-1, 8, 400, 0, "@Arial Unicode MS")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x000000)
$PFMenuFile = GUICtrlCreateMenu("&File")
$PFMenuStart = GUICtrlCreateMenuItem("Start!", $PFMenuFile)
$PFMenuStop = GUICtrlCreateMenuItem("Stop", $PFMenuFile)
$PFSelection = GUICtrlCreateMenuItem("Selection Menu", $PFMenuFile)
$PFMenuPreferences = GUICtrlCreateMenuItem("Preferences", $PFMenuFile)
$PFMenuExit = GUICtrlCreateMenuItem("Exit", $PFMenuFile)
$PFMenuOptions = GUICtrlCreateMenu("&Options")
$PFMenuFishFinder = GUICtrlCreateMenu("Fish Finder", $PFMenuOptions)
$PFMenuMoveFishFinder = GUICtrlCreateMenuItem("Move", $PFMenuFishFinder)
$PFMenuHideFishFinder = GUICtrlCreateMenuItem("Hide", $PFMenuFishFinder) ;<== Creates MenuItem Hide in the Fish Finder Menu
$PFMenuResizeFishFinder = GUICtrlCreateMenuItem("Resize", $PFMenuFishFinder)
$PFMenuDropFinder = GUICtrlCreateMenu("Drop Finder", $PFMenuOptions)
$PFMenuMoveDropFinder = GUICtrlCreateMenuItem("Move", $PFMenuDropFinder)
$PFMenuHideDropFinder = GUICtrlCreateMenuItem("Hide", $PFMenuDropFinder) ;<== Creates MenuItem Hide in the Drop Finder Menu
$PFMenuChooseColors = GUICtrlCreateMenu("Choose Colors", $PFMenuOptions)
$PFMenuChooseColorsFish = GUICtrlCreateMenu("Fish Finder", $PFMenuChooseColors)
$PFMenuChooseColorsFishByColor = GUICtrlCreateMenuItem("By Color", $PFMenuChooseColorsFish)
$PFMenuChooseColorsFishByFish = GUICtrlCreateMenu("By Fish", $PFMenuChooseColorsFish)
$PFMenuFishShrimp= GUICtrlCreateMenuItem("Shrimp", $PFMenuChooseColorsFishByFish)
$PFMenuFishTrout = GUICtrlCreateMenuItem("Trout", $PFMenuChooseColorsFishByFish)
$PFMenuFishSalmon = GUICtrlCreateMenuItem("Salmon", $PFMenuChooseColorsFishByFish)
$PFMenuChooseColorsDrop = GUICtrlCreateMenu("Drop Finder", $PFMenuChooseColors)
$PFMenuChooseColorsDropByColor = GUICtrlCreateMenuItem("By Color", $PFMenuChooseColorsDrop)
$PFMenuChooseColorsDropByFish = GUICtrlCreateMenu("By Fish", $PFMenuChooseColorsDrop)
$PFMenuDropShrimp = GUICtrlCreateMenuItem("Shrimp", $PFMenuChooseColorsDropByFish)
$PFMenuDropTrout = GUICtrlCreateMenuItem("Trout", $PFMenuChooseColorsDropByFish)
$PFMenuDropSalmon = GUICtrlCreateMenuItem("Salmon", $PFMenuChooseColorsDropByFish)
$PFCheckIntervalMenu = GUICtrlCreateMenu("Check Interval", $PFMenuOptions)
$PFCheckInterval2 = GUICtrlCreateMenuItem("2000(ms)", $PFCheckIntervalMenu)
$PFCheckInterval4 = GUICtrlCreateMenuItem("4000(ms)", $PFCheckIntervalMenu)
$PFCheckInterval6 = GUICtrlCreateMenuItem("6000(ms)", $PFCheckIntervalMenu)
$PFCheckIntervalCustom = GUICtrlCreateMenuItem("Custom", $PFCheckIntervalMenu)
$PFFishingIntervalMenu = GUICtrlCreateMenu("Fishing Interval", $PFMenuOptions)
$PFFishingInterval2 = GUICtrlCreateMenuItem("2000(ms)", $PFFishingIntervalMenu)
$PFFishingInterval4 = GUICtrlCreateMenuItem("4000(ms)", $PFFishingIntervalMenu)
$PFFishingInterval6 = GUICtrlCreateMenuItem("6000(ms)", $PFFishingIntervalMenu)
$PFFishingIntervalCustom = GUICtrlCreateMenuItem("Custom", $PFFishingIntervalMenu)
$PFMenuHelp = GUICtrlCreateMenu("&Help")
$PFMenuInstructions = GUICtrlCreateMenuItem("Instructions", $PFMenuHelp)
$PFMenuHotkeys = GUICtrlCreateMenu("HotKeys", $PFMenuHelp)
$PFMenuHotKeyStart = GUICtrlCreateMenuItem("Start (Ctrl - Z)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Start (Ctrl - Z) in the Hotkeys Menu
$PFMenuHotKeyStop = GUICtrlCreateMenuItem("Stop (Ctrl - X)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Stop (Ctrl - X) in the Hotkeys Menu
$PFMenuHotKeyMove = GUICtrlCreateMenuItem("Move Ore Finder (Ctrl - A)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Move Ore Finder (Ctrl - A) in the Hotkeys Menu
$PFMenuHotKeySmallMove = GUICtrlCreateMenuItem("Move Drop Finder (Ctrl - Q)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Move Drop Finder (Ctrl - Q) in the Hotkeys Menu
$PFMenuHotKeyHide = GUICtrlCreateMenuItem("Hide Red Boxes (Ctrl - W)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - W) in the Hotkeys Menu
$PFMenuHotKeyShow = GUICtrlCreateMenuItem("Show Red Boxes (Ctrl - S)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Hide Red Boxes (Ctrl - S) in the Hotkeys Menu
$PFMenuHotKeyEmergencyStop = GUICtrlCreateMenuItem("Emeregency Stop (Ctrl + Alt - X)", $PFMenuHotkeys) ;<== Cretaes the MenuItem Emeregency Stop (Ctrl + Alt - X) in the Hotkeys Menu
;Draws the Top of the Ore Finder Box
$PFTop = GUICreate("Top Line", $PFScanWidth, 2, $PFx, $PFy, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Ore Finder Box
$PFLeft = GUICreate("Left Line", 2, $PFScanHeight, $PFx, $PFy, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Ore Finder Box
$PFRight = GUICreate("Right Line", 2, $PFScanHeight, $PFx + $PFScanWidth, $PFy, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Ore Finder Box
$PFBottom = GUICreate("Bottom Line", $PFScanWidth, 2, $PFx, $PFy + $PFScanHeight, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Top of the Drop Finder Box
$PFsmallTop = GUICreate("Top Line", $PFSmallScanWidth, 2, $PFsmallx, $PFsmally, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Left Side of the Drop Finder Box
$PFsmallLeft = GUICreate("Left Line", 2, $PFSmallScanHeight, $PFsmallx, $PFsmally, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Right Side of the Drop Finder Box
$PFsmallRight = GUICreate("Right Line", 2, $PFSmallScanHeight, $PFsmallx + $PFSmallScanWidth - 2, $PFsmally, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)
;Draws the Bottom of the Drop Finder Box
$PFsmallBottom = GUICreate("Bottom Line", $PFSmallScanWidth, 2, $PFsmallx, $PFsmally + $PFSmallScanHeight, $WS_POPUP, -1, $PFGUI)
GUISetBkColor(0xFF0000)
GUISetState(@SW_HIDE)

;FUNCTION
Func POWERFISHER()
    Do      
        WinSetOnTop($PFGUI, "", 1)

HotKeySet("^z", "PFStart")
HotKeySet("^x", "PFStop")
HotKeySet("^a", "PFMove")
HotKeySet("^q", "PFSmallMove")
HotKeySet("^w", "PFHideBoth")
HotKeySet("^s", "PFShowBoth")
;~ HotKeySet("!^x", "Abort")

    $PFdata = PixelSearch($PFsmallx, $PFsmally, $PFsmallx + $PFSmallScanWidth, $PFsmally + $PFSmallScanHeight, $PFDropColor, $PFSens)
    If $PFdata <> 1 Then
        PFDrop()
    EndIf

   $msg = GUIGetMsg(1)
    Select 
        
        Case $msg[0] = $PFStartButton Or $msg[0] = $PFMenuStart Or $msg[0] = $PFMenuHotKeyStart And $msg[1] = $PFGUI
        PFStart()
        
        Case $msg[0] = $PFStopButton Or $msg[0] = $PFMenuStop Or $msg[0] = $PFMenuHotKeyStop
            PFStop()
        
        Case $msg[0] = $PFSelection And $msg[1] = $PFGUI
        PFHideBoth()
        GUISetState(@SW_HIDE, $PFGUI)
        GUISetState(@SW_SHOW, $SELECTGUI)
        Selection()
        
        Case $msg[0] = $PFMenuExit And $msg[1] = $PFGUI
        $Exitbox = MsgBox(36, "Would you like to quit?", "Select 'Yes' to quit, otherwise click 'No'")
        If $Exitbox = 6 then
            Exit
        Endif
            
        Case $msg[0] = $PFMenuMoveFishFinder And $msg[1] = $PFGUI
            PFMove()    
            
        Case $msg[0] = $PFMenuMoveDropFinder And $msg[1] = $PFGUI
            PFSmallMove()
            
        Case $msg[0] = $PFMenuHotKeySmallMove And $msg[1] = $PFGUI
            PFSmallMove()
            
        Case $msg[0] = $PFMenuResizeFishFinder And $msg[1] = $PFGUI
            PFResize()
            PFHide()
            
        Case $msg[0] = $PFMenuHideFishFinder And $msg[1] = $PFGUI
            PFHide()
            
        Case $msg[0] = $PFMenuHideDropFinder And $msg[1] = $PFGUI
            PFSmallHide()
            
        Case $msg[0] = $PFMenuHotKeyHide And $msg[1] = $PFGUI
            PFHideBoth()
            
        Case $msg[0] = $PFMenuHotKeyShow And $msg[1] = $PFGUI
            PFShowBoth()
            
        Case $msg[0] = $PFMenuChooseColorsDropByColor And $msg[1] = $PFGUI
            PFFishFindChooseColor()
            
        Case $msg[0] = $PFMenuChooseColorsDropByColor And $msg[1] = $PFGUI
            PFDropFindChooseColor()
            
        Case $msg[0] = $PFT1[0] And $msg[1] = $PFGUI
            $PFSleepCheck = 200
        Case $msg[0] = $PFT1[1] And $msg[1] = $PFGUI
            $PFSleepCheck = 500
        Case $msg[0] = $PFT1[2] And $msg[1] = $PFGUI
            $PFSleepCheck = 1000
        Case $msg[0] = $PFT1[3] And $msg[1] = $PFGUI
            $PFSleepCheck = 2000
        Case $msg[0] = $PFT1[4] And $msg[1] = $PFGUI
            $Input = Number(InputBox("Custom Checking Time", "How many ms do you want to wait? (1000ms = 1sec)", $PFSleepCheck, "", 200, 162, $PFx + 111, $PFy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $PFSleepCheck = Round($Input)
            Else
                $PFSleepCheck = 500
            EndIf
        Case $msg[0] = $PFT2[0] And $msg[1] = $PFGUI
            $PFSleepMine = 1000
        Case $msg[0] = $PFT2[1] And $msg[1] = $PFGUI
            $PFSleepMine = 2000
        Case $msg[0] = $PFT2[2] And $msg[1] = $PFGUI
            $PFSleepMine = 4000
        Case $msg[0] = $PFT2[3] And $msg[1] = $PFGUI
            $PFSleepMine = 6000
        Case $msg[0] = $PFT2[4] And $msg[1] = $PFGUI
            $Input = Number(InputBox("Custom Mining Time", "How many ms do you want to wait? (1000ms = 1sec)", $PFSleepMine, "", 200, 162, $PFx + 111, $PFy))
            If (Not @error) And (IsNumber($Input)) And ($Input <> 0) Then
                $PFSleepMine = Round($Input)
            Else
                $PFSleepMine = 4000
            EndIf
            
        Case $msg[0] = $PFMenuInstructions And $msg[1] = $PFGUI
            $var = FileExists("ReadMe.txt")
            If $var = 1 Then
                ShellExecuteWait("ReadMe.txt")
            Else
                SplashTextOn("Error:", "File Not Found! You must have deleted it!", 200, 300)
            EndIf
        Case $msg[0] = $PFDropColorDisplay And $msg[1] = $PFGUI
            PFDropFindChooseColor()
        Case $msg[0] = $PFCurrentColorDisplay And $msg[1] = $PFGUI
            PFTreeFindChooseColor() 
            
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc 
;
;
;
;

Func PFStart()
    PFShowBoth()
    PFCheck()
    PFSetBothColor()

EndFunc   ;==>Start

Func PFStop()
    PFHideBoth()
    PFReSetColor()
    AdlibDisable()
    GUICtrlSetData($PFLabelStatus, "Stopped")

EndFunc   ;==>Stop

Func PFCheck()
    
    Sleep(Random(0, 500, 1))
    
    $PFPixel = PixelSearch($PFx + 2, $PFy, $PFx + 2 + $PFScanWidth, $PFy + $PFScanHeight, $PFCurrentColor, $PFSens)
    
    If Not @error Then
        
        MouseClick("Left", $PFPixel[0], $PFPixel[1], 1, 2)
        GUICtrlSetData($PFLabelStatus, "Mining")
        $PFIdle = 0
        AdlibEnable("PFCheck", $PFSleepMine)
        
    Else
        
        GUICtrlSetData($PFLabelStatus, "Checking")
        $PFIdle += $PFSleepCheck
        If $PFIdle >= 60000 Then
            MouseClick("Left")
            $PFIdle = 0
        EndIf

        AdlibEnable("PFCheck", $PFSleepCheck)
    EndIf

    GUICtrlSetData($PFLabelCheckInterval, "" & $PFSleepCheck / 1000 & " Seconds")
    GUICtrlSetData($PFLableFishInterval, "" & $PFSleepMine / 1000 & " Seconds")


EndFunc   ;==>Check

Func PFSetColor()
    GUICtrlSetBkColor($PFCurrentColorDisplay, $PFCurrentColor)
EndFunc   ;==>SetColor

Func PFSetDropColor()
    GUICtrlSetBkColor($PFDropColorDisplay, $PFCurrentDropColor)
EndFunc   ;==>SetDropColor

Func PFSetBothColor()
    GUICtrlSetBkColor($PFCurrentColorDisplay, $PFCurrentColor)
    GUICtrlSetBkColor($PFDropColorDisplay, $PFCurrentDropColor)
EndFunc   ;==>SetBothColor

Func PFReSetColor()
    GUICtrlSetBkColor($PFCurrentColorDisplay, 0x000000)
    GUICtrlSetBkColor($PFDropColorDisplay, 0x000000)
EndFunc   ;==>ReSetColor

Func PFDrop()
    $PFdata = PixelSearch($PFsmallx, $PFsmally, $PFsmallx + $PFSmallScanWidth, $PFsmally + $PFSmallScanHeight, $PFDropColor, $PFSens)
    GUICtrlSetData($PFLabelStatus, "Droping Trees")
    $PFIdle = 0
    
    
    ;Searches the Inventory for the Drop Color
    $PFpos = PixelSearch(810, 350, 990, 570, $PFDropColor, $PFSens)
    ;Makes $pos an Array
    If IsArray($PFpos) Then
        ;Moves Mouse to the Tree that was detected
        MouseMove($PFpos[0], $PFpos[1])
        ;Right Clicks the Tree
        MouseClick("right", $PFpos[0], $PFpos[1])
        ;Left Clicks the D
        ;Moves the Mouse Down to the Drop Option
        MouseMove($PFpos[0], $PFpos[1] + 45)
        ;Left Clicks the Drop Option
        MouseClick("left", $PFpos[0], $PFpos[1] + 45)
        ;Left Clicks the D
    EndIf
    
    AdlibEnable("PFCheck", $PFSleepDrop)
    
EndFunc   ;==>Drop

Func PFMove()
    
    PFShow()
    
    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $PFMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($PFTop, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFLeft, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFRight, "", $PFMousePos[0] + $PFScanWidth - 2, $PFMousePos[1])
        WinMove($PFBottom, "", $PFMousePos[0], $PFMousePos[1] + $PFScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $PFx = $PFMousePos[0]
        $PFy = $PFMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            PFHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Move

Func PFSmallMove()

    PFSmallShow()

    ;Loops while user moves the Scan Screen.
    While 1
        ;Sets a Variable equal to the Mouse Position
        $PFMousePos = MouseGetPos()
        
        ;Moves the Sides of the Scan Screen to the Mouse Position
        WinMove($PFsmallTop, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFsmallLeft, "", $PFMousePos[0], $PFMousePos[1])
        WinMove($PFsmallRight, "", $PFMousePos[0] + $PFSmallScanWidth - 2, $PFMousePos[1])
        WinMove($PFsmallBottom, "", $PFMousePos[0], $PFMousePos[1] + $PFSmallScanHeight)
        
        ;Sets the scan Screens Current Position to its New Position
        $PFsmallx = $PFMousePos[0]
        $PFsmally = $PFMousePos[1]
        
        ;When the Left Mouse Button is released the Loop ends.
        If _IsPressed(01) Then
            ;Deletes the Box around the Scan Screen
            Sleep(1000)
            PFSmallHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>SmallMove

Func PFHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $PFTop)
    GUISetState(@SW_HIDE, $PFBottom)
    GUISetState(@SW_HIDE, $PFLeft)
    GUISetState(@SW_HIDE, $PFRight)
    
EndFunc   ;==>Hide

Func PFSmallHide()
    
    Sleep(1000)
    GUISetState(@SW_HIDE, $PFsmallTop)
    GUISetState(@SW_HIDE, $PFsmallBottom)
    GUISetState(@SW_HIDE, $PFsmallLeft)
    GUISetState(@SW_HIDE, $PFsmallRight)
    
EndFunc   ;==>SmallHide

Func PFHideBoth()

    Sleep(1000)
    GUISetState(@SW_HIDE, $PFTop)
    GUISetState(@SW_HIDE, $PFBottom)
    GUISetState(@SW_HIDE, $PFLeft)
    GUISetState(@SW_HIDE, $PFRight)

    GUISetState(@SW_HIDE, $PFsmallTop)
    GUISetState(@SW_HIDE, $PFsmallBottom)
    GUISetState(@SW_HIDE, $PFsmallLeft)
    GUISetState(@SW_HIDE, $PFsmallRight)
    
EndFunc   ;==>HideBoth

Func PFShow()

    GUISetState(@SW_SHOW, $PFTop)
    GUISetState(@SW_SHOW, $PFBottom)
    GUISetState(@SW_SHOW, $PFLeft)
    GUISetState(@SW_SHOW, $PFRight)

EndFunc   ;==>Show

Func PFSmallShow()
    
    GUISetState(@SW_SHOW, $PFsmallTop)
    GUISetState(@SW_SHOW, $PFsmallBottom)
    GUISetState(@SW_SHOW, $PFsmallLeft)
    GUISetState(@SW_SHOW, $PFsmallRight)

EndFunc   ;==>SmallShow

Func PFShowBoth()
    
    GUISetState(@SW_SHOW, $PFTop)
    GUISetState(@SW_SHOW, $PFBottom)
    GUISetState(@SW_SHOW, $PFLeft)
    GUISetState(@SW_SHOW, $PFRight)

    GUISetState(@SW_SHOW, $PFsmallTop)
    GUISetState(@SW_SHOW, $PFsmallBottom)
    GUISetState(@SW_SHOW, $PFsmallLeft)
    GUISetState(@SW_SHOW, $PFsmallRight)

EndFunc   ;==>ShowBoth

Func PFResize()
    PFStop()
    $PFMoveMode = True

    PFShow()
    
    While 1
        
        $PFMousePos = MouseGetPos()
        
        WinMove($PFTop, "", $PFx, $PFy, $PFScanWidth, 2)
        WinMove($PFLeft, "", $PFx, $PFy, 2, $PFScanHeight)
        WinMove($PFRight, "", $PFx + $PFScanWidth - 2, $y, 2, $PFScanHeight)
        WinMove($PFBottom, "", $PFx, $PFy + $PFScanHeight, $PFScanWidth, 2)
        
        If Not (($PFMousePos[0] - $PFx + 1) <= 40) Then
            $PFScanWidth = $PFMousePos[0] - $PFx + 1
        EndIf
        If Not (($PFMousePos[1] - $PFy - 39) <= 40) Then
            $PFScanHeight = $PFMousePos[1] - $PFy - 39
        EndIf
        
        If _IsPressed(01) Then
            Sleep(1000)
            PFHide()
            ExitLoop
        EndIf
    WEnd
EndFunc   ;==>Resize

Func PFTreeFindChooseColor()
    $PFNewColor = 0
    While 1
        $PFMousePos = MouseGetPos()
        If Not @error Then
            $PFNewColor = PixelGetColor($PFMousePos[0], $PFMousePos[1])
            GUICtrlSetBkColor($PFCurrentColorDisplay, $PFNewColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $PFNewColor <> -1 Then
                $PFCurrentColor = $PFNewColor
            EndIf
            
            PFSetColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>TreeFindChooseColor

Func PFDropFindChooseColor()
    $PFDropColor = 0
    While 1
        $PFMousePos = MouseGetPos()
        If Not @error Then
            $PFDropColor = PixelGetColor($PFMousePos[0], $PFMousePos[1])
            GUICtrlSetBkColor($PFDropColorDisplay, $PFDropColor)
        EndIf
        
        Sleep(150)
        
        If _IsPressed(01) Then
            
            If $PFDropColor <> -1 Then
                $PFCurrentDropColor = $PFDropColor
            EndIf
            
            PFSetDropColor()
            
            ExitLoop
        EndIf
        
    WEnd
EndFunc   ;==>DropFindChooseColor

;LOOP
POWERFISHER()

Please help!. =) All help is greatly appreciated.

Edited by inline853
Link to comment
Share on other sites

This compound operator is suspicious, so I tweaked it:

Case ($msg[1] = $PFGUI) And ($msg[0] = $PFStartButton Or $msg[0] = $PFMenuStart Or $msg[0] = $PFMenuHotKeyStart) 
                PFStart()

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Way too much code to wade through that has nothing to do with the problem, and references a game I and others don't have. Reduce the script to what Dale calls a "reproducer" -- the minimum code required to replicate the symptoms.

If you cut out that GUI as a standalone script with just the menu functions, and have the menu selection just do a MsgBox or ConsoleWrite, you can pare it way down to just the issue.

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

Way too much code to wade through that has nothing to do with the problem, and references a game I and others don't have. Reduce the script to what Dale calls a "reproducer" -- the minimum code required to replicate the symptoms.

If you cut out that GUI as a standalone script with just the menu functions, and have the menu selection just do a MsgBox or ConsoleWrite, you can pare it way down to just the issue.

:)

Ditto

8)

NEWHeader1.png

Link to comment
Share on other sites

well, i did start only putting in what was needed, and it worked. Even with the bare minimim. So I have no clue what the problem is. The Menu for File Menu Top Thing, is not working. It will not execute its code, and I don't know why. And its only happening on the Power Fisher Function part. The other ones work fine. If anyone can point me in the right direction of how to find it, it would be great. =) Thanks so far, and thanks in advance.

Link to comment
Share on other sites

I think there is a problem with the PowerFisher Portion of this code, but I don't see it. When I call the POWERFISHER()

on its own, its fine.

Func Selection()
    Do
        WinSetOnTop($SELECTGUI, "", 1)
   $msg = GUIGetMsg(1)
    Select
        
        Case $msg[0] = $AFButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $AFGUI)
        AUTOFIGHTER()
        
        Case $msg[0] = $PCButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $PCGUI)
        POWERCUTTER()
        
        Case $msg[0] = $PFButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $PFGUI)
        POWERFISHER()
        
        Case $msg[0] = $HMButton And $msg[1] = $SELECTGUI
        $username = GUICtrlRead($UsernameInput)
        $password = GUICtrlRead($PasswordInput)
        GUISetState(@SW_HIDE, $SELECTGUI)
        GUISetState(@SW_SHOW, $HMGUI)
        HYBERMINER()
        
    EndSelect       
    
    Until $msg[0] = $GUI_EVENT_CLOSE

EndFunc
Link to comment
Share on other sites

I think there is a problem with the PowerFisher Portion of this code, but I don't see it. When I call the POWERFISHER()

on its own, its fine.

Do you mean this select function just doesn't call PowerFisher() at all, or calls it wrong somehow?

:)

Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law
Link to comment
Share on other sites

no i have found it to be the POWERFISH FUNCTION itself, I was looking to wide, but with some peoples support and help I have narrowed it down to either the POWERFISHER GUI or Functions. Prolly the function tho.

http://www.autoitscript.com/forum/index.php?showtopic=53857 ^^ This post eventually leads to those suspicions

Edited by inline853
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...