Click Speed/delay/sleep Topic is solved

Ask gaming related questions (AHK v1.1 and older)
nexinferis
Posts: 61
Joined: 04 Jan 2022, 05:02

Re: Click Speed/delay/sleep

Post by nexinferis » 07 Feb 2022, 06:59

Hellbent wrote:
05 Feb 2022, 14:18
I was playing around with a design for a general purpose script that can be set to watch n pixels for true or false values.

I don't have the time to finish it today but I'll post what I have so far.

This is my mock up for the individual search panels.

.
00001 Pixel search 4.PNG
.


@boiler you are more versed in pixel / image search.
Do you see anything that I am missing from the list of features seen in the panel image?

Also things that I may want to add here?


.
00001 Pixel search main window 1.PNG
.
Wow its seems very good 👍 When we can use it? Thanks for this project!

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 07 Feb 2022, 19:33

nexinferis wrote:
07 Feb 2022, 06:59
Wow its seems very good 👍 When we can use it? Thanks for this project!
I need to re-do the layout design and then create classes for the control types, create a panel class, create the gui, and then wire the gui up to the required functions.
The only hold-up is that I need to be in the mood to do the design work and I'm not in the mood right now. If that last design would have worked I'd likely be done by now.

nexinferis
Posts: 61
Joined: 04 Jan 2022, 05:02

Re: Click Speed/delay/sleep

Post by nexinferis » 08 Feb 2022, 03:34

Hellbent wrote:
07 Feb 2022, 19:33
nexinferis wrote:
07 Feb 2022, 06:59
Wow its seems very good 👍 When we can use it? Thanks for this project!
I need to re-do the layout design and then create classes for the control types, create a panel class, create the gui, and then wire the gui up to the required functions.
The only hold-up is that I need to be in the mood to do the design work and I'm not in the mood right now. If that last design would have worked I'd likely be done by now.
I think the first design photo you shared was really cool. I really like the work you do. I will wait patiently and check it daily. Thanks!

nexinferis
Posts: 61
Joined: 04 Jan 2022, 05:02

Re: Click Speed/delay/sleep

Post by nexinferis » 25 Feb 2022, 05:19

Hellbent wrote:
07 Feb 2022, 19:33
nexinferis wrote:
07 Feb 2022, 06:59
Wow its seems very good 👍 When we can use it? Thanks for this project!
I need to re-do the layout design and then create classes for the control types, create a panel class, create the gui, and then wire the gui up to the required functions.
The only hold-up is that I need to be in the mood to do the design work and I'm not in the mood right now. If that last design would have worked I'd likely be done by now.
Any update my friend?

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 24 Mar 2022, 21:25

Completed a prototype for the main window. ( what I described in my last post (windows in windows) )
There is no real need to use custom graphics, you can just use default controls to get the same result. The only tricky part would be the consecutive panels, and they are little more than a window sitting inside a window that is also sitting in a window ( the panels sit on a inner window ). To move through the panels ( when there is more than 3 (as per the setup in the image ) ) you just move the inner window and the panels go along for the ride.
Animation.gif
Animation.gif (333.74 KiB) Viewed 3958 times

Code: Select all

#SingleInstance, Force
SetBatchlines, -1

Slider := {}
Slider.Range := 440 - 60 - 2 ;( 378 )
Slider.Top := 11
Slider.ModCount := 1
Slider.Height := 60
Slider.Bottom := Slider.Range + Slider.Top
Slider.Value := 1

colors := [ "FE6C26" , "F535A8" , "4FC08A" , "F2DB03" , "89DBD3" , "E15C10" , "D126F0" , "072EAE" , "284C24" , "10E893" ]
Y := 0

Gui, 1:+AlwaysOnTop
Gui, 1:Color, 22262a

Gui, 2:+Parent1 -Caption 
Gui, 2:Color, 32363a
Gui, 2:Show, x10 y10 w600 h440

Gui, 3:+Parent2 -Caption 
Gui, 3:Color, 42464a
Gui, 3:Show, % "x0 y0 w600 h" Slider.ModCount * 170 + 200

Loop, % Slider.ModCount	{
	index := A_Index + 3
	Gui, % index ":New", +Parent3 -Caption 
	Gui, % index ":Color", % colors[ Random( 1 , 10 ) ]
	Gui, % index ":Add", Text, , % A_Index
	Gui, % index ":Show", % "x0 y" Y " w600 h160"
	Y += 170
}

Gui, 1:Add, Text, x620 y10 w20 h440 Border gAdjustSlider
Gui, 1:Add, Hotkey, xm y+30 ,
Gui, 1:Add, Button, x+10  , % "Update"
Gui, 1:Add, Hotkey, xm  ,
Gui, 1:Add, Button, x+10  , % "Update"

Gui, 1:Add, Button, x+100  gAddPanel, % "Add"

Gui, 1:Add, Progress, % "x621 y11 w18 h" Slider.Height " C3399FF Background000000 Disabled hwndProHwnd", 100

Gui, 1:Show, x800 y100 w650 h550

OnMessage( 0x020A , Func( "WheelChange" ).Bind( Slider ) )

return
GuiClose:
GuiContextMenu:
*ESC::ExitApp


AdjustSlider:
	CoordMode, Mouse, Client
	ly := ""
	While( GetKeyState( "LButton" ) ){
		MouseGetPos,, y
		if( ly != y ){
			if( y < Slider.Top )
				y := Slider.Top
			if( y > Slider.Bottom )
				y := Slider.Bottom
			value := Slider.Range / ( Slider.ModCount - 1 ) 
			Loop, % Slider.ModCount	{
				if( y - Slider.Top < ( value * A_Index ) ){
					y := Slider.Top + ( value * ( A_Index - 1 ) )
					value := A_Index
					Slider.Value := Value
					GuiControl, 1:Move, % ProHwnd, % "y" y
					Gui, 3:Show, % "x0 y" -( ( value - 1 ) * 170)
					break
				}
			}
			ly := y
			sleep, 30
		}
	}
	return

AddPanel:
	GuiControl, 1:Move, % ProHwnd, % "y" Slider.Top
	++Slider.ModCount
	Gui, 3:Show, % "x0 y0 h" Slider.ModCount * 170 + 200
	Gui, % "W" Slider.ModCount + 3 ":New", +Parent3 -Caption 
	Gui, % "W" Slider.ModCount + 3 ":Color", % colors[ Random( 1 , 10 ) ]
	Gui, % "W" Slider.ModCount + 3 ":Add", Text, , % Slider.ModCount
	Gui, % "W" Slider.ModCount + 3 ":Show", % "x0 y" ( Slider.ModCount - 1 ) * 170 " w600 h160"
	return

WheelChange( Slider , input ){
	local Dir := ( (input >> 16 ) > 0x7FFF ) || ( ( input < 0 ) ? ( 1 ) : ( 0 ) )
	if( !Dir && Slider.Value > 1 ){
		Slider.Value -= 1
		value := Slider.Range / ( Slider.ModCount - 1 ) 
		y := Slider.Top + ( value * ( Slider.Value - 1 ) )
		value := Slider.Value
		GuiControl, 1:Move, % ProHwnd, % "y" y 
		Gui, 3:Show, % "x0 y" -( ( Slider.Value - 1 ) * 170)
		return 1
	}else if( Dir && Slider.Value < Slider.ModCount ){
		Slider.Value += 1
		value := Slider.Range / ( Slider.ModCount - 1 ) 
		y := Slider.Top + ( value * ( Slider.Value - 1 ) )
		value := Slider.Value
		GuiControl, 1:Move, % ProHwnd, % "y" y 
		Gui, 3:Show, % "x0 y" -( ( Slider.Value - 1 ) * 170)
		return 1
	}
	sleep, 100
}

Random( min , max ){
	local Output
	Random, Output, min, max
	return Output
}
I will likely work on a Panel class next.

nexinferis
Posts: 61
Joined: 04 Jan 2022, 05:02

Re: Click Speed/delay/sleep

Post by nexinferis » 26 Mar 2022, 20:11

Hellbent wrote:
24 Mar 2022, 21:25
Completed a prototype for the main window. ( what I described in my last post (windows in windows) )
There is no real need to use custom graphics, you can just use default controls to get the same result. The only tricky part would be the consecutive panels, and they are little more than a window sitting inside a window that is also sitting in a window ( the panels sit on a inner window ). To move through the panels ( when there is more than 3 (as per the setup in the image ) ) you just move the inner window and the panels go along for the ride.

Animation.gif

Code: Select all

#SingleInstance, Force
SetBatchlines, -1

Slider := {}
Slider.Range := 440 - 60 - 2 ;( 378 )
Slider.Top := 11
Slider.ModCount := 1
Slider.Height := 60
Slider.Bottom := Slider.Range + Slider.Top
Slider.Value := 1

colors := [ "FE6C26" , "F535A8" , "4FC08A" , "F2DB03" , "89DBD3" , "E15C10" , "D126F0" , "072EAE" , "284C24" , "10E893" ]
Y := 0

Gui, 1:+AlwaysOnTop
Gui, 1:Color, 22262a

Gui, 2:+Parent1 -Caption 
Gui, 2:Color, 32363a
Gui, 2:Show, x10 y10 w600 h440

Gui, 3:+Parent2 -Caption 
Gui, 3:Color, 42464a
Gui, 3:Show, % "x0 y0 w600 h" Slider.ModCount * 170 + 200

Loop, % Slider.ModCount	{
	index := A_Index + 3
	Gui, % index ":New", +Parent3 -Caption 
	Gui, % index ":Color", % colors[ Random( 1 , 10 ) ]
	Gui, % index ":Add", Text, , % A_Index
	Gui, % index ":Show", % "x0 y" Y " w600 h160"
	Y += 170
}

Gui, 1:Add, Text, x620 y10 w20 h440 Border gAdjustSlider
Gui, 1:Add, Hotkey, xm y+30 ,
Gui, 1:Add, Button, x+10  , % "Update"
Gui, 1:Add, Hotkey, xm  ,
Gui, 1:Add, Button, x+10  , % "Update"

Gui, 1:Add, Button, x+100  gAddPanel, % "Add"

Gui, 1:Add, Progress, % "x621 y11 w18 h" Slider.Height " C3399FF Background000000 Disabled hwndProHwnd", 100

Gui, 1:Show, x800 y100 w650 h550

OnMessage( 0x020A , Func( "WheelChange" ).Bind( Slider ) )

return
GuiClose:
GuiContextMenu:
*ESC::ExitApp


AdjustSlider:
	CoordMode, Mouse, Client
	ly := ""
	While( GetKeyState( "LButton" ) ){
		MouseGetPos,, y
		if( ly != y ){
			if( y < Slider.Top )
				y := Slider.Top
			if( y > Slider.Bottom )
				y := Slider.Bottom
			value := Slider.Range / ( Slider.ModCount - 1 ) 
			Loop, % Slider.ModCount	{
				if( y - Slider.Top < ( value * A_Index ) ){
					y := Slider.Top + ( value * ( A_Index - 1 ) )
					value := A_Index
					Slider.Value := Value
					GuiControl, 1:Move, % ProHwnd, % "y" y
					Gui, 3:Show, % "x0 y" -( ( value - 1 ) * 170)
					break
				}
			}
			ly := y
			sleep, 30
		}
	}
	return

AddPanel:
	GuiControl, 1:Move, % ProHwnd, % "y" Slider.Top
	++Slider.ModCount
	Gui, 3:Show, % "x0 y0 h" Slider.ModCount * 170 + 200
	Gui, % "W" Slider.ModCount + 3 ":New", +Parent3 -Caption 
	Gui, % "W" Slider.ModCount + 3 ":Color", % colors[ Random( 1 , 10 ) ]
	Gui, % "W" Slider.ModCount + 3 ":Add", Text, , % Slider.ModCount
	Gui, % "W" Slider.ModCount + 3 ":Show", % "x0 y" ( Slider.ModCount - 1 ) * 170 " w600 h160"
	return

WheelChange( Slider , input ){
	local Dir := ( (input >> 16 ) > 0x7FFF ) || ( ( input < 0 ) ? ( 1 ) : ( 0 ) )
	if( !Dir && Slider.Value > 1 ){
		Slider.Value -= 1
		value := Slider.Range / ( Slider.ModCount - 1 ) 
		y := Slider.Top + ( value * ( Slider.Value - 1 ) )
		value := Slider.Value
		GuiControl, 1:Move, % ProHwnd, % "y" y 
		Gui, 3:Show, % "x0 y" -( ( Slider.Value - 1 ) * 170)
		return 1
	}else if( Dir && Slider.Value < Slider.ModCount ){
		Slider.Value += 1
		value := Slider.Range / ( Slider.ModCount - 1 ) 
		y := Slider.Top + ( value * ( Slider.Value - 1 ) )
		value := Slider.Value
		GuiControl, 1:Move, % ProHwnd, % "y" y 
		Gui, 3:Show, % "x0 y" -( ( Slider.Value - 1 ) * 170)
		return 1
	}
	sleep, 100
}

Random( min , max ){
	local Output
	Random, Output, min, max
	return Output
}
I will likely work on a Panel class next.
Wow, looks solid 👍 Im curious about, on which platform will you share it when you finished it bro?

nexinferis
Posts: 61
Joined: 04 Jan 2022, 05:02

Re: Click Speed/delay/sleep

Post by nexinferis » 10 May 2022, 08:17

Hellbent wrote:
24 Mar 2022, 21:25
Completed a prototype for the main window. ( what I described in my last post (windows in windows) )
There is no real need to use custom graphics, you can just use default controls to get the same result. The only tricky part would be the consecutive panels, and they are little more than a window sitting inside a window that is also sitting in a window ( the panels sit on a inner window ). To move through the panels ( when there is more than 3 (as per the setup in the image ) ) you just move the inner window and the panels go along for the ride.

Animation.gif

Code: Select all

#SingleInstance, Force
SetBatchlines, -1

Slider := {}
Slider.Range := 440 - 60 - 2 ;( 378 )
Slider.Top := 11
Slider.ModCount := 1
Slider.Height := 60
Slider.Bottom := Slider.Range + Slider.Top
Slider.Value := 1

colors := [ "FE6C26" , "F535A8" , "4FC08A" , "F2DB03" , "89DBD3" , "E15C10" , "D126F0" , "072EAE" , "284C24" , "10E893" ]
Y := 0

Gui, 1:+AlwaysOnTop
Gui, 1:Color, 22262a

Gui, 2:+Parent1 -Caption 
Gui, 2:Color, 32363a
Gui, 2:Show, x10 y10 w600 h440

Gui, 3:+Parent2 -Caption 
Gui, 3:Color, 42464a
Gui, 3:Show, % "x0 y0 w600 h" Slider.ModCount * 170 + 200

Loop, % Slider.ModCount	{
	index := A_Index + 3
	Gui, % index ":New", +Parent3 -Caption 
	Gui, % index ":Color", % colors[ Random( 1 , 10 ) ]
	Gui, % index ":Add", Text, , % A_Index
	Gui, % index ":Show", % "x0 y" Y " w600 h160"
	Y += 170
}

Gui, 1:Add, Text, x620 y10 w20 h440 Border gAdjustSlider
Gui, 1:Add, Hotkey, xm y+30 ,
Gui, 1:Add, Button, x+10  , % "Update"
Gui, 1:Add, Hotkey, xm  ,
Gui, 1:Add, Button, x+10  , % "Update"

Gui, 1:Add, Button, x+100  gAddPanel, % "Add"

Gui, 1:Add, Progress, % "x621 y11 w18 h" Slider.Height " C3399FF Background000000 Disabled hwndProHwnd", 100

Gui, 1:Show, x800 y100 w650 h550

OnMessage( 0x020A , Func( "WheelChange" ).Bind( Slider ) )

return
GuiClose:
GuiContextMenu:
*ESC::ExitApp


AdjustSlider:
	CoordMode, Mouse, Client
	ly := ""
	While( GetKeyState( "LButton" ) ){
		MouseGetPos,, y
		if( ly != y ){
			if( y < Slider.Top )
				y := Slider.Top
			if( y > Slider.Bottom )
				y := Slider.Bottom
			value := Slider.Range / ( Slider.ModCount - 1 ) 
			Loop, % Slider.ModCount	{
				if( y - Slider.Top < ( value * A_Index ) ){
					y := Slider.Top + ( value * ( A_Index - 1 ) )
					value := A_Index
					Slider.Value := Value
					GuiControl, 1:Move, % ProHwnd, % "y" y
					Gui, 3:Show, % "x0 y" -( ( value - 1 ) * 170)
					break
				}
			}
			ly := y
			sleep, 30
		}
	}
	return

AddPanel:
	GuiControl, 1:Move, % ProHwnd, % "y" Slider.Top
	++Slider.ModCount
	Gui, 3:Show, % "x0 y0 h" Slider.ModCount * 170 + 200
	Gui, % "W" Slider.ModCount + 3 ":New", +Parent3 -Caption 
	Gui, % "W" Slider.ModCount + 3 ":Color", % colors[ Random( 1 , 10 ) ]
	Gui, % "W" Slider.ModCount + 3 ":Add", Text, , % Slider.ModCount
	Gui, % "W" Slider.ModCount + 3 ":Show", % "x0 y" ( Slider.ModCount - 1 ) * 170 " w600 h160"
	return

WheelChange( Slider , input ){
	local Dir := ( (input >> 16 ) > 0x7FFF ) || ( ( input < 0 ) ? ( 1 ) : ( 0 ) )
	if( !Dir && Slider.Value > 1 ){
		Slider.Value -= 1
		value := Slider.Range / ( Slider.ModCount - 1 ) 
		y := Slider.Top + ( value * ( Slider.Value - 1 ) )
		value := Slider.Value
		GuiControl, 1:Move, % ProHwnd, % "y" y 
		Gui, 3:Show, % "x0 y" -( ( Slider.Value - 1 ) * 170)
		return 1
	}else if( Dir && Slider.Value < Slider.ModCount ){
		Slider.Value += 1
		value := Slider.Range / ( Slider.ModCount - 1 ) 
		y := Slider.Top + ( value * ( Slider.Value - 1 ) )
		value := Slider.Value
		GuiControl, 1:Move, % ProHwnd, % "y" y 
		Gui, 3:Show, % "x0 y" -( ( Slider.Value - 1 ) * 170)
		return 1
	}
	sleep, 100
}

Random( min , max ){
	local Output
	Random, Output, min, max
	return Output
}
I will likely work on a Panel class next.
Im still waiting for this :D

nexinferis
Posts: 61
Joined: 04 Jan 2022, 05:02

Re: Click Speed/delay/sleep

Post by nexinferis » 05 Jul 2022, 18:21

@Hellbent any update of your multi color program my friend?

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 01 Oct 2022, 12:01

@nexinferis.
Sorry that it took so long but I'm very busy these days. None the less I have created an early draft for the script that should hopefully do the trick for you. There are a number of features that I would still like to add but I don't have the time to spend on this right now. I did however leave some space at the bottom of the window so that you can add more controls if you want to.


The window for this script is fully scalable so you can make it small with lots of panels or you can make it big with fewer panels.

.
Pixel Pred 4.1 1.gif
Pixel Pred 4.1 1.gif (743.78 KiB) Viewed 3601 times
.

Once you set your hotkeys for the first time they will get saved for the next time you run the script.
You can also save up to 9 colors that will persist when you run the script in the future.
.
20221001122138.png
20221001122138.png (28.63 KiB) Viewed 3601 times
.



Here is a little demo of how to use this.


[/code]
Pixel Pred 4.1 2.gif
Pixel Pred 4.1 2.gif (398.98 KiB) Viewed 3601 times
.

If you have any questions let me know.

Requires the GDI+ lib for ahk

Code: Select all

;Pixel Predator v4.1
;HB - sept 30th 2022
;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************

#Include <GDIP_ALL> ;GDIP:  https://www.autohotkey.com/boards/viewtopic.php?f=6&t=6517

;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************

#SingleInstance, Force
SetBatchLines, -1
Gdip_Startup()




Main.Setup( 1 , 3 )      ;Change the scaling and the number of panels to display on the window 
;~ Main.Setup( .7 , 5 ) ;Example of smaller window.




return

GuiClose:
;~ GuiContextMenu:
;~ *ESC::   ;<<<<<<------ Add a exit hotkey if you want to
	ExitApp







;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class SearchPanel extends Graphics	{

	;Written By: Hellbent aka CivReborn
	;Date: Sept 30th 2022
	;Last Edit: Oct 1st, 2022
	;Search Panel for pixel predator v4.1
	
	__New( ParentHwnd , obj := "" ){
		This._SetDefaults( ParentHwnd )
		This._UpdateDefaults( obj )
	}
	
	_SetDefaults( ParentHwnd ){
		This.Window := {}
		This.Window.X := 0 
		This.Window.Y := 0
		This.Window.W := 600
		This.Window.H := 115
		This.Window.Options := " -Caption -DPIScale +Parent" parentHwnd 
		This.Window.Color := "22262a"
		This.Window.Scale := 1
	}
	
	_UpdateDefaults( obj := "" ){
		static tog
		for k , v in obj 
			This.Window[ k ] := obj[ k ]
		This.Scale := This.Window.Scale
		This.Window := New WindowClass( This.Window )
		This.Hwnd := This.Window.Hwnd
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		This.Activate := 0
		This.Truth := 1
		This.SearchX := ""
		This.SearchY := ""
		This.SearchColor := "428B44"
		This.MoveClickSend := 1
		This.Delay := 1000
		This.SendStuff := "{ click , 200 , 200 } ^v"
		This.ButtonPress_SetPosition := 0
		This.ButtonPress_SetColor := 0
		This.ButtonPress_Copy := 0
		This.ButtonPress_Remove := 0
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		This.Controls := {}
		This.Handles := []
		;*********************************************************
		This.Controls.SearchXPosEdit := New ControlClass( This.Hwnd , { X: 117 , Y: 36 , W: 43 , H: 21 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.SearchX , Method: "_ChangeValuesTrigger" } )
		This.Controls.SearchXPosEdit.BindControl( This[ This.Controls.SearchXPosEdit.Method ].Bind( This , This.Handles[ This.Controls.SearchXPosEdit.Hwnd ] := "SearchXPosEdit" ) )
		;*********************************************************
		This.Controls.SearchYPosEdit := New ControlClass( This.Hwnd , { X: 171 , Y: 36 , W: 43 , H: 21 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.SearchY , Method: "_ChangeValuesTrigger" } )
		This.Controls.SearchYPosEdit.BindControl( This[ This.Controls.SearchYPosEdit.Method ].Bind( This , This.Handles[ This.Controls.SearchYPosEdit.Hwnd ] := "SearchYPosEdit" ) )
		;*********************************************************
		This.Controls.DelayEdit := New ControlClass( This.Hwnd , { X: 430 , Y: 42 , W: 84 , H: 23 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.Delay , Method: "_ChangeValuesTrigger" } )
		This.Controls.DelayEdit.BindControl( This[ This.Controls.DelayEdit.Method ].Bind( This , This.Handles[ This.Controls.DelayEdit.Hwnd ] := "DelayEdit" ) )
		;*********************************************************
		This.Controls.SendEdit := New ControlClass( This.Hwnd , { X: 355 , Y: 83 , W: 225 , H: 25 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.SendStuff , Method: "_ChangeValuesTrigger" } )
		This.Controls.SendEdit.BindControl( This[ This.Controls.SendEdit.Method ].Bind( This , This.Handles[ This.Controls.SendEdit.Hwnd ] := "SendEdit" ) )
		;*********************************************************
		This.Controls.BackgroundPicture := New ControlClass( This.Hwnd , { X: 0 , Y: 0 , W: 600 , H: 115 , Scale: This.Scale , Type: "Picture" , Options: " 0xE 0x04000000  " } )
		;*********************************************************
		This.Controls.ActivateCheckbox := New ControlClass( This.Hwnd , { X: 10 , Y: 10 , W: 80 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.ActivateCheckbox.BindControl( This[ This.Controls.ActivateCheckbox.Method ].Bind( This , This.Handles[ This.Controls.ActivateCheckbox.Hwnd ] := "ActivateCheckbox" ) )
		;*********************************************************
		This.Controls.TrueRadio := New ControlClass( This.Hwnd , { X: 10 , Y: 50 , W: 80 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.TrueRadio.BindControl( This[ This.Controls.TrueRadio.Method ].Bind( This , This.Handles[ This.Controls.TrueRadio.Hwnd ] := "TrueRadio" ) )
		;*********************************************************
		This.Controls.FalseRadio := New ControlClass( This.Hwnd , { X: 10 , Y: 80 , W: 80 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans " , Method: "_ChangeValuesTrigger" } )
		This.Controls.FalseRadio.BindControl( This[ This.Controls.FalseRadio.Method ].Bind( This , This.Handles[ This.Controls.FalseRadio.Hwnd ] := "FalseRadio" ) )
		;*********************************************************
		This.Controls.SetPosButton := New ControlClass( This.Hwnd , { X: 108 , Y: 68 , W: 116 , H: 32 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ButtonPress" } )
		This.Controls.SetPosButton.BindControl( This[ This.Controls.SetPosButton.Method ].Bind( This , This.Handles[ This.Controls.SetPosButton.Hwnd ] := "SetPosButton" ) )
		;*********************************************************
		This.Controls.SetColorButton := New ControlClass( This.Hwnd , { X: 248 , Y: 68 , W: 85 , H: 32 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ButtonPress" } )
		This.Controls.SetColorButton.BindControl( This[ This.Controls.SetColorButton.Method ].Bind( This , This.Handles[ This.Controls.SetColorButton.Hwnd ] := "SetColorButton" ) )
		;*********************************************************
		This.Controls.MoveRadio := New ControlClass( This.Hwnd , { X: 348 , Y: 8 , W: 65 , H: 22 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.MoveRadio.BindControl( This[ This.Controls.MoveRadio.Method ].Bind( This , This.Handles[ This.Controls.MoveRadio.Hwnd ] := "MoveRadio" ) )
		;*********************************************************
		This.Controls.ClickRadio := New ControlClass( This.Hwnd , { X: 348 , Y: 30 , W: 65 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.ClickRadio.BindControl( This[ This.Controls.ClickRadio.Method ].Bind( This , This.Handles[ This.Controls.ClickRadio.Hwnd ] := "ClickRadio" ) )
		;*********************************************************
		This.Controls.SendRadio := New ControlClass( This.Hwnd , { X: 348 , Y: 50 , W: 65 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.SendRadio.BindControl( This[ This.Controls.SendRadio.Method ].Bind( This , This.Handles[ This.Controls.SendRadio.Hwnd ] := "SendRadio" ) )
		;*********************************************************
		;(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)
		This.Controls.RemoveButton := New ControlClass( This.Hwnd , { X: 528 , Y: 42 , W: 64 , H: 28 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_RemovePanel" } )
		This.Controls.RemoveButton.BindControl( Main[ This.Controls.RemoveButton.Method ].Bind( This , This.Hwnd ) )
		;(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)
		This.Controls.CopyButton := New ControlClass( This.Hwnd , { X: 528 , Y: 7 , W: 64 , H: 28 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_CopyPanel" } )
		This.Controls.CopyButton.BindControl( Main[ This.Controls.CopyButton.Method ].Bind( This , This.Hwnd ) )
		;(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)
		This.DrawPanel()
	}
	
	_ChangeValuesTrigger( Name ){
		Main.Stop := 1
		if( Name = "ActivateCheckbox" ){
			This.Activate := !This.Activate
			This.DrawPanel()
		}else if( Name = "TrueRadio" ){
			This.Truth := 1
			This.DrawPanel()
		}else if( Name = "FalseRadio" ){
			This.Truth := 0
			This.DrawPanel()
		}else if( Name = "SearchXPosEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd ,
			This.SearchX := out
		}else if( Name = "SearchYPosEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd ,
			This.SearchY := out
		}else if( Name = "DelayEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.DelayEdit.Hwnd ,
			This.Delay := out
		}else if( Name = "SendEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.SendEdit.Hwnd ,
			This.SendStuff := out
		}else if( Name = "MoveRadio" ){
			This.MoveClickSend := 1
			This.DrawPanel()
		}else if( Name = "ClickRadio" ){
			This.MoveClickSend := 2
			This.DrawPanel()
		}else if( Name = "SendRadio" ){
			This.MoveClickSend := 3
			This.DrawPanel()
		}
	}
	
	_ButtonPress( name ){
		Main.Stop := 1
		if( Name = "SetPosButton" ){
			This.ButtonPress_SetPosition := 1
			This.DrawPanel()
			This._SetSearchPosition()
			This.ButtonPress_SetPosition := 0
			This.DrawPanel()
			return
		}else if( Name = "SetColorButton" ){
			This.ButtonPress_SetColor := 1
			This.DrawPanel()
			This._SetSearchColor()
			This.ButtonPress_SetColor := 0
			This.DrawPanel()
		}else if( Name = "CopyButton" ){
			This.ButtonPress_Copy := 1
			This.DrawPanel()
			While( GetKeyState( "LButton" , "P" ) )
				sleep, 60
			This.ButtonPress_Copy := 0
			This.DrawPanel()
		}else if( Name = "RemoveButton" ){
			This.ButtonPress_Remove := 1
			This.DrawPanel()
			While( GetKeyState( "LButton" , "P" ) )
				sleep, 60
			This.ButtonPress_Remove := 0
			This.DrawPanel()
		}
	}
	
	_SetSearchPosition(){
		Main.Stop := 1
		if( This.ButtonPress_SetColor )
			return
		This.Controls.SetPosButton.SetFocus()
		CoordMode, Mouse, Screen 
		While( !GetKeyState( "ctrl" ) ){
			ToolTip, % "Move your cursor to the target position and then`nPress ""ctrl"" "
			MouseGetPos, x , y 
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd , % This.SearchX := x
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd , % This.SearchY := y
		}
		ToolTip
		This.Controls.SetPosButton.SetFocus()
	}
	
	_SetSearchColor(){
		local lc 
		Main.Stop := 1
		if( This.ButtonPress_SetPosition )
			return
		This.Controls.SetColorButton.SetFocus()
		CoordMode, Mouse, Screen
		CoordMode, Pixel, Screen
		While( !GetKeyState( "ctrl" ) ){
			ToolTip, Press "ctrl" to capture the color under your cursor.
			MouseGetPos, x , y
			PixelGetColor, outColor , x , y , RGB 
			if( GetKeyState( "Shift" ) ){
				GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd , % This.SearchX := x
				GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd , % This.SearchY := y
			}
			if( lc != outColor ){
				lc := outColor
				This.SearchColor := SubStr( outColor , 3 )
				This.DrawPanel()
				Sleep 60
			}
		}
		ToolTip,
		MouseGetPos, x , y
		PixelGetColor, outColor , x , y , RGB 
		This.SearchColor := SubStr( outColor , 3 )
		if( GetKeyState( "Shift" ) ){
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd , % This.SearchX := x
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd , % This.SearchY := y
		}
		Sleep, 60
	}

}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class Main extends Graphics	{
	
	;Written By: Hellbent aka. CivReborn
	;Name: Pixel Predator v4.1
	;Date Started: Sept 30th, 2022
	;Last Edit: Oct 1st, 2022
	/*
	[Colors]
	1=22262a
	2=22262a
	3=22262a
	4=22262a
	5=22262a
	6=22262a
	7=22262a
	8=22262a
	9=22262a
	[HKs]
	start=
	stop=
	*/
	
	SetUp( scale := 1 , PanelsMax := 3 ){
		This.StartHotkey := ""
		This.StopHotkey := ""
		This.LoopDelay := 0
		IniRead, out , % A_ScriptFullPath , HKs , start
		if( out != "" ){
			This.StartHotkey := out
		}
		IniRead, out , % A_ScriptFullPath , HKs , stop
		if( out != "" ){
			This.StopHotkey := out
		}
		This.Stop := 1
		This.Scale := scale
		This.Margin := 10
		This.ExtraControlSpacing := 100
		This.Truth := 1
		This.AddButtonPressed := 0
		This.StartButtonPressed := 0
		This.StopButtonPressed := 0
		;#########################################################					;PANELS
		This.Panels := []
		This.PanelHandles := []
		;#########################################################				
		This.PanelsMax := PanelsMax
		This.PanelWidth := 600
		This.PanelHeight := 115
		This.PanelsTotal := 0
		This.PanelCurrentY := 0
		;#########################################################
		;*********************************************************					;SLIDER
		This.SliderWidth := 30
		This.SliderValue := 0
		This.SliderInterval := 30
		;*********************************************************
		This.SliderTrack := { X: 2 , Y: 2 , W: This.SliderWidth - 4 , H: This.PanelsMax * This.PanelHeight - 4 }
		;*********************************************************
		This.SliderButton := { X: This.SliderTrack.X + 4 , Y: This.SliderTrack.Y + 4 , W: This.SliderWidth - 12 , H: This.PanelsMax * This.PanelHeight - 12 }
		;*********************************************************
		This.SliderStartY := This.SliderButton.Y
		This.SliderStartHeight := This.SliderButton.H
		;*********************************************************
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!					;WINDOWS
		This.MainWindow := { X: 800 , Y: 280 , W: This.PanelWidth + This.SliderWidth + 3 * This.Margin , H: ( This.PanelHeight * This.PanelsMax ) + ( 1 * This.Margin ) + This.ExtraControlSpacing , Options: " +AlwaysOnTop -DPIScale " , Color: "22262a" , Scale: This.Scale }
		This.MainWindow := New WindowClass( This.MainWindow )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		This.FrameWindow := { X: This.Margin - 2 , Y: This.Margin - 2 , W: This.PanelWidth + 4 , H: ( This.PanelHeight * This.PanelsMax ) + 4 , Options: " -DPIScale -Caption +Parent" This.MainWindow.Hwnd , Parent: This.MainWindow.Hwnd , Color: "32363a" , Scale: This.Scale }
		This.FrameWindow := New WindowClass( This.FrameWindow )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		This.FrameWindowInner := { X: 2 , Y: 2 , W: This.PanelWidth , H: ( This.PanelHeight * This.PanelsMax ) , Options: " -DPIScale -Caption +Parent" This.FrameWindow.Hwnd , Parent: This.FrameWindow.Hwnd , Color: "22262a" , Scale: This.Scale }
		This.FrameWindowInner := New WindowClass( This.FrameWindowInner )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		This.CanvasWindow := { X: 0 , Y: 0 , W: This.PanelWidth , H: ( This.PanelHeight * This.PanelsMax ) , Options: " -DPIScale -Caption +Parent" This.FrameWindowInner.Hwnd , Color: This.FrameWindowInner.Color , Parent: This.FrameWindowInner.Hwnd , Scale: This.Scale  }
		This.CanvasWindow := New WindowClass( This.CanvasWindow )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();					;CONTROLS
		This.Controls := {}
		This.ControlHandles := []
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.AddNewPanelButton := { X: This.Margin , Y: y := This.Margin * 2 + This.FrameWindow.H , H: h := This.MainWindow.H - y - This.Margin , W: h , Scale: This.Scale , Type: "Picture" , Options: " 0xE" }
		This.Controls.AddNewPanelButton := New ControlClass( This.MainWindow.Hwnd , This.Controls.AddNewPanelButton )
		This.Controls.AddNewPanelButton.Method := "_AddNewPanelButtonPress"
		This.Controls.AddNewPanelButton.Pressed := 0
		This.Controls.AddNewPanelButton.Bind := This[ This.Controls.AddNewPanelButton.Method ].Bind( This )
		This.Controls.AddNewPanelButton.BindControl( This.Controls.AddNewPanelButton.Bind )
		This.DrawAddButton()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.Slider := { X: This.FrameWindow.W - 2 + 2 * This.Margin , Y: This.Margin , W: This.SliderWidth , H: This.PanelsMax * This.PanelHeight , Scale: This.Scale , Type: "Picture" , Options: " 0xE " }
		This.Controls.Slider := New ControlClass( This.MainWindow.Hwnd , This.Controls.Slider )
		This.ControlHandles[ This.Controls.Slider.Hwnd ] := "Slider"
		This.Controls.Slider.Method := "_SliderClick"
		This.Controls.Slider.Bind := This[ This.Controls.Slider.Method ].Bind( This )
		This.Controls.Slider.BindControl( This.Controls.Slider.Bind )
		This._UpdateSliderPositions()
		This.DrawSlider()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.ColorSelector := { X: This.Controls.AddNewPanelButton.W + 2 * This.Margin , Y: yb := y - 3 , W: This.Controls.AddNewPanelButton.W , H: This.Controls.AddNewPanelButton.W , Scale: This.Scale , Type: "Picture" , Options: " 0xE " }
		This.Controls.ColorSelector := New ControlClass( This.MainWindow.Hwnd , This.Controls.ColorSelector )
		This.Controls.ColorSelector.Method := "_SetColorPallet"
		This.Controls.ColorSelector.Bind := This[ This.Controls.ColorSelector.Method ].Bind( This )
		This.Controls.ColorSelector.BindControl( This.Controls.ColorSelector.Bind )
		This.ColorPalette := []
		This.ColoPalette[ 1 ] := { Vector: This._NewVector( This.Controls.ColorSelector.X + 8 + 10 , This.Controls.ColorSelector.Y + 8 + 10 ) }
		Index := 0
		y := 18
		loop, 3	{
			x := 18
			Loop, 3	{
				IniRead, out , % A_ScriptFullPath , Colors , % ++Index
				This.ColoPalette[ Index ] := { Vector: This._NewVector( This.Controls.ColorSelector.X + x , This.Controls.ColorSelector.Y + y ) , Color: ( out != "" ) ? ( out ) : ( "004444" ) }
				x += 22
			}
			y += 22
		}
		This.DrawColorPanel()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.StartHotkey := { X: ( This.Controls.ColorSelector.X + This.Controls.ColorSelector.W + This.Margin ) + 114  , Y: ( This.FrameWindow.H + 2 * This.Margin ) + 5 , W: 90 , H: 27 , Scale: This.Scale , Type: "Hotkey" , Options: " Center -E0x200 " , Value: This.StartHotkey }
		This.Controls.StartHotkey := New ControlClass( This.MainWindow.Hwnd , This.Controls.StartHotkey )
		This.STHKBIND := This.RunSearch.Bind( This )
		if( This.StartHotkey != "" ){
			bd := This.STHKBIND
			Hotkey, % This.StartHotkey , % bd , On
		}
		This.Controls.StopHotkey := { X: ( This.Controls.ColorSelector.X + This.Controls.ColorSelector.W + This.Margin ) + 112  , Y: ( This.FrameWindow.H + 2 * This.Margin ) + 46 , W: 94 , H: 27 , Scale: This.Scale , Type: "Hotkey" , Options: " Center -E0x200 " , Value: This.StopHotkey }
		This.Controls.StopHotkey := New ControlClass( This.MainWindow.Hwnd , This.Controls.StopHotkey )
		This.SPHKBIND := This.StopSearch.Bind( This )
		if( This.StopHotkey != "" ){
			bd := This.SPHKBIND
			Hotkey, % This.StopHotkey , % bd , On
		}
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.HotkeyPanel := { X: This.Controls.ColorSelector.X + This.Controls.ColorSelector.W + This.Margin , Y: yb, W: 300 , H: 80 , Scale: This.Scale , Type: "Picture" , Options: " 0xE 0x04000000 " }
		This.Controls.HotkeyPanel := New ControlClass( This.MainWindow.Hwnd , This.Controls.HotkeyPanel )
		This.DrawHotkeys()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		;*********************************************************
		;*********************************************************
		This.Controls.UpdateStartButton := { X: This.Controls.HotkeyPanel.X + 220 , Y: yb + 6 , W: 70 , H: 30 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans " }
		This.Controls.UpdateStartButton := New ControlClass( This.MainWindow.Hwnd , This.Controls.UpdateStartButton )
		This.Controls.UpdateStartButton.Method := "_SetStartHotkey"
		This.Controls.UpdateStartButton.Bind := This[ This.Controls.UpdateStartButton.Method ].Bind( This )
		This.Controls.UpdateStartButton.BindControl( This.Controls.UpdateStartButton.Bind )
		
		;*********************************************************
		;*********************************************************
		This.Controls.UpdateStopButton := { X: This.Controls.HotkeyPanel.X + 220 , Y: yb + 46 , W: 70 , H: 30 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans " }
		This.Controls.UpdateStopButton := New ControlClass( This.MainWindow.Hwnd , This.Controls.UpdateStopButton )
		This.Controls.UpdateStopButton.Method := "_SetStopHotkey"
		This.Controls.UpdateStopButton.Bind := This[ This.Controls.UpdateStopButton.Method ].Bind( This )
		This.Controls.UpdateStopButton.BindControl( This.Controls.UpdateStopButton.Bind )
	}
	
	_NewVector( x := 0 , y := 0 ){
		return { X: x , Y: y }
	}
	
	_Dist( vector ){
		CoordMode, Mouse, Client
		MouseGetPos, x, y
		return Sqrt( ( ( x / This.Scale - vector.X ) **2 ) + ( ( y / This.Scale - vector.Y ) **2 ) )
	}
	
	_SetStartHotkey(){
		This.Stop := 1
		This.Controls.UpdateStartButton.SetFocus()
		This.StartButtonPressed := 1 
		This.DrawHotkeys()
		While( GetKeyState( "LButton" , "P" ) )
			sleep, 60
		This.StartButtonPressed := 0
		This.DrawHotkeys()
		GuiControlGet, out , % This.MainWindow.Hwnd ":" , % This.Controls.StartHotkey.Hwnd
		if( out != "" && out != This.StartHotkey ){
			bd := This.STHKBIND
			if( This.StartHotkey != "" ){
				Hotkey, % This.StartHotkey , % bd , Off
			}
			This.StartHotkey := out
			Hotkey, % This.StartHotkey , % bd , ON
			IniWrite, % This.StartHotkey , % A_ScriptFullPath , HKs , start
		}else if( out = "" ){
			GuiControl, % This.MainWindow.Hwnd ":" , % This.Controls.StartHotkey.Hwnd , % This.StartHotkey
		}
	}
	
	_SetStopHotkey(){
		This.Stop := 1
		This.Controls.UpdateStopButton.SetFocus()
		This.StopButtonPressed := 1 
		This.DrawHotkeys()
		While( GetKeyState( "LButton" , "P" ) )
			sleep, 60
		This.StopButtonPressed := 0
		This.DrawHotkeys()
		GuiControlGet, out , % This.MainWindow.Hwnd ":" , % This.Controls.StopHotkey.Hwnd
		if( out != "" && out != This.StopHotkey ){
			bd := This.SPHKBIND
			if( This.StopHotkey != "" ){
				Hotkey, % This.StopHotkey , % bd , Off
			}
			This.StopHotkey := out
			Hotkey, % This.StopHotkey , % bd , ON
			IniWrite, % This.StopHotkey , % A_ScriptFullPath , HKs , stop
		}else if( out = "" ){
			GuiControl, % This.MainWindow.Hwnd ":" , % This.Controls.StopHotkey.Hwnd , % This.StopHotkey
		}
	}
	
	_UpdateSliderPositions(){
		if( This.SliderValue = 0 || This.SliderValue = 1 )
			This.SliderButton.Y := This.SliderStartY
		else
			This.SliderButton.Y := This.SliderStartY + This.SliderInterval * ( This.SliderValue - 1 )
		if( This.PanelsTotal <= This.PanelsMax )
			This.SliderButton.H := This.SliderStartHeight 
		else
			This.SliderButton.H := This.SliderStartHeight - ( ( This.PanelsTotal - This.PanelsMax + 1 - This.SliderValue ) * This.SliderInterval  ) - Abs( This.SliderStartY - This.SliderButton.Y ) 
	}
	
	_SliderClick(){
		This.Stop := 1
		if( This.PanelsTotal > This.PanelsMax || This.SliderValue > 1 ){
			CoordMode, Mouse, Client
			MouseGetPos,, StartY 
			OldValue := This.SliderValue
			WinGetPos, x , y ,,, % "ahk_Id " This.MainWindow.Hwnd
			This.MainWindow.X := x 
			This.MainWindow.Y := y
			Gui1 := New PopUpWindow( { AutoShow: 1 , X: ( This.MainWindow.X + ( This.MainWindow.W * This.Scale ) ) + 10  , Y: ( This.MainWindow.Y ) , W: 70 , H: ( This.MainWindow.H * This.Scale ) , Options: " +ToolWindow -DPIScale +AlwaysOnTop " } )
			While( GetKeyState( "LButton" , "P" ) ){
				MouseGetPos,, EndY 
				if( abs( StartY - EndY ) >= This.SliderInterval ){
					if( StartY < EndY ){ 
						if( ++This.SliderValue <= ( This.PanelsTotal - This.PanelsMax + 1 ) ){
							Gui1.ClearWindow()
							Arrow := New ArrowHead( { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 - 50 } , { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 + 50 } , HeadLength := 10 , ArmLength := 10 , ElbowLength := 5 , x_offset := 0 , y_offset := 0 )
							FillPolygon( Gui1.G , Arrow , "0xFF428B44" )
							DrawPolygon( Gui1.G , Arrow , "0x9955ff55" )
							Gui1.UpdateWindow()
							This._UpdateSliderPositions()
							This.DrawSlider()
							This.CanvasWindow.Y := ( This.SliderValue -1 ) * This.PanelHeight  * -1
							This.CanvasWindow.ShowWindow()
							sleep, 400
						}else{
							This.SliderValue := ( This.PanelsTotal - This.PanelsMax )
						}
					}else{
						if( --This.SliderValue >= 1 ){
							Gui1.ClearWindow()
							Arrow := New ArrowHead( { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 + 50 } , { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 - 50 } , HeadLength := 10 , ArmLength := 10 , ElbowLength := 5 , x_offset := 0 , y_offset := 0 )
							FillPolygon( Gui1.G , Arrow , "0xFF428B44" )
							DrawPolygon( Gui1.G , Arrow , "0x9955ff55" )
							Gui1.UpdateWindow()
							This._UpdateSliderPositions()
							This.DrawSlider()
							This.CanvasWindow.Y := ( This.SliderValue -1 ) * This.PanelHeight * -1
							This.CanvasWindow.ShowWindow()
							sleep, 400
						}else{
							This.SliderValue := 1
							This.CanvasWindow.Y := 0
							This.CanvasWindow.ShowWindow()
						}
					}
				}
				Gui1.ClearWindow( 1 )
			}
			Gui1.DeleteWindow()
		}
	}
	
	_AddNewPanelButtonPress(){
		This.Stop := 1
		This.AddButtonPressed := 1
		This.DrawAddButton()
		While( GetKeyState( "LButton" , "P" ) )
			Sleep, 30
		This.AddButtonPressed := 0
		This.DrawAddButton()
		This.PanelsTotal++
		This.PanelCurrentY += This.PanelHeight
		This.Panels.Push( New SearchPanel( This.CanvasWindow.Hwnd , { Y: ( This.PanelCurrentY - This.PanelHeight ) * This.Scale  , Scale: This.Scale } ) )
		if( ( This.PanelsTotal * This.PanelHeight ) < This.FrameWindowInner.H )
			This.CanvasWindow.H := This.FrameWindowInner.H
		else
			This.CanvasWindow.H := This.PanelsTotal * This.PanelHeight
		This.CanvasWindow.ShowWindow()
		if( This.PanelsTotal = 1 )
			This.SliderValue := 1
		This._UpdateSliderPositions()
		This.DrawSlider()
	}
	
	_CopyPanel( hwnd ){
		This.Stop := 1
		Loop, % Main.Panels.Length()	{
			if( Main.Panels[ Index := A_Index ].Hwnd = hwnd ){
				Main.Panels[ Index].ButtonPress_Copy := 1
				Main.Panels[ Index].DrawPanel()
				While( GetKeyState( "LButton" , "P" ) )
					sleep, 60
				Main.Panels[ Index].ButtonPress_Copy := 0
				Main.Panels[ Index].DrawPanel()
				Main.PanelsTotal++
				Main.PanelCurrentY += Main.PanelHeight
				Main.Panels.Push( New SearchPanel( Main.CanvasWindow.Hwnd , { Y: ( Main.PanelCurrentY - Main.PanelHeight ) * Main.Scale  , Scale: Main.Scale } ) )
				if( ( Main.PanelsTotal * Main.PanelHeight ) < Main.FrameWindowInner.H )
					Main.CanvasWindow.H := Main.FrameWindowInner.H
				else
					Main.CanvasWindow.H := Main.PanelsTotal * Main.PanelHeight
				Main.CanvasWindow.ShowWindow()
				if( Main.PanelsTotal = 1 )
					Main.SliderValue := 1
				Main.Panels[ Main.Panels.Length() ].Activate  := Main.Panels[ Index ].Activate
				Main.Panels[ Main.Panels.Length() ].Truth  := Main.Panels[ Index ].Truth
				Main.Panels[ Main.Panels.Length() ].SearchX  := Main.Panels[ Index ].SearchX
				Main.Panels[ Main.Panels.Length() ].SearchY  := Main.Panels[ Index ].SearchY
				Main.Panels[ Main.Panels.Length() ].SearchColor  := Main.Panels[ Index ].SearchColor
				Main.Panels[ Main.Panels.Length() ].MoveClickSend  := Main.Panels[ Index ].MoveClickSend
				Main.Panels[ Main.Panels.Length() ].Delay  := Main.Panels[ Index ].Delay
				Main.Panels[ Main.Panels.Length() ].SendStuff  := Main.Panels[ Index ].SendStuff
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.SearchXPosEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].SearchX
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.SearchYPosEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].SearchY
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.DelayEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].Delay
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.SendEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].SendStuff
				Main.Panels[ Main.Panels.Length() ].DrawPanel()
				Main._UpdateSliderPositions()
				Main.DrawSlider()
				return
			}
		}
	}
	
	_RemovePanel( hwnd ){
		This.Stop := 1
		Loop, % Main.Panels.Length()	{
			if( Main.Panels[ Index := A_Index ].Hwnd = hwnd ){
				Main.Panels[ Index].ButtonPress_Remove := 1
				Main.Panels[ Index].DrawPanel()
				While( GetKeyState( "LButton" , "P" ) )
					sleep, 60
				Main.Panels[ Index].ButtonPress_Remove := 0
				Main.Panels[ Index].DrawPanel()
				Loop, % Main.Panels.Length() - Index	{
					Main.Panels[ A_Index + Index ].Window.Y -= Main.PanelHeight * Main.Scale
					Main.Panels[ A_Index + Index ].Window.ShowWindow()
				}
				Main.Panels[ Index ].Window.DeleteWindow()
				Main.Panels.RemoveAt( Index )
				Main.PanelCurrentY -= Main.PanelHeight
				Main.PanelsTotal--
				If( Main.SliderValue > Main.PanelsTotal ){
					Main.SliderValue := Main.PanelsTotal - Main.PanelsMax
				}
				Main._UpdateSliderPositions()
			}
		}
	}
		
	_SetColorPallet(){
		This.Stop := 1
		This.Controls.ColorSelector.SetFocus()
		Loop, 9	{
			if( This._Dist( This.ColoPalette[ A_Index ].Vector ) < 10 * This.Scale  ){
				This.ButtonPress_ColorPalette := A_Index 
				CoordMode, Mouse, Screen
				CoordMode, Pixel, Screen
				While( !GetKeyState( "ctrl" ) ){
					ToolTip, Press "ctrl" to capture the color under your cursor.
					MouseGetPos, x , y
					PixelGetColor, out , x , y , RGB
					This.ColoPalette[ This.ButtonPress_ColorPalette ].Color := SubStr( out , 3 )
					This.DrawColorPanel()
					sleep, 60
				}
				ToolTip,
				IniWrite, % This.ColoPalette[ This.ButtonPress_ColorPalette ].Color , % A_ScriptFullPath , Colors , % This.ButtonPress_ColorPalette
				This.ButtonPress_ColorPalette := 0
				This.DrawColorPanel()
				return
			}
		}
	}
	
	RunSearch(){
		local activeArr := [] , Index := 0 , ErrorCount := 0 , BadPanel := 0
		This.Stop := 1
		if( This.StartHotkey = "" || This.StopHotkey = "" ){
			Gui, % This.MainWindow.Hwnd ": +OwnDialogs "
			MsgBox, % "One or more of your hotkeys haven't been set"
			return
		}
		Loop, % This.Panels.Length()	{
			if( This.Panels[ A_Index ].Activate ){
				activeArr[ ++Index ] := {}
				activeArr[ Index ].Truth := This.Panels[ A_Index ].Truth
				activeArr[ Index ].MoveClickSend := This.Panels[ A_Index ].MoveClickSend
				activeArr[ Index ].SearchX := This.Panels[ A_Index ].SearchX
				activeArr[ Index ].SearchY := This.Panels[ A_Index ].SearchY
				if( This.Panels[ A_Index ].SearchX = "" || This.Panels[ A_Index ].SearchY = "" ){
					--Index
					activeArr.Pop()
					++ErrorCount
					BadPanel := A_Index
					continue
				}
				activeArr[ Index ].SearchColor := This.Panels[ A_Index ].SearchColor
				if( This.Panels[ A_Index ].SearchColor = "" ){
					--Index
					activeArr.Pop()
					++ErrorCount
					BadPanel := A_Index
					continue
				}
				activeArr[ Index ].Delay := This.Panels[ A_Index ].Delay
				if( This.Panels[ A_Index ].Delay = "" ){
					activeArr[ Index ].Delay := 0
				}
				activeArr[ Index ].SendStuff := This.Panels[ A_Index ].SendStuff
				if( This.Panels[ A_Index ].MoveClickSend = 3 && This.Panels[ A_Index ].SendStuff = "" ){
					--Index
					activeArr.Pop()
					++ErrorCount
					BadPanel := A_Index
					continue
				}
			}
		}
		if( ErrorCount ){
			Gui, % This.MainWindow.Hwnd ": +OwnDialogs "
			if( ErrorCount = 1 )
				MsgBox, % "Panel " BadPanel " has an error.`nPlease correct it and try again."
			else
				MsgBox, % "You have " ErrorCount " Panels with errors in them."
			return
		}
		if( !Index ){
			Gui, % This.MainWindow.Hwnd ": +OwnDialogs "
			MsgBox, % "You have no panels activated"
			return
		}
		SoundBeep, 555
		SoundBeep, 666
		This.Stop := 0
		CoordMode, Mouse, Screen
		CoordMode, Pixel, Screen
		SetDefaultMouseSpeed, 0
		SetMouseDelay, 30
		While( !This.Stop ){
			Loop, % activeArr.Length()	{
				PixelGetColor, out , % activeArr[ A_Index ].SearchX , % activeArr[ A_Index ].SearchY , RGB
				if( ( subStr( out , 3 ) = activeArr[ A_Index ].SearchColor && activeArr[ A_Index ].Truth ) || ( subStr( out , 3 ) != activeArr[ A_Index ].SearchColor && !activeArr[ A_Index ].Truth ) ){
					if( This.Stop ){
						Break 2
					}
					if( activeArr[ A_Index ].Delay )
						Sleep, % activeArr[ A_Index ].Delay
					if( This.Stop ){
						Break 2
					}
					if( activeArr[ A_Index ].MoveClickSend = 1 ){
						MouseMove, % activeArr[ A_Index ].SearchX , % activeArr[ A_Index ].SearchY
					}else if( activeArr[ A_Index ].MoveClickSend = 2 ){
						Click, % activeArr[ A_Index ].SearchX " , "  activeArr[ A_Index ].SearchY
					}else{
						SendInput, % activeArr[ A_Index ].SendStuff
					}
				}
			}
			Sleep, % This.LoopDelay 
		}
		SoundBeep, 1111
		SoundBeep, 1111
		SoundBeep, 1111
	}
	
	StopSearch(){
		This.Stop := 1
	}

}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class Graphics	{
	
	DrawHotkeys(){
		;Bitmap Created Using: HB Bitmap Maker
		pBitmap := Gdip_CreateBitmap( 300 * This.Scale , 80 * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , -3 * This.Scale , -10 * This.Scale , 390 * This.Scale , 100 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFFacacac" ) , Gdip_TextToGraphics( G , "START HOTKEY :" , "s" 12 * This.Scale " vCenter Bold c" Brush " x" 5 * This.Scale " y" -4 * This.Scale  , "Segoe ui" , 110 * This.Scale , 50 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 108 * This.Scale , 3 * This.Scale , 102 * This.Scale , 38 * This.Scale , "0xFF428B44" , "0xFF000000" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 109 * This.Scale , 3 * This.Scale , 100 * This.Scale , 36 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 111 * This.Scale , 5 * This.Scale , 96 * This.Scale , 32 * This.Scale ) , Gdip_DeleteBrush( Brush )
		if( !This.StartButtonPressed ){
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 6 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 223 * This.Scale , 9 * This.Scale , 66 * This.Scale , 27 * This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 7 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF222222" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 219 * This.Scale " y" 5 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 220 * This.Scale " y" 6 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 220 * This.Scale , 6 * This.Scale , 70 * This.Scale , 30 * This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 6 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 221 * This.Scale , 7 * This.Scale , 68 * This.Scale , 28 * This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 7 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Update" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 221 * This.Scale " y" 7 * This.Scale  , "Segoe ui" , 68 * This.Scale , 28 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFFacacac" ) , Gdip_TextToGraphics( G , "  STOP HOTKEY :" , "s" 12 * This.Scale " vCenter Bold c" Brush " x" 5 * This.Scale " y" 36 * This.Scale  , "Segoe ui" , 110 * This.Scale , 50 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 111 * This.Scale , 44 * This.Scale , 96 * This.Scale , 31 * This.Scale , "0xFF428B44" , "0xFF000000" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 109 * This.Scale , 43 * This.Scale , 100 * This.Scale , 36 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 111 * This.Scale , 45 * This.Scale , 96 * This.Scale , 32 * This.Scale ) , Gdip_DeleteBrush( Brush )
		if( !This.StopButtonPressed ){
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 46 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 222 * This.Scale , 47 * This.Scale , 66 * This.Scale , 28 * This.Scale , "0xff6A6E72" , "0xff22262a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 47 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF222222" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 219 * This.Scale " y" 45 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 220 * This.Scale " y" 46 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 220 * This.Scale , 46 * This.Scale , 70 * This.Scale , 30 * This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 46 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 221 * This.Scale , 47 * This.Scale , 68 * This.Scale , 28 * This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 47 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Update" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 221 * This.Scale " y" 47 * This.Scale  , "Segoe ui" , 68 * This.Scale , 28 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.HotkeyPanel.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawColorPanel(){
		;Bitmap Created Using: HB Bitmap Maker
		pBitmap := Gdip_CreateBitmap( 80 * This.Scale , 80 * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , -2 * This.Scale , -3 * This.Scale , 90 * This.Scale , 90 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Loop, 9	{
			cc := This.ColoPalette[ A_Index ].Vector
			bb := This.Controls.ColorSelector
			Pen := Gdip_CreatePen( ( This.ButtonPress_ColorPalette = A_Index ) ? ( "0x9900ff00" ) : ( "0xFF44484f" ) , 3 ) , Gdip_DrawEllipse( G , Pen , ( cc.X - 10 - bb.X ) * This.Scale , ( cc.Y - 10 - bb.Y ) * This.Scale , 20 * This.Scale , 20 * This.Scale ) , Gdip_DeletePen( Pen )
			Brush := Gdip_BrushCreateSolid( "0xFF" This.ColoPalette[ A_Index ].Color ) , Gdip_FillEllipse( G , Brush , ( cc.X - 10 - bb.X ) * This.Scale , ( cc.Y - 10 - bb.Y ) * This.Scale , 20 * This.Scale , 20 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.ColorSelector.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawSlider(){
		;Bitmap Created Using: HB Bitmap Maker
		local pBitmap , Brush , G , hBitmap
		pBitmap := Gdip_CreateBitmap( This.Controls.Slider.W * This.Scale , This.Controls.Slider.H * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF428B44" ) , Gdip_FillRoundedRectangle( G , Brush , This.SliderTrack.X * This.Scale , This.SliderTrack.Y * This.Scale , This.SliderTrack.W * This.Scale , This.SliderTrack.H * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF222222" ) , Gdip_FillRoundedRectangle( G , Brush , ( This.SliderTrack.X + 2 ) * This.Scale , ( This.SliderTrack.Y + 2 ) * This.Scale , ( This.SliderTrack.W - 4 ) * This.Scale , ( This.SliderTrack.H - 4 ) * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF428B44" ) , Gdip_FillRoundedRectangle( G , Brush ,  This.SliderButton.X * This.Scale , This.SliderButton.Y * This.Scale , This.SliderButton.W * This.Scale , This.SliderButton.H * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF333333" ) , Gdip_FillRectangle( G , Brush , ( This.SliderButton.X + 4 ) * This.Scale , ( This.SliderButton.Y + This.SliderButton.H / 2 ) * This.Scale , ( This.SliderButton.W - 8 ) * This.Scale , 2 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF333333" ) , Gdip_FillRectangle( G , Brush , ( This.SliderButton.X + 4 ) * This.Scale , ( This.SliderButton.Y + This.SliderButton.H / 2 - 10 ) * This.Scale , ( This.SliderButton.W - 8 ) * This.Scale , 2 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF333333" ) , Gdip_FillRectangle( G , Brush , ( This.SliderButton.X + 4 ) * This.Scale , ( This.SliderButton.Y + This.SliderButton.H / 2 + 10 ) * This.Scale , ( This.SliderButton.W - 8 ) * This.Scale , 2 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.Slider.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawAddButton(){
		;Bitmap Created Using: HB Bitmap Maker
		local pBitmap , Brush , G , hBitmap
		pBitmap := Gdip_CreateBitmap( This.Controls.AddNewPanelButton.W * This.Scale , This.Controls.AddNewPanelButton.H * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRoundedRectangle( G , Brush , -10 * This.Scale , -10 * This.Scale , ( This.Controls.AddNewPanelButton.W + 20 ) * This.Scale , ( This.Controls.AddNewPanelButton.H + 20 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF12161a" ) , Gdip_FillRoundedRectangle( G , Brush , 2 * This.Scale , 2 * This.Scale , ( This.Controls.AddNewPanelButton.W - 4 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 4 ) * This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF356F36" ) , Gdip_FillRoundedRectangle( G , Brush , 4 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 4 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , "0x11ffffff" , "0x33000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 4 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		if( !This.AddButtonPressed ){
			Brush := Gdip_BrushCreateSolid( "0x99FFFFFF" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , 7 * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x99000000" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x44000000" ) , Gdip_FillRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 12 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x33ffffff" ) , Gdip_FillRectangle( G , Brush , 7 * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 16 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x6672767a" ) , Gdip_FillRoundedRectangle( G , Brush , 15 * This.Scale , 15 * This.Scale , ( This.Controls.AddNewPanelButton.W - 30 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 30 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x9932363a" ) , Gdip_FillRoundedRectangle( G , Brush , 20 * This.Scale , 20 * This.Scale , ( This.Controls.AddNewPanelButton.W - 40 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 40 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x994BFF4B" ) , Gdip_FillRoundedRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W / 2 - 2 ) * This.Scale , 25 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.H - 50 ) * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x994BFF4B" ) , Gdip_FillRoundedRectangle( G , Brush , 25 * This.Scale , ( This.Controls.AddNewPanelButton.H / 2 - 1 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 50 ) * This.Scale , 4 * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_BrushCreateSolid( "0x66000000" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , 7 * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x66FFFFFF" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x6600000" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x66FFFFFF" ) , Gdip_FillRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 12 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x66000000" ) , Gdip_FillRectangle( G , Brush , 7 * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 16 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x9900ff00" ) , Gdip_FillRoundedRectangle( G , Brush , 15 * This.Scale , 15 * This.Scale , ( This.Controls.AddNewPanelButton.W - 30 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 30 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x9932363a" ) , Gdip_FillRoundedRectangle( G , Brush , 20 * This.Scale , 20 * This.Scale , ( This.Controls.AddNewPanelButton.W - 40 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 40 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( Color := "0xFF00FF00" ) , Gdip_FillRoundedRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W / 2 - 2 ) * This.Scale , 25 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.H - 50 ) * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( Color ) , Gdip_FillRoundedRectangle( G , Brush , 25 * This.Scale , ( This.Controls.AddNewPanelButton.H / 2 - 1 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 50 ) * This.Scale , 4 * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.AddNewPanelButton.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawPanel(){
		;Bitmap Created Using: HB Bitmap Maker
		This.Scale := This.Window.Scale
		pBitmap := Gdip_CreateBitmap( 600 * This.Scale , 115* This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , -10* This.Scale , -10* This.Scale , 620* This.Scale , 135* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 0* This.Scale , 5* This.Scale , 597* This.Scale , 103* This.Scale , "0x66F0F0F0" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 2* This.Scale , 2* This.Scale , 596* This.Scale , 110* This.Scale , 11* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_FillRectangle( G , Brush , 10* This.Scale , 10* This.Scale , 20* This.Scale , 20* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF777777" ) , Gdip_FillRectangle( G , Brush , 11* This.Scale , 11* This.Scale , 18* This.Scale , 18* This.Scale ) , Gdip_DeleteBrush( Brush )
		if ( This.Activate )
			Brush := Gdip_BrushCreateSolid( "0xaa45D549" ) , Gdip_FillRectangle( G , Brush , 12* This.Scale , 12* This.Scale , 16* This.Scale , 16* This.Scale ) , Gdip_DeleteBrush( Brush )
		Pen := Gdip_CreatePen( "0x99333333" , 2 ) , Gdip_DrawLine( G , Pen , 11* This.Scale , 12* This.Scale , 29* This.Scale , 12* This.Scale ) , Gdip_DeletePen( Pen )
		Pen := Gdip_CreatePen( "0x99333333" , 2 ) , Gdip_DrawLine( G , Pen , 12* This.Scale , 12* This.Scale , 12* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		Pen := Gdip_CreatePen( "0x33F0F0F0" , 2 ) , Gdip_DrawLine( G , Pen , 11* This.Scale , 28* This.Scale , 29* This.Scale , 28* This.Scale ) , Gdip_DeletePen( Pen )
		Pen := Gdip_CreatePen( "0x33F0F0F0" , 2 ) , Gdip_DrawLine( G , Pen , 28* This.Scale , 12* This.Scale , 28* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		if ( This.Activate )
			Brush := Gdip_BrushCreateSolid( "0xFF111111" ) , Gdip_TextToGraphics( G , "a" , "s" 18* This.Scale " Center vCenter Bold c" Brush " x" -3* This.Scale " y" -2* This.Scale  , "webdings" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		if ( This.Activate ){
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Activate" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 23* This.Scale " y" -6* This.Scale  , "Segoe ui" , 80* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 38* This.Scale , 27* This.Scale , 88* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		}else{	
			Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" ) , Gdip_TextToGraphics( G , "Activate" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 23* This.Scale " y" -6* This.Scale  , "Segoe ui" , 80* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF777777" , 1 ) , Gdip_DrawLine( G , Pen , 38* This.Scale , 27* This.Scale , 88* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		}
		if ( This.Truth ){
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 47* This.Scale , 23* This.Scale , 29* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 51* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 16* This.Scale , 46* This.Scale , 11* This.Scale , 17* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xff56B659" ) , Gdip_TextToGraphics( G , "True" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 34* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xff56B659" , 1 ) , Gdip_DrawLine( G , Pen , 35* This.Scale , 67* This.Scale , 68* This.Scale , 67* This.Scale ) , Gdip_DeletePen( Pen )
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 83* This.Scale , 19* This.Scale , 17* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 80* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 15* This.Scale , 81* This.Scale , 13* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "False" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 64* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 47* This.Scale , 23* This.Scale , 29* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 51* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 16* This.Scale , 46* This.Scale , 11* This.Scale , 17* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 83* This.Scale , 19* This.Scale , 17* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 80* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "True" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 34* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 15* This.Scale , 81* This.Scale , 13* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xff56B659" ) , Gdip_TextToGraphics( G , "False" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 64* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 35* This.Scale , 97* This.Scale , 68* This.Scale , 97* This.Scale ) , Gdip_DeletePen( Pen )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF32363a" ) , Gdip_FillRoundedRectangle( G , Brush , 101* This.Scale , 6* This.Scale , 130* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 105* This.Scale , 6* This.Scale , 126* This.Scale , 99* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 101* This.Scale , 6* This.Scale , 130* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeletePen( Pen )
		if( !This.ButtonPress_SetPosition ){
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 107* This.Scale , 66* This.Scale , 118* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 108* This.Scale , 70* This.Scale , 114* This.Scale , 27* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 109* This.Scale , 68* This.Scale , 114* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Set Position" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 109* This.Scale " y" 69 * This.Scale  , "Segoe ui" , 114* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{	
			Brush := Gdip_CreateLineBrushFromRect( 107* This.Scale , 66* This.Scale , 118* This.Scale , 35* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 107* This.Scale , 66* This.Scale , 118* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 108* This.Scale , 70* This.Scale , 114* This.Scale , 27* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 109* This.Scale , 68* This.Scale , 114* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Set Position" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 109* This.Scale " y" 69* This.Scale  , "Segoe ui" , 114* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "X" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 122* This.Scale " y" 7* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "X" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 121* This.Scale " y" 6* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Y" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 171* This.Scale " y" 7* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Y" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 170* This.Scale " y" 6* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xff22262a" ) , Gdip_FillRectangle( G , Brush , 113* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 114* This.Scale , 29* This.Scale , 48* This.Scale , 33* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 113* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 167* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 168* This.Scale , 29* This.Scale , 49* This.Scale , 31* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 167* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF32363A" ) , Gdip_FillRoundedRectangle( G , Brush , 240* This.Scale , 6* This.Scale , 100* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 105* This.Scale , 6* This.Scale , 126* This.Scale , 99* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 240* This.Scale , 6* This.Scale , 100* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeletePen( Pen )
		if( !This.ButtonPress_SetColor ){
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 246* This.Scale , 66* This.Scale , 88* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 108* This.Scale , 70* This.Scale , 114* This.Scale , 27* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 248* This.Scale , 68* This.Scale , 84* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Set Color" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 249* This.Scale " y" 69* This.Scale  , "Segoe ui" , 84* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 246* This.Scale , 66* This.Scale , 88* This.Scale , 35* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 246* This.Scale , 66* This.Scale , 88* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 248* This.Scale , 68* This.Scale , 84* This.Scale , 32* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 248* This.Scale , 68* This.Scale , 84* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Set Color" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 249* This.Scale " y" 69* This.Scale  , "Segoe ui" , 84* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 246* This.Scale , 31* This.Scale , 88* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF" This.SearchColor ) , Gdip_FillRoundedRectangle( G , Brush , 248* This.Scale , 33* This.Scale , 84* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 250* This.Scale , 33* This.Scale , 81* This.Scale , 25* This.Scale , "0x00F0F0F0" , "0xaaF0F0F0" , 3 , 1 ) , Gdip_FillRectangle( G , Brush , 251* This.Scale , 34* This.Scale , 78* This.Scale , 3* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 250* This.Scale , 33* This.Scale , 78* This.Scale , 25* This.Scale , "0xff000000" , "0x33F0F0F0" , 3 , 1 ) , Gdip_FillRectangle( G , Brush , 251* This.Scale , 56* This.Scale , 78* This.Scale , 2* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G ,  "0x" This.SearchColor , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 247* This.Scale " y" 7* This.Scale  , "Segoe ui" , 88* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "0x" This.SearchColor , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 246* This.Scale " y" 6* This.Scale  , "Segoe ui" , 88* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		if( This.MoveClickSend = 1 ){
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 11* This.Scale , 14* This.Scale , 13* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 10* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 351* This.Scale , 7* This.Scale , 19* This.Scale , 16* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Move" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" -6* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 374* This.Scale , 27 * This.Scale , 407* This.Scale , 27 * This.Scale ) , Gdip_DeletePen( Pen )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 11* This.Scale , 14* This.Scale , 13* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 10* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 351* This.Scale , 7* This.Scale , 19* This.Scale , 16* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "Move" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" -6* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		if( This.MoveClickSend = 2 ){
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 31* This.Scale , 13* This.Scale , 14* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 30* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 355* This.Scale , 32* This.Scale , 12* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Click" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 14* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 374* This.Scale , 47 * This.Scale , 407* This.Scale , 47 * This.Scale ) , Gdip_DeletePen( Pen )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 31* This.Scale , 13* This.Scale , 14* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 30* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 355* This.Scale , 32* This.Scale , 12* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "Click" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 14 * This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		if( This.MoveClickSend = 3 ){
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 51* This.Scale , 14* This.Scale , 15* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 50* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 356* This.Scale , 53* This.Scale , 9* This.Scale , 8* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Send" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 34* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 374* This.Scale , 67* This.Scale , 407* This.Scale , 67* This.Scale ) , Gdip_DeletePen( Pen )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 51* This.Scale , 14* This.Scale , 15* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 50* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 356* This.Scale , 53* This.Scale , 9* This.Scale , 8* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "Send" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 34* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 350* This.Scale , 76* This.Scale , 238* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 350* This.Scale , 76* This.Scale , 238* This.Scale , 31* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 350* This.Scale , 76* This.Scale , 238* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xaaffffff" ) , Gdip_TextToGraphics( G , This.SendStuff , "s" 12* This.Scale " vCenter NoWrap c" Brush " x" 352* This.Scale " y" 77* This.Scale  , "Arial" , 234* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF32363A" ) , Gdip_FillRoundedRectangle( G , Brush , 422* This.Scale , 6* This.Scale , 100* This.Scale , 66* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 423* This.Scale , 6* This.Scale , 100* This.Scale , 66* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 422* This.Scale , 6* This.Scale , 100* This.Scale , 66* This.Scale , 5* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Delay [ms]" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 423* This.Scale " y" 7* This.Scale  , "Segoe ui" , 100* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Delay [ms]" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 422* This.Scale " y" 6* This.Scale  , "Segoe ui" , 100* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF22262A" ) , Gdip_FillRectangle( G , Brush , 427* This.Scale , 35* This.Scale , 90* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 436* This.Scale , 34* This.Scale , 72* This.Scale , 31* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 427* This.Scale , 35* This.Scale , 90* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		if( !This.ButtonPress_Copy ){
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 6* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 533* This.Scale , 7* This.Scale , 51* This.Scale , 33* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 8* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Copy" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 533* This.Scale " y" 9* This.Scale  , "Segoe ui" , 53* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 526* This.Scale , 6* This.Scale , 67* This.Scale , 30* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 6* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 533* This.Scale , 7* This.Scale , 51* This.Scale , 33* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 8* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Copy" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 533* This.Scale " y" 9* This.Scale  , "Segoe ui" , 53* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		if( !This.ButtonPress_Remove ){	
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 41* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 532* This.Scale , 43* This.Scale , 52* This.Scale , 27* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 43* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Remove" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 528* This.Scale " y" 44* This.Scale  , "Segoe ui" , 63* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 526* This.Scale , 41* This.Scale , 67* This.Scale , 30* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 41* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 528* This.Scale , 43* This.Scale , 63* This.Scale , 26* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 43* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Remove" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 528* This.Scale " y" 44* This.Scale  , "Segoe ui" , 63* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.BackgroundPicture.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}

}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class WindowClass	{
	;Written By: Hellbent
	;Name: Controls [ class ]
	;Date: Sept 30th , 2022
	;Last Edit: Sept 30th , 2022
	;Purpose: Create amd manipulate gui controls through an object.
	;Resources:
	;:
	;:
	;:
	;:
	;:
	;*************************************
	;Method List:
	;	__New( param1 )
	;	_SetDefaults()
	;	_UpdateDefaults( param1 )
	;	_CreateWindow()
	;	SetFont( param1 )
	;	ShowWindow( param1 , param2 )
	;	HideWindow()
	;	DeleteWindow()
	;	DestroyWindow()
	;	Helper()
	;*************************************
	
	__New( obj := "" ){
		
		This._SetDefaults()
		
		This._UpdateDefaults( obj )
		
		This._CreateWindow()
		
		This.SetFont()
		
		This.SetWindowColor()
		
		if( This.Visible ){
			
			This.ShowWindow()
			
		}
		
	}
	
	_SetDefaults(){ 
		
		This.X := 10
		This.Y := 10
		This.W := 300
		This.H := 150
		This.Options := " +AlwaysOnTop "
		This.Hwnd := ""
		This.Color := "22262a"
		This.ControlColor := "22262a"
		This.FontColor := "ADADAD"
		This.FontType := "Segoe UI"
		This.FontSize := 12
		This.Visible := 1
		This.Scale := 1
		This.Parent := ""
		
	}
	
	_UpdateDefaults( obj := "" ){ ;<<<<<<<<<<-------|||  obj := { X: "10" , Y: "10" , W: "300" , H: "150" , Options: "+AlwaysOnTop" , Color: "F0F0F0" , ControlColor: "FFFFFF" , FontColor: "000000" , FontType: "Segoe UI" , FontSize: "10 " , Visible: 1 }
		
		local k , v 
		
		if( !IsObject( obj ) )
			
			return
		
		for k , v in obj	
			
			This[ k ] := obj[ k ]
		
	}
	
	_CreateWindow(){
		
		local hwnd
		
		Gui, New, % " +hwndhwnd " This.Options
		
		This.Hwnd := hwnd
		
	}
	
	SetWindowColor(){
		
		Gui, % This.Hwnd ":Color", % This.Color , % This.ControlColor
		
	}
	
	SetFont( obj := "" ){
		
		static keyList := [ "FontColor" , "FontOptions" , "FontType" , "FontSize" ] 
		
		if( IsObject( obj ) ){
			
			for k , v in keyList	{
				
				if( obj.HasKey( v ) )
					
					This[ v ] := obj[ v ]
					
			}
			
		}
		
		Gui, % This.Hwnd ":Font", % "s" This.FontSize * This.Scale " c" This.FontColor " " This.FontOptions , % This.FontType
		
	}
	
	ShowWindow( UsePositions := 1 , AutoSize := 0 ){
		static out := ""
		if( UsePositions ){
			
			if( AutoSize )
				
				Gui, % AutoSize
				
			else	
				if( This.Parent )
					Gui, % This.Hwnd ":Show", % "x" This.X * This.Scale " y" This.Y * This.Scale " w" This.W * This.Scale " h" This.H * This.Scale
				else	
					Gui, % This.Hwnd ":Show", % "x" This.X " y" This.Y " w" This.W * This.Scale " h" This.H * This.Scale
			
		}else{
			
			if( AutoSize )
				
				Gui, % This.Hwnd ":Show", AutoSize
				
			else 
				
				Gui, % This.Hwnd ":Show",
			
		}
		
	}
	
	HideWindow(){
		
		Gui, % This.Hwnd ":Hide",
		
	}
	
	DeleteWindow(){
		
		Gui, % This.Hwnd ":Destroy"
		
	}
	
	DestroyWindow(){
		
		This.DeleteWindow()
		
	}
	
	Helper(){
		
		static MethodList := [ "New" , "_UpdateDefaults" , "_SetDefaults" , "SetFont" , "ShowWindow" , "DeleteWindow" , "HideWindow" ]
		
		static out := "PRESS ""CRTL"" to EXIT `n`n***Method List***`n`n`tNew`n`t_UpdateDefaults      ` `n`t_SetDefaults `n`tSetFont `n`tShowWindow `n`tDeleteWindow `n`tHideWindow`n`n." 
		
		While( !GetKeyState( "ctrl" ) ){
			
			ToolTip, % out
			
			sleep, 300
			
		}
		
		ToolTip,
		
	}
	
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class ControlClass	{

	;***************************************************************************************************************
	;***************************************************************************************************************
	;Written By: Hellbent
	;Name: Controls [ class ]
	;Date: Sept 30th , 2022
	;Last Edit: Sept 30th , 2022
	;Purpose: Create amd manipulate gui controls through an object.
	;Resources:
	;:
	;:
	;:
	;:
	;:
	;*************************************
	;Method List:
	;	__New( param1 , param2 )
	;	_SetDefaults( param1 )
	;	_UpdateDefaults( param1 )
	;	_CreateControl()
	;	MoveControl( param1 )
	;	HideControl()
	;	ShowControl()
	;	BindControl( param1 )
	;	UnbindControl( param1 )
	;	DeleteControl( param1 )
	;*************************************
	;***************************************************************************************************************
	;***************************************************************************************************************
	static ControlHandles := []
	
	__New( parentHwnd , obj := "" ){
		
		This._SetDefaults( parentHwnd )
		
		This._UpdateDefaults( obj )
		This._CreateControl()
		Controls.ControlHandles[ This.Hwnd ] := This
		
	}
	
	_SetDefaults( parentHwnd ){
		
		This.X := 10
		This.Y := 10
		This.W := 10
		This.H := 10
		
		This.Options := ""
		
		This.Hwnd := ""
		
		This.Type := "Text"
		This.Parent := parentHwnd
		
		This.Value := ""
		
		This.Method := ""
		This.Scale := 1
		
	}
	
	_UpdateDefaults( obj := "" ){
		
		local k , v 
		
		if( !IsObject( obj ) )
			
			return
		
		for k , v in obj	
			
			This[ k ] := obj[ k ]
			
	}
	
	_CreateControl(){
		
		local hwnd
		
		Gui, % This.Parent ":Add", % This.Type , % "x" This.X * This.Scale " y" This.Y * This.Scale " w" This.W * This.Scale " h" This.H * This.Scale " hwndhwnd " This.Options , % This.Value
		
		This.Hwnd := hwnd
	
	}
	
	MoveControl( obj := "" ){
		
		static KeyList := [ "X" , "Y" , "W" , "H" ]
		
		if( IsObject( obj ) ){
			
			for k , v in KeyList	{
				
				if( obj.HasKey( v ) ){
					
					This[ v ] := obj[ v ]
				
				}
			
			}
			
		}
		
		GuiControl, % This.Parent ":MoveDraw", % This.Hwnd , % "x" This.X " y" This.Y " w" This.W " h" This.H
		
	}
	
	HideControl(){
		
		GuiControl, % This.Parent ":Hide" , % This.Hwnd
		
	}
	
	ShowControl(){
		
		GuiControl, % This.Parent ":Show" , % This.Hwnd
		
	}
	
	BindControl( Bind ){
		
		GuiControl, % This.Parent ":+G" , % This.Hwnd , % Bind
		
	}
	
	UnbindControl( Bind ){
		
		GuiControl, % This.Parent ":-G" , % This.Hwnd , % Bind
		
	}
	
	SetFocus(){
		GuiControl, % This.Parent ":Focus" , % This.Hwnd 
	}
	
	DeleteControl( hwnd ){
		
		Handles[ hwnd ].MoveControl( { X: -10 , Y: -10 , W: 0 , H: 0 } )
		Handles[ hwnd ].HideControl( { X: -10 , Y: -10 , W: 0 , H: 0 } )
		Handles.RemoveAt( hwnd )
		
	}
	
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class ArrowHead	{
	;Written By: Hellbent
	;Date: Aug 24th 2022
	;Last Edit: Sept 24th, 2022
	;Purpose: Create a list of points to draw an arrow.  " x , y | x , y | etc... "
	__New( Start , End , HeadLength := 30 , ArmLength := 20 , ElbowLength := 10 , x_offset := 0 , y_offset := 0 ){
		if( This._DistanceBetweenVectors( Start , End ) < ( HeadLength + HeadLength * 2 ) ){
			temp := This._NewVector( End.X + 1 , End.Y + 1 )
			This._SubVector( temp , Start )
			This._SetVectorMag( temp ,  HeadLength + HeadLength * 2 )
			This._AddVector( temp , Start )
			End := This._NewVector( temp )
		}
		Master := This._NewVector( Start )
		This._SubVector( Master , End )
		Head := This._NewVector( Master )
		This._SetVectorMag( Head ,  HeadLength )
		This._AddVector( Head , End )
		RightArm := This._NewVector( Master , , 2 )
		This._SetVectorMag( RightArm ,  ArmLength )
		This._AddVector( RightArm , Head )
		LeftArm := This._NewVector( Master , , 1 )
		This._SetVectorMag( LeftArm ,  ArmLength )
		This._AddVector( LeftArm , Head )
		RightElbow := This._NewVector( Master , , 2 )
		This._SetVectorMag( RightElbow ,  ElbowLength )
		This._AddVector( RightElbow , Head )
		LeftElbow := This._NewVector( Master , , 1 )
		This._SetVectorMag( LeftElbow ,  ElbowLength )
		This._AddVector( LeftElbow , Head )
		output := ""
		for k , v in [ "Start" , "RightElbow" , "RightArm" , "End" , "LeftArm" , "LeftElbow" , "Start" ] {	
			
			a := %v%.X + x_offset
			b := %v%.Y + y_offset
			output .= a "," b "|"
		
		}
		return output
	}
	_CopyVector( vector ){
		return This._NewVector( vector.X , vector.Y )
	}
	_NewVector( x , y := "" , rotate := 0 ){
		if( IsObject( x ) ){
			if( rotate = 1 )
				return { X: x.Y * -1 , Y: x.X }
			else if( rotate = 2 )
				return { X: x.Y , Y: x.X * -1 }
			else
				return { X: x.X , Y: x.Y }
		}else
			return { X: x , Y: y }
	}
	_DistanceBetweenVectors( vector1 , vector2 ){
		return Sqrt( ( ( vector1.X - vector2.X ) **2 ) + ( ( vector1.Y - vector2.Y ) **2 ) )
	}
	_SubVector( vector1 , vector2 ){
		vector1.X -= vector2.X
		vector1.Y -= vector2.Y
	}
	_AddVector( vector1 , vector2 ){
		vector1.X += vector2.X
		vector1.Y += vector2.Y
	}
	_SetVectorMag( vector , mag ){
		local m := This._GetVectorMag( vector )
		vector.X := vector.X * mag / m
		vector.Y := vector.Y * mag / m
	}
	_GetVectorMag( vector ){
		return Sqrt( vector.X * vector.X + vector.Y * vector.Y )
	}
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;


class PopUpWindow	{
;PopUpWindow v2.2
;Date Written: Oct 28th, 2021
;Last Edit: Feb 7th, 2022 :Changed the trigger method.
;Written By: Hellbent aka CivReborn
;SpcThanks: teadrinker , malcev 
	static Index := 0 , Windows := [] , Handles := [] , EditHwnd , HelperHwnd
	__New( obj := "" ){
		This._SetDefaults()
		This.UpdateSettings( obj )
		This._CreateWindow()
		This._CreateWindowGraphics()
		if( This.AutoShow )
			This.ShowWindow( This.Title )
	}
	_SetDefaults(){
		This.X := 10
		This.Y := 10
		This.W := 10
		This.H := 10
		This.Smoothing := 2
		This.Options := " -DPIScale +AlwaysOnTop "
		This.AutoShow := 0
		This.GdipStartUp := 0
		This.Title := ""
		
		This.Controls := []
		This.Handles := []
		This.Index := 0 
	}
	AddTrigger( obj ){
		local k , v , cc , bd
		
		This.Controls[ ++This.Index ] := { 	X:		10
										,	Y:		10
										,	W:		10
										,	H:		10	}
		for k, v in obj
			This.Controls[ This.Index ][ k ] := obj[ k ] 
		cc := This.Controls[ This.Index ]
		Gui, % This.Hwnd ":Add", Text, % "x" cc.X " y" cc.Y " w" cc.W " h" cc.H " hwndhwnd"
		This.Handles[ hwnd ] := This.Index
		This.Controls[ This.Index ].Hwnd := hwnd
		
		if( IsObject( cc.Label ) ){
			bd := cc.Label
			GuiControl, % This.Hwnd ":+G" , % hwnd , % bd
		}else{
			bd := This._TriggerCall.Bind( This )
			GuiControl, % This.Hwnd ":+G" , % hwnd , % bd
		}
		return hwnd
		
	}
	_TriggerCall(){
		MouseGetPos,,,, ctrl, 2
		Try
			;~ SetTimer, % This.Controls[ This.Handles[ ctrl ] ].Label, -0
			gosub, % This.Controls[ This.Handles[ ctrl ] ].Label
		
				
	}
	DrawTriggers( color := "0xFFFF0000" , AutoUpdate := 0 ){
		local brush , cc 
		Brush := Gdip_BrushCreateSolid( color ) 
		Gdip_SetSmoothingMode( This.G , 3 )
		loop, % This.Controls.Length()	{
			cc := This.Controls[ A_Index ]
			Gdip_FillRectangle( This.G , Brush , cc.x , cc.y , cc.w , cc.h )
		
		}
		Gdip_DeleteBrush( Brush )
		Gdip_SetSmoothingMode( This.G , This.Smoothing )
		if( AutoUpdate )
			This.UpdateWindow()
	}
	UpdateSettings( obj := "" , UpdateGraphics := 0 ){
		local k , v
		if( IsObject( obj ) )
			for k, v in obj
				This[ k ] := obj[ k ]
		( This.X = "Center" ) ? ( This.X := ( A_ScreenWidth - This.W ) / 2 ) 	
		( This.Y = "Center" ) ? ( This.Y := ( A_ScreenHeight - This.H ) / 2 ) 	
		if( UpdateGraphics ){
			This._DestroyWindowsGraphics()
			This._CreateWindowGraphics()
		}
	}
	_CreateWindow(){
		local hwnd
		Gui , New, % " +LastFound +E0x80000 hwndhwnd -Caption  " This.Options
		PopUpWindow.Index++
		This.Index := PopUpWindow.Index
		PopUpWindow.Windows[ PopUpWindow.Index ] := This
		This.Hwnd := hwnd
		PopUpWindow.Handles[ hwnd ] := PopUpWindow.Index
		if( This.GdipStartUp && !PopUpWindow.pToken )
			PopUpWindow.pToken := GDIP_STARTUP()
	}
	_DestroyWindowsGraphics(){
		Gdip_DeleteGraphics( This.G )
		SelectObject( This.hdc , This.obm )
		DeleteObject( This.hbm )
		DeleteDC( This.hdc )
	}
	_CreateWindowGraphics(){
		This.hbm := CreateDIBSection( This.W , This.H )
		This.hdc := CreateCompatibleDC()
		This.obm := SelectObject( This.hdc , This.hbm )
		This.G := Gdip_GraphicsFromHDC( This.hdc )
		Gdip_SetSmoothingMode( This.G , This.Smoothing )
	}
	ShowWindow( Title := "" ){
		Gui , % This.Hwnd ":Show", % "x" This.X " y" This.Y " w" This.W " h" This.H " NA", % Title
	}
	HideWindow(){
		Gui , % This.Hwnd ":Hide",
	}
	UpdateWindow( alpha := 255 ){
		UpdateLayeredWindow( This.hwnd , This.hdc , This.X , This.Y , This.W , This.H , alpha )
	}
	ClearWindow( AutoUpdate := 0 ){
		Gdip_GraphicsClear( This.G )
		if( Autoupdate )
			This.UpdateWindow()
	}
	DrawBitmap( pBitmap , obj , dispose := 1 , AutoUpdate := 0 ){
		Gdip_DrawImage( This.G , pBitmap , obj.X , obj.Y , obj.W , obj.H )
		if( dispose )
			Gdip_DisposeImage( pBitmap )
		if( Autoupdate )
			This.UpdateWindow()
	}
	PaintBackground( color := "0xFF000000" , AutoUpdate := 0 ){
		if( isObject( color ) ){
			Brush := Gdip_BrushCreateSolid( ( color.HasKey( "Color" ) ) ? ( color.Color ) : ( "0xFF000000" ) ) 
			if( color.Haskey( "Round" ) )
				Gdip_FillRoundedRectangle( This.G , Brush , color.X , color.Y , color.W , color.H , color.Round )
			else
				Gdip_FillRectangle( This.G , Brush , color.X , color.Y , color.W , color.H ) 
		}else{
			Brush := Gdip_BrushCreateSolid( color ) 
			Gdip_FillRectangle( This.G , Brush , -1 , -1 , This.W + 2 , This.H + 2 ) 
		}
		Gdip_DeleteBrush( Brush )
		if( AutoUpdate )
			This.UpdateWindow()
	}
	DeleteWindow( GDIPShutdown := 0 ){
		Gui, % This.Hwnd ":Destroy"
		SelectObject( This.hdc , This.obm )
		DeleteObject( This.hbm )
		DeleteDC( This.hdc )
		Gdip_DeleteGraphics( This.G )
		hwnd := This.Hwnd
		for k, v in PopUpWindow.Windows[ Hwnd ]
			This[k] := ""
		PopUpWindow.Windows[ Hwnd ] := ""
		if( GDIPShutdown ){
			Gdip_Shutdown( PopUpWindow.pToken )
			PopUpWindow.pToken := ""
		}
	}
	_OnClose( wParam ){
		if( wParam = 0xF060 ){	;SC_CLOSE ;[ clicking on the gui close button ]
			Try{
				Gui, % PopUpWindow.HelperHwnd ":Destroy"
				SoundBeep, 555
			}
		}
	}
	CreateCachedBitmap( pBitmap , Dispose := 0 ){
		local pCachedBitmap
		if( This.CachedBitmap )
			This.DisposeCachedbitmap()
		DllCall( "gdiplus\GdipCreateCachedBitmap" , "Ptr" , pBitmap , "Ptr" , this.G , "PtrP" , pCachedBitmap )
		This.CachedBitmap := pCachedBitmap
		if( Dispose )
			Gdip_DisposeImage( pBitmap )
	}
	DrawCachedBitmap( AutoUpdate := 0 ){
		DllCall( "gdiplus\GdipDrawCachedBitmap" , "Ptr" , this.G , "Ptr" , This.CachedBitmap , "Int" , 0 , "Int" , 0 )
		if( AutoUpdate )
			This.UpdateWindow()
	}
	DisposeCachedbitmap(){
		DllCall( "gdiplus\GdipDeleteCachedBitmap" , "Ptr" , This.CachedBitmap )
	}
	Helper(){
		local hwnd , MethodList := ["__New","UpdateSettings","ShowWindow","HideWindow","UpdateWindow","ClearWindow","DrawBitmap","PaintBackground","DeleteWindow" , "AddTrigger" , "DrawTriggers", "CreateCachedBitmap" , "DrawCachedBitmap" , "DisposeCachedbitmap" ]
		Gui, New, +AlwaysOnTop +ToolWindow +HwndHwnd
		PopUpWindow.HelperHwnd := hwnd
		Gui, Add, Edit, xm ym w250 r1 Center hwndhwnd, Gui1
		PopUpWindow.EditHwnd := hwnd
		loop, % MethodList.Length()	
			Gui, Add, Button, xm y+1 w250 r1 gPopUpWindow._HelperClip, % MethodList[ A_Index ]
		Gui, Show,,
		OnMessage( 0x112 , This._OnClose.Bind( hwnd ) )
	}
	_HelperClip(){
		local ClipList 
		
		GuiControlGet, out, % PopUpWindow.HelperHwnd ":", % PopUpWindow.EditHwnd	
		
		ClipList := 		{ 	__New: 					" := New PopUpWindow( { AutoShow: 1 , X: 0 , Y: 0 , W: A_ScreenWidth , H: A_ScreenHeight , Options: "" -DPIScale +AlwaysOnTop "" } )"
							,	UpdateSettings:			".UpdateSettings( { X: """" , Y: """" , W: """" , H: """" } , UpdateGraphics := 0 )"
							,	ShowWindow:				".ShowWindow( Title := """" )"
							,	HideWindow:				".HideWindow()"
							,	UpdateWindow:			".UpdateWindow()"
							,	ClearWindow:			".ClearWindow( AutoUpdate := 0 )"
							,	DrawBitmap:				".DrawBitmap( pBitmap := """" , { X: 0 , Y: 0 , W: " Out ".W , H: " Out ".H } , dispose := 1 , AutoUpdate := 0 )"
							,	PaintBackground:		".PaintBackground( color := ""0xFF000000"" , AutoUpdate := 0 )  "  ";{ Color: ""0xFF000000"" , X: 2 , Y: 2 , W: " Out ".W - 4 , H: " Out ".H - 4 , Round: 10 }"
							,	DeleteWindow:			".DeleteWindow( GDIPShutdown := 0 )"
							,	AddTrigger:				".AddTrigger( { X: """" , Y: """" , W: """" , H: """" , Value: """" , Label: """" } )"	
							,	DrawTriggers:			".DrawTriggers( color := ""0xFFFF0000"" , AutoUpdate := 0 )"	
							,	CreateCachedBitmap:		".CreateCachedBitmap( pBitmap , Dispose := 0 )"	
							,	DrawCachedBitmap: 		".DrawCachedBitmap( AutoUpdate := 0 )"	
							,	DisposeCachedbitmap:	".DisposeCachedbitmap()"	}
							
		clipboard := Out ClipList[ A_GuiControl ]
		
	}
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

FillPolygon( G , Points := "50 , 50 | 100 , 100 | 150 , 50 | 50 , 50 " , Color := "0xFFFF0000" ){
	Brush := Gdip_BrushCreateSolid( Color ) , Gdip_FillPolygon( G , Brush , Points ) , Gdip_DeleteBrush( Brush )
}

DrawPolygon( G , Points := "50 , 50 | 100 , 100 | 150 , 50 | 50 , 50 " , Color := "0xFF000000" , Thickness := 3 ){
	Pen := Gdip_CreatePen( Color , Thickness ) , Gdip_DrawLines( G , Pen , Points ) , Gdip_DeletePen( Pen )
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
Last edited by Hellbent on 08 Jan 2024, 02:47, edited 1 time in total.

Galakrond
Posts: 26
Joined: 18 Dec 2022, 12:23

Re: Click Speed/delay/sleep

Post by Galakrond » 15 Jan 2023, 14:41

@Hellbent All my settings are gone when I close the program. When I turn it back on, my settings don't come back. I have to start everything from scratch. I want to create several different profiles. When I open the program, I want it to run as registered, whatever I did before.

Is it possible? Creating profiles for different keybind options?

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 15 Jan 2023, 16:35

@Galakrond I don't want to write a save function for this but here is how you can hard code panels.

add new panel

Code: Select all

;**************************************************************************
Main._AddNewPanelButtonPress()	
Main.Panels[ 1 ].Activate := 0
Main.Panels[ 1 ].Truth := 1
Main.Panels[ 1 ].SearchX := 300
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.SearchXPosEdit.Hwnd , % Main.Panels[ 1 ].SearchX
Main.Panels[ 1 ].SearchY := 500
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.SearchYPosEdit.Hwnd , % Main.Panels[ 1 ].SearchY
Main.Panels[ 1 ].SearchColor := "3399ff"
Main.Panels[ 1 ].MoveClickSend := 1
Main.Panels[ 1 ].Delay := 9001
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.DelayEdit.Hwnd , % Main.Panels[ 1 ].Delay
Main.Panels[ 1 ].SendStuff := "Blah Blah"
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.SendEdit.Hwnd , % Main.Panels[ 1 ].SendStuff
Main.Panels[ 1 ].DrawPanel()
;**************************************************************************
working example

Code: Select all

;Pixel Predator v4.1
;HB - sept 30th 2022
;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************

#Include <My Altered GDIP lib>			;<<<<<<<<<<<<<<<<<<---------------------------     Use the path to your copy of the gdi+ lib

;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************
;****************************************************************************************************************************************************************************

#SingleInstance, Force
SetBatchLines, -1
Gdip_Startup()




Main.Setup( 1 , 3 )      ;Change the scaling and the number of panels to display on the window 
;~ Main.Setup( .7 , 5 ) ;Example of smaller window.

;**************************************************************************
Main._AddNewPanelButtonPress()	
Main.Panels[ 1 ].Activate := 0
Main.Panels[ 1 ].Truth := 1
Main.Panels[ 1 ].SearchX := 300
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.SearchXPosEdit.Hwnd , % Main.Panels[ 1 ].SearchX
Main.Panels[ 1 ].SearchY := 500
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.SearchYPosEdit.Hwnd , % Main.Panels[ 1 ].SearchY
Main.Panels[ 1 ].SearchColor := "3399ff"
Main.Panels[ 1 ].MoveClickSend := 1
Main.Panels[ 1 ].Delay := 9001
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.DelayEdit.Hwnd , % Main.Panels[ 1 ].Delay
Main.Panels[ 1 ].SendStuff := "Blah Blah"
GuiControl, % Main.Panels[ 1 ].Hwnd ":" , % Main.Panels[ 1 ].Controls.SendEdit.Hwnd , % Main.Panels[ 1 ].SendStuff
Main.Panels[ 1 ].DrawPanel()
;**************************************************************************
Main._AddNewPanelButtonPress()	
Main.Panels[ 2 ].Activate := 1
Main.Panels[ 2 ].Truth := 0
Main.Panels[ 2 ].SearchX := 222
GuiControl, % Main.Panels[ 2 ].Hwnd ":" , % Main.Panels[ 2 ].Controls.SearchXPosEdit.Hwnd , % Main.Panels[ 2 ].SearchX
Main.Panels[ 2 ].SearchY := 666
GuiControl, % Main.Panels[ 2 ].Hwnd ":" , % Main.Panels[ 2 ].Controls.SearchYPosEdit.Hwnd , % Main.Panels[ 2 ].SearchY
Main.Panels[ 2 ].SearchColor := "FF0000"
Main.Panels[ 2 ].MoveClickSend := 3
Main.Panels[ 2 ].Delay := 100
GuiControl, % Main.Panels[ 2 ].Hwnd ":" , % Main.Panels[ 2 ].Controls.DelayEdit.Hwnd , % Main.Panels[ 2 ].Delay
Main.Panels[ 2 ].SendStuff := "Blah Blah something , something"
GuiControl, % Main.Panels[ 2 ].Hwnd ":" , % Main.Panels[ 2 ].Controls.SendEdit.Hwnd , % Main.Panels[ 2 ].SendStuff
Main.Panels[ 2 ].DrawPanel()
;**************************************************************************


return

GuiClose:
;~ GuiContextMenu:
;~ *ESC::   ;<<<<<<------ Add a exit hotkey if you want to
	ExitApp







;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class SearchPanel extends Graphics	{

	;Written By: Hellbent aka CivReborn
	;Date: Sept 30th 2022
	;Last Edit: Oct 1st, 2022
	;Search Panel for pixel predator v4.1
	
	__New( ParentHwnd , obj := "" ){
		This._SetDefaults( ParentHwnd )
		This._UpdateDefaults( obj )
	}
	
	_SetDefaults( ParentHwnd ){
		This.Window := {}
		This.Window.X := 0 
		This.Window.Y := 0
		This.Window.W := 600
		This.Window.H := 115
		This.Window.Options := " -Caption -DPIScale +Parent" parentHwnd 
		This.Window.Color := "22262a"
		This.Window.Scale := 1
	}
	
	_UpdateDefaults( obj := "" ){
		static tog
		for k , v in obj 
			This.Window[ k ] := obj[ k ]
		This.Scale := This.Window.Scale
		This.Window := New WindowClass( This.Window )
		This.Hwnd := This.Window.Hwnd
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		This.Activate := 0
		This.Truth := 1
		This.SearchX := ""
		This.SearchY := ""
		This.SearchColor := "428B44"
		This.MoveClickSend := 1
		This.Delay := 1000
		This.SendStuff := "{ click , 200 , 200 } ^v"
		This.ButtonPress_SetPosition := 0
		This.ButtonPress_SetColor := 0
		This.ButtonPress_Copy := 0
		This.ButtonPress_Remove := 0
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		;|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|000---<^>---000|;
		This.Controls := {}
		This.Handles := []
		;*********************************************************
		This.Controls.SearchXPosEdit := New ControlClass( This.Hwnd , { X: 117 , Y: 36 , W: 43 , H: 21 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.SearchX , Method: "_ChangeValuesTrigger" } )
		This.Controls.SearchXPosEdit.BindControl( This[ This.Controls.SearchXPosEdit.Method ].Bind( This , This.Handles[ This.Controls.SearchXPosEdit.Hwnd ] := "SearchXPosEdit" ) )
		;*********************************************************
		This.Controls.SearchYPosEdit := New ControlClass( This.Hwnd , { X: 171 , Y: 36 , W: 43 , H: 21 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.SearchY , Method: "_ChangeValuesTrigger" } )
		This.Controls.SearchYPosEdit.BindControl( This[ This.Controls.SearchYPosEdit.Method ].Bind( This , This.Handles[ This.Controls.SearchYPosEdit.Hwnd ] := "SearchYPosEdit" ) )
		;*********************************************************
		This.Controls.DelayEdit := New ControlClass( This.Hwnd , { X: 430 , Y: 42 , W: 84 , H: 23 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.Delay , Method: "_ChangeValuesTrigger" } )
		This.Controls.DelayEdit.BindControl( This[ This.Controls.DelayEdit.Method ].Bind( This , This.Handles[ This.Controls.DelayEdit.Hwnd ] := "DelayEdit" ) )
		;*********************************************************
		This.Controls.SendEdit := New ControlClass( This.Hwnd , { X: 355 , Y: 83 , W: 225 , H: 25 , Scale: This.Scale , Type: "Edit" , Options: " -E0x200 Center " , Value: This.SendStuff , Method: "_ChangeValuesTrigger" } )
		This.Controls.SendEdit.BindControl( This[ This.Controls.SendEdit.Method ].Bind( This , This.Handles[ This.Controls.SendEdit.Hwnd ] := "SendEdit" ) )
		;*********************************************************
		This.Controls.BackgroundPicture := New ControlClass( This.Hwnd , { X: 0 , Y: 0 , W: 600 , H: 115 , Scale: This.Scale , Type: "Picture" , Options: " 0xE 0x04000000  " } )
		;*********************************************************
		This.Controls.ActivateCheckbox := New ControlClass( This.Hwnd , { X: 10 , Y: 10 , W: 80 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.ActivateCheckbox.BindControl( This[ This.Controls.ActivateCheckbox.Method ].Bind( This , This.Handles[ This.Controls.ActivateCheckbox.Hwnd ] := "ActivateCheckbox" ) )
		;*********************************************************
		This.Controls.TrueRadio := New ControlClass( This.Hwnd , { X: 10 , Y: 50 , W: 80 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.TrueRadio.BindControl( This[ This.Controls.TrueRadio.Method ].Bind( This , This.Handles[ This.Controls.TrueRadio.Hwnd ] := "TrueRadio" ) )
		;*********************************************************
		This.Controls.FalseRadio := New ControlClass( This.Hwnd , { X: 10 , Y: 80 , W: 80 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans " , Method: "_ChangeValuesTrigger" } )
		This.Controls.FalseRadio.BindControl( This[ This.Controls.FalseRadio.Method ].Bind( This , This.Handles[ This.Controls.FalseRadio.Hwnd ] := "FalseRadio" ) )
		;*********************************************************
		This.Controls.SetPosButton := New ControlClass( This.Hwnd , { X: 108 , Y: 68 , W: 116 , H: 32 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ButtonPress" } )
		This.Controls.SetPosButton.BindControl( This[ This.Controls.SetPosButton.Method ].Bind( This , This.Handles[ This.Controls.SetPosButton.Hwnd ] := "SetPosButton" ) )
		;*********************************************************
		This.Controls.SetColorButton := New ControlClass( This.Hwnd , { X: 248 , Y: 68 , W: 85 , H: 32 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ButtonPress" } )
		This.Controls.SetColorButton.BindControl( This[ This.Controls.SetColorButton.Method ].Bind( This , This.Handles[ This.Controls.SetColorButton.Hwnd ] := "SetColorButton" ) )
		;*********************************************************
		This.Controls.MoveRadio := New ControlClass( This.Hwnd , { X: 348 , Y: 8 , W: 65 , H: 22 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.MoveRadio.BindControl( This[ This.Controls.MoveRadio.Method ].Bind( This , This.Handles[ This.Controls.MoveRadio.Hwnd ] := "MoveRadio" ) )
		;*********************************************************
		This.Controls.ClickRadio := New ControlClass( This.Hwnd , { X: 348 , Y: 30 , W: 65 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.ClickRadio.BindControl( This[ This.Controls.ClickRadio.Method ].Bind( This , This.Handles[ This.Controls.ClickRadio.Hwnd ] := "ClickRadio" ) )
		;*********************************************************
		This.Controls.SendRadio := New ControlClass( This.Hwnd , { X: 348 , Y: 50 , W: 65 , H: 20 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_ChangeValuesTrigger" } )
		This.Controls.SendRadio.BindControl( This[ This.Controls.SendRadio.Method ].Bind( This , This.Handles[ This.Controls.SendRadio.Hwnd ] := "SendRadio" ) )
		;*********************************************************
		;(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)
		This.Controls.RemoveButton := New ControlClass( This.Hwnd , { X: 528 , Y: 42 , W: 64 , H: 28 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_RemovePanel" } )
		This.Controls.RemoveButton.BindControl( Main[ This.Controls.RemoveButton.Method ].Bind( This , This.Hwnd ) )
		;(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)
		This.Controls.CopyButton := New ControlClass( This.Hwnd , { X: 528 , Y: 7 , W: 64 , H: 28 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans  " , Method: "_CopyPanel" } )
		This.Controls.CopyButton.BindControl( Main[ This.Controls.CopyButton.Method ].Bind( This , This.Hwnd ) )
		;(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)(&)
		This.DrawPanel()
	}
	
	_ChangeValuesTrigger( Name ){
		Main.Stop := 1
		if( Name = "ActivateCheckbox" ){
			This.Activate := !This.Activate
			This.DrawPanel()
		}else if( Name = "TrueRadio" ){
			This.Truth := 1
			This.DrawPanel()
		}else if( Name = "FalseRadio" ){
			This.Truth := 0
			This.DrawPanel()
		}else if( Name = "SearchXPosEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd ,
			This.SearchX := out
		}else if( Name = "SearchYPosEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd ,
			This.SearchY := out
		}else if( Name = "DelayEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.DelayEdit.Hwnd ,
			This.Delay := out
		}else if( Name = "SendEdit" ){
			GuiControlGet, out , % This.Hwnd ":" , % This.Controls.SendEdit.Hwnd ,
			This.SendStuff := out
		}else if( Name = "MoveRadio" ){
			This.MoveClickSend := 1
			This.DrawPanel()
		}else if( Name = "ClickRadio" ){
			This.MoveClickSend := 2
			This.DrawPanel()
		}else if( Name = "SendRadio" ){
			This.MoveClickSend := 3
			This.DrawPanel()
		}
	}
	
	_ButtonPress( name ){
		Main.Stop := 1
		if( Name = "SetPosButton" ){
			This.ButtonPress_SetPosition := 1
			This.DrawPanel()
			This._SetSearchPosition()
			This.ButtonPress_SetPosition := 0
			This.DrawPanel()
			return
		}else if( Name = "SetColorButton" ){
			This.ButtonPress_SetColor := 1
			This.DrawPanel()
			This._SetSearchColor()
			This.ButtonPress_SetColor := 0
			This.DrawPanel()
		}else if( Name = "CopyButton" ){
			This.ButtonPress_Copy := 1
			This.DrawPanel()
			While( GetKeyState( "LButton" , "P" ) )
				sleep, 60
			This.ButtonPress_Copy := 0
			This.DrawPanel()
		}else if( Name = "RemoveButton" ){
			This.ButtonPress_Remove := 1
			This.DrawPanel()
			While( GetKeyState( "LButton" , "P" ) )
				sleep, 60
			This.ButtonPress_Remove := 0
			This.DrawPanel()
		}
	}
	
	_SetSearchPosition(){
		Main.Stop := 1
		if( This.ButtonPress_SetColor )
			return
		This.Controls.SetPosButton.SetFocus()
		CoordMode, Mouse, Screen 
		While( !GetKeyState( "ctrl" ) ){
			ToolTip, % "Move your cursor to the target position and then`nPress ""ctrl"" "
			MouseGetPos, x , y 
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd , % This.SearchX := x
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd , % This.SearchY := y
		}
		ToolTip
		This.Controls.SetPosButton.SetFocus()
	}
	
	_SetSearchColor(){
		local lc 
		Main.Stop := 1
		if( This.ButtonPress_SetPosition )
			return
		This.Controls.SetColorButton.SetFocus()
		CoordMode, Mouse, Screen
		CoordMode, Pixel, Screen
		While( !GetKeyState( "ctrl" ) ){
			ToolTip, Press "ctrl" to capture the color under your cursor.
			MouseGetPos, x , y
			PixelGetColor, outColor , x , y , RGB 
			if( GetKeyState( "Shift" ) ){
				GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd , % This.SearchX := x
				GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd , % This.SearchY := y
			}
			if( lc != outColor ){
				lc := outColor
				This.SearchColor := SubStr( outColor , 3 )
				This.DrawPanel()
				Sleep 60
			}
		}
		ToolTip,
		MouseGetPos, x , y
		PixelGetColor, outColor , x , y , RGB 
		This.SearchColor := SubStr( outColor , 3 )
		if( GetKeyState( "Shift" ) ){
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchXPosEdit.Hwnd , % This.SearchX := x
			GuiControl, % This.window.Hwnd ":" , % This.Controls.SearchYPosEdit.Hwnd , % This.SearchY := y
		}
		Sleep, 60
	}

}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class Main extends Graphics	{
	
	;Written By: Hellbent aka. CivReborn
	;Name: Pixel Predator v4.1
	;Date Started: Sept 30th, 2022
	;Last Edit: Oct 1st, 2022
	/*
	[Colors]
	1=22262a
	2=22262a
	3=22262a
	4=22262a
	5=22262a
	6=22262a
	7=22262a
	8=22262a
	9=22262a
	[HKs]
	start=
	stop=
	*/
	
	SetUp( scale := 1 , PanelsMax := 3 ){
		This.StartHotkey := ""
		This.StopHotkey := ""
		This.LoopDelay := 0
		IniRead, out , % A_ScriptFullPath , HKs , start
		if( out != "" ){
			This.StartHotkey := out
		}
		IniRead, out , % A_ScriptFullPath , HKs , stop
		if( out != "" ){
			This.StopHotkey := out
		}
		This.Stop := 1
		This.Scale := scale
		This.Margin := 10
		This.ExtraControlSpacing := 100
		This.Truth := 1
		This.AddButtonPressed := 0
		This.StartButtonPressed := 0
		This.StopButtonPressed := 0
		;#########################################################					;PANELS
		This.Panels := []
		This.PanelHandles := []
		;#########################################################				
		This.PanelsMax := PanelsMax
		This.PanelWidth := 600
		This.PanelHeight := 115
		This.PanelsTotal := 0
		This.PanelCurrentY := 0
		;#########################################################
		;*********************************************************					;SLIDER
		This.SliderWidth := 30
		This.SliderValue := 0
		This.SliderInterval := 30
		;*********************************************************
		This.SliderTrack := { X: 2 , Y: 2 , W: This.SliderWidth - 4 , H: This.PanelsMax * This.PanelHeight - 4 }
		;*********************************************************
		This.SliderButton := { X: This.SliderTrack.X + 4 , Y: This.SliderTrack.Y + 4 , W: This.SliderWidth - 12 , H: This.PanelsMax * This.PanelHeight - 12 }
		;*********************************************************
		This.SliderStartY := This.SliderButton.Y
		This.SliderStartHeight := This.SliderButton.H
		;*********************************************************
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!					;WINDOWS
		This.MainWindow := { X: 800 , Y: 280 , W: This.PanelWidth + This.SliderWidth + 3 * This.Margin , H: ( This.PanelHeight * This.PanelsMax ) + ( 1 * This.Margin ) + This.ExtraControlSpacing , Options: " +AlwaysOnTop -DPIScale " , Color: "22262a" , Scale: This.Scale }
		This.MainWindow := New WindowClass( This.MainWindow )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		This.FrameWindow := { X: This.Margin - 2 , Y: This.Margin - 2 , W: This.PanelWidth + 4 , H: ( This.PanelHeight * This.PanelsMax ) + 4 , Options: " -DPIScale -Caption +Parent" This.MainWindow.Hwnd , Parent: This.MainWindow.Hwnd , Color: "32363a" , Scale: This.Scale }
		This.FrameWindow := New WindowClass( This.FrameWindow )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		This.FrameWindowInner := { X: 2 , Y: 2 , W: This.PanelWidth , H: ( This.PanelHeight * This.PanelsMax ) , Options: " -DPIScale -Caption +Parent" This.FrameWindow.Hwnd , Parent: This.FrameWindow.Hwnd , Color: "22262a" , Scale: This.Scale }
		This.FrameWindowInner := New WindowClass( This.FrameWindowInner )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		This.CanvasWindow := { X: 0 , Y: 0 , W: This.PanelWidth , H: ( This.PanelHeight * This.PanelsMax ) , Options: " -DPIScale -Caption +Parent" This.FrameWindowInner.Hwnd , Color: This.FrameWindowInner.Color , Parent: This.FrameWindowInner.Hwnd , Scale: This.Scale  }
		This.CanvasWindow := New WindowClass( This.CanvasWindow )
		;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();					;CONTROLS
		This.Controls := {}
		This.ControlHandles := []
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.AddNewPanelButton := { X: This.Margin , Y: y := This.Margin * 2 + This.FrameWindow.H , H: h := This.MainWindow.H - y - This.Margin , W: h , Scale: This.Scale , Type: "Picture" , Options: " 0xE" }
		This.Controls.AddNewPanelButton := New ControlClass( This.MainWindow.Hwnd , This.Controls.AddNewPanelButton )
		This.Controls.AddNewPanelButton.Method := "_AddNewPanelButtonPress"
		This.Controls.AddNewPanelButton.Pressed := 0
		This.Controls.AddNewPanelButton.Bind := This[ This.Controls.AddNewPanelButton.Method ].Bind( This )
		This.Controls.AddNewPanelButton.BindControl( This.Controls.AddNewPanelButton.Bind )
		This.DrawAddButton()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.Slider := { X: This.FrameWindow.W - 2 + 2 * This.Margin , Y: This.Margin , W: This.SliderWidth , H: This.PanelsMax * This.PanelHeight , Scale: This.Scale , Type: "Picture" , Options: " 0xE " }
		This.Controls.Slider := New ControlClass( This.MainWindow.Hwnd , This.Controls.Slider )
		This.ControlHandles[ This.Controls.Slider.Hwnd ] := "Slider"
		This.Controls.Slider.Method := "_SliderClick"
		This.Controls.Slider.Bind := This[ This.Controls.Slider.Method ].Bind( This )
		This.Controls.Slider.BindControl( This.Controls.Slider.Bind )
		This._UpdateSliderPositions()
		This.DrawSlider()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.ColorSelector := { X: This.Controls.AddNewPanelButton.W + 2 * This.Margin , Y: yb := y - 3 , W: This.Controls.AddNewPanelButton.W , H: This.Controls.AddNewPanelButton.W , Scale: This.Scale , Type: "Picture" , Options: " 0xE " }
		This.Controls.ColorSelector := New ControlClass( This.MainWindow.Hwnd , This.Controls.ColorSelector )
		This.Controls.ColorSelector.Method := "_SetColorPallet"
		This.Controls.ColorSelector.Bind := This[ This.Controls.ColorSelector.Method ].Bind( This )
		This.Controls.ColorSelector.BindControl( This.Controls.ColorSelector.Bind )
		This.ColorPalette := []
		This.ColoPalette[ 1 ] := { Vector: This._NewVector( This.Controls.ColorSelector.X + 8 + 10 , This.Controls.ColorSelector.Y + 8 + 10 ) }
		Index := 0
		y := 18
		loop, 3	{
			x := 18
			Loop, 3	{
				IniRead, out , % A_ScriptFullPath , Colors , % ++Index
				This.ColoPalette[ Index ] := { Vector: This._NewVector( This.Controls.ColorSelector.X + x , This.Controls.ColorSelector.Y + y ) , Color: ( out != "" ) ? ( out ) : ( "004444" ) }
				x += 22
			}
			y += 22
		}
		This.DrawColorPanel()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.StartHotkey := { X: ( This.Controls.ColorSelector.X + This.Controls.ColorSelector.W + This.Margin ) + 114  , Y: ( This.FrameWindow.H + 2 * This.Margin ) + 5 , W: 90 , H: 27 , Scale: This.Scale , Type: "Hotkey" , Options: " Center -E0x200 " , Value: This.StartHotkey }
		This.Controls.StartHotkey := New ControlClass( This.MainWindow.Hwnd , This.Controls.StartHotkey )
		This.STHKBIND := This.RunSearch.Bind( This )
		if( This.StartHotkey != "" ){
			bd := This.STHKBIND
			Hotkey, % This.StartHotkey , % bd , On
		}
		This.Controls.StopHotkey := { X: ( This.Controls.ColorSelector.X + This.Controls.ColorSelector.W + This.Margin ) + 112  , Y: ( This.FrameWindow.H + 2 * This.Margin ) + 46 , W: 94 , H: 27 , Scale: This.Scale , Type: "Hotkey" , Options: " Center -E0x200 " , Value: This.StopHotkey }
		This.Controls.StopHotkey := New ControlClass( This.MainWindow.Hwnd , This.Controls.StopHotkey )
		This.SPHKBIND := This.StopSearch.Bind( This )
		if( This.StopHotkey != "" ){
			bd := This.SPHKBIND
			Hotkey, % This.StopHotkey , % bd , On
		}
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		This.Controls.HotkeyPanel := { X: This.Controls.ColorSelector.X + This.Controls.ColorSelector.W + This.Margin , Y: yb, W: 300 , H: 80 , Scale: This.Scale , Type: "Picture" , Options: " 0xE 0x04000000 " }
		This.Controls.HotkeyPanel := New ControlClass( This.MainWindow.Hwnd , This.Controls.HotkeyPanel )
		This.DrawHotkeys()
		;()()()()()()()()()()()()()()()()()()()()()()()()()()()();
		;*********************************************************
		;*********************************************************
		This.Controls.UpdateStartButton := { X: This.Controls.HotkeyPanel.X + 220 , Y: yb + 6 , W: 70 , H: 30 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans " }
		This.Controls.UpdateStartButton := New ControlClass( This.MainWindow.Hwnd , This.Controls.UpdateStartButton )
		This.Controls.UpdateStartButton.Method := "_SetStartHotkey"
		This.Controls.UpdateStartButton.Bind := This[ This.Controls.UpdateStartButton.Method ].Bind( This )
		This.Controls.UpdateStartButton.BindControl( This.Controls.UpdateStartButton.Bind )
		
		;*********************************************************
		;*********************************************************
		This.Controls.UpdateStopButton := { X: This.Controls.HotkeyPanel.X + 220 , Y: yb + 46 , W: 70 , H: 30 , Scale: This.Scale , Type: "Text" , Options: " BackgroundTrans " }
		This.Controls.UpdateStopButton := New ControlClass( This.MainWindow.Hwnd , This.Controls.UpdateStopButton )
		This.Controls.UpdateStopButton.Method := "_SetStopHotkey"
		This.Controls.UpdateStopButton.Bind := This[ This.Controls.UpdateStopButton.Method ].Bind( This )
		This.Controls.UpdateStopButton.BindControl( This.Controls.UpdateStopButton.Bind )
	}
	
	_NewVector( x := 0 , y := 0 ){
		return { X: x , Y: y }
	}
	
	_Dist( vector ){
		CoordMode, Mouse, Client
		MouseGetPos, x, y
		return Sqrt( ( ( x / This.Scale - vector.X ) **2 ) + ( ( y / This.Scale - vector.Y ) **2 ) )
	}
	
	_SetStartHotkey(){
		This.Stop := 1
		This.Controls.UpdateStartButton.SetFocus()
		This.StartButtonPressed := 1 
		This.DrawHotkeys()
		While( GetKeyState( "LButton" , "P" ) )
			sleep, 60
		This.StartButtonPressed := 0
		This.DrawHotkeys()
		GuiControlGet, out , % This.MainWindow.Hwnd ":" , % This.Controls.StartHotkey.Hwnd
		if( out != "" && out != This.StartHotkey ){
			bd := This.STHKBIND
			if( This.StartHotkey != "" ){
				Hotkey, % This.StartHotkey , % bd , Off
			}
			This.StartHotkey := out
			Hotkey, % This.StartHotkey , % bd , ON
			IniWrite, % This.StartHotkey , % A_ScriptFullPath , HKs , start
		}else if( out = "" ){
			GuiControl, % This.MainWindow.Hwnd ":" , % This.Controls.StartHotkey.Hwnd , % This.StartHotkey
		}
	}
	
	_SetStopHotkey(){
		This.Stop := 1
		This.Controls.UpdateStopButton.SetFocus()
		This.StopButtonPressed := 1 
		This.DrawHotkeys()
		While( GetKeyState( "LButton" , "P" ) )
			sleep, 60
		This.StopButtonPressed := 0
		This.DrawHotkeys()
		GuiControlGet, out , % This.MainWindow.Hwnd ":" , % This.Controls.StopHotkey.Hwnd
		if( out != "" && out != This.StopHotkey ){
			bd := This.SPHKBIND
			if( This.StopHotkey != "" ){
				Hotkey, % This.StopHotkey , % bd , Off
			}
			This.StopHotkey := out
			Hotkey, % This.StopHotkey , % bd , ON
			IniWrite, % This.StopHotkey , % A_ScriptFullPath , HKs , stop
		}else if( out = "" ){
			GuiControl, % This.MainWindow.Hwnd ":" , % This.Controls.StopHotkey.Hwnd , % This.StopHotkey
		}
	}
	
	_UpdateSliderPositions(){
		if( This.SliderValue = 0 || This.SliderValue = 1 )
			This.SliderButton.Y := This.SliderStartY
		else
			This.SliderButton.Y := This.SliderStartY + This.SliderInterval * ( This.SliderValue - 1 )
		if( This.PanelsTotal <= This.PanelsMax )
			This.SliderButton.H := This.SliderStartHeight 
		else
			This.SliderButton.H := This.SliderStartHeight - ( ( This.PanelsTotal - This.PanelsMax + 1 - This.SliderValue ) * This.SliderInterval  ) - Abs( This.SliderStartY - This.SliderButton.Y ) 
	}
	
	_SliderClick(){
		This.Stop := 1
		if( This.PanelsTotal > This.PanelsMax || This.SliderValue > 1 ){
			CoordMode, Mouse, Client
			MouseGetPos,, StartY 
			OldValue := This.SliderValue
			WinGetPos, x , y ,,, % "ahk_Id " This.MainWindow.Hwnd
			This.MainWindow.X := x 
			This.MainWindow.Y := y
			Gui1 := New PopUpWindow( { AutoShow: 1 , X: ( This.MainWindow.X + ( This.MainWindow.W * This.Scale ) ) + 10  , Y: ( This.MainWindow.Y ) , W: 70 , H: ( This.MainWindow.H * This.Scale ) , Options: " +ToolWindow -DPIScale +AlwaysOnTop " } )
			While( GetKeyState( "LButton" , "P" ) ){
				MouseGetPos,, EndY 
				if( abs( StartY - EndY ) >= This.SliderInterval ){
					if( StartY < EndY ){ 
						if( ++This.SliderValue <= ( This.PanelsTotal - This.PanelsMax + 1 ) ){
							Gui1.ClearWindow()
							Arrow := New ArrowHead( { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 - 50 } , { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 + 50 } , HeadLength := 10 , ArmLength := 10 , ElbowLength := 5 , x_offset := 0 , y_offset := 0 )
							FillPolygon( Gui1.G , Arrow , "0xFF428B44" )
							DrawPolygon( Gui1.G , Arrow , "0x9955ff55" )
							Gui1.UpdateWindow()
							This._UpdateSliderPositions()
							This.DrawSlider()
							This.CanvasWindow.Y := ( This.SliderValue -1 ) * This.PanelHeight  * -1
							This.CanvasWindow.ShowWindow()
							sleep, 400
						}else{
							This.SliderValue := ( This.PanelsTotal - This.PanelsMax )
						}
					}else{
						if( --This.SliderValue >= 1 ){
							Gui1.ClearWindow()
							Arrow := New ArrowHead( { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 + 50 } , { X: 20 , Y: ( This.MainWindow.H * This.Scale ) / 2 - 50 } , HeadLength := 10 , ArmLength := 10 , ElbowLength := 5 , x_offset := 0 , y_offset := 0 )
							FillPolygon( Gui1.G , Arrow , "0xFF428B44" )
							DrawPolygon( Gui1.G , Arrow , "0x9955ff55" )
							Gui1.UpdateWindow()
							This._UpdateSliderPositions()
							This.DrawSlider()
							This.CanvasWindow.Y := ( This.SliderValue -1 ) * This.PanelHeight * -1
							This.CanvasWindow.ShowWindow()
							sleep, 400
						}else{
							This.SliderValue := 1
							This.CanvasWindow.Y := 0
							This.CanvasWindow.ShowWindow()
						}
					}
				}
				Gui1.ClearWindow( 1 )
			}
			Gui1.DeleteWindow()
		}
	}
	
	_AddNewPanelButtonPress(){
		This.Stop := 1
		This.AddButtonPressed := 1
		This.DrawAddButton()
		While( GetKeyState( "LButton" , "P" ) )
			Sleep, 30
		This.AddButtonPressed := 0
		This.DrawAddButton()
		This.PanelsTotal++
		This.PanelCurrentY += This.PanelHeight
		This.Panels.Push( New SearchPanel( This.CanvasWindow.Hwnd , { Y: ( This.PanelCurrentY - This.PanelHeight ) * This.Scale  , Scale: This.Scale } ) )
		if( ( This.PanelsTotal * This.PanelHeight ) < This.FrameWindowInner.H )
			This.CanvasWindow.H := This.FrameWindowInner.H
		else
			This.CanvasWindow.H := This.PanelsTotal * This.PanelHeight
		This.CanvasWindow.ShowWindow()
		if( This.PanelsTotal = 1 )
			This.SliderValue := 1
		This._UpdateSliderPositions()
		This.DrawSlider()
	}
	
	_CopyPanel( hwnd ){
		This.Stop := 1
		Loop, % Main.Panels.Length()	{
			if( Main.Panels[ Index := A_Index ].Hwnd = hwnd ){
				Main.Panels[ Index].ButtonPress_Copy := 1
				Main.Panels[ Index].DrawPanel()
				While( GetKeyState( "LButton" , "P" ) )
					sleep, 60
				Main.Panels[ Index].ButtonPress_Copy := 0
				Main.Panels[ Index].DrawPanel()
				Main.PanelsTotal++
				Main.PanelCurrentY += Main.PanelHeight
				Main.Panels.Push( New SearchPanel( Main.CanvasWindow.Hwnd , { Y: ( Main.PanelCurrentY - Main.PanelHeight ) * Main.Scale  , Scale: Main.Scale } ) )
				if( ( Main.PanelsTotal * Main.PanelHeight ) < Main.FrameWindowInner.H )
					Main.CanvasWindow.H := Main.FrameWindowInner.H
				else
					Main.CanvasWindow.H := Main.PanelsTotal * Main.PanelHeight
				Main.CanvasWindow.ShowWindow()
				if( Main.PanelsTotal = 1 )
					Main.SliderValue := 1
				Main.Panels[ Main.Panels.Length() ].Activate  := Main.Panels[ Index ].Activate
				Main.Panels[ Main.Panels.Length() ].Truth  := Main.Panels[ Index ].Truth
				Main.Panels[ Main.Panels.Length() ].SearchX  := Main.Panels[ Index ].SearchX
				Main.Panels[ Main.Panels.Length() ].SearchY  := Main.Panels[ Index ].SearchY
				Main.Panels[ Main.Panels.Length() ].SearchColor  := Main.Panels[ Index ].SearchColor
				Main.Panels[ Main.Panels.Length() ].MoveClickSend  := Main.Panels[ Index ].MoveClickSend
				Main.Panels[ Main.Panels.Length() ].Delay  := Main.Panels[ Index ].Delay
				Main.Panels[ Main.Panels.Length() ].SendStuff  := Main.Panels[ Index ].SendStuff
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.SearchXPosEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].SearchX
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.SearchYPosEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].SearchY
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.DelayEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].Delay
				GuiControl, % Main.Panels[ Main.Panels.Length() ].Hwnd ":" , % Main.Panels[ Main.Panels.Length() ].Controls.SendEdit.Hwnd , % Main.Panels[ Main.Panels.Length() ].SendStuff
				Main.Panels[ Main.Panels.Length() ].DrawPanel()
				Main._UpdateSliderPositions()
				Main.DrawSlider()
				return
			}
		}
	}
	
	_RemovePanel( hwnd ){
		This.Stop := 1
		Loop, % Main.Panels.Length()	{
			if( Main.Panels[ Index := A_Index ].Hwnd = hwnd ){
				Main.Panels[ Index].ButtonPress_Remove := 1
				Main.Panels[ Index].DrawPanel()
				While( GetKeyState( "LButton" , "P" ) )
					sleep, 60
				Main.Panels[ Index].ButtonPress_Remove := 0
				Main.Panels[ Index].DrawPanel()
				Loop, % Main.Panels.Length() - Index	{
					Main.Panels[ A_Index + Index ].Window.Y -= Main.PanelHeight * Main.Scale
					Main.Panels[ A_Index + Index ].Window.ShowWindow()
				}
				Main.Panels[ Index ].Window.DeleteWindow()
				Main.Panels.RemoveAt( Index )
				Main.PanelCurrentY -= Main.PanelHeight
				Main.PanelsTotal--
				If( Main.SliderValue > Main.PanelsTotal ){
					Main.SliderValue := Main.PanelsTotal - Main.PanelsMax
				}
				Main._UpdateSliderPositions()
			}
		}
	}
		
	_SetColorPallet(){
		This.Stop := 1
		This.Controls.ColorSelector.SetFocus()
		Loop, 9	{
			if( This._Dist( This.ColoPalette[ A_Index ].Vector ) < 10 * This.Scale  ){
				This.ButtonPress_ColorPalette := A_Index 
				CoordMode, Mouse, Screen
				CoordMode, Pixel, Screen
				While( !GetKeyState( "ctrl" ) ){
					ToolTip, Press "ctrl" to capture the color under your cursor.
					MouseGetPos, x , y
					PixelGetColor, out , x , y , RGB
					This.ColoPalette[ This.ButtonPress_ColorPalette ].Color := SubStr( out , 3 )
					This.DrawColorPanel()
					sleep, 60
				}
				ToolTip,
				IniWrite, % This.ColoPalette[ This.ButtonPress_ColorPalette ].Color , % A_ScriptFullPath , Colors , % This.ButtonPress_ColorPalette
				This.ButtonPress_ColorPalette := 0
				This.DrawColorPanel()
				return
			}
		}
	}
	
	RunSearch(){
		local activeArr := [] , Index := 0 , ErrorCount := 0 , BadPanel := 0
		This.Stop := 1
		if( This.StartHotkey = "" || This.StopHotkey = "" ){
			Gui, % This.MainWindow.Hwnd ": +OwnDialogs "
			MsgBox, % "One or more of your hotkeys haven't been set"
			return
		}
		Loop, % This.Panels.Length()	{
			if( This.Panels[ A_Index ].Activate ){
				activeArr[ ++Index ] := {}
				activeArr[ Index ].Truth := This.Panels[ A_Index ].Truth
				activeArr[ Index ].MoveClickSend := This.Panels[ A_Index ].MoveClickSend
				activeArr[ Index ].SearchX := This.Panels[ A_Index ].SearchX
				activeArr[ Index ].SearchY := This.Panels[ A_Index ].SearchY
				if( This.Panels[ A_Index ].SearchX = "" || This.Panels[ A_Index ].SearchY = "" ){
					--Index
					activeArr.Pop()
					++ErrorCount
					BadPanel := A_Index
					continue
				}
				activeArr[ Index ].SearchColor := This.Panels[ A_Index ].SearchColor
				if( This.Panels[ A_Index ].SearchColor = "" ){
					--Index
					activeArr.Pop()
					++ErrorCount
					BadPanel := A_Index
					continue
				}
				activeArr[ Index ].Delay := This.Panels[ A_Index ].Delay
				if( This.Panels[ A_Index ].Delay = "" ){
					activeArr[ Index ].Delay := 0
				}
				activeArr[ Index ].SendStuff := This.Panels[ A_Index ].SendStuff
				if( This.Panels[ A_Index ].MoveClickSend = 3 && This.Panels[ A_Index ].SendStuff = "" ){
					--Index
					activeArr.Pop()
					++ErrorCount
					BadPanel := A_Index
					continue
				}
			}
		}
		if( ErrorCount ){
			Gui, % This.MainWindow.Hwnd ": +OwnDialogs "
			if( ErrorCount = 1 )
				MsgBox, % "Panel " BadPanel " has an error.`nPlease correct it and try again."
			else
				MsgBox, % "You have " ErrorCount " Panels with errors in them."
			return
		}
		if( !Index ){
			Gui, % This.MainWindow.Hwnd ": +OwnDialogs "
			MsgBox, % "You have no panels activated"
			return
		}
		SoundBeep, 555
		SoundBeep, 666
		This.Stop := 0
		CoordMode, Mouse, Screen
		CoordMode, Pixel, Screen
		SetDefaultMouseSpeed, 0
		SetMouseDelay, 30
		While( !This.Stop ){
			Loop, % activeArr.Length()	{
				PixelGetColor, out , % activeArr[ A_Index ].SearchX , % activeArr[ A_Index ].SearchY , RGB
				if( ( subStr( out , 3 ) = activeArr[ A_Index ].SearchColor && activeArr[ A_Index ].Truth ) || ( subStr( out , 3 ) != activeArr[ A_Index ].SearchColor && !activeArr[ A_Index ].Truth ) ){
					if( This.Stop ){
						Break 2
					}
					if( activeArr[ A_Index ].Delay )
						Sleep, % activeArr[ A_Index ].Delay
					if( This.Stop ){
						Break 2
					}
					if( activeArr[ A_Index ].MoveClickSend = 1 ){
						MouseMove, % activeArr[ A_Index ].SearchX , % activeArr[ A_Index ].SearchY
					}else if( activeArr[ A_Index ].MoveClickSend = 2 ){
						Click, % activeArr[ A_Index ].SearchX " , "  activeArr[ A_Index ].SearchY
					}else{
						SendInput, % activeArr[ A_Index ].SendStuff
					}
				}
			}
			Sleep, % This.LoopDelay 
		}
		SoundBeep, 1111
		SoundBeep, 1111
		SoundBeep, 1111
	}
	
	StopSearch(){
		This.Stop := 1
	}

}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class Graphics	{
	
	DrawHotkeys(){
		;Bitmap Created Using: HB Bitmap Maker
		pBitmap := Gdip_CreateBitmap( 300 * This.Scale , 80 * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , -3 * This.Scale , -10 * This.Scale , 390 * This.Scale , 100 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFFacacac" ) , Gdip_TextToGraphics( G , "START HOTKEY :" , "s" 12 * This.Scale " vCenter Bold c" Brush " x" 5 * This.Scale " y" -4 * This.Scale  , "Segoe ui" , 110 * This.Scale , 50 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 108 * This.Scale , 3 * This.Scale , 102 * This.Scale , 38 * This.Scale , "0xFF428B44" , "0xFF000000" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 109 * This.Scale , 3 * This.Scale , 100 * This.Scale , 36 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 111 * This.Scale , 5 * This.Scale , 96 * This.Scale , 32 * This.Scale ) , Gdip_DeleteBrush( Brush )
		if( !This.StartButtonPressed ){
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 6 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 223 * This.Scale , 9 * This.Scale , 66 * This.Scale , 27 * This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 7 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF222222" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 219 * This.Scale " y" 5 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 220 * This.Scale " y" 6 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 220 * This.Scale , 6 * This.Scale , 70 * This.Scale , 30 * This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 6 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 221 * This.Scale , 7 * This.Scale , 68 * This.Scale , 28 * This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 7 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Update" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 221 * This.Scale " y" 7 * This.Scale  , "Segoe ui" , 68 * This.Scale , 28 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFFacacac" ) , Gdip_TextToGraphics( G , "  STOP HOTKEY :" , "s" 12 * This.Scale " vCenter Bold c" Brush " x" 5 * This.Scale " y" 36 * This.Scale  , "Segoe ui" , 110 * This.Scale , 50 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 111 * This.Scale , 44 * This.Scale , 96 * This.Scale , 31 * This.Scale , "0xFF428B44" , "0xFF000000" , 1 , 1 ) , Gdip_FillRectangle( G , Brush , 109 * This.Scale , 43 * This.Scale , 100 * This.Scale , 36 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 111 * This.Scale , 45 * This.Scale , 96 * This.Scale , 32 * This.Scale ) , Gdip_DeleteBrush( Brush )
		if( !This.StopButtonPressed ){
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 46 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 222 * This.Scale , 47 * This.Scale , 66 * This.Scale , 28 * This.Scale , "0xff6A6E72" , "0xff22262a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 47 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF222222" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 219 * This.Scale " y" 45 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Update" , "s" 14 * This.Scale " Center Bold vCenter  c" Brush " x" 220 * This.Scale " y" 46 * This.Scale  , "Comic Sans MS" , 70 * This.Scale , 30 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 220 * This.Scale , 46 * This.Scale , 70 * This.Scale , 30 * This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 220 * This.Scale , 46 * This.Scale , 70 * This.Scale , 30 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 221 * This.Scale , 47 * This.Scale , 68 * This.Scale , 28 * This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 221 * This.Scale , 47 * This.Scale , 68 * This.Scale , 28 * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Update" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 221 * This.Scale " y" 47 * This.Scale  , "Segoe ui" , 68 * This.Scale , 28 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.HotkeyPanel.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawColorPanel(){
		;Bitmap Created Using: HB Bitmap Maker
		pBitmap := Gdip_CreateBitmap( 80 * This.Scale , 80 * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , -2 * This.Scale , -3 * This.Scale , 90 * This.Scale , 90 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Loop, 9	{
			cc := This.ColoPalette[ A_Index ].Vector
			bb := This.Controls.ColorSelector
			Pen := Gdip_CreatePen( ( This.ButtonPress_ColorPalette = A_Index ) ? ( "0x9900ff00" ) : ( "0xFF44484f" ) , 3 ) , Gdip_DrawEllipse( G , Pen , ( cc.X - 10 - bb.X ) * This.Scale , ( cc.Y - 10 - bb.Y ) * This.Scale , 20 * This.Scale , 20 * This.Scale ) , Gdip_DeletePen( Pen )
			Brush := Gdip_BrushCreateSolid( "0xFF" This.ColoPalette[ A_Index ].Color ) , Gdip_FillEllipse( G , Brush , ( cc.X - 10 - bb.X ) * This.Scale , ( cc.Y - 10 - bb.Y ) * This.Scale , 20 * This.Scale , 20 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.ColorSelector.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawSlider(){
		;Bitmap Created Using: HB Bitmap Maker
		local pBitmap , Brush , G , hBitmap
		pBitmap := Gdip_CreateBitmap( This.Controls.Slider.W * This.Scale , This.Controls.Slider.H * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF428B44" ) , Gdip_FillRoundedRectangle( G , Brush , This.SliderTrack.X * This.Scale , This.SliderTrack.Y * This.Scale , This.SliderTrack.W * This.Scale , This.SliderTrack.H * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF222222" ) , Gdip_FillRoundedRectangle( G , Brush , ( This.SliderTrack.X + 2 ) * This.Scale , ( This.SliderTrack.Y + 2 ) * This.Scale , ( This.SliderTrack.W - 4 ) * This.Scale , ( This.SliderTrack.H - 4 ) * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF428B44" ) , Gdip_FillRoundedRectangle( G , Brush ,  This.SliderButton.X * This.Scale , This.SliderButton.Y * This.Scale , This.SliderButton.W * This.Scale , This.SliderButton.H * This.Scale , 5 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF333333" ) , Gdip_FillRectangle( G , Brush , ( This.SliderButton.X + 4 ) * This.Scale , ( This.SliderButton.Y + This.SliderButton.H / 2 ) * This.Scale , ( This.SliderButton.W - 8 ) * This.Scale , 2 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF333333" ) , Gdip_FillRectangle( G , Brush , ( This.SliderButton.X + 4 ) * This.Scale , ( This.SliderButton.Y + This.SliderButton.H / 2 - 10 ) * This.Scale , ( This.SliderButton.W - 8 ) * This.Scale , 2 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF333333" ) , Gdip_FillRectangle( G , Brush , ( This.SliderButton.X + 4 ) * This.Scale , ( This.SliderButton.Y + This.SliderButton.H / 2 + 10 ) * This.Scale , ( This.SliderButton.W - 8 ) * This.Scale , 2 * This.Scale ) , Gdip_DeleteBrush( Brush )
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.Slider.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawAddButton(){
		;Bitmap Created Using: HB Bitmap Maker
		local pBitmap , Brush , G , hBitmap
		pBitmap := Gdip_CreateBitmap( This.Controls.AddNewPanelButton.W * This.Scale , This.Controls.AddNewPanelButton.H * This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRoundedRectangle( G , Brush , -10 * This.Scale , -10 * This.Scale , ( This.Controls.AddNewPanelButton.W + 20 ) * This.Scale , ( This.Controls.AddNewPanelButton.H + 20 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF12161a" ) , Gdip_FillRoundedRectangle( G , Brush , 2 * This.Scale , 2 * This.Scale , ( This.Controls.AddNewPanelButton.W - 4 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 4 ) * This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF356F36" ) , Gdip_FillRoundedRectangle( G , Brush , 4 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 4 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , "0x11ffffff" , "0x33000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 4 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		if( !This.AddButtonPressed ){
			Brush := Gdip_BrushCreateSolid( "0x99FFFFFF" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , 7 * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x99000000" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x44000000" ) , Gdip_FillRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 12 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x33ffffff" ) , Gdip_FillRectangle( G , Brush , 7 * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 16 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x6672767a" ) , Gdip_FillRoundedRectangle( G , Brush , 15 * This.Scale , 15 * This.Scale , ( This.Controls.AddNewPanelButton.W - 30 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 30 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x9932363a" ) , Gdip_FillRoundedRectangle( G , Brush , 20 * This.Scale , 20 * This.Scale , ( This.Controls.AddNewPanelButton.W - 40 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 40 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x994BFF4B" ) , Gdip_FillRoundedRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W / 2 - 2 ) * This.Scale , 25 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.H - 50 ) * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x994BFF4B" ) , Gdip_FillRoundedRectangle( G , Brush , 25 * This.Scale , ( This.Controls.AddNewPanelButton.H / 2 - 1 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 50 ) * This.Scale , 4 * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_BrushCreateSolid( "0x66000000" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , 7 * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x66FFFFFF" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x6600000" ) , Gdip_FillRectangle( G , Brush , 8 * This.Scale , ( This.Controls.AddNewPanelButton.H - 8 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 16 ) * This.Scale , 3 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x66FFFFFF" ) , Gdip_FillRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W - 8 ) * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 12 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x66000000" ) , Gdip_FillRectangle( G , Brush , 7 * This.Scale , 7 * This.Scale , 3 * This.Scale , ( This.Controls.AddNewPanelButton.H - 16 ) * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x9900ff00" ) , Gdip_FillRoundedRectangle( G , Brush , 15 * This.Scale , 15 * This.Scale , ( This.Controls.AddNewPanelButton.W - 30 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 30 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0x9932363a" ) , Gdip_FillRoundedRectangle( G , Brush , 20 * This.Scale , 20 * This.Scale , ( This.Controls.AddNewPanelButton.W - 40 ) * This.Scale , ( This.Controls.AddNewPanelButton.H - 40 ) * This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( Color := "0xFF00FF00" ) , Gdip_FillRoundedRectangle( G , Brush , ( This.Controls.AddNewPanelButton.W / 2 - 2 ) * This.Scale , 25 * This.Scale , 4 * This.Scale , ( This.Controls.AddNewPanelButton.H - 50 ) * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( Color ) , Gdip_FillRoundedRectangle( G , Brush , 25 * This.Scale , ( This.Controls.AddNewPanelButton.H / 2 - 1 ) * This.Scale , ( This.Controls.AddNewPanelButton.W - 50 ) * This.Scale , 4 * This.Scale , 1 * This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.AddNewPanelButton.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}
	
	DrawPanel(){
		;Bitmap Created Using: HB Bitmap Maker
		This.Scale := This.Window.Scale
		pBitmap := Gdip_CreateBitmap( 600 * This.Scale , 115* This.Scale ) , G := Gdip_GraphicsFromImage( pBitmap ) , Gdip_SetSmoothingMode( G , 2 )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , -10* This.Scale , -10* This.Scale , 620* This.Scale , 135* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 0* This.Scale , 5* This.Scale , 597* This.Scale , 103* This.Scale , "0x66F0F0F0" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 2* This.Scale , 2* This.Scale , 596* This.Scale , 110* This.Scale , 11* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_FillRectangle( G , Brush , 10* This.Scale , 10* This.Scale , 20* This.Scale , 20* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF777777" ) , Gdip_FillRectangle( G , Brush , 11* This.Scale , 11* This.Scale , 18* This.Scale , 18* This.Scale ) , Gdip_DeleteBrush( Brush )
		if ( This.Activate )
			Brush := Gdip_BrushCreateSolid( "0xaa45D549" ) , Gdip_FillRectangle( G , Brush , 12* This.Scale , 12* This.Scale , 16* This.Scale , 16* This.Scale ) , Gdip_DeleteBrush( Brush )
		Pen := Gdip_CreatePen( "0x99333333" , 2 ) , Gdip_DrawLine( G , Pen , 11* This.Scale , 12* This.Scale , 29* This.Scale , 12* This.Scale ) , Gdip_DeletePen( Pen )
		Pen := Gdip_CreatePen( "0x99333333" , 2 ) , Gdip_DrawLine( G , Pen , 12* This.Scale , 12* This.Scale , 12* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		Pen := Gdip_CreatePen( "0x33F0F0F0" , 2 ) , Gdip_DrawLine( G , Pen , 11* This.Scale , 28* This.Scale , 29* This.Scale , 28* This.Scale ) , Gdip_DeletePen( Pen )
		Pen := Gdip_CreatePen( "0x33F0F0F0" , 2 ) , Gdip_DrawLine( G , Pen , 28* This.Scale , 12* This.Scale , 28* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		if ( This.Activate )
			Brush := Gdip_BrushCreateSolid( "0xFF111111" ) , Gdip_TextToGraphics( G , "a" , "s" 18* This.Scale " Center vCenter Bold c" Brush " x" -3* This.Scale " y" -2* This.Scale  , "webdings" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		if ( This.Activate ){
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Activate" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 23* This.Scale " y" -6* This.Scale  , "Segoe ui" , 80* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 38* This.Scale , 27* This.Scale , 88* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		}else{	
			Brush := Gdip_BrushCreateSolid( "0xFFaaaaaa" ) , Gdip_TextToGraphics( G , "Activate" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 23* This.Scale " y" -6* This.Scale  , "Segoe ui" , 80* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF777777" , 1 ) , Gdip_DrawLine( G , Pen , 38* This.Scale , 27* This.Scale , 88* This.Scale , 27* This.Scale ) , Gdip_DeletePen( Pen )
		}
		if ( This.Truth ){
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 47* This.Scale , 23* This.Scale , 29* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 51* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 16* This.Scale , 46* This.Scale , 11* This.Scale , 17* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xff56B659" ) , Gdip_TextToGraphics( G , "True" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 34* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xff56B659" , 1 ) , Gdip_DrawLine( G , Pen , 35* This.Scale , 67* This.Scale , 68* This.Scale , 67* This.Scale ) , Gdip_DeletePen( Pen )
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 83* This.Scale , 19* This.Scale , 17* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 80* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 15* This.Scale , 81* This.Scale , 13* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "False" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 64* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 47* This.Scale , 23* This.Scale , 29* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 51* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 16* This.Scale , 46* This.Scale , 11* This.Scale , 17* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 53* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 13* This.Scale , 83* This.Scale , 19* This.Scale , 17* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 13* This.Scale , 80* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "True" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 34* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 15* This.Scale , 81* This.Scale , 13* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 15* This.Scale , 82* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xff56B659" ) , Gdip_TextToGraphics( G , "False" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 26* This.Scale " y" 64* This.Scale  , "Segoe ui" , 50* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 35* This.Scale , 97* This.Scale , 68* This.Scale , 97* This.Scale ) , Gdip_DeletePen( Pen )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF32363a" ) , Gdip_FillRoundedRectangle( G , Brush , 101* This.Scale , 6* This.Scale , 130* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 105* This.Scale , 6* This.Scale , 126* This.Scale , 99* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 101* This.Scale , 6* This.Scale , 130* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeletePen( Pen )
		if( !This.ButtonPress_SetPosition ){
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 107* This.Scale , 66* This.Scale , 118* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 108* This.Scale , 70* This.Scale , 114* This.Scale , 27* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 109* This.Scale , 68* This.Scale , 114* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Set Position" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 109* This.Scale " y" 69 * This.Scale  , "Segoe ui" , 114* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{	
			Brush := Gdip_CreateLineBrushFromRect( 107* This.Scale , 66* This.Scale , 118* This.Scale , 35* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 107* This.Scale , 66* This.Scale , 118* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 108* This.Scale , 70* This.Scale , 114* This.Scale , 27* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 109* This.Scale , 68* This.Scale , 114* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Set Position" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 109* This.Scale " y" 69* This.Scale  , "Segoe ui" , 114* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "X" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 122* This.Scale " y" 7* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "X" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 121* This.Scale " y" 6* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Y" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 171* This.Scale " y" 7* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Y" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 170* This.Scale " y" 6* This.Scale  , "Segoe ui" , 40* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xff22262a" ) , Gdip_FillRectangle( G , Brush , 113* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 114* This.Scale , 29* This.Scale , 48* This.Scale , 33* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 113* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 167* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 168* This.Scale , 29* This.Scale , 49* This.Scale , 31* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 167* This.Scale , 30* This.Scale , 50* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF32363A" ) , Gdip_FillRoundedRectangle( G , Brush , 240* This.Scale , 6* This.Scale , 100* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 105* This.Scale , 6* This.Scale , 126* This.Scale , 99* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 240* This.Scale , 6* This.Scale , 100* This.Scale , 102* This.Scale , 5* This.Scale ) , Gdip_DeletePen( Pen )
		if( !This.ButtonPress_SetColor ){
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 246* This.Scale , 66* This.Scale , 88* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 108* This.Scale , 70* This.Scale , 114* This.Scale , 27* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 248* This.Scale , 68* This.Scale , 84* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Set Color" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 249* This.Scale " y" 69* This.Scale  , "Segoe ui" , 84* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 246* This.Scale , 66* This.Scale , 88* This.Scale , 35* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 246* This.Scale , 66* This.Scale , 88* This.Scale , 35* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 248* This.Scale , 68* This.Scale , 84* This.Scale , 32* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 248* This.Scale , 68* This.Scale , 84* This.Scale , 32* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Set Color" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 249* This.Scale " y" 69* This.Scale  , "Segoe ui" , 84* This.Scale , 32* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 246* This.Scale , 31* This.Scale , 88* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF" This.SearchColor ) , Gdip_FillRoundedRectangle( G , Brush , 248* This.Scale , 33* This.Scale , 84* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 250* This.Scale , 33* This.Scale , 81* This.Scale , 25* This.Scale , "0x00F0F0F0" , "0xaaF0F0F0" , 3 , 1 ) , Gdip_FillRectangle( G , Brush , 251* This.Scale , 34* This.Scale , 78* This.Scale , 3* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 250* This.Scale , 33* This.Scale , 78* This.Scale , 25* This.Scale , "0xff000000" , "0x33F0F0F0" , 3 , 1 ) , Gdip_FillRectangle( G , Brush , 251* This.Scale , 56* This.Scale , 78* This.Scale , 2* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G ,  "0x" This.SearchColor , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 247* This.Scale " y" 7* This.Scale  , "Segoe ui" , 88* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "0x" This.SearchColor , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 246* This.Scale " y" 6* This.Scale  , "Segoe ui" , 88* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		if( This.MoveClickSend = 1 ){
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 11* This.Scale , 14* This.Scale , 13* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 10* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 351* This.Scale , 7* This.Scale , 19* This.Scale , 16* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Move" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" -6* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 374* This.Scale , 27 * This.Scale , 407* This.Scale , 27 * This.Scale ) , Gdip_DeletePen( Pen )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 11* This.Scale , 14* This.Scale , 13* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 10* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 351* This.Scale , 7* This.Scale , 19* This.Scale , 16* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 12* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "Move" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" -6* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		if( This.MoveClickSend = 2 ){
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 31* This.Scale , 13* This.Scale , 14* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 30* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 355* This.Scale , 32* This.Scale , 12* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Click" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 14* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 374* This.Scale , 47 * This.Scale , 407* This.Scale , 47 * This.Scale ) , Gdip_DeletePen( Pen )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 31* This.Scale , 13* This.Scale , 14* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 30* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 355* This.Scale , 32* This.Scale , 12* This.Scale , 11* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 32* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "Click" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 14 * This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		if( This.MoveClickSend = 3 ){
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 51* This.Scale , 14* This.Scale , 15* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 50* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 356* This.Scale , 53* This.Scale , 9* This.Scale , 8* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Send" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 34* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
			Pen := Gdip_CreatePen( "0xFF56B659" , 1 ) , Gdip_DrawLine( G , Pen , 374* This.Scale , 67* This.Scale , 407* This.Scale , 67* This.Scale ) , Gdip_DeletePen( Pen )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 354* This.Scale , 51* This.Scale , 14* This.Scale , 15* This.Scale , "0xaa32363A" , "0xFF000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 353* This.Scale , 50* This.Scale , 15* This.Scale , 15* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF72767a" ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 356* This.Scale , 53* This.Scale , 9* This.Scale , 8* This.Scale , "0x0056B659" , "0x66000000" , 1 , 1 ) , Gdip_FillEllipse( G , Brush , 355* This.Scale , 52* This.Scale , 11* This.Scale , 11* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xaaF0F0F0" ) , Gdip_TextToGraphics( G , "Send" , "s" 12* This.Scale " vCenter Bold c" Brush " x" 373* This.Scale " y" 34* This.Scale  , "Segoe ui" , 90* This.Scale , 50* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Brush := Gdip_BrushCreateSolid( "0xFF22262a" ) , Gdip_FillRectangle( G , Brush , 350* This.Scale , 76* This.Scale , 238* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 350* This.Scale , 76* This.Scale , 238* This.Scale , 31* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 350* This.Scale , 76* This.Scale , 238* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xaaffffff" ) , Gdip_TextToGraphics( G , This.SendStuff , "s" 12* This.Scale " vCenter NoWrap c" Brush " x" 352* This.Scale " y" 77* This.Scale  , "Arial" , 234* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF32363A" ) , Gdip_FillRoundedRectangle( G , Brush , 422* This.Scale , 6* This.Scale , 100* This.Scale , 66* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 423* This.Scale , 6* This.Scale , 100* This.Scale , 66* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRoundedRectangle( G , Pen , 422* This.Scale , 6* This.Scale , 100* This.Scale , 66* This.Scale , 5* This.Scale ) , Gdip_DeletePen( Pen )
		Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Delay [ms]" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 423* This.Scale " y" 7* This.Scale  , "Segoe ui" , 100* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Delay [ms]" , "s" 14* This.Scale " Center vCenter Bold c" Brush " x" 422* This.Scale " y" 6* This.Scale  , "Segoe ui" , 100* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_BrushCreateSolid( "0xFF22262A" ) , Gdip_FillRectangle( G , Brush , 427* This.Scale , 35* This.Scale , 90* This.Scale , 30* This.Scale ) , Gdip_DeleteBrush( Brush )
		Brush := Gdip_CreateLineBrushFromRect( 436* This.Scale , 34* This.Scale , 72* This.Scale , 31* This.Scale , "0xFF56B659" , "0xFF000000" , 1 , 1 ) , Pen := Gdip_CreatePenFromBrush( Brush , 1 ) , Gdip_DeleteBrush( Brush ) , Gdip_DrawRectangle( G , Pen , 427* This.Scale , 35* This.Scale , 90* This.Scale , 30* This.Scale ) , Gdip_DeletePen( Pen )
		if( !This.ButtonPress_Copy ){
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 6* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 533* This.Scale , 7* This.Scale , 51* This.Scale , 33* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 8* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Copy" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 533* This.Scale " y" 9* This.Scale  , "Segoe ui" , 53* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 526* This.Scale , 6* This.Scale , 67* This.Scale , 30* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 6* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 533* This.Scale , 7* This.Scale , 51* This.Scale , 33* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 8* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Copy" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 533* This.Scale " y" 9* This.Scale  , "Segoe ui" , 53* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		if( !This.ButtonPress_Remove ){	
			Brush := Gdip_BrushCreateSolid( "0xFF1D1D1D" ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 41* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 532* This.Scale , 43* This.Scale , 52* This.Scale , 27* This.Scale , "0xFF72767a" , "0xFF32363a" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 43* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF56B659" ) , Gdip_TextToGraphics( G , "Remove" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 528* This.Scale " y" 44* This.Scale  , "Segoe ui" , 63* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}else{
			Brush := Gdip_CreateLineBrushFromRect( 526* This.Scale , 41* This.Scale , 67* This.Scale , 30* This.Scale , "0xFF006600" , "0xFF000000" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 526* This.Scale , 41* This.Scale , 67* This.Scale , 30* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_CreateLineBrushFromRect( 528* This.Scale , 43* This.Scale , 63* This.Scale , 26* This.Scale , "0xFF56B659" , "0xFFaaffaa" , 1 , 1 ) , Gdip_FillRoundedRectangle( G , Brush , 528* This.Scale , 43* This.Scale , 63* This.Scale , 26* This.Scale , 5* This.Scale ) , Gdip_DeleteBrush( Brush )
			Brush := Gdip_BrushCreateSolid( "0xFF000000" ) , Gdip_TextToGraphics( G , "Remove" , "s" 12* This.Scale " Center vCenter Bold c" Brush " x" 528* This.Scale " y" 44* This.Scale  , "Segoe ui" , 63* This.Scale , 26* This.Scale ) , Gdip_DeleteBrush( Brush )
		}
		Gdip_DeleteGraphics( G )
		hBitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
		Gdip_DisposeImage( pBitmap )
		SetImage( This.Controls.BackgroundPicture.Hwnd , hBitmap )
		DeleteObject( hBitmap )
	}

}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class WindowClass	{
	;Written By: Hellbent
	;Name: Controls [ class ]
	;Date: Sept 30th , 2022
	;Last Edit: Sept 30th , 2022
	;Purpose: Create amd manipulate gui controls through an object.
	;Resources:
	;:
	;:
	;:
	;:
	;:
	;*************************************
	;Method List:
	;	__New( param1 )
	;	_SetDefaults()
	;	_UpdateDefaults( param1 )
	;	_CreateWindow()
	;	SetFont( param1 )
	;	ShowWindow( param1 , param2 )
	;	HideWindow()
	;	DeleteWindow()
	;	DestroyWindow()
	;	Helper()
	;*************************************
	
	__New( obj := "" ){
		
		This._SetDefaults()
		
		This._UpdateDefaults( obj )
		
		This._CreateWindow()
		
		This.SetFont()
		
		This.SetWindowColor()
		
		if( This.Visible ){
			
			This.ShowWindow()
			
		}
		
	}
	
	_SetDefaults(){ 
		
		This.X := 10
		This.Y := 10
		This.W := 300
		This.H := 150
		This.Options := " +AlwaysOnTop "
		This.Hwnd := ""
		This.Color := "22262a"
		This.ControlColor := "22262a"
		This.FontColor := "ADADAD"
		This.FontType := "Segoe UI"
		This.FontSize := 12
		This.Visible := 1
		This.Scale := 1
		This.Parent := ""
		
	}
	
	_UpdateDefaults( obj := "" ){ ;<<<<<<<<<<-------|||  obj := { X: "10" , Y: "10" , W: "300" , H: "150" , Options: "+AlwaysOnTop" , Color: "F0F0F0" , ControlColor: "FFFFFF" , FontColor: "000000" , FontType: "Segoe UI" , FontSize: "10 " , Visible: 1 }
		
		local k , v 
		
		if( !IsObject( obj ) )
			
			return
		
		for k , v in obj	
			
			This[ k ] := obj[ k ]
		
	}
	
	_CreateWindow(){
		
		local hwnd
		
		Gui, New, % " +hwndhwnd " This.Options
		
		This.Hwnd := hwnd
		
	}
	
	SetWindowColor(){
		
		Gui, % This.Hwnd ":Color", % This.Color , % This.ControlColor
		
	}
	
	SetFont( obj := "" ){
		
		static keyList := [ "FontColor" , "FontOptions" , "FontType" , "FontSize" ] 
		
		if( IsObject( obj ) ){
			
			for k , v in keyList	{
				
				if( obj.HasKey( v ) )
					
					This[ v ] := obj[ v ]
					
			}
			
		}
		
		Gui, % This.Hwnd ":Font", % "s" This.FontSize * This.Scale " c" This.FontColor " " This.FontOptions , % This.FontType
		
	}
	
	ShowWindow( UsePositions := 1 , AutoSize := 0 ){
		static out := ""
		if( UsePositions ){
			
			if( AutoSize )
				
				Gui, % AutoSize
				
			else	
				if( This.Parent )
					Gui, % This.Hwnd ":Show", % "x" This.X * This.Scale " y" This.Y * This.Scale " w" This.W * This.Scale " h" This.H * This.Scale
				else	
					Gui, % This.Hwnd ":Show", % "x" This.X " y" This.Y " w" This.W * This.Scale " h" This.H * This.Scale
			
		}else{
			
			if( AutoSize )
				
				Gui, % This.Hwnd ":Show", AutoSize
				
			else 
				
				Gui, % This.Hwnd ":Show",
			
		}
		
	}
	
	HideWindow(){
		
		Gui, % This.Hwnd ":Hide",
		
	}
	
	DeleteWindow(){
		
		Gui, % This.Hwnd ":Destroy"
		
	}
	
	DestroyWindow(){
		
		This.DeleteWindow()
		
	}
	
	Helper(){
		
		static MethodList := [ "New" , "_UpdateDefaults" , "_SetDefaults" , "SetFont" , "ShowWindow" , "DeleteWindow" , "HideWindow" ]
		
		static out := "PRESS ""CRTL"" to EXIT `n`n***Method List***`n`n`tNew`n`t_UpdateDefaults      ` `n`t_SetDefaults `n`tSetFont `n`tShowWindow `n`tDeleteWindow `n`tHideWindow`n`n." 
		
		While( !GetKeyState( "ctrl" ) ){
			
			ToolTip, % out
			
			sleep, 300
			
		}
		
		ToolTip,
		
	}
	
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class ControlClass	{

	;***************************************************************************************************************
	;***************************************************************************************************************
	;Written By: Hellbent
	;Name: Controls [ class ]
	;Date: Sept 30th , 2022
	;Last Edit: Sept 30th , 2022
	;Purpose: Create amd manipulate gui controls through an object.
	;Resources:
	;:
	;:
	;:
	;:
	;:
	;*************************************
	;Method List:
	;	__New( param1 , param2 )
	;	_SetDefaults( param1 )
	;	_UpdateDefaults( param1 )
	;	_CreateControl()
	;	MoveControl( param1 )
	;	HideControl()
	;	ShowControl()
	;	BindControl( param1 )
	;	UnbindControl( param1 )
	;	DeleteControl( param1 )
	;*************************************
	;***************************************************************************************************************
	;***************************************************************************************************************
	static ControlHandles := []
	
	__New( parentHwnd , obj := "" ){
		
		This._SetDefaults( parentHwnd )
		
		This._UpdateDefaults( obj )
		This._CreateControl()
		Controls.ControlHandles[ This.Hwnd ] := This
		
	}
	
	_SetDefaults( parentHwnd ){
		
		This.X := 10
		This.Y := 10
		This.W := 10
		This.H := 10
		
		This.Options := ""
		
		This.Hwnd := ""
		
		This.Type := "Text"
		This.Parent := parentHwnd
		
		This.Value := ""
		
		This.Method := ""
		This.Scale := 1
		
	}
	
	_UpdateDefaults( obj := "" ){
		
		local k , v 
		
		if( !IsObject( obj ) )
			
			return
		
		for k , v in obj	
			
			This[ k ] := obj[ k ]
			
	}
	
	_CreateControl(){
		
		local hwnd
		
		Gui, % This.Parent ":Add", % This.Type , % "x" This.X * This.Scale " y" This.Y * This.Scale " w" This.W * This.Scale " h" This.H * This.Scale " hwndhwnd " This.Options , % This.Value
		
		This.Hwnd := hwnd
	
	}
	
	MoveControl( obj := "" ){
		
		static KeyList := [ "X" , "Y" , "W" , "H" ]
		
		if( IsObject( obj ) ){
			
			for k , v in KeyList	{
				
				if( obj.HasKey( v ) ){
					
					This[ v ] := obj[ v ]
				
				}
			
			}
			
		}
		
		GuiControl, % This.Parent ":MoveDraw", % This.Hwnd , % "x" This.X " y" This.Y " w" This.W " h" This.H
		
	}
	
	HideControl(){
		
		GuiControl, % This.Parent ":Hide" , % This.Hwnd
		
	}
	
	ShowControl(){
		
		GuiControl, % This.Parent ":Show" , % This.Hwnd
		
	}
	
	BindControl( Bind ){
		
		GuiControl, % This.Parent ":+G" , % This.Hwnd , % Bind
		
	}
	
	UnbindControl( Bind ){
		
		GuiControl, % This.Parent ":-G" , % This.Hwnd , % Bind
		
	}
	
	SetFocus(){
		GuiControl, % This.Parent ":Focus" , % This.Hwnd 
	}
	
	DeleteControl( hwnd ){
		
		Handles[ hwnd ].MoveControl( { X: -10 , Y: -10 , W: 0 , H: 0 } )
		Handles[ hwnd ].HideControl( { X: -10 , Y: -10 , W: 0 , H: 0 } )
		Handles.RemoveAt( hwnd )
		
	}
	
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

class ArrowHead	{
	;Written By: Hellbent
	;Date: Aug 24th 2022
	;Last Edit: Sept 24th, 2022
	;Purpose: Create a list of points to draw an arrow.  " x , y | x , y | etc... "
	__New( Start , End , HeadLength := 30 , ArmLength := 20 , ElbowLength := 10 , x_offset := 0 , y_offset := 0 ){
		if( This._DistanceBetweenVectors( Start , End ) < ( HeadLength + HeadLength * 2 ) ){
			temp := This._NewVector( End.X + 1 , End.Y + 1 )
			This._SubVector( temp , Start )
			This._SetVectorMag( temp ,  HeadLength + HeadLength * 2 )
			This._AddVector( temp , Start )
			End := This._NewVector( temp )
		}
		Master := This._NewVector( Start )
		This._SubVector( Master , End )
		Head := This._NewVector( Master )
		This._SetVectorMag( Head ,  HeadLength )
		This._AddVector( Head , End )
		RightArm := This._NewVector( Master , , 2 )
		This._SetVectorMag( RightArm ,  ArmLength )
		This._AddVector( RightArm , Head )
		LeftArm := This._NewVector( Master , , 1 )
		This._SetVectorMag( LeftArm ,  ArmLength )
		This._AddVector( LeftArm , Head )
		RightElbow := This._NewVector( Master , , 2 )
		This._SetVectorMag( RightElbow ,  ElbowLength )
		This._AddVector( RightElbow , Head )
		LeftElbow := This._NewVector( Master , , 1 )
		This._SetVectorMag( LeftElbow ,  ElbowLength )
		This._AddVector( LeftElbow , Head )
		output := ""
		for k , v in [ "Start" , "RightElbow" , "RightArm" , "End" , "LeftArm" , "LeftElbow" , "Start" ] {	
			
			a := %v%.X + x_offset
			b := %v%.Y + y_offset
			output .= a "," b "|"
		
		}
		return output
	}
	_CopyVector( vector ){
		return This._NewVector( vector.X , vector.Y )
	}
	_NewVector( x , y := "" , rotate := 0 ){
		if( IsObject( x ) ){
			if( rotate = 1 )
				return { X: x.Y * -1 , Y: x.X }
			else if( rotate = 2 )
				return { X: x.Y , Y: x.X * -1 }
			else
				return { X: x.X , Y: x.Y }
		}else
			return { X: x , Y: y }
	}
	_DistanceBetweenVectors( vector1 , vector2 ){
		return Sqrt( ( ( vector1.X - vector2.X ) **2 ) + ( ( vector1.Y - vector2.Y ) **2 ) )
	}
	_SubVector( vector1 , vector2 ){
		vector1.X -= vector2.X
		vector1.Y -= vector2.Y
	}
	_AddVector( vector1 , vector2 ){
		vector1.X += vector2.X
		vector1.Y += vector2.Y
	}
	_SetVectorMag( vector , mag ){
		local m := This._GetVectorMag( vector )
		vector.X := vector.X * mag / m
		vector.Y := vector.Y * mag / m
	}
	_GetVectorMag( vector ){
		return Sqrt( vector.X * vector.X + vector.Y * vector.Y )
	}
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;


class PopUpWindow	{
;PopUpWindow v2.2
;Date Written: Oct 28th, 2021
;Last Edit: Feb 7th, 2022 :Changed the trigger method.
;Written By: Hellbent aka CivReborn
;SpcThanks: teadrinker , malcev 
	static Index := 0 , Windows := [] , Handles := [] , EditHwnd , HelperHwnd
	__New( obj := "" ){
		This._SetDefaults()
		This.UpdateSettings( obj )
		This._CreateWindow()
		This._CreateWindowGraphics()
		if( This.AutoShow )
			This.ShowWindow( This.Title )
	}
	_SetDefaults(){
		This.X := 10
		This.Y := 10
		This.W := 10
		This.H := 10
		This.Smoothing := 2
		This.Options := " -DPIScale +AlwaysOnTop "
		This.AutoShow := 0
		This.GdipStartUp := 0
		This.Title := ""
		
		This.Controls := []
		This.Handles := []
		This.Index := 0 
	}
	AddTrigger( obj ){
		local k , v , cc , bd
		
		This.Controls[ ++This.Index ] := { 	X:		10
										,	Y:		10
										,	W:		10
										,	H:		10	}
		for k, v in obj
			This.Controls[ This.Index ][ k ] := obj[ k ] 
		cc := This.Controls[ This.Index ]
		Gui, % This.Hwnd ":Add", Text, % "x" cc.X " y" cc.Y " w" cc.W " h" cc.H " hwndhwnd"
		This.Handles[ hwnd ] := This.Index
		This.Controls[ This.Index ].Hwnd := hwnd
		
		if( IsObject( cc.Label ) ){
			bd := cc.Label
			GuiControl, % This.Hwnd ":+G" , % hwnd , % bd
		}else{
			bd := This._TriggerCall.Bind( This )
			GuiControl, % This.Hwnd ":+G" , % hwnd , % bd
		}
		return hwnd
		
	}
	_TriggerCall(){
		MouseGetPos,,,, ctrl, 2
		Try
			;~ SetTimer, % This.Controls[ This.Handles[ ctrl ] ].Label, -0
			gosub, % This.Controls[ This.Handles[ ctrl ] ].Label
		
				
	}
	DrawTriggers( color := "0xFFFF0000" , AutoUpdate := 0 ){
		local brush , cc 
		Brush := Gdip_BrushCreateSolid( color ) 
		Gdip_SetSmoothingMode( This.G , 3 )
		loop, % This.Controls.Length()	{
			cc := This.Controls[ A_Index ]
			Gdip_FillRectangle( This.G , Brush , cc.x , cc.y , cc.w , cc.h )
		
		}
		Gdip_DeleteBrush( Brush )
		Gdip_SetSmoothingMode( This.G , This.Smoothing )
		if( AutoUpdate )
			This.UpdateWindow()
	}
	UpdateSettings( obj := "" , UpdateGraphics := 0 ){
		local k , v
		if( IsObject( obj ) )
			for k, v in obj
				This[ k ] := obj[ k ]
		( This.X = "Center" ) ? ( This.X := ( A_ScreenWidth - This.W ) / 2 ) 	
		( This.Y = "Center" ) ? ( This.Y := ( A_ScreenHeight - This.H ) / 2 ) 	
		if( UpdateGraphics ){
			This._DestroyWindowsGraphics()
			This._CreateWindowGraphics()
		}
	}
	_CreateWindow(){
		local hwnd
		Gui , New, % " +LastFound +E0x80000 hwndhwnd -Caption  " This.Options
		PopUpWindow.Index++
		This.Index := PopUpWindow.Index
		PopUpWindow.Windows[ PopUpWindow.Index ] := This
		This.Hwnd := hwnd
		PopUpWindow.Handles[ hwnd ] := PopUpWindow.Index
		if( This.GdipStartUp && !PopUpWindow.pToken )
			PopUpWindow.pToken := GDIP_STARTUP()
	}
	_DestroyWindowsGraphics(){
		Gdip_DeleteGraphics( This.G )
		SelectObject( This.hdc , This.obm )
		DeleteObject( This.hbm )
		DeleteDC( This.hdc )
	}
	_CreateWindowGraphics(){
		This.hbm := CreateDIBSection( This.W , This.H )
		This.hdc := CreateCompatibleDC()
		This.obm := SelectObject( This.hdc , This.hbm )
		This.G := Gdip_GraphicsFromHDC( This.hdc )
		Gdip_SetSmoothingMode( This.G , This.Smoothing )
	}
	ShowWindow( Title := "" ){
		Gui , % This.Hwnd ":Show", % "x" This.X " y" This.Y " w" This.W " h" This.H " NA", % Title
	}
	HideWindow(){
		Gui , % This.Hwnd ":Hide",
	}
	UpdateWindow( alpha := 255 ){
		UpdateLayeredWindow( This.hwnd , This.hdc , This.X , This.Y , This.W , This.H , alpha )
	}
	ClearWindow( AutoUpdate := 0 ){
		Gdip_GraphicsClear( This.G )
		if( Autoupdate )
			This.UpdateWindow()
	}
	DrawBitmap( pBitmap , obj , dispose := 1 , AutoUpdate := 0 ){
		Gdip_DrawImage( This.G , pBitmap , obj.X , obj.Y , obj.W , obj.H )
		if( dispose )
			Gdip_DisposeImage( pBitmap )
		if( Autoupdate )
			This.UpdateWindow()
	}
	PaintBackground( color := "0xFF000000" , AutoUpdate := 0 ){
		if( isObject( color ) ){
			Brush := Gdip_BrushCreateSolid( ( color.HasKey( "Color" ) ) ? ( color.Color ) : ( "0xFF000000" ) ) 
			if( color.Haskey( "Round" ) )
				Gdip_FillRoundedRectangle( This.G , Brush , color.X , color.Y , color.W , color.H , color.Round )
			else
				Gdip_FillRectangle( This.G , Brush , color.X , color.Y , color.W , color.H ) 
		}else{
			Brush := Gdip_BrushCreateSolid( color ) 
			Gdip_FillRectangle( This.G , Brush , -1 , -1 , This.W + 2 , This.H + 2 ) 
		}
		Gdip_DeleteBrush( Brush )
		if( AutoUpdate )
			This.UpdateWindow()
	}
	DeleteWindow( GDIPShutdown := 0 ){
		Gui, % This.Hwnd ":Destroy"
		SelectObject( This.hdc , This.obm )
		DeleteObject( This.hbm )
		DeleteDC( This.hdc )
		Gdip_DeleteGraphics( This.G )
		hwnd := This.Hwnd
		for k, v in PopUpWindow.Windows[ Hwnd ]
			This[k] := ""
		PopUpWindow.Windows[ Hwnd ] := ""
		if( GDIPShutdown ){
			Gdip_Shutdown( PopUpWindow.pToken )
			PopUpWindow.pToken := ""
		}
	}
	_OnClose( wParam ){
		if( wParam = 0xF060 ){	;SC_CLOSE ;[ clicking on the gui close button ]
			Try{
				Gui, % PopUpWindow.HelperHwnd ":Destroy"
				SoundBeep, 555
			}
		}
	}
	CreateCachedBitmap( pBitmap , Dispose := 0 ){
		local pCachedBitmap
		if( This.CachedBitmap )
			This.DisposeCachedbitmap()
		DllCall( "gdiplus\GdipCreateCachedBitmap" , "Ptr" , pBitmap , "Ptr" , this.G , "PtrP" , pCachedBitmap )
		This.CachedBitmap := pCachedBitmap
		if( Dispose )
			Gdip_DisposeImage( pBitmap )
	}
	DrawCachedBitmap( AutoUpdate := 0 ){
		DllCall( "gdiplus\GdipDrawCachedBitmap" , "Ptr" , this.G , "Ptr" , This.CachedBitmap , "Int" , 0 , "Int" , 0 )
		if( AutoUpdate )
			This.UpdateWindow()
	}
	DisposeCachedbitmap(){
		DllCall( "gdiplus\GdipDeleteCachedBitmap" , "Ptr" , This.CachedBitmap )
	}
	Helper(){
		local hwnd , MethodList := ["__New","UpdateSettings","ShowWindow","HideWindow","UpdateWindow","ClearWindow","DrawBitmap","PaintBackground","DeleteWindow" , "AddTrigger" , "DrawTriggers", "CreateCachedBitmap" , "DrawCachedBitmap" , "DisposeCachedbitmap" ]
		Gui, New, +AlwaysOnTop +ToolWindow +HwndHwnd
		PopUpWindow.HelperHwnd := hwnd
		Gui, Add, Edit, xm ym w250 r1 Center hwndhwnd, Gui1
		PopUpWindow.EditHwnd := hwnd
		loop, % MethodList.Length()	
			Gui, Add, Button, xm y+1 w250 r1 gPopUpWindow._HelperClip, % MethodList[ A_Index ]
		Gui, Show,,
		OnMessage( 0x112 , This._OnClose.Bind( hwnd ) )
	}
	_HelperClip(){
		local ClipList 
		
		GuiControlGet, out, % PopUpWindow.HelperHwnd ":", % PopUpWindow.EditHwnd	
		
		ClipList := 		{ 	__New: 					" := New PopUpWindow( { AutoShow: 1 , X: 0 , Y: 0 , W: A_ScreenWidth , H: A_ScreenHeight , Options: "" -DPIScale +AlwaysOnTop "" } )"
							,	UpdateSettings:			".UpdateSettings( { X: """" , Y: """" , W: """" , H: """" } , UpdateGraphics := 0 )"
							,	ShowWindow:				".ShowWindow( Title := """" )"
							,	HideWindow:				".HideWindow()"
							,	UpdateWindow:			".UpdateWindow()"
							,	ClearWindow:			".ClearWindow( AutoUpdate := 0 )"
							,	DrawBitmap:				".DrawBitmap( pBitmap := """" , { X: 0 , Y: 0 , W: " Out ".W , H: " Out ".H } , dispose := 1 , AutoUpdate := 0 )"
							,	PaintBackground:		".PaintBackground( color := ""0xFF000000"" , AutoUpdate := 0 )  "  ";{ Color: ""0xFF000000"" , X: 2 , Y: 2 , W: " Out ".W - 4 , H: " Out ".H - 4 , Round: 10 }"
							,	DeleteWindow:			".DeleteWindow( GDIPShutdown := 0 )"
							,	AddTrigger:				".AddTrigger( { X: """" , Y: """" , W: """" , H: """" , Value: """" , Label: """" } )"	
							,	DrawTriggers:			".DrawTriggers( color := ""0xFFFF0000"" , AutoUpdate := 0 )"	
							,	CreateCachedBitmap:		".CreateCachedBitmap( pBitmap , Dispose := 0 )"	
							,	DrawCachedBitmap: 		".DrawCachedBitmap( AutoUpdate := 0 )"	
							,	DisposeCachedbitmap:	".DisposeCachedbitmap()"	}
							
		clipboard := Out ClipList[ A_GuiControl ]
		
	}
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;

FillPolygon( G , Points := "50 , 50 | 100 , 100 | 150 , 50 | 50 , 50 " , Color := "0xFFFF0000" ){
	Brush := Gdip_BrushCreateSolid( Color ) , Gdip_FillPolygon( G , Brush , Points ) , Gdip_DeleteBrush( Brush )
}

DrawPolygon( G , Points := "50 , 50 | 100 , 100 | 150 , 50 | 50 , 50 " , Color := "0xFF000000" , Thickness := 3 ){
	Pen := Gdip_CreatePen( Color , Thickness ) , Gdip_DrawLines( G , Pen , Points ) , Gdip_DeletePen( Pen )
}

;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
;| ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) | ((((()))))***^|^***((((())))) |;
Perhaps you or someone else can work out how to add a button to save and read your panels.

Galakrond
Posts: 26
Joined: 18 Dec 2022, 12:23

Re: Click Speed/delay/sleep

Post by Galakrond » 17 Jan 2023, 05:53

Thank you so much, i’ll try this.

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 17 Jan 2023, 14:44

Galakrond wrote:
17 Jan 2023, 05:53
Thank you so much, i’ll try this.
You should probably do it this way rather than typing a panel number.

Code: Select all


;change
Main._AddNewPanelButtonPress()	
Main.Panels[ 1 ].Activate := 0
;...
;..
;.

;to 

Main._AddNewPanelButtonPress()	
Main.Panels[ Main.Panels.Length() ].Activate := 0
;...
;..
;.
You can also put that into a hotkey routine and switch between setups ( run a setup, delete the panels and run the next setup ).

Example:

Code: Select all

F1::
	;panel 1
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	;panel 2
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	return
	
F2::
	;panel 1
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	;panel 2
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	return	

Galakrond
Posts: 26
Joined: 18 Dec 2022, 12:23

Re: Click Speed/delay/sleep

Post by Galakrond » 17 Jan 2023, 15:22

Hellbent wrote:
17 Jan 2023, 14:44
Galakrond wrote:
17 Jan 2023, 05:53
Thank you so much, i’ll try this.
You should probably do it this way rather than typing a panel number.

Code: Select all


;change
Main._AddNewPanelButtonPress()	
Main.Panels[ 1 ].Activate := 0
;...
;..
;.

;to 

Main._AddNewPanelButtonPress()	
Main.Panels[ Main.Panels.Length() ].Activate := 0
;...
;..
;.
You can also put that into a hotkey routine and switch between setups ( run a setup, delete the panels and run the next setup ).

Example:

Code: Select all

F1::
	;panel 1
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	;panel 2
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	return
	
F2::
	;panel 1
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	;panel 2
	Main._AddNewPanelButtonPress()	
	Main.Panels[ Main.Panels.Length() ].Activate := 0
	;...
	;..
	;.
	return	
I tried it. Yes its working good. But without saving option, its beign pointless my friend. Because ppl may want to use it with 10-15 panels for everyime they opened your program. The setting all part is beign very difficult without save.

Actually, your work is looking great. One little more thing can make it awesome. Profile's not needed, program must work everytime i set it like before. Its enough i think.

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 17 Jan 2023, 16:02

Galakrond wrote:
17 Jan 2023, 15:22

I tried it. Yes its working good. But without saving option, its beign pointless my friend. Because ppl may want to use it with 10-15 panels for everyime they opened your program. The setting all part is beign very difficult without save.

Actually, your work is looking great. One little more thing can make it awesome. Profile's not needed, program must work everytime i set it like before. Its enough i think.
It isn't hard to write the code for it.

1. Add a default button to the bottom right corner of the window ( lots of space available ).
2. Have that button call up a routine to loop through the panels and save the data to a ini file.
3. When the scripts first runs, have it read the saved data and create the new panels like I showed before.

Tackle that list one step at a time and you should be able to write something simple to save your data.

So step one, how do you add a default gui button to a gui?

hint:

Code: Select all


Main.Setup( 1 , 3 )      ;Change the scaling and the number of panels to display on the window 
;~ Main.Setup( .7 , 5 ) ;Example of smaller window.

Gui, % Main.MainWindow.Hwnd ":Add", Button, ;x y w h g , Save Data

Galakrond
Posts: 26
Joined: 18 Dec 2022, 12:23

Re: Click Speed/delay/sleep

Post by Galakrond » 17 Jan 2023, 16:20

@Hellbent I will try it and inform you again my friend. If i can make it, i will post it here for everyone

Galakrond
Posts: 26
Joined: 18 Dec 2022, 12:23

Re: Click Speed/delay/sleep

Post by Galakrond » 19 Jan 2023, 01:45

@Hellbent Nope, i cannot do it. Wish i can but i tried my luck. Community need your help about it my friend 😁

Teo
Posts: 1
Joined: 18 Mar 2023, 07:37

Re: Click Speed/delay/sleep

Post by Teo » 18 Mar 2023, 07:46

How can I change the search area,
for example, I want the script to search a specific area(Coordinates{x1,y1,x2,y2}) and when it finds the selected color within this area, then it does whatever I chose (move, click, or send).
I tried to find this section in the code but I couldn't.
so, figured out that asking would be much faster.
Thanks in advance.

User avatar
Hellbent
Posts: 2109
Joined: 23 Sep 2017, 13:34

Re: Click Speed/delay/sleep

Post by Hellbent » 22 Mar 2023, 19:09

Teo wrote:
18 Mar 2023, 07:46
How can I change the search area,
for example, I want the script to search a specific area(Coordinates{x1,y1,x2,y2}) and when it finds the selected color within this area, then it does whatever I chose (move, click, or send).
I tried to find this section in the code but I couldn't.
so, figured out that asking would be much faster.
Thanks in advance.
This one uses fixed positions. If you want to search an area you can check out this one here:
viewtopic.php?f=6&t=60949#p257665
You can find an updated version of it here:
viewtopic.php?f=6&t=60949#p298276

S1lver
Posts: 23
Joined: 07 Nov 2020, 04:14

Re: Click Speed/delay/sleep

Post by S1lver » 06 Dec 2023, 11:52

Hellbent wrote:
01 Oct 2022, 12:01
I am a big fan of this work. and been trying to upgrade the the first pixel predator version you made, into having multiple searches so I could share. but I couldn't figure it out. Now I see you upgraded it and made it for multiple searches at once. that is amazing. thank you. How is it possible to get back the search area in stead of search coordinate into this new version? and also could I add a save function to it?
all the best.

[Mod edit: Fixed quote, I guess. The text above was buried in a huge quote.]

Post Reply

Return to “Gaming Help (v1)”