SHARE
TWEET

cbm test

a guest Aug 1st, 2019 90 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #SingleInstance,Force
  2. ;~ #SingleInstance,Off
  3. #NoEnv
  4. ListLines,Off
  5. SetBatchLines,-1
  6. CoordMode,Mouse,Screen
  7. Gdip_Startup()
  8.  
  9.  
  10. IfNotExist,%A_ScriptDir%\Clipboard Master Save Folder
  11. {
  12.     FileCreateDir,%A_ScriptDir%\Clipboard Master Save Folder
  13. }
  14. SetWorkingDir,%A_ScriptDir%\Clipboard Master Save Folder
  15. global ClipArray:=[]
  16. Loop,30 {
  17.     IfExist,%A_WorkingDir%\Saved Clip %A_Index%.txt
  18.     {
  19.         temp:=""
  20.         FileRead,Temp,%A_WorkingDir%\Saved Clip %A_Index%.txt
  21.         ClipArray[A_Index]:=temp
  22.         temp:=""
  23.     }
  24. }
  25. ;~ ToolTip,% clipArray[1]
  26.  
  27. global HB_Button:=[],ToggleTips,ToggleHotkeyLock,HotkeyLocks:=[],Indicators:=[],Tab,PreviewWindow:={},WinFade,PreviewEditHwnd
  28. global EnableSettingsTips:={},EnableSounds:={},EnableClipView:={}
  29. global Save_Hotkeys_Locks:=[]
  30. global ClipViewTime:=2
  31. ;******************************************************************
  32. global SaveHK1,SaveHK2,SaveHK3,SaveHK4,SaveHK5,SaveHK6,SaveHK7,SaveHK8,SaveHK9,SaveHK10
  33. ;******************************************************************
  34. global Classic:=0, ColorSet:=[]
  35.  
  36. ;~ colorSet:=["00FF66","ff0000","00aaaa","ffff00","aa00aa"]
  37. ;~ colorSet:=["aaaaaa","aaaaaa","aaaaaa","aaaaaa"]
  38. ;~ colorSet:=["ffffff","ffffff","ffffff","ffffff"]
  39. ;~ colorSet:=["aaaa00","aaaa00","aaaa00","aaaa00","aaaa00"]
  40. ;~ colorSet:=["0066CC","0066CC","0066CC","0066CC"]
  41. ;~ colorSet:=["0077aa","0077aa","0077aa","0077aa","0077aa"]
  42. ;~ colorSet:=["aa2222","aa2222","aa2222","aa2222","772222"]
  43. ;~ colorSet:=["0088cc","0088cc","0088cc","0088cc","0088cc"]    ;E3A409 ;E61C74 ;E33939 ;FFD80C
  44. colorSet:=["22aa22","22aa22","22aa22","22aa22","2A6C2C"]
  45. ;~ Loop,5
  46.     ;~ colorSet[A_Index]:="FFD80C"
  47.    
  48.    
  49.    
  50. ;~ global Main := New Custom_Window( x:= 0 , y:= 0 , w:= 740 , h:= 320 , Name:= "1" , Options:= "+AlwaysOnTop -Caption -DPIScale +Toolwindow" , Title:= "HB Clipboard Master v2" , Background_Bitmap:= Main_Window() )
  51. global Main := New Custom_Window( x:= 0 , y:= 0 , w:= 740 , h:= 323 , Name:= "1" , Options:= "+AlwaysOnTop -Caption -DPIScale +Toolwindow" , Title:= "HB Clipboard Master v2" , Background_Bitmap:= Main_Window() )
  52.  
  53. Gui,1:Add,Text,x5 y5 w150 h40 BackgroundTrans hwndMoveWindowHwnd gMove_Window
  54.  
  55. ;Main Window Controls
  56. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  57. ToggleTips:=New Flat_Round_Switch_Type_1(x:=170,y:=20,w:=100,Text:="Enable Tips",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="38393C",State:=0,Label:="ToggleTips",Type:="ToggleTips")
  58.  
  59. ToggleHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10,y,w:=105,Text:="      Toggle Hotkey Locks",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="38393C",State:=1,Label:="ToggleHotkeysLocks",Type:="ToggleHotkeysLocks")
  60.  
  61.  
  62. Tab:=New Dark_3_Tabs_1(x:=415, y:=15, window:="1", label:="Change_Tabs", Selected_Tab:=1, Background_Color:="333437",Font_Color:=colorSet[1])
  63.  
  64. ;++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  65.  
  66. ;Tab Panels
  67. ;((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  68. Panel1:=New NumClass(x:=26,y:=66,window:="1",Font_Color:=(Classic)?("16508B"):(colorSet[1]))
  69. Panel1.Draw_1()
  70. Panel2:=New NumClass(x:=386,y:=66,window:="1",Font_Color:=(Classic)?("16508B"):(colorSet[1]))
  71. Panel2.Draw_2()
  72. ;((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((((
  73.  
  74.  
  75. ;Tab Indicators 1
  76. ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  77. Indicators.Push(New Indicator(x:=61,y:=69,Window:="1",Tab1_Value:=(ClipArray[1])?(1):(0),Tab2_Value:=(ClipArray[11])?(1):(0),Tab3_Value:=(ClipArray[21])?(1):(0),Indicator_Color:=colorSet[1]))
  78. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[2])?(1):(0),Tab2_Value:=(ClipArray[12])?(1):(0),Tab3_Value:=(ClipArray[22])?(1):(0),Indicator_Color:=colorSet[1]))
  79. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[3])?(1):(0),Tab2_Value:=(ClipArray[13])?(1):(0),Tab3_Value:=(ClipArray[23])?(1):(0),Indicator_Color:=colorSet[1]))
  80. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[4])?(1):(0),Tab2_Value:=(ClipArray[14])?(1):(0),Tab3_Value:=(ClipArray[24])?(1):(0),Indicator_Color:=colorSet[1]))
  81. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[5])?(1):(0),Tab2_Value:=(ClipArray[15])?(1):(0),Tab3_Value:=(ClipArray[25])?(1):(0),Indicator_Color:=colorSet[1]))
  82.  
  83.  
  84. ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  85.  
  86.  
  87.  
  88. ;Tab Buttons 1
  89. ;--------------------------------------------------------------------------------------------------------------------------------------------------------
  90. ;--------------------------------------------------------------------------------------------------------------------------------------------------------
  91.  
  92. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=100, y:=69, w:=30, h:=30, window:="1", Label:="AddNewClip", Text:="+", Font:="Arial", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset:=1, Type:="Add" ))
  93. Loop 4
  94.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=100, y+=h+11, w:=30, h:=30, window:="1", Label:="AddNewClip", Text:="+", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[1], Font_Color_Bottom, Background_Color:="333437", y_Offset:=1, Type:="Add" ))
  95.  
  96. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=145, y:=69, w:=30, h:=30, window:="1", Label:="RemoveClip", Text:="_", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[2], Font_Color_Bottom, Background_Color:="333437", y_Offset:=-3, Type:="Remove" ))
  97. Loop 4
  98.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h+11, w:=30, h:=30, window:="1", Label:="RemoveClip", Text:="_", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[2], Font_Color_Bottom, Background_Color:="333437", y_Offset:=-3, Type:="Remove" ))
  99.  
  100.  
  101. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=190, y:=69, w:=50, h:=30, window:="1", Label:="ViewIt", Text:="View", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[3], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="View" ))
  102. Loop 4
  103.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h+11, w:=50, h:=30, window:="1", Label:="ViewIt", Text:="View", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[3], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="View" ))
  104.  
  105.  
  106. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=255, y:=69, w:=50, h:=30, window:="1", Label:="ClipIt", Text:="Clip", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[4], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="Clip" ))
  107. Loop 4
  108.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h+11, w:=50, h:=30, window:="1", Label:="ClipIt", Text:="Clip", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[4], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="Clip" ))
  109.  
  110.  
  111.  
  112. ;--------------------------------------------------------------------------------------------------------------------------------------------------------
  113. ;Tab Switches 1
  114. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  115.  
  116. HotkeyLocks.Push(New Flat_Round_Switch_Type_1(x:=320,y:=75,w:=30,Text:="Text",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="36373A",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  117. Loop 4
  118.     HotkeyLocks.Push(New Flat_Round_Switch_Type_1(x:=320,y+=h+11,w:=30,Text:="Text",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="36373A",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  119.  
  120.  
  121. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  122.  
  123.  
  124. ;Tab Indicators 2
  125. ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  126. Indicators.Push(New Indicator(x:=421,y:=69,Window:="1",Tab1_Value:=(ClipArray[6])?(1):(0),Tab2_Value:=(ClipArray[16])?(1):(0),Tab3_Value:=(ClipArray[26])?(1):(0),Indicator_Color:=colorSet[1]))
  127. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[7])?(1):(0),Tab2_Value:=(ClipArray[17])?(1):(0),Tab3_Value:=(ClipArray[27])?(1):(0),Indicator_Color:=colorSet[1]))
  128. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[8])?(1):(0),Tab2_Value:=(ClipArray[18])?(1):(0),Tab3_Value:=(ClipArray[28])?(1):(0),Indicator_Color:=colorSet[1]))
  129. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[9])?(1):(0),Tab2_Value:=(ClipArray[19])?(1):(0),Tab3_Value:=(ClipArray[29])?(1):(0),Indicator_Color:=colorSet[1]))
  130. Indicators.Push(New Indicator(x,y+=41,Window:="1",Tab1_Value:=(ClipArray[10])?(1):(0),Tab2_Value:=(ClipArray[20])?(1):(0),Tab3_Value:=(ClipArray[30])?(1):(0),Indicator_Color:=colorSet[1]))
  131.  
  132. ;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  133.  
  134. ;Tab Buttons 2
  135. ;--------------------------------------------------------------------------------------------------------------------------------------------------------
  136. ;--------------------------------------------------------------------------------------------------------------------------------------------------------
  137. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=460, y:=69, w:=30, h:=30, window:="1", Label:="AddNewClip", Text:="+", Font:="Arial", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset:=1, Type:="Add" ))
  138. Loop 4
  139.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=460, y+=h+11, w:=30, h:=30, window:="1", Label:="AddNewClip", Text:="+", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[1], Font_Color_Bottom, Background_Color:="333437", y_Offset:=1, Type:="Add" ))
  140.  
  141. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=505, y:=69, w:=30, h:=30, window:="1", Label:="RemoveClip", Text:="_", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[2], Font_Color_Bottom, Background_Color:="333437", y_Offset:=-3, Type:="Remove" ))
  142. Loop 4
  143.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h+11, w:=30, h:=30, window:="1", Label:="RemoveClip", Text:="_", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[2], Font_Color_Bottom, Background_Color:="333437", y_Offset:=-3, Type:="Remove" ))
  144.  
  145.  
  146. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=550, y:=69, w:=50, h:=30, window:="1", Label:="ViewIt", Text:="View", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[3], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="View" ))
  147. Loop 4
  148.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h+11, w:=50, h:=30, window:="1", Label:="ViewIt", Text:="View", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[3], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="View" ))
  149.  
  150.  
  151. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=615, y:=69, w:=50, h:=30, window:="1", Label:="ClipIt", Text:="Clip", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[4], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="Clip" ))
  152. Loop 4
  153.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h+11, w:=50, h:=30, window:="1", Label:="ClipIt", Text:="Clip", Font:="Arial", Font_Size, Font_Color_Top:=colorSet[4], Font_Color_Bottom, Background_Color:="333437", y_Offset:=0, Type:="Clip" ))
  154.  
  155. ;--------------------------------------------------------------------------------------------------------------------------------------------------------
  156. ;Tab Switches 2
  157. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  158. HotkeyLocks.Push(New Flat_Round_Switch_Type_1(x:=680,y:=75,w:=30,Text:="Text",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="36373A",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  159. Loop 4
  160.     HotkeyLocks.Push(New Flat_Round_Switch_Type_1(x,y+=h+11,w:=30,Text:="Text",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="36373A",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  161.  
  162.  
  163.  
  164. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  165.  
  166. ;----------------  ;Create_Settings_Gui
  167. ;Open Folder button
  168. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=23, y:=284, w:=108, h:=29, window:="1", Label:="Create_Settings_Window", Text:="Hotkeys & Settings", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset:=-2,Type:="Open Folder"))
  169. ;Delete Button
  170. HB_Button.Push(New Clipboard_Master_v2_Buttons(x+=w+0, y, w, h, window:="1", Label:="", Text:="Reserved", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  171.  
  172. ;----------------
  173. ;Open Folder button
  174. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=263, y:=284, w:=108, h:=29, window:="1", Label:="OpenSavedClipsFolder", Text:="Open Folder", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Open Folder"))
  175. ;Delete Button
  176. HB_Button.Push(New Clipboard_Master_v2_Buttons(x+=w+0, y, w, h, window:="1", Label:="DeleteClips", Text:="Delete Clips", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  177.  
  178. ;----------------
  179. ;Open Folder button
  180. HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=503, y:=284, w:=108, h:=29, window:="1", Label:="", Text:="Clip Master 1", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Open Folder"))
  181. ;Delete Button
  182. HB_Button.Push(New Clipboard_Master_v2_Buttons(x+=w+0, y, w, h, window:="1", Label:="", Text:="Clip Master 2", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  183.  
  184.  
  185. Gui,1:Color,333437,333437
  186. Gui,1:Font,cWhite s10, Segoe ui
  187. ;~ Gui,1:Add,Edit,x30 y330 w680 h60 Center -VScroll -Wrap -E0x200 ReadOnly vTipsEdit,Line 1`nThis is line 2`nThis is on the 3rd line down`nthis is on line 4 and should be the last line of text
  188. Gui,1:Add,Text,x30 y330 w680 h60 Center vTipsEdit,Line 1`nThis is line 2`nThis is on the 3rd line down`nthis is on line 4 and should be the last line of text
  189.  
  190. ;~ 740 , h:= 400
  191.  
  192. Main.Show_Window()
  193. ;~ Gui,1:Show,w740 h323
  194. ;~ Gui,1:Show,x1400  ;<----------------------Testing purposes
  195. GuiControl,1:Focus,% HB_Button[1].Hwnd
  196. Create_Preview()
  197. Create_Settings_Window()  ; pre-Create Settings window
  198. SetTimer,Tips,500
  199. SetTimer,Tips,Off
  200. SetTimer,HB_Button_Hover,50
  201. return
  202. GuiClose:
  203. *Esc::
  204.     ExitApp
  205.  
  206. *Numpad2::
  207.     Gui,1:Hide
  208.     return
  209.  
  210.  
  211.  
  212. Move_Window(){
  213.     SetTimer,HB_Button_Hover,Off
  214.     PostMessage,0xA1,2
  215.     While(GetKeyState("LButton"))
  216.         sleep 20
  217.     SetTimer,HB_Button_Hover,On
  218. }
  219.  
  220.  
  221. GuiContextMenu:
  222.     if(TogWinTab:=!TogWinTab){
  223.         Gui,1:Show,w160 h50 NA
  224.         SetTimer,Tips,Off
  225.         SetTimer,HB_Button_Hover,Off
  226.     }else   {
  227.         if(ToggleTips.State){
  228.             Gui,1:Show,w740 h400 NA
  229.             SetTimer,Tips,On
  230.             SetTimer,HB_Button_Hover,On
  231.         }else   {
  232.             Gui,1:Show,w740 h323 NA
  233.             SetTimer,HB_Button_Hover,On
  234.         }
  235.     }
  236.     return
  237. ;w28 h198
  238. ToggleTips:
  239.     if(ToggleTips.State){
  240.         SetTimer,Tips,On
  241.         ;~ GuiControl,1:,TipsEdit,Toggle this switch to turn On or Off Tips
  242.         Gui,1:Show,w740 h400
  243.     }else   {
  244.         SetTimer,Tips,Off
  245.         ;~ sleep, 20
  246.         ;~ GuiControl,1:,TipsEdit,Tips are currently turned off
  247.         Gui,1:Show,w740 h323
  248.     }
  249.     return
  250. ToggleHotkeysLocks:
  251.     if(GetKeyState("Shift")){
  252.         if(ToggleHotkeyLock.State){
  253.             Loop,10 {
  254.                 HotkeyLocks[A_Index].State:=0
  255.                 HotkeyLocks[A_Index].Switch_State()
  256.                 (Tab.Tab=1)?(HotkeyLocks[A_Index].Tab1_Value := HotkeyLocks[A_Index].State):(Tab.Tab=2)?(HotkeyLocks[A_Index].Tab2_Value := HotkeyLocks[A_Index].State):(Tab.Tab=3)?(HotkeyLocks[A_Index].Tab3_Value := HotkeyLocks[A_Index].State)
  257.             }
  258.         }else   {
  259.             Loop,10 {
  260.                 HotkeyLocks[A_Index].State:=1
  261.                 HotkeyLocks[A_Index].Switch_State()
  262.                 (Tab.Tab=1)?(HotkeyLocks[A_Index].Tab1_Value := HotkeyLocks[A_Index].State):(Tab.Tab=2)?(HotkeyLocks[A_Index].Tab2_Value := HotkeyLocks[A_Index].State):(Tab.Tab=3)?(HotkeyLocks[A_Index].Tab3_Value := HotkeyLocks[A_Index].State)
  263.             }
  264.         }
  265.     }
  266.     return
  267. DeleteClips:
  268.     if(GetKeyState("Ctrl")&&GetKeyState("Shift")){
  269.         if(Tab.Tab=1){
  270.             Loop,10 {
  271.                 if(ClipArray[A_Index]&&!HotkeyLocks[A_Index].Tab1_Value){
  272.                     FileDelete,% A_WorkingDir "\Saved Clip " A_Index ".txt"
  273.                     Indicators[A_Index].Tab1_Value:=0
  274.                     Indicators[A_Index].Draw_Off()
  275.                 }
  276.             }
  277.             SoundBeep,500
  278.             return
  279.         }else if(Tab.Tab=2){
  280.             Loop,10 {
  281.                 if(ClipArray[A_Index+10]&&!HotkeyLocks[A_Index].Tab2_Value){
  282.                     FileDelete,% A_WorkingDir "\Saved Clip " A_Index+10 ".txt"
  283.                     Indicators[A_Index].Tab2_Value:=0
  284.                     Indicators[A_Index].Draw_Off()
  285.                 }
  286.             }
  287.             SoundBeep,500
  288.             return
  289.         }else if(Tab.Tab=3){
  290.             Loop,10 {
  291.                 if(ClipArray[A_Index+20]&&!HotkeyLocks[A_Index].Tab3_Value){
  292.                     FileDelete,% A_WorkingDir "\Saved Clip " A_Index+20 ".txt"
  293.                     Indicators[A_Index].Tab3_Value:=0
  294.                     Indicators[A_Index].Draw_Off()
  295.                 }
  296.             }
  297.             SoundBeep,500
  298.             return
  299.         }
  300.     }else   {
  301.         Loop, 3
  302.             SoundBeep,777
  303.     }
  304.     return
  305. Change_Tabs:
  306.     Loop,10
  307.         (Tab.Tab=1)?(HotkeyLocks[A_Index].State:=!HotkeyLocks[A_Index].Tab1_Value,HotkeyLocks[A_Index].Switch_State(),((Indicators[A_Index].Tab1_Value=1)?(Indicators[A_Index].Draw_On()):(Indicators[A_Index].Draw_Off()))):(Tab.Tab=2)?(HotkeyLocks[A_Index].State:=!HotkeyLocks[A_Index].Tab2_Value,HotkeyLocks[A_Index].Switch_State(),((Indicators[A_Index].Tab2_Value=1)?(Indicators[A_Index].Draw_On()):(Indicators[A_Index].Draw_Off()))):(Tab.Tab=3)?(HotkeyLocks[A_Index].State:=!HotkeyLocks[A_Index].Tab3_Value,HotkeyLocks[A_Index].Switch_State(),((Indicators[A_Index].Tab3_Value=1)?(Indicators[A_Index].Draw_On()):(Indicators[A_Index].Draw_Off())))
  308.     (Tab.Tab=1)?(Panel1.Draw_1(),Panel2.Draw_2()):(Tab.Tab=2)?(Panel1.Draw_3(),Panel2.Draw_4()):(Tab.Tab=3)?(Panel1.Draw_5(),Panel2.Draw_6())
  309.     return
  310.    
  311. OpenSavedClipsFolder(){
  312.     try
  313.         Run,% A_WorkingDir
  314. }
  315.  
  316. AddNewClip(){  ;Buttons 1-5 / 21-25
  317.     MouseGetPos,,,,tctrl,2
  318.     Loop,% HB_Button.Length()   {
  319.         if(HB_Button[A_Index].Hwnd=tctrl){
  320.             if(GetKeyState("Shift")){
  321.                 if(A_Index<6){
  322.                     FileDelete,% A_WorkingDir "\Saved Clip " A_Index + (Tab.Tab*10-10) ".txt"
  323.                     FileAppend,%Clipboard%,% A_WorkingDir "\Saved Clip " A_Index + (Tab.Tab*10-10) ".txt"
  324.                     ClipArray[A_Index + (Tab.Tab*10-10)]:=Clipboard
  325.                     (Tab.Tab=1)?(Indicators[A_Index].Tab1_Value:=1,Indicators[A_Index].Draw_On()):(Tab.Tab=2)?(Indicators[A_Index].Tab2_Value:=1,Indicators[A_Index].Draw_On()):(Tab.Tab=3)?(Indicators[A_Index].Tab3_Value:=1,Indicators[A_Index].Draw_On())
  326.                    
  327.                 }else if(A_Index>6){
  328.                     FileDelete,% A_WorkingDir "\Saved Clip " (A_Index-15) + (Tab.Tab*10-10) ".txt"
  329.                     FileAppend,%Clipboard%,% A_WorkingDir "\Saved Clip " (A_Index-15) + (Tab.Tab*10-10) ".txt"
  330.                     ClipArray[(A_Index-15) + (Tab.Tab*10-10)]:=Clipboard
  331.                     (Tab.Tab=1)?(Indicators[A_Index-15].Tab1_Value:=1,Indicators[A_Index-15].Draw_On()):(Tab.Tab=2)?(Indicators[A_Index-15].Tab2_Value:=1,Indicators[A_Index-15].Draw_On()):(Tab.Tab=3)?(Indicators[A_Index-15].Tab3_Value:=1,Indicators[A_Index-15].Draw_On())
  332.                    
  333.                 }
  334.                 SoundBeep, 500
  335.             }else   {
  336.                 loop 3
  337.                     SoundBeep, 777
  338.             }
  339.         }
  340.     }
  341. }
  342.  
  343. RemoveClip(){  ; button 6-10 / 26-30
  344.     MouseGetPos,,,,tctrl,2
  345.     Loop,% HB_Button.Length()   {
  346.         if(HB_Button[A_Index].Hwnd=tctrl){
  347.             if(GetKeyState("Shift")){
  348.                 if(A_Index<11){
  349.                     FileDelete,% A_WorkingDir "\Saved Clip " (A_Index-5) + (Tab.Tab*10-10) ".txt"
  350.                     ClipArray[(A_Index-5) + (Tab.Tab*10-10)]:=""
  351.                     (Tab.Tab=1)?(Indicators[A_Index-5].Tab1_Value:=0,Indicators[A_Index-5].Draw_Off()):(Tab.Tab=2)?(Indicators[A_Index-5].Tab2_Value:=0,Indicators[A_Index-5].Draw_Off()):(Tab.Tab=3)?(Indicators[A_Index-5].Tab3_Value:=0,Indicators[A_Index-5].Draw_Off())
  352.                    
  353.                 }else if(A_Index>11){
  354.                     FileDelete,% A_WorkingDir "\Saved Clip " (A_Index-20) + (Tab.Tab*10-10) ".txt"
  355.                     ClipArray[(A_Index-20) + (Tab.Tab*10-10)]:=""
  356.                     (Tab.Tab=1)?(Indicators[A_Index-20].Tab1_Value:=0,Indicators[A_Index-20].Draw_Off()):(Tab.Tab=2)?(Indicators[A_Index-20].Tab2_Value:=0,Indicators[A_Index-20].Draw_Off()):(Tab.Tab=3)?(Indicators[A_Index-20].Tab3_Value:=0,Indicators[A_Index-20].Draw_Off())
  357.                    
  358.                 }
  359.                 SoundBeep, 500
  360.             }else   {
  361.                 loop 3
  362.                     SoundBeep, 777
  363.             }
  364.         }
  365.     }
  366. }
  367.  
  368. ClipIt(){ ;button 16-20 / 36-40
  369.     MouseGetPos,,,,tctrl,2
  370.     Loop,% HB_Button.Length()   {
  371.         if(HB_Button[A_Index].Hwnd=tctrl){
  372.             if(A_Index<21){
  373.                 if(ClipArray[A_Index-15 + (Tab.Tab*10-10)]){
  374.                     Clipboard:= ClipArray[A_Index-15 + (Tab.Tab*10-10)]
  375.                     ClipWait,
  376.                     SoundBeep, 500
  377.                 }else   {
  378.                     loop,3
  379.                         SoundBeep,777
  380.                 }
  381.             }else if(A_Index>21){
  382.                 if(ClipArray[A_Index-30 + (Tab.Tab*10-10)]){
  383.                     Clipboard:= ClipArray[A_Index-30 + (Tab.Tab*10-10)]
  384.                     ClipWait,
  385.                     SoundBeep, 500
  386.                 }else   {
  387.                     loop,3
  388.                         SoundBeep,777
  389.                 }
  390.             }
  391.         }
  392.     }
  393. }
  394.  
  395. ViewIt(){ ;Buttons 11-15 / 31-35
  396.     MouseGetPos,,,,tctrl,2
  397.     Loop,% HB_Button.Length()   {
  398.         if(HB_Button[A_Index].Hwnd=tctrl){
  399.             if(GetKeyState("Shift")&&GetKeyState("ctrl")){
  400.                 if(A_Index<16&&ClipArray[(A_Index-10)+(Tab.Tab*10-10)]){
  401.                     try
  402.                         Run,% A_WorkingDir "\Saved Clip " (A_Index-10)+(Tab.Tab*10-10) ".txt"
  403.                     return
  404.                 }else if(A_Index<16&&!ClipArray[(A_Index-10)+(Tab.Tab*10-10)]){
  405.                     Loop, 3
  406.                         SoundBeep,777
  407.                     return
  408.                 }else if(A_Index>16&&ClipArray[(A_Index-25)+(Tab.Tab*10-10)]){
  409.                     try
  410.                         Run,% A_WorkingDir "\Saved Clip " (A_Index-25)+(Tab.Tab*10-10) ".txt"
  411.                     return 
  412.                 }else if(A_Index>16&&!ClipArray[(A_Index-25)+(Tab.Tab*10-10)]){
  413.                     Loop, 3
  414.                         SoundBeep,777
  415.                     return 
  416.                 }
  417.             }
  418.             if(A_Index<16){
  419.                 if(ClipArray[(A_Index-10)+(Tab.Tab*10-10)]){
  420.                     Show_Preview(ClipArray[(A_Index-10)+(Tab.Tab*10-10)])
  421.                     return 
  422.                 }else   {
  423.                     Loop, 3
  424.                         SoundBeep,777
  425.                     return 
  426.                 }
  427.             }else if(A_Index>16){
  428.                 if(ClipArray[(A_Index-25)+(Tab.Tab*10-10)]){
  429.                     Show_Preview(ClipArray[(A_Index-25)+(Tab.Tab*10-10)])
  430.                     return 
  431.                 }else   {
  432.                     Loop, 3
  433.                         SoundBeep,777
  434.                     return 
  435.                 }
  436.             }
  437.         }
  438.     }
  439. }
  440.  
  441. Update_LocksValue:
  442.     MouseGetPos,,,,lctrl,2
  443.     if(Tab.Tab=1){
  444.         Loop,10 {
  445.             if(HotkeyLocks[A_Index].Hwnd=lctrl)
  446.                 HotkeyLocks[A_Index].Tab1_Value:=HotkeyLocks[A_Index].State
  447.            
  448.         }
  449.     }else if(Tab.Tab=2){
  450.         Loop,10 {
  451.             if(HotkeyLocks[A_Index].Hwnd=lctrl)
  452.                 HotkeyLocks[A_Index].Tab2_Value:=HotkeyLocks[A_Index].State
  453.         }
  454.     }else if(Tab.Tab=3){
  455.         Loop,10 {
  456.             if(HotkeyLocks[A_Index].Hwnd=lctrl)
  457.                 HotkeyLocks[A_Index].Tab3_Value:=HotkeyLocks[A_Index].State
  458.         }
  459.     }
  460.     return
  461.  
  462. Tips(){
  463.     static LActive
  464.     MouseGetPos,cmx,cmy,,ctrl,2
  465.     WingetPos,wx,wy,,,% "ahk_Id" Main.hwnd
  466.     if(LActive!=ctrl){
  467.         Loop,% HB_Button.Length()   {
  468.             if(HB_Button[A_Index].Hwnd=ctrl){
  469.                 if(HB_Button[A_Index].Type="Minimize Window"){
  470.                     GuiControl,1:,TipsEdit,Press this button to minimize the window
  471.                 }else if(HB_Button[A_Index].Type="Clip"){
  472.                     GuiControl,1:,TipsEdit,`nPut this saved clip into your Clipboard
  473.                 }else if(HB_Button[A_Index].Type="Add"){
  474.                     GuiControl,1:,TipsEdit, Save the contents of your Clipboard`n*** HOLD SHIFT *** when you press the button.
  475.                 }else if(HB_Button[A_Index].Type="Remove"){
  476.                     GuiControl,1:,TipsEdit, Delete this clip`n*** HOLD SHIFT *** when you press the button.
  477.                 }else if(HB_Button[A_Index].Type="View"){
  478.                     GuiControl,1:,TipsEdit, Briefly displays a small window with the contents saved here`nHold "Shift" && "Ctrl" to open the file instead.
  479.                 }else if(HB_Button[A_Index].Type="Open Folder"){
  480.                     GuiControl,1:,TipsEdit, Opens the folder containing all saved clips.
  481.                 }
  482.                 LActive:=ctrl
  483.                 Return
  484.             }
  485.         }
  486.         Loop, % HotkeyLocks.Length()    {
  487.             if(HotkeyLocks[A_Index].Hwnd=ctrl){
  488.                 if(HotkeyLocks[A_Index].Type="Lock_Clip"){
  489.                     GuiControl,1:,TipsEdit,Toggle this switch On to LOCK this clip.`nWhile locked, Hotkeys and Clearing all clips will have no effect on this clip.
  490.                 }
  491.                 LActive:=ctrl
  492.                 Return
  493.             }
  494.         }
  495.         Loop,% Indicators.Length(){
  496.             if(Indicators[A_Index].Hwnd=ctrl){
  497.                 GuiControl,1:,TipsEdit,Indicates if a clip is currently saved at this location
  498.                 LActive:=ctrl
  499.                 Return
  500.             }
  501.         }
  502.         loop,2  {
  503.             if(Panel%A_Index%.Hwnd=ctrl){
  504.                 GuiControl,1:,TipsEdit,The Clip Number`nFiles are saved with same number`nSaved Clip "Number" .txt
  505.                 LActive:=ctrl
  506.                 Return
  507.             }
  508.         }
  509.         if(ToggleTips.Hwnd=ctrl){
  510.             GuiControl,1:,TipsEdit,Toggle this switch to turn On or Off Tips
  511.             LActive:=ctrl
  512.             Return
  513.         }else if(ToggleHotkeyLock.Hwnd=ctrl){
  514.             GuiControl,1:,TipsEdit,***  Hold Shift  ***`nToggle All Hotkey Locks in the current tab to this State
  515.             LActive:=ctrl
  516.             Return
  517.         }else if(cmx>=wx&&cmx<=wx+160&&cmy<=wy+60&&cmy>=wy){
  518.             GuiControl,1:,TipsEdit,Click && Drag To Move Window`nRight Click To Expand / Shrink The Window
  519.             LActive:=Null
  520.             Return
  521.         }
  522.     }
  523. }
  524.  
  525.  
  526. numpad1::
  527. ;Test window move to cursor
  528.     MouseGetPos,cx,cy
  529.     Gui,1:Show,% "x" cx-75 " y" cy-25 ;" NA"
  530.     return
  531.  
  532. Numpad4::
  533.     if(ctab=null)
  534.         ctab:=Tab.Tab,ctab++
  535.     (cTab=1)?(ctab:=null,Tab._Switch_Tab1()):(ctab=2)?(ctab:=null,Tab._Switch_Tab2()):(ctab=3)?(ctab:=null,Tab._Switch_Tab3()):(ctab=4)?(ctab:=null,Tab._Switch_Tab1())
  536.     TrayTip,,% "Tab: " Tab.Tab
  537.     return
  538.  
  539.  
  540. ;Create Preview Window
  541. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  542. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  543. Create_Preview(){
  544.     PreviewWindow := New Custom_Window( x:= 0 , y:= 0 , w:= 700 , h:= 175 , Name:= "2" , Options:= "+AlwaysOnTop -Caption -DPIScale +ToolWindow" , Title:= "Preview Window" , Background_Bitmap:= PreviewWindow() )
  545.     Gui,2:Color,333437,333437
  546.     Gui,2:Font,cWhite s10 ,Arial
  547.     Gui,2:Add,Edit,x15 y10 w670 h120 -VScroll -E0x200 ReadOnly -Wrap hwndPreviewEditHwnd,
  548.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=480, y:=140, w:=100, h:=30, window:="2", Label:="FreezePreviewWindow", Text:="Freeze", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="38393C", y_Offset:=0 ))
  549.     HB_Button.Push(New Clipboard_Master_v2_Buttons(x+=w+10, y:=140, w:=100, h:=30, window:="2", Label:="ClosePreviewWindow", Text:="Close", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="38393C", y_Offset:=0 ))
  550.     GuiControl,2:Focus,% HB_Button[44].Hwnd
  551.     Gui,2:Show,Hide x0 y0 w700 h175,Preview Window
  552.     WinFade:=255
  553.     ;~ SetTimer,PreviewExitTimer,-2000
  554. }
  555.  
  556. Show_Preview(DisplayMsg){
  557.     SetTimer,PreviewExitTimer,Off
  558.     SetTimer,PreviewFadeTimer,Off
  559.     Gui,2:Show,NA
  560.     Winset,Transparent,255,% "ahk_Id" PreviewWindow.HWnd
  561.     GuiControl,2:,% PreviewEditHwnd,% DisplayMsg
  562.     WinFade:=255
  563.     SetTimer,PreviewExitTimer,% (ClipViewTime *-1)*1000
  564. }
  565.  
  566. FreezePreviewWindow:
  567.     SetTimer,PreviewExitTimer,Off
  568.     SetTimer,PreviewFadeTimer,Off
  569.     Winset,Transparent,255,% "ahk_Id" PreviewWindow.HWnd
  570.     return
  571.    
  572. ClosePreviewWindow:
  573.     SetTimer,PreviewExitTimer,Off
  574.     SetTimer,PreviewFadeTimer,Off
  575.     Gui,2:Hide
  576.     return
  577. PreviewExitTimer:
  578.     SetTimer,PreviewFadeTimer,0
  579.     return
  580. PreviewFadeTimer:
  581.     if(WinFade>1){
  582.         Winset,Transparent,% WinFade-=5,% "ahk_Id" PreviewWindow.HWnd
  583.     }else   {
  584.         SetTimer,PreviewFadeTimer,Off
  585.         Gui,2:Hide
  586.     }
  587.     return
  588. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  589. ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
  590.  
  591.  
  592.  
  593. ;******************************************************************************************************************************************
  594. ;*********************************** Create Settings & Hotkeys Window *********************************************************************
  595. ;******************************************************************************************************************************************
  596.  
  597. Create_Settings_Window(){
  598.     static ftr
  599.     if(!ftr){
  600.         ftr:=1  ;860- 590 for expanded window , 500 for norm
  601.         SettingsWindow := New Custom_Window( x:= 0 , y:= 0 , w:= 860 , h:= 590 , Name:= "4" , Options:= "+AlwaysOnTop -Caption -DPIScale +Owner1" , Title:= "Settings Window" , Background_Bitmap:= Settings_Window() )
  602.         Gui,4:Add,Text,x5 y5 w150 h40 BackgroundTrans gMove_Window
  603.         Gui,4:Color,333437,333437
  604.         Gui,4:Font,cWhite s8
  605.        
  606.         ;Enable use of hotkeys
  607.         ;---------------------------------------------------------
  608.         AllHotkeysLock:=New Flat_Round_Switch_Type_1(x:=180 , y:=20 ,w:=100,Text:="Enable Hotkeys",Font:="Segoe Ui",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="",Type:="")
  609.        
  610.         ;---------------------------------------------------------
  611.         ;Save Hotkeys Section
  612.         ;-----------------------------------------------------
  613.        
  614.         ToggleSaveHotkeys:=New Flat_Round_Switch_Type_1(x:=350 , y:=34 ,w:=200,Text:="Enable Save Clip Hotkeys",Font:="Arial",FontSize:= "10 Bold" , FontColor:="ffffff" ,Window:="4",Background_Color:="38393C",State:=0,Label:="",Type:="")
  615.         ToggleClipHotkeys:=New Flat_Round_Switch_Type_1(x:=640 , y:=34 ,w:=200,Text:="Enable Clip Hotkeys",Font:="Arial",FontSize:= "10 Bold" , FontColor:="ffffff" ,Window:="4",Background_Color:="38393C",State:=0,Label:="",Type:="")
  616.        
  617.        
  618.         Gui,4:Add,Hotkey,x340 y107 w95 h22 vSaveHK1 ;gSet_SaveHK
  619.         Loop 9  {
  620.             SHKindex:=A_Index+1
  621.             Gui,4:Add,Hotkey,x340 yp+30 w95 h22 vSaveHK%SHKIndex% ;gSet_SaveHK
  622.         }
  623.        
  624.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y:=103, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset:=-1,Type:="",Name:="SaveHK1" ))
  625.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK2"))
  626.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK3"))
  627.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK4"))
  628.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK5"))
  629.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK6"))
  630.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK7"))
  631.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK8"))
  632.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK9"))
  633.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=450, y+=h, w:=60, h:=30, window:="4", Label:="Update_SaveHK", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="" ,Name:="SaveHK10"))
  634.        
  635.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y:=110 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  636.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  637.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  638.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  639.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  640.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  641.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  642.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  643.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  644.         Save_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=525 , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="UpdateSaveHKLock",Type:="Lock_Clip"))
  645.  
  646.         ;-----------------------------------------------------
  647.    
  648.         ;Clip Hotkeys Section
  649.         ;-----------------------------------------------------
  650.         Gui,4:Add,Hotkey,x625 y107 w95 h22
  651.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  652.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  653.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  654.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  655.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  656.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  657.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  658.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  659.         Gui,4:Add,Hotkey,x625 yp+30 w95 h22
  660.        
  661.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=735, y:=103, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  662.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  663.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  664.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  665.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  666.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  667.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  668.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  669.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  670.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x, y+=h, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  671.        
  672.         global Clip_Hotkeys_Locks:=[]
  673.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x:=810 , y:=110 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  674.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  675.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  676.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  677.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  678.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  679.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  680.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  681.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  682.         Clip_Hotkeys_Locks.Push(New Flat_Round_Switch_Type_1(x , y+=30 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=0,Label:="Update_LocksValue",Type:="Lock_Clip",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0))
  683.  
  684.         ;-----------------------------------------------------
  685.        
  686.         ;Other Hotkeys Section
  687.         ;-----------------------------------------------------
  688.         ;CBM1
  689.         Gui,4:Add,Hotkey,x20 y83 w145 h22
  690.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=175, y:=79, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  691.         ClipMasterHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10 , y+=6 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="333437",State:=0,Label:="",Type:="")
  692.         ;CBM2
  693.         Gui,4:Add,Hotkey,x20 y148 w145 h22
  694.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=175, y:=144, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  695.         ClipMasterHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10 , y+=6 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="333437",State:=0,Label:="",Type:="")
  696.         ;Switch Tabs
  697.         Gui,4:Add,Hotkey,x20 y213 w145 h22
  698.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=175, y:=209, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  699.         ClipMasterHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10 , y+=6 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="333437",State:=0,Label:="",Type:="")
  700.         ;Hide Window
  701.         Gui,4:Add,Hotkey,x20 y278 w145 h22
  702.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=175, y:=274, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  703.         ClipMasterHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10 , y+=6 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="333437",State:=0,Label:="",Type:="")
  704.         ;Teleport Window
  705.         Gui,4:Add,Hotkey,x20 y343 w145 h22
  706.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=175, y:=339, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  707.         ClipMasterHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10 , y+=6 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="333437",State:=0,Label:="",Type:="")
  708.         ;Save To first available slot
  709.         Gui,4:Add,Hotkey,x20 y408 w145 h22
  710.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=175, y:=404, w:=60, h:=30, window:="4", Label:="", Text:="Update", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset,Type:="Delete Clips" ))
  711.         ClipMasterHotkeyLock:=New Flat_Round_Switch_Type_1(x+=w+10 , y+=6 ,w:=30,Text:="",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="333437",State:=0,Label:="",Type:="")
  712.         ;-----------------------------------------------------
  713.         ;Bottom row controls
  714.         EnableSettingsTips:=New Flat_Round_Switch_Type_1(x:=30 , y:=465 ,w:=110,Text:="Enable Tips",Font:="Segoe UI",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=1,Label:="Enable_Settings_Tips",Type:="")
  715.         EnableSounds:=New Flat_Round_Switch_Type_1(x+=w+10 , y:=465 ,w:=110,Text:="Enable Sounds",Font:="Segoe UI",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=1,Label:="",Type:="Enable Sounds")
  716.        
  717.         EnableClipView:=New Flat_Round_Switch_Type_1(x:=310 , y:=465 ,w:=190,Text:="Clip Preview - Duration (Sec)",Font:="Segoe UI",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="4",Background_Color:="38393C",State:=1,Label:="",Type:="")
  718.         Gui,4:Add,Edit,x500 y463 w50 h22 Center Number vClipViewTime gSetClipViewDuration,
  719.        
  720.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x:=590, y:=458, w:=80, h:=30, window:="4", Label:="", Text:="Reserved", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="38393C", y_Offset,Type:="Delete Clips" ))
  721.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x+=w, y:=458, w:=80, h:=30, window:="4", Label:="", Text:="Save", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="38393C", y_Offset,Type:="Delete Clips" ))
  722.         HB_Button.Push(New Clipboard_Master_v2_Buttons(x+=w, y:=458, w:=80, h:=30, window:="4", Label:="ExitSettingsMenu", Text:="Exit", Font:="Segoe UI", Font_Size:="10 Bold", Font_Color_Top:=colorSet[1], Font_Color_Bottom:="000000", Background_Color:="38393C", y_Offset,Type:="Exit Settings Menu" ))
  723.         Gui,4:Font,cWhite s10
  724.         Gui,4:Add,Edit,x30 y515 w800 h65 -VScroll -E0x200 -Wrap Center,Line 1`nLine 2`nLine 3`nLine 4
  725.         ;-----------------------------------------------------
  726.         return
  727.     }
  728.     SettingsWindow.Show_Window()
  729.     Gui,4:Show
  730.     if(EnableSettingsTips.State=1)
  731.         SetTimer,Settings_Tips,500
  732. }
  733.  
  734. Enable_Settings_Tips:
  735.     if(EnableSettingsTips.State=1){
  736.         Gui,4:Show,w860 h590 NA
  737.         SetTimer,Settings_Tips,500
  738.     }else   {
  739.         Gui,4:Show,w860 h500 NA
  740.         SetTimer,Settings_Tips,Off
  741.     }
  742.     return
  743.  
  744. Settings_Tips(){
  745.     ;Tips for the settings menu
  746. }
  747.  
  748. ExitSettingsMenu(){
  749.     SetTimer,Settings_Tips,Off
  750.     Gui,4:Hide
  751. }
  752.  
  753. SetClipViewDuration:
  754.     GuiControlGet,ClipViewTime
  755.     ToolTip, % ClipViewTime
  756.     SetTimer,TooltipsOff,-1000
  757.     return
  758.    
  759. ;~ Set_SaveHK(){
  760.     ;~ GuiControlGet,%A_GuiControl%
  761.         ;~ ToolTip,% SaveHK1 "`n"SaveHK2 "`n"SaveHK3 "`n"SaveHK4 "`n"SaveHK5 "`n"SaveHK6 "`n"SaveHK7 "`n"SaveHK8 "`n"SaveHK9 "`n"SaveHK10
  762.     ;~ SetTimer,TooltipsOff,-1000
  763. ;~ }
  764. Update_SaveHK(){
  765.     MouseGetPos,,,,ctrl,2
  766.     Loop,% HB_Button.Length()   {
  767.         if(HB_Button[A_Index].Hwnd=ctrl){
  768.             GuiControlGet,NewKey,4:,% HB_Button[A_Index].Name
  769.             kName:=HB_Button[A_Index].Name
  770.             ;~ if(!NewKey){
  771.             if(!NewKey&&%kName%){
  772.                 ;~ Hotkey,% %kName%,% kName,Off
  773.                 Hotkey,% %kName%,SaveHK,Off
  774.                 %kName%:=NewKey
  775.             }else if(NewKey!=%kName%&&%kName%){
  776.                 ;~ Hotkey,% %kName%,% kName,Off
  777.                 Hotkey,% %kName%,SaveHK,Off
  778.                 ;~ Hotkey,% NewKey,% kName,On
  779.                 Hotkey,% NewKey,SaveHK,On
  780.                 %kName%:=NewKey
  781.             }else if(NewKey!=%kName%&&!%kName%){
  782.                 ;~ Hotkey,% NewKey,% kName,On
  783.                 Hotkey,% NewKey,SaveHK,On
  784.                 %kName%:=NewKey
  785.             }
  786.         }
  787.     }
  788. }
  789.  
  790.  
  791.  
  792.  
  793. UpdateSaveHKLock: ;Save To file
  794.     return
  795.  
  796.  
  797. ;******************************************************************************************************************************************
  798. ;******************************************************************************************************************************************
  799.  
  800. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  801. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$         Save Hotkey Used        $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  802. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  803.  
  804. ;~ SaveHK: ;Need to move this later
  805.     ;~ Loop 10  {
  806.         ;~ if(SaveHK%A_Index%=A_ThisHotkey){
  807.             ;~ index:=A_Index
  808.             ;~ break
  809.         ;~ }
  810.     ;~ }
  811.     ;~ if(Tab.Tab=1&&HotkeyLocks[Index].Tab1_Value=0&&Save_Hotkeys_Locks[Index].State=1){
  812.             ;~ ToolTip, % A_ThisHotkey "`n"
  813.     ;~ }else if(Tab.Tab=2&&HotkeyLocks[Index].Tab2_Value=0&&Save_Hotkeys_Locks[Index].State=1){
  814.             ;~ ToolTip, % A_ThisHotkey
  815.     ;~ }else if(Tab.Tab=3&&HotkeyLocks[Index].Tab3_Value=0&&Save_Hotkeys_Locks[Index].State=1){
  816.             ;~ ToolTip, % A_ThisHotkey
  817.     ;~ }else if(EnableSounds.State=1) {
  818.         ;~ Loop 3
  819.             ;~ SoundBeep,777
  820.     ;~ }
  821.     ;~ SetTimer,TooltipsOff,-1000
  822.     ;~ return
  823.  
  824.  
  825.  
  826. SaveHK:
  827.     Loop 10
  828.         if(SaveHK%A_Index%=A_ThisHotkey)
  829.             index:=A_Index,break
  830.     if(!HotkeyLocks[Index,"Tab" Tab.Tab "_Value"]&&Save_Hotkeys_Locks[Index].State){
  831.         ToolTip, % A_ThisHotkey "`n"
  832.     }else if(EnableSounds.State) {
  833.         Loop 3
  834.             SoundBeep,777
  835.     }
  836.     SetTimer,TooltipsOff,-1000
  837.     return
  838.  
  839.  
  840.  
  841.  
  842.  
  843.  
  844.  
  845.  
  846. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  847. ;$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
  848.  
  849.  
  850. ;%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  851. TooltipsOff:
  852.     ToolTip,
  853.     return
  854.  
  855.  
  856.  
  857. ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  858. ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&   Indicator Class    &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  859. ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  860.  
  861. class Indicator {
  862.     __New(x:=10,y:=10,Window:="1",Tab1_Value:=0,Tab2_Value:=0,Tab3_Value:=0,Indicator_Color:="0066cc"){
  863.         This.X:=x
  864.         This.Y:=y
  865.         This.W:=28
  866.         This.H:=28
  867.        
  868.         This.Window:=window
  869.        
  870.         This.Color:="0xFF" Indicator_Color
  871.         This.HalfColor:=Indicator_Color
  872.         This.Tab1_Value:=Tab1_Value
  873.         This.Tab2_Value:=Tab2_Value
  874.         This.Tab3_Value:=Tab3_Value
  875.        
  876.         This._Create_Trigger()
  877.        
  878.         This._Create_On_Bitmap()
  879.         This._Create_Off_Bitmap()
  880.        
  881.         (This.Tab1_Value)?(This.Draw_On()):(This.Draw_Off())
  882.     }
  883.     _Create_Trigger(){
  884.         local hwnd
  885.         Gui,% This.Window ":Add",Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " hwndhwnd 0xE"
  886.         This.Hwnd:=hwnd
  887.     }
  888.     _Create_On_Bitmap(){
  889.         ;Bitmap Created Using: HB Bitmap Maker
  890.         pBitmap:=Gdip_CreateBitmap( 28 , 28 )
  891.         G := Gdip_GraphicsFromImage( pBitmap )
  892.         Gdip_SetSmoothingMode( G , 2 )
  893.         Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  894.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 32 )
  895.         Gdip_DeleteBrush( Brush )
  896.         Brush := Gdip_CreateLineBrushFromRect( 3 , 5 , 22 , 22 , "0xFF333437" , "0xFF000000" , 1 , 1 )
  897.         Gdip_FillEllipse( G , Brush , 4 , 4 , 20 , 20 )
  898.         Gdip_DeleteBrush( Brush )
  899.         Brush := Gdip_CreateLineBrushFromRect( 1 , 1 , 26 , 25 , "0xFF333437" , "0xFF222222" , 1 , 1 )
  900.         Gdip_FillEllipse( G , Brush , 5 , 5 , 18 , 18 )
  901.         Gdip_DeleteBrush( Brush )
  902.         ;~ Brush := Gdip_CreateLineBrushFromRect( 1 , -1 , 20 , 22 , "0xFF0066cc" , "0xFF333437" , 1 , 1 )
  903.         Brush := Gdip_CreateLineBrushFromRect( 1 , -1 , 20 , 22 , This.Color , "0xFF333437" , 1 , 1 )
  904.         Gdip_FillEllipse( G , Brush , 7 , 7 , 14 , 14 )
  905.         Gdip_DeleteBrush( Brush )
  906.         ;~ Brush := Gdip_BrushCreateSolid( "0x330066cc" )
  907.         Brush := Gdip_BrushCreateSolid( "0x33" This.HalfColor )
  908.         Gdip_FillEllipse( G , Brush , 8 , 8 , 11 , 11 )
  909.         Gdip_DeleteBrush( Brush )
  910.         ;~ Brush := Gdip_BrushCreateSolid( "0x110066cc" )
  911.         Brush := Gdip_BrushCreateSolid( "0x11" This.HalfColor )
  912.         Gdip_FillEllipse( G , Brush , 10 , 10 , 8 , 8 )
  913.         Gdip_DeleteBrush( Brush )
  914.         ;~ Brush := Gdip_BrushCreateSolid( "0x110066cc" )
  915.         Brush := Gdip_BrushCreateSolid( "0x11" This.HalfColor )
  916.         Gdip_FillEllipse( G , Brush , 11 , 11 , 6 , 6 )
  917.         Gdip_DeleteBrush( Brush )
  918.         ;~ Brush := Gdip_BrushCreateSolid( "0x110066cc" )
  919.         Brush := Gdip_BrushCreateSolid( "0x11" This.HalfColor )
  920.         Gdip_FillEllipse( G , Brush , 12 , 12 , 4 , 4 )
  921.         Gdip_DeleteBrush( Brush )
  922.         Gdip_DeleteGraphics( G )
  923.         This.On_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  924.         Gdip_DisposeImage(pBitmap)
  925.     }
  926.     _Create_Off_Bitmap(){
  927.         ;Bitmap Created Using: HB Bitmap Maker
  928.         pBitmap:=Gdip_CreateBitmap( 28 , 28 )
  929.         G := Gdip_GraphicsFromImage( pBitmap )
  930.         Gdip_SetSmoothingMode( G , 2 )
  931.         Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  932.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 32 )
  933.         Gdip_DeleteBrush( Brush )
  934.         Brush := Gdip_CreateLineBrushFromRect( 3 , 5 , 22 , 22 , "0xFF333437" , "0xFF000000" , 1 , 1 )
  935.         Gdip_FillEllipse( G , Brush , 4 , 4 , 20 , 20 )
  936.         Gdip_DeleteBrush( Brush )
  937.         Brush := Gdip_CreateLineBrushFromRect( 1 , 1 , 26 , 25 , "0xFF333437" , "0xFF222222" , 1 , 1 )
  938.         Gdip_FillEllipse( G , Brush , 5 , 5 , 18 , 18 )
  939.         Gdip_DeleteBrush( Brush )
  940.         Brush := Gdip_CreateLineBrushFromRect( 1 , -1 , 20 , 22 , "0xFF666869" , "0xFF333437" , 1 , 1 )
  941.         Gdip_FillEllipse( G , Brush , 7 , 7 , 14 , 14 )
  942.         Gdip_DeleteBrush( Brush )
  943.         Brush := Gdip_BrushCreateSolid( "0x33666869" )
  944.         Gdip_FillEllipse( G , Brush , 8 , 8 , 11 , 11 )
  945.         Gdip_DeleteBrush( Brush )
  946.         Brush := Gdip_BrushCreateSolid( "0x11666869" )
  947.         Gdip_FillEllipse( G , Brush , 10 , 10 , 8 , 8 )
  948.         Gdip_DeleteBrush( Brush )
  949.         Brush := Gdip_BrushCreateSolid( "0x11666869" )
  950.         Gdip_FillEllipse( G , Brush , 11 , 11 , 6 , 6 )
  951.         Gdip_DeleteBrush( Brush )
  952.         Brush := Gdip_BrushCreateSolid( "0x11666869" )
  953.         Gdip_FillEllipse( G , Brush , 12 , 12 , 4 , 4 )
  954.         Gdip_DeleteBrush( Brush )
  955.         Gdip_DeleteGraphics( G )
  956.         This.Off_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  957.         Gdip_DisposeImage(pBitmap)
  958.     }
  959.     Draw_On(){
  960.         SetImage(This.Hwnd,This.On_Bitmap)
  961.     }
  962.     Draw_Off(){
  963.         SetImage(This.Hwnd,This.Off_Bitmap)
  964.     }
  965. }
  966.  
  967. ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  968. ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&  End Indicator Class &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  969. ;&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
  970. ;-----------------------------------------------------------------------------------------------
  971. ;----------------------------------------------Num Class----------------------------------------
  972. ;-----------------------------------------------------------------------------------------------
  973. class NumClass  {
  974.     ;~ __New(x:=10,y:=10,window:="1",Font_Color:="0066cc"){
  975.     __New(x:=10,y:=10,window:="1",Font_Color:="ff0000"){
  976.         This.X:=x
  977.         This.Y:=y
  978.         This.W:=28
  979.         This.H:=198
  980.         This.Window:=window
  981.         This.Font_Color:= "0xFF" Font_Color
  982.         This._Create_Trigger()
  983.         This._Create_Num1()
  984.         This._Create_Num2()
  985.         This._Create_Num3()
  986.         This._Create_Num4()
  987.         This._Create_Num5()
  988.         This._Create_Num6()
  989.         Sleep,20
  990.     }
  991.     _Create_Trigger(){
  992.         local hwnd
  993.         Gui,% This.Window ":Add",Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " hwndhwnd 0xE"
  994.         This.Hwnd:=hwnd
  995.     }
  996.     _Create_Num1(){
  997.         ;Bitmap Created Using: HB Bitmap Maker
  998.         pBitmap:=Gdip_CreateBitmap( 28 , 198 )
  999.         G := Gdip_GraphicsFromImage( pBitmap )
  1000.         Gdip_SetSmoothingMode( G , 4 )
  1001.         Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1002.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 201 )
  1003.         Gdip_DeleteBrush( Brush )
  1004.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1005.         Gdip_TextToGraphics( G , "1" , "s16 Center Bold c" Brush " x-1 y6" , "Segoe Ui" , 28 , 20 )
  1006.         Gdip_DeleteBrush( Brush )
  1007.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1008.         Gdip_TextToGraphics( G , "1" , "s16 Center Bold c" Brush " x0 y7" , "Segoe Ui" , 28 , 20 )
  1009.         Gdip_DeleteBrush( Brush )
  1010.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1011.         Gdip_TextToGraphics( G , "2" , "s16 Center Bold c" Brush " x-1 y47" , "Segoe Ui" , 28 , 20 )
  1012.         Gdip_DeleteBrush( Brush )
  1013.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1014.         Gdip_TextToGraphics( G , "2" , "s16 Center Bold c" Brush " x0 y48" , "Segoe Ui" , 28 , 20 )
  1015.         Gdip_DeleteBrush( Brush )
  1016.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1017.         Gdip_TextToGraphics( G , "3" , "s16 Center Bold c" Brush " x-1 y88" , "Segoe Ui" , 28 , 20 )
  1018.         Gdip_DeleteBrush( Brush )
  1019.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1020.         Gdip_TextToGraphics( G , "3" , "s16 Center Bold c" Brush " x0 y89" , "Segoe Ui" , 28 , 20 )
  1021.         Gdip_DeleteBrush( Brush )
  1022.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1023.         Gdip_TextToGraphics( G , "4" , "s16 Center Bold c" Brush " x-1 y129" , "Segoe Ui" , 28 , 20 )
  1024.         Gdip_DeleteBrush( Brush )
  1025.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1026.         Gdip_TextToGraphics( G , "4" , "s16 Center Bold c" Brush " x0 y130" , "Segoe Ui" , 28 , 20 )
  1027.         Gdip_DeleteBrush( Brush )
  1028.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1029.         Gdip_TextToGraphics( G , "5" , "s16 Center Bold c" Brush " x-1 y170" , "Segoe Ui" , 28 , 20 )
  1030.         Gdip_DeleteBrush( Brush )
  1031.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1032.         Gdip_TextToGraphics( G , "5" , "s16 Center Bold c" Brush " x0 y171" , "Segoe Ui" , 28 , 20 )
  1033.         Gdip_DeleteBrush( Brush )
  1034.         Gdip_DeleteGraphics( G )
  1035.         This.Num1_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1036.         Gdip_DisposeImage(pBitmap)
  1037.     }
  1038.     _Create_Num2(){
  1039.         ;Bitmap Created Using: HB Bitmap Maker
  1040.         pBitmap:=Gdip_CreateBitmap( 28 , 198 )
  1041.         G := Gdip_GraphicsFromImage( pBitmap )
  1042.         Gdip_SetSmoothingMode( G , 4 )
  1043.         Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1044.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 201 )
  1045.         Gdip_DeleteBrush( Brush )
  1046.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1047.         Gdip_TextToGraphics( G , "6" , "s16 Center Bold c" Brush " x-1 y6" , "Segoe Ui" , 28 , 20 )
  1048.         Gdip_DeleteBrush( Brush )
  1049.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1050.         Gdip_TextToGraphics( G , "6" , "s16 Center Bold c" Brush " x0 y7" , "Segoe Ui" , 28 , 20 )
  1051.         Gdip_DeleteBrush( Brush )
  1052.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1053.         Gdip_TextToGraphics( G , "7" , "s16 Center Bold c" Brush " x-1 y47" , "Segoe Ui" , 28 , 20 )
  1054.         Gdip_DeleteBrush( Brush )
  1055.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1056.         Gdip_TextToGraphics( G , "7" , "s16 Center Bold c" Brush " x0 y48" , "Segoe Ui" , 28 , 20 )
  1057.         Gdip_DeleteBrush( Brush )
  1058.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1059.         Gdip_TextToGraphics( G , "8" , "s16 Center Bold c" Brush " x-1 y88" , "Segoe Ui" , 28 , 20 )
  1060.         Gdip_DeleteBrush( Brush )
  1061.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1062.         Gdip_TextToGraphics( G , "8" , "s16 Center Bold c" Brush " x0 y89" , "Segoe Ui" , 28 , 20 )
  1063.         Gdip_DeleteBrush( Brush )
  1064.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1065.         Gdip_TextToGraphics( G , "9" , "s16 Center Bold c" Brush " x-1 y129" , "Segoe Ui" , 28 , 20 )
  1066.         Gdip_DeleteBrush( Brush )
  1067.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1068.         Gdip_TextToGraphics( G , "9" , "s16 Center Bold c" Brush " x0 y130" , "Segoe Ui" , 28 , 20 )
  1069.         Gdip_DeleteBrush( Brush )
  1070.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1071.         Gdip_TextToGraphics( G , "10" , "s16 Center Bold c" Brush " x-1 y170" , "Segoe Ui" , 28 , 20 )
  1072.         Gdip_DeleteBrush( Brush )
  1073.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1074.         Gdip_TextToGraphics( G , "10" , "s16 Center Bold c" Brush " x0 y171" , "Segoe Ui" , 28 , 20 )
  1075.         Gdip_DeleteBrush( Brush )
  1076.         Gdip_DeleteGraphics( G )
  1077.         This.Num2_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1078.         Gdip_DisposeImage(pBitmap)
  1079.     }
  1080.     _Create_Num3(){
  1081.         ;Bitmap Created Using: HB Bitmap Maker
  1082.         pBitmap:=Gdip_CreateBitmap( 28 , 198 )
  1083.         G := Gdip_GraphicsFromImage( pBitmap )
  1084.         Gdip_SetSmoothingMode( G , 4 )
  1085.         Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1086.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 201 )
  1087.         Gdip_DeleteBrush( Brush )
  1088.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1089.         Gdip_TextToGraphics( G , "11" , "s16 Center Bold c" Brush " x-1 y6" , "Segoe Ui" , 28 , 20 )
  1090.         Gdip_DeleteBrush( Brush )
  1091.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1092.         Gdip_TextToGraphics( G , "11" , "s16 Center Bold c" Brush " x0 y7" , "Segoe Ui" , 28 , 20 )
  1093.         Gdip_DeleteBrush( Brush )
  1094.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1095.         Gdip_TextToGraphics( G , "12" , "s16 Center Bold c" Brush " x-1 y47" , "Segoe Ui" , 28 , 20 )
  1096.         Gdip_DeleteBrush( Brush )
  1097.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1098.         Gdip_TextToGraphics( G , "12" , "s16 Center Bold c" Brush " x0 y48" , "Segoe Ui" , 28 , 20 )
  1099.         Gdip_DeleteBrush( Brush )
  1100.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1101.         Gdip_TextToGraphics( G , "13" , "s16 Center Bold c" Brush " x-1 y88" , "Segoe Ui" , 28 , 20 )
  1102.         Gdip_DeleteBrush( Brush )
  1103.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1104.         Gdip_TextToGraphics( G , "13" , "s16 Center Bold c" Brush " x0 y89" , "Segoe Ui" , 28 , 20 )
  1105.         Gdip_DeleteBrush( Brush )
  1106.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1107.         Gdip_TextToGraphics( G , "14" , "s16 Center Bold c" Brush " x-1 y129" , "Segoe Ui" , 28 , 20 )
  1108.         Gdip_DeleteBrush( Brush )
  1109.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1110.         Gdip_TextToGraphics( G , "14" , "s16 Center Bold c" Brush " x0 y130" , "Segoe Ui" , 28 , 20 )
  1111.         Gdip_DeleteBrush( Brush )
  1112.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1113.         Gdip_TextToGraphics( G , "15" , "s16 Center Bold c" Brush " x-1 y170" , "Segoe Ui" , 28 , 20 )
  1114.         Gdip_DeleteBrush( Brush )
  1115.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1116.         Gdip_TextToGraphics( G , "15" , "s16 Center Bold c" Brush " x0 y171" , "Segoe Ui" , 28 , 20 )
  1117.         Gdip_DeleteBrush( Brush )
  1118.         Gdip_DeleteGraphics( G )
  1119.         This.Num3_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1120.         Gdip_DisposeImage(pBitmap)
  1121.     }
  1122.     _Create_Num4(){
  1123.         ;Bitmap Created Using: HB Bitmap Maker
  1124.         pBitmap:=Gdip_CreateBitmap( 28 , 198 )
  1125.         G := Gdip_GraphicsFromImage( pBitmap )
  1126.         Gdip_SetSmoothingMode( G , 4 )
  1127.         Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1128.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 201 )
  1129.         Gdip_DeleteBrush( Brush )
  1130.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1131.         Gdip_TextToGraphics( G , "16" , "s16 Center Bold c" Brush " x-1 y6" , "Segoe Ui" , 28 , 20 )
  1132.         Gdip_DeleteBrush( Brush )
  1133.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1134.         Gdip_TextToGraphics( G , "16" , "s16 Center Bold c" Brush " x0 y7" , "Segoe Ui" , 28 , 20 )
  1135.         Gdip_DeleteBrush( Brush )
  1136.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1137.         Gdip_TextToGraphics( G , "17" , "s16 Center Bold c" Brush " x-1 y47" , "Segoe Ui" , 28 , 20 )
  1138.         Gdip_DeleteBrush( Brush )
  1139.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1140.         Gdip_TextToGraphics( G , "17" , "s16 Center Bold c" Brush " x0 y48" , "Segoe Ui" , 28 , 20 )
  1141.         Gdip_DeleteBrush( Brush )
  1142.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1143.         Gdip_TextToGraphics( G , "18" , "s16 Center Bold c" Brush " x-1 y88" , "Segoe Ui" , 28 , 20 )
  1144.         Gdip_DeleteBrush( Brush )
  1145.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1146.         Gdip_TextToGraphics( G , "18" , "s16 Center Bold c" Brush " x0 y89" , "Segoe Ui" , 28 , 20 )
  1147.         Gdip_DeleteBrush( Brush )
  1148.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1149.         Gdip_TextToGraphics( G , "19" , "s16 Center Bold c" Brush " x-1 y129" , "Segoe Ui" , 28 , 20 )
  1150.         Gdip_DeleteBrush( Brush )
  1151.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1152.         Gdip_TextToGraphics( G , "19" , "s16 Center Bold c" Brush " x0 y130" , "Segoe Ui" , 28 , 20 )
  1153.         Gdip_DeleteBrush( Brush )
  1154.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1155.         Gdip_TextToGraphics( G , "20" , "s16 Center Bold c" Brush " x-1 y170" , "Segoe Ui" , 28 , 20 )
  1156.         Gdip_DeleteBrush( Brush )
  1157.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1158.         Gdip_TextToGraphics( G , "20" , "s16 Center Bold c" Brush " x0 y171" , "Segoe Ui" , 28 , 20 )
  1159.         Gdip_DeleteBrush( Brush )
  1160.         Gdip_DeleteGraphics( G )
  1161.         This.Num4_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1162.         Gdip_DisposeImage(pBitmap)
  1163.     }
  1164.     _Create_Num5(){
  1165.         ;Bitmap Created Using: HB Bitmap Maker
  1166.         pBitmap:=Gdip_CreateBitmap( 28 , 198 )
  1167.         G := Gdip_GraphicsFromImage( pBitmap )
  1168.         Gdip_SetSmoothingMode( G , 4 )
  1169.         Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1170.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 201 )
  1171.         Gdip_DeleteBrush( Brush )
  1172.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1173.         Gdip_TextToGraphics( G , "21" , "s16 Center Bold c" Brush " x-1 y6" , "Segoe Ui" , 28 , 20 )
  1174.         Gdip_DeleteBrush( Brush )
  1175.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1176.         Gdip_TextToGraphics( G , "21" , "s16 Center Bold c" Brush " x0 y7" , "Segoe Ui" , 28 , 20 )
  1177.         Gdip_DeleteBrush( Brush )
  1178.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1179.         Gdip_TextToGraphics( G , "22" , "s16 Center Bold c" Brush " x-1 y47" , "Segoe Ui" , 28 , 20 )
  1180.         Gdip_DeleteBrush( Brush )
  1181.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1182.         Gdip_TextToGraphics( G , "22" , "s16 Center Bold c" Brush " x0 y48" , "Segoe Ui" , 28 , 20 )
  1183.         Gdip_DeleteBrush( Brush )
  1184.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1185.         Gdip_TextToGraphics( G , "23" , "s16 Center Bold c" Brush " x-1 y88" , "Segoe Ui" , 28 , 20 )
  1186.         Gdip_DeleteBrush( Brush )
  1187.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1188.         Gdip_TextToGraphics( G , "23" , "s16 Center Bold c" Brush " x0 y89" , "Segoe Ui" , 28 , 20 )
  1189.         Gdip_DeleteBrush( Brush )
  1190.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1191.         Gdip_TextToGraphics( G , "24" , "s16 Center Bold c" Brush " x-1 y129" , "Segoe Ui" , 28 , 20 )
  1192.         Gdip_DeleteBrush( Brush )
  1193.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1194.         Gdip_TextToGraphics( G , "24" , "s16 Center Bold c" Brush " x0 y130" , "Segoe Ui" , 28 , 20 )
  1195.         Gdip_DeleteBrush( Brush )
  1196.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1197.         Gdip_TextToGraphics( G , "25" , "s16 Center Bold c" Brush " x-1 y170" , "Segoe Ui" , 28 , 20 )
  1198.         Gdip_DeleteBrush( Brush )
  1199.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1200.         Gdip_TextToGraphics( G , "25" , "s16 Center Bold c" Brush " x0 y171" , "Segoe Ui" , 28 , 20 )
  1201.         Gdip_DeleteBrush( Brush )
  1202.         Gdip_DeleteGraphics( G )
  1203.         This.Num5_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1204.         Gdip_DisposeImage(pBitmap)
  1205.     }
  1206.     _Create_Num6(){
  1207.         ;Bitmap Created Using: HB Bitmap Maker
  1208.         pBitmap:=Gdip_CreateBitmap( 28 , 198 )
  1209.         G := Gdip_GraphicsFromImage( pBitmap )
  1210.         Gdip_SetSmoothingMode( G , 4 )
  1211.         Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1212.         Gdip_FillRectangle( G , Brush , -2 , -2 , 32 , 201 )
  1213.         Gdip_DeleteBrush( Brush )
  1214.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1215.         Gdip_TextToGraphics( G , "26" , "s16 Center Bold c" Brush " x-1 y6" , "Segoe Ui" , 28 , 20 )
  1216.         Gdip_DeleteBrush( Brush )
  1217.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1218.         Gdip_TextToGraphics( G , "26" , "s16 Center Bold c" Brush " x0 y7" , "Segoe Ui" , 28 , 20 )
  1219.         Gdip_DeleteBrush( Brush )
  1220.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1221.         Gdip_TextToGraphics( G , "27" , "s16 Center Bold c" Brush " x-1 y47" , "Segoe Ui" , 28 , 20 )
  1222.         Gdip_DeleteBrush( Brush )
  1223.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1224.         Gdip_TextToGraphics( G , "27" , "s16 Center Bold c" Brush " x0 y48" , "Segoe Ui" , 28 , 20 )
  1225.         Gdip_DeleteBrush( Brush )
  1226.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1227.         Gdip_TextToGraphics( G , "28" , "s16 Center Bold c" Brush " x-1 y88" , "Segoe Ui" , 28 , 20 )
  1228.         Gdip_DeleteBrush( Brush )
  1229.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1230.         Gdip_TextToGraphics( G , "28" , "s16 Center Bold c" Brush " x0 y89" , "Segoe Ui" , 28 , 20 )
  1231.         Gdip_DeleteBrush( Brush )
  1232.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1233.         Gdip_TextToGraphics( G , "29" , "s16 Center Bold c" Brush " x-1 y129" , "Segoe Ui" , 28 , 20 )
  1234.         Gdip_DeleteBrush( Brush )
  1235.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1236.         Gdip_TextToGraphics( G , "29" , "s16 Center Bold c" Brush " x0 y130" , "Segoe Ui" , 28 , 20 )
  1237.         Gdip_DeleteBrush( Brush )
  1238.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1239.         Gdip_TextToGraphics( G , "30" , "s16 Center Bold c" Brush " x-1 y170" , "Segoe Ui" , 28 , 20 )
  1240.         Gdip_DeleteBrush( Brush )
  1241.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1242.         Gdip_TextToGraphics( G , "30" , "s16 Center Bold c" Brush " x0 y171" , "Segoe Ui" , 28 , 20 )
  1243.         Gdip_DeleteBrush( Brush )
  1244.         Gdip_DeleteGraphics( G )
  1245.         This.Num6_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1246.         Gdip_DisposeImage(pBitmap)
  1247.     }
  1248.     Draw_1(){
  1249.         SetImage(This.Hwnd,This.Num1_Bitmap)
  1250.     }
  1251.     Draw_2(){
  1252.         SetImage(This.Hwnd,This.Num2_Bitmap)
  1253.     }
  1254.     Draw_3(){
  1255.         SetImage(This.Hwnd,This.Num3_Bitmap)
  1256.     }
  1257.     Draw_4(){
  1258.         SetImage(This.Hwnd,This.Num4_Bitmap)
  1259.     }
  1260.     Draw_5(){
  1261.         SetImage(This.Hwnd,This.Num5_Bitmap)
  1262.     }
  1263.     Draw_6(){
  1264.         SetImage(This.Hwnd,This.Num6_Bitmap)
  1265.     }
  1266. }
  1267. ;-----------------------------------------------------------------------------------------------
  1268. ;------------------------------------------End Num Class----------------------------------------
  1269. ;-----------------------------------------------------------------------------------------------
  1270. ;Button Hover Function
  1271. ;*************************************************************************************************************
  1272. HB_Button_Hover(){
  1273.     static Hover_On,Index
  1274.     MouseGetPos,,,,ctrl,2
  1275.     if(!Hover_On&&ctrl){
  1276.         Loop,% HB_Button.Length()   {
  1277.             if(ctrl=HB_Button[A_Index].Hwnd)
  1278.                 HB_Button[A_Index].Draw_Hover(),Index:=A_Index,Hover_On:=1,break
  1279.         }
  1280.     }else if(Hover_On){
  1281.         if(HB_Button[Index].Hwnd!=ctrl)
  1282.             HB_Button[Index].Draw_Default(),Hover_On:=0
  1283.     }
  1284. }
  1285.  
  1286. ;--------------------------------------------------------------------------------------------------
  1287. ;--------------------------------Clipboard Master Button Class-------------------------------------
  1288. ;--------------------------------------------------------------------------------------------------
  1289. button:=New Cliheoirgy(10,44)
  1290. class Clipboard_Master_v2_Buttons   {
  1291.     __New(x:=10, y:=10, w:=100, h:=30, window:="1", Label:="", Text:="Button", Font:="Arial", Font_Size:="10 Bold", Font_Color_Top:="FFFFFF", Font_Color_Bottom:="000000", Background_Color:="333437", y_Offset:=0, Typek:="",Name:="" ){
  1292.         This.X:=x,This.Y:=y,This.W:=w,This.H:=h
  1293.         This.Window:=window,This.Label:=Label
  1294.         This.Background_Color:="0xFF" Background_Color
  1295.         This.Text:=Text,This.Font:=Font
  1296.         This.Font_Color_Top:="0xFF" Font_Color_Top
  1297.         This.Font_Color_Bottom:="0xFF" Font_Color_Bottom
  1298.         This.Font_Size:=Font_Size
  1299.         This.Y_Offset:=y_Offset
  1300.        
  1301.         This.Type:=Typek
  1302.         This.Name:=Name
  1303.        
  1304.         This._Create_Trigger()
  1305.         This._Create_Default_Bitmap()
  1306.         This._Create_Hover_Bitmap()
  1307.         This._Create_Pressed_Bitmap()
  1308.         Sleep, 20
  1309.         This.Draw_Default()
  1310.         GuiControl,% This.Window ":Focus",% This.Hwnd
  1311.     }
  1312.     _Create_Trigger(){
  1313.         local hwnd,bbp
  1314.         Gui,% This.Window ":Add",Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " hwndhwnd 0xE"
  1315.         This.Hwnd:=hwnd
  1316.         bbp:=This._Draw_Pressed.Bind(This)
  1317.         GuiControl,% This.Window ":+G",% This.Hwnd,% bbp
  1318.         if(This.Label)
  1319.             (isFunc(This.Label))?(This.Function:=Func(This.Label))
  1320.     }
  1321.     _Create_Default_Bitmap(){
  1322.         ;Bitmap Created Using: HB Bitmap Maker
  1323.         pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;106 , 36
  1324.         G := Gdip_GraphicsFromImage( pBitmap )
  1325.         Gdip_SetSmoothingMode( G , 1 )
  1326.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1327.         ;~ Gdip_FillRectangle( G , Brush , -2 , 0 , 109 , 39 )
  1328.         Gdip_FillRectangle( G , Brush , -2 , 0 , This.W+3 , This.H+3 )
  1329.         Gdip_DeleteBrush( Brush )
  1330.         ;~ Brush := Gdip_BrushCreateSolid( "0xFF141416" )   ;<----------------------------------
  1331.         Brush := Gdip_BrushCreateSolid( "0xFF252627" )   ;<----------------------------------
  1332.         ;~ Gdip_FillRectangle( G , Brush , 3 , 3 , 100 , 30 )
  1333.         Gdip_FillRectangle( G , Brush , 3 , 3 , This.W-6 , This.H-6 ) ;<--------------------------------------------
  1334.         Gdip_DeleteBrush( Brush )
  1335.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 3 , 97 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1336.         Brush := Gdip_CreateLineBrushFromRect( 4 , 3 , This.W-9 , This.H-7 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1337.         ;~ Gdip_FillRectangle( G , Brush , 4 , 4 , 98 , 28 )
  1338.         Gdip_FillRectangle( G , Brush , 4 , 4 , This.W-8 , This.H-8 )
  1339.         Gdip_DeleteBrush( Brush )
  1340.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1341.         ;~ Gdip_DrawLine( G , Pen , 4 , 4 , 101 , 4 )
  1342.         Gdip_DrawLine( G , Pen , 4 , 4 , This.W-5 , 4 )
  1343.         Gdip_DeletePen( Pen )
  1344.         ;~ Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1345.         Brush := Gdip_BrushCreateSolid( This.Font_Color_Bottom )
  1346.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y" 1+This.Y_Offset , This.Font , This.W , This.H )
  1347.         Gdip_DeleteBrush( Brush )
  1348.         Brush := Gdip_BrushCreateSolid( This.Font_Color_Top )
  1349.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y" 2+This.Y_Offset , This.Font , This.W , This.H )
  1350.         Gdip_DeleteBrush( Brush )
  1351.         Gdip_DeleteGraphics( G )
  1352.         This.Default_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1353.         Gdip_DisposeImage(pBitmap)
  1354.     }
  1355.     _Create_Hover_Bitmap(){
  1356.         ;Bitmap Created Using: HB Bitmap Maker
  1357.         pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;106 , 36
  1358.         G := Gdip_GraphicsFromImage( pBitmap )
  1359.         Gdip_SetSmoothingMode( G , 1 )
  1360.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1361.         ;~ Gdip_FillRectangle( G , Brush , -2 , 0 , 109 , 39 )
  1362.         Gdip_FillRectangle( G , Brush , -2 , 0 , This.W+3 , This.H+3 )
  1363.         Gdip_DeleteBrush( Brush )
  1364.         ;~ Brush := Gdip_BrushCreateSolid( "0xFF141416" )  ;<------------------------------------------------------------
  1365.         ;~ Brush := Gdip_BrushCreateSolid( "0xFF0066cc" )  ;<------------------------------------------------------------
  1366.         Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )  ;<------------------------------------------------------------
  1367.         ;~ Gdip_FillRectangle( G , Brush , 3 , 3 , 100 , 30 )
  1368.         Gdip_FillRectangle( G , Brush , 3 , 3 , This.W-6 , This.H-6 )
  1369.         Gdip_DeleteBrush( Brush )
  1370.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 3 , 97 , 29 , "0xFF464C55" , "0xFF3B3C3E" , 1 , 1 )
  1371.         Brush := Gdip_CreateLineBrushFromRect( 4 , 3 , This.W-9 , This.H-7 , "0xFF464C55" , "0xFF3B3C3E" , 1 , 1 )
  1372.         ;~ Gdip_FillRectangle( G , Brush , 4 , 4 , 98 , 28 )
  1373.         Gdip_FillRectangle( G , Brush , 4 , 4 , This.W-8 , This.H-8 )
  1374.         Gdip_DeleteBrush( Brush )
  1375.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1376.         ;~ Gdip_DrawLine( G , Pen , 4 , 4 , 101 , 4 )
  1377.         Gdip_DrawLine( G , Pen , 4 , 4 , This.W-5 , 4 )
  1378.         Gdip_DeletePen( Pen )
  1379.         Brush := Gdip_BrushCreateSolid( This.Font_Color_Bottom )
  1380.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y" 1+This.Y_Offset , This.Font , This.W , This.H )
  1381.         Gdip_DeleteBrush( Brush )
  1382.         Brush := Gdip_BrushCreateSolid( This.Font_Color_Top )
  1383.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y" 2+This.Y_Offset , This.Font , This.W , This.H )
  1384.         Gdip_DeleteBrush( Brush )
  1385.         Gdip_DeleteGraphics( G )
  1386.         This.Hover_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1387.         Gdip_DisposeImage(pBitmap)
  1388.     }
  1389.     _Create_Pressed_Bitmap(){
  1390.         ;Bitmap Created Using: HB Bitmap Maker
  1391.         pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;106 , 36
  1392.         G := Gdip_GraphicsFromImage( pBitmap )
  1393.         Gdip_SetSmoothingMode( G , 1 )
  1394.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1395.         ;~ Gdip_FillRectangle( G , Brush , -2 , 0 , 109 , 39 )
  1396.         Gdip_FillRectangle( G , Brush , -2 , 0 , This.W+3 , This.H+3 )
  1397.         Gdip_DeleteBrush( Brush )
  1398.         ;~ Brush := Gdip_BrushCreateSolid( "0xFF141416" ) ;<----------------------------------------------
  1399.         ;~ Brush := Gdip_BrushCreateSolid( "0xFF0044aa" ) ;<----------------------------------------------
  1400.         ;----------------------------------------------------------------
  1401.         cc:="0xFF" ColorSet[1]
  1402.         Match := StrSplit(RegExReplace(cc, "^0x(..)(..)(..)(..)$", "0x$1 0x$2 0x$3 0x$4"), " ")
  1403.         cc := Format("0x{:02X}{:02X}{:02X}{:02X}", Match.1, Max(Match.2-0x33,0), Max(Match.3-0x33,0), Max(Match.4-0x33,0))
  1404.         Brush := Gdip_BrushCreateSolid( cc )
  1405.         ;----------------------------------------------------------------
  1406.         ;~ Gdip_FillRectangle( G , Brush , 3 , 3 , 100 , 30 )
  1407.         Gdip_FillRectangle( G , Brush , 3 , 3 , This.W-6 , This.H-6 )
  1408.         Gdip_DeleteBrush( Brush )
  1409.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 3 , 97 , 29 , "0xFF2B2C2E" , "0xFF363C45" , 1 , 1 )
  1410.         Brush := Gdip_CreateLineBrushFromRect( 4 , 3 , This.W-9 , This.H-7 , "0xFF2B2C2E" , "0xFF363C45" , 1 , 1 )
  1411.         ;~ Gdip_FillRectangle( G , Brush , 4 , 4 , 98 , 28 )
  1412.         Gdip_FillRectangle( G , Brush , 4 , 4 , This.W-8 , This.H-8 )
  1413.         Gdip_DeleteBrush( Brush )
  1414.         Pen := Gdip_CreatePen( "0x881D232B" , 1 )
  1415.         ;~ Gdip_DrawLine( G , Pen , 4 , 31 , 101 , 31 )
  1416.         if(HB_Button.Length()+1=884)  ;<------ Disabling the bottom line for testing
  1417.         Gdip_DrawLine( G , Pen , 4 , This.H-5 , This.W-5 , This.H-5 )
  1418.         Gdip_DeletePen( Pen )
  1419.         Pen := Gdip_CreatePen( "0x881D232B" , 1 )
  1420.         ;~ Gdip_DrawLine( G , Pen , 4 , 4 , 101 , 4 )
  1421.         Gdip_DrawLine( G , Pen , 4 , 4 , This.W-5 , 4 )
  1422.         Gdip_DeletePen( Pen )
  1423.         ;~ Pen := Gdip_CreatePen( "0x881D232B" , 1 )
  1424.         Pen := Gdip_CreatePen( "0x881D232B" , 1 )
  1425.         ;~ Gdip_DrawLine( G , Pen , 4 , 4 , 4 , 30 )
  1426.         Gdip_DrawLine( G , Pen , 4 , 4 , 4 , This.H-6 )
  1427.         Gdip_DeletePen( Pen )
  1428.         Pen := Gdip_CreatePen( "0x881D232B" , 1 )
  1429.         ;~ Gdip_DrawLine( G , Pen , 101 , 4 , 101 , 30 )
  1430.         Gdip_DrawLine( G , Pen , This.W-5 , 4 , This.W-5 , This.H-6 )
  1431.         Gdip_DeletePen( Pen )
  1432.         Brush := Gdip_BrushCreateSolid( This.Font_Color_Bottom )
  1433.         ;~ Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y" 0+This.Y_Offset , This.Font , This.W , This.H )
  1434.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y" 2+This.Y_Offset , This.Font , This.W , This.H )
  1435.         Gdip_DeleteBrush( Brush )
  1436.         Brush := Gdip_BrushCreateSolid( This.Font_Color_Top )
  1437.         ;~ Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y" 1+This.Y_Offset , This.Font , This.W , This.H )
  1438.         Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y" 3+This.Y_Offset , This.Font , This.W , This.H )
  1439.         Gdip_DeleteBrush( Brush )
  1440.         Gdip_DeleteGraphics( G )
  1441.         This.Pressed_Bitmap:=Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1442.         Gdip_DisposeImage(pBitmap)
  1443.     }
  1444.     _Draw_Pressed(){
  1445.         local ctrl
  1446.         GuiControl,% This.Window ":Focus",% This.Hwnd
  1447.         SetTimer,HB_Button_Hover,Off
  1448.         SetImage(This.Hwnd,This.Pressed_Bitmap)
  1449.         While(GetKeyState("LButton"))
  1450.             Sleep,10
  1451.         SetTimer,HB_Button_Hover,On
  1452.         MouseGetPos,,,,ctrl,2
  1453.         if(ctrl=This.Hwnd){
  1454.             This.Draw_Hover()
  1455.             if(This.Function)
  1456.                 This.Function.Call()
  1457.             else if(This.Label)
  1458.                 gosub,% This.Label
  1459.         }else   {
  1460.             This.Draw_Default()
  1461.         }
  1462.     }
  1463.     Draw_Hover(){
  1464.         SetImage(This.Hwnd,This.Hover_Bitmap)
  1465.     }
  1466.     Draw_Default(){
  1467.         SetImage(This.Hwnd,This.Default_Bitmap)
  1468.     }
  1469. }
  1470.  
  1471. ;--------------------------------------------------------------------------------------------------
  1472. ;--------------------------------End of class------------------------------------------------------
  1473. ;--------------------------------------------------------------------------------------------------
  1474.  
  1475. ;*******************************************************************************************************************
  1476. ;**********************************         Tab Class         ******************************************************
  1477. ;*******************************************************************************************************************
  1478.  
  1479. class Dark_3_Tabs_1 {
  1480.     __New(x:=10, y:=10, window:="1", label:="", Selected_Tab:=1, Background_Color:="333437",Font_Color:="F0F0F0"){
  1481.         This.X:=x
  1482.         This.Y:=y
  1483.         This.W:=311
  1484.         This.H:=36
  1485.        
  1486.         This.Window:=window
  1487.         This.Label:=Label
  1488.        
  1489.         This.Tab:=Selected_Tab
  1490.        
  1491.         This.Background_Color:="0xFF" Background_Color
  1492.        
  1493.         This.Font_Color:="0xFF" Font_Color
  1494.        
  1495.         This._Create_Trigger()
  1496.         This._Create_Tab1_Bitmap()
  1497.         This._Create_Tab2_Bitmap()
  1498.         This._Create_Tab3_Bitmap()
  1499.         sleep 20
  1500.         (This.Tab=1)?(SetImage(This.Hwnd,This.Tab1_Bitmap)):(This.Tab=2)?(SetImage(This.Hwnd,This.Tab2_Bitmap)):(This.Tab=3)?(SetImage(This.Hwnd,This.Tab3_Bitmap))
  1501.        
  1502.     }
  1503.     _Create_Trigger(){
  1504.         local hwnd
  1505.         Gui,% This.Window ":Add",Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " hwndhwnd 0xE"
  1506.         This.hwnd:=hwnd
  1507.         Gui,% This.Window ":Add",Text,% "x" This.X+3 " y" This.Y+6 " w99 h28 BackgroundTrans hwndhwnd"
  1508.         This.Tab1_Hwnd:=hwnd
  1509.         Gui,% This.Window ":Add",Text,% "x" This.X+104 " y" This.Y+5 " w100 h30 BackgroundTrans hwndhwnd"
  1510.         This.Tab2_Hwnd:=hwnd
  1511.         Gui,% This.Window ":Add",Text,% "x" This.X+206 " y" This.Y+5 " w100 h30 BackgroundTrans hwndhwnd"
  1512.         This.Tab3_Hwnd:=hwnd
  1513.        
  1514.         TabBind:=This._Switch_Tab1.Bind(This)
  1515.         GuiControl,% This.Window ":+G",% This.Tab1_Hwnd,% TabBind
  1516.         TabBind:=This._Switch_Tab2.Bind(This)
  1517.         GuiControl,% This.Window ":+G",% This.Tab2_Hwnd,% TabBind
  1518.         TabBind:=This._Switch_Tab3.Bind(This)
  1519.         GuiControl,% This.Window ":+G",% This.Tab3_Hwnd,% TabBind
  1520.         if(This.Label)
  1521.             (isFunc(This.Label))?(This.Function:=Func(This.Label))
  1522.     }
  1523.     _Create_Tab1_Bitmap(){
  1524.         ;Bitmap Created Using: HB Bitmap Maker
  1525.         pBitmap:=Gdip_CreateBitmap( 311 , 36 )
  1526.         G := Gdip_GraphicsFromImage( pBitmap )
  1527.         Gdip_SetSmoothingMode( G , 1 )
  1528.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1529.         Gdip_FillRectangle( G , Brush , -2 , -2 , 317 , 42 )
  1530.         Gdip_DeleteBrush( Brush )
  1531.         Brush := Gdip_BrushCreateSolid( "0xFF141416" )
  1532.         ;~ Gdip_FillRectangle( G , Brush , 2 , 2 , 307 , 32 )
  1533.         Gdip_FillRectangle( G , Brush , 3 , 2 , 305 , 32 )
  1534.         Gdip_DeleteBrush( Brush )
  1535.         Brush := Gdip_CreateLineBrushFromRect( 207 , 4 , 98 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1536.         Gdip_FillRectangle( G , Brush , 207 , 3 , 100 , 30 )
  1537.         Gdip_DeleteBrush( Brush )
  1538.         Brush := Gdip_CreateLineBrushFromRect( 207 , 4 , 98 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1539.         Gdip_FillRectangle( G , Brush , 105 , 3 , 100 , 30 )
  1540.         Gdip_DeleteBrush( Brush )
  1541.         ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFF1177dd" , 1 , 1 ) ;<-----------------------------------------
  1542.         Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF242527" , "0xFF45474a" , 1 , 1 )
  1543.         ;~ Gdip_FillRectangle( G , Brush , 4 , 4 , 99 , 28 )
  1544.         Gdip_FillRectangle( G , Brush , 4 , 4 , 99 , 29 )
  1545.         Gdip_DeleteBrush( Brush )
  1546.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 1 , 99 , 29 , "0x66000000" , "0x77222222" , 1 , 1 ) ;<----------------------------------------------
  1547.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 1 , 99 , 29 , "0x33000000" , "0x33222222" , 1 , 1 )
  1548.         ;~ Gdip_FillRectangle( G , Brush , 4 , 4 , 99 , 28 )
  1549.         ;~ Gdip_FillRectangle( G , Brush , 4 , 4 , 99 , 29 ) ;<----------------------------------------------
  1550.         Gdip_DeleteBrush( Brush )
  1551.         ;Tab 1 text
  1552.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1553.         ;Tab 1 text
  1554.         ;~ Gdip_TextToGraphics( G , "Tab 1" , "s12 Center vCenter Bold c" Brush " x3 y6" , "Arial" , 99 , 28 )
  1555.         Gdip_TextToGraphics( G , "Page 1" , "s12 Center vCenter Bold c" Brush " x3 y6" , "Arial" , 99 , 28 )
  1556.         Gdip_DeleteBrush( Brush )
  1557.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1558.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1559.         Gdip_TextToGraphics( G , "Page 1" , "s12 Center vCenter Bold c" Brush " x4 y7" , "Arial" , 99 , 28 )
  1560.         Gdip_DeleteBrush( Brush )
  1561.         ;tab 2 text
  1562.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1563.         ;tab 2 text
  1564.         Gdip_TextToGraphics( G , "Page 2" , "s12 Center vCenter Bold c" Brush " x104 y5" , "Arial" , 100 , 30 )
  1565.         Gdip_DeleteBrush( Brush )
  1566.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1567.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1568.         Gdip_TextToGraphics( G , "Page 2" , "s12 Center vCenter Bold c" Brush " x105 y6" , "Arial" , 100 , 30 )
  1569.         Gdip_DeleteBrush( Brush )
  1570.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1571.         ;~ Gdip_DrawLine( G , Pen , 106 , 4 , 204 , 4 )
  1572.         Gdip_DrawLine( G , Pen , 106 , 3 , 204 , 3 )
  1573.         Gdip_DeletePen( Pen )
  1574.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1575.         ;~ Gdip_DrawLine( G , Pen , 208 , 4 , 306 , 4 )
  1576.         Gdip_DrawLine( G , Pen , 208 , 3 , 306 , 3 )
  1577.         Gdip_DeletePen( Pen )
  1578.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1579.         Gdip_TextToGraphics( G , "Page 3" , "s12 Center vCenter Bold c" Brush " x206 y5" , "Arial" , 100 , 30 )
  1580.         Gdip_DeleteBrush( Brush )
  1581.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1582.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1583.         Gdip_TextToGraphics( G , "Page 3" , "s12 Center vCenter Bold c" Brush " x207 y6" , "Arial" , 100 , 30 )
  1584.         Gdip_DeleteBrush( Brush )
  1585.         Gdip_DeleteGraphics( G )
  1586.         This.Tab1_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1587.         Gdip_DisposeImage(pBitmap)
  1588.     }
  1589.     _Create_Tab2_Bitmap(){
  1590.         ;Bitmap Created Using: HB Bitmap Maker
  1591.         pBitmap:=Gdip_CreateBitmap( 311 , 36 )
  1592.         G := Gdip_GraphicsFromImage( pBitmap )
  1593.         Gdip_SetSmoothingMode( G , 1 )
  1594.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1595.         Gdip_FillRectangle( G , Brush , -2 , -2 , 317 , 42 )
  1596.         Gdip_DeleteBrush( Brush )
  1597.         Brush := Gdip_BrushCreateSolid( "0xFF141416" )
  1598.         ;~ Gdip_FillRectangle( G , Brush , 2 , 2 , 307 , 32 )
  1599.         Gdip_FillRectangle( G , Brush , 3 , 2 , 305 , 32 )
  1600.         Gdip_DeleteBrush( Brush )
  1601.         Brush := Gdip_CreateLineBrushFromRect( 207 , 4 , 98 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1602.         Gdip_FillRectangle( G , Brush , 207 , 3 , 100 , 30 )
  1603.         Gdip_DeleteBrush( Brush )
  1604.         Brush := Gdip_CreateLineBrushFromRect( 207 , 4 , 98 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1605.         Gdip_FillRectangle( G , Brush , 4 , 3 , 100 , 30 )
  1606.         Gdip_DeleteBrush( Brush )
  1607.         ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFF1177dd" , 1 , 1 )
  1608.         Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF242527" , "0xFF45474a" , 1 , 1 )
  1609.         ;~ Gdip_FillRectangle( G , Brush , 106 , 4 , 99 , 28 )
  1610.         Gdip_FillRectangle( G , Brush , 106 , 4 , 99 , 29 )
  1611.         Gdip_DeleteBrush( Brush )
  1612.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 1 , 99 , 29 , "0x66000000" , "0x77222222" , 1 , 1 )
  1613.         ;~ Gdip_FillRectangle( G , Brush , 106 , 4 , 99 , 28 )
  1614.         ;~ Gdip_FillRectangle( G , Brush , 106 , 4 , 99 , 29 )
  1615.         ;~ Gdip_DeleteBrush( Brush )
  1616.         ;Tab 1 text
  1617.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1618.         ;Tab 1 text
  1619.         Gdip_TextToGraphics( G , "Page 1" , "s12 Center vCenter Bold c" Brush " x3 y5" , "Arial" , 99 , 28 )
  1620.         Gdip_DeleteBrush( Brush )
  1621.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1622.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1623.         Gdip_TextToGraphics( G , "Page 1" , "s12 Center vCenter Bold c" Brush " x4 y6" , "Arial" , 99 , 28 )
  1624.         Gdip_DeleteBrush( Brush )
  1625.         ;tab 2 text
  1626.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1627.         ;tab 2 text
  1628.         Gdip_TextToGraphics( G , "Page 2" , "s12 Center vCenter Bold c" Brush " x104 y6" , "Arial" , 100 , 30 )
  1629.         Gdip_DeleteBrush( Brush )
  1630.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1631.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1632.         Gdip_TextToGraphics( G , "Page 2" , "s12 Center vCenter Bold c" Brush " x105 y7" , "Arial" , 100 , 30 )
  1633.         Gdip_DeleteBrush( Brush )
  1634.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1635.         ;~ Gdip_DrawLine( G , Pen , 5 , 4 , 103 , 4 )
  1636.         Gdip_DrawLine( G , Pen , 5 , 3 , 103 , 3 )
  1637.         Gdip_DeletePen( Pen )
  1638.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1639.         ;~ Gdip_DrawLine( G , Pen , 208 , 4 , 306 , 4 )
  1640.         Gdip_DrawLine( G , Pen , 208 , 3 , 306 , 3 )
  1641.         Gdip_DeletePen( Pen )
  1642.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1643.         Gdip_TextToGraphics( G , "Page 3" , "s12 Center vCenter Bold c" Brush " x206 y5" , "Arial" , 100 , 30 )
  1644.         Gdip_DeleteBrush( Brush )
  1645.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1646.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1647.         Gdip_TextToGraphics( G , "Page 3" , "s12 Center vCenter Bold c" Brush " x207 y6" , "Arial" , 100 , 30 )
  1648.         Gdip_DeleteBrush( Brush )
  1649.         Gdip_DeleteGraphics( G )
  1650.         This.Tab2_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1651.         Gdip_DisposeImage(pBitmap)
  1652.     }
  1653.     _Create_Tab3_Bitmap(){
  1654.         ;Bitmap Created Using: HB Bitmap Maker
  1655.         pBitmap:=Gdip_CreateBitmap( 311 , 36 )
  1656.         G := Gdip_GraphicsFromImage( pBitmap )
  1657.         Gdip_SetSmoothingMode( G , 1 )
  1658.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1659.         Gdip_FillRectangle( G , Brush , -2 , -2 , 317 , 42 )
  1660.         Gdip_DeleteBrush( Brush )
  1661.         Brush := Gdip_BrushCreateSolid( "0xFF141416" )
  1662.         ;~ Gdip_FillRectangle( G , Brush , 2 , 2 , 307 , 32 )
  1663.         Gdip_FillRectangle( G , Brush , 3 , 2 , 305 , 32 )
  1664.         Gdip_DeleteBrush( Brush )
  1665.         Brush := Gdip_CreateLineBrushFromRect( 207 , 4 , 98 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1666.         Gdip_FillRectangle( G , Brush , 106 , 3 , 100 , 30 )
  1667.         Gdip_DeleteBrush( Brush )
  1668.         Brush := Gdip_CreateLineBrushFromRect( 207 , 4 , 98 , 29 , "0xFF363C45" , "0xFF2B2C2E" , 1 , 1 )
  1669.         Gdip_FillRectangle( G , Brush , 4 , 3 , 100 , 30 )
  1670.         Gdip_DeleteBrush( Brush )
  1671.         ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFF1177dd" , 1 , 1 )
  1672.         Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF242527" , "0xFF45474a" , 1 , 1 )
  1673.         ;~ Gdip_FillRectangle( G , Brush , 208 , 4 , 99 , 28 )
  1674.         Gdip_FillRectangle( G , Brush , 208 , 4 , 99 , 29 )
  1675.         Gdip_DeleteBrush( Brush )
  1676.         ;~ Brush := Gdip_CreateLineBrushFromRect( 4 , 1 , 99 , 29 , "0x66000000" , "0x77222222" , 1 , 1 )
  1677.         ;~ Gdip_FillRectangle( G , Brush , 208 , 4 , 99 , 28 )
  1678.         ;~ Gdip_FillRectangle( G , Brush , 208 , 4 , 99 , 29 )
  1679.         ;~ Gdip_DeleteBrush( Brush )
  1680.         ;Tab 1 text
  1681.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1682.         ;Tab 1 text
  1683.         Gdip_TextToGraphics( G , "Page 1" , "s12 Center vCenter Bold c" Brush " x3 y5" , "Arial" , 99 , 28 )
  1684.         Gdip_DeleteBrush( Brush )
  1685.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1686.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1687.         Gdip_TextToGraphics( G , "Page 1" , "s12 Center vCenter Bold c" Brush " x4 y6" , "Arial" , 99 , 28 )
  1688.         Gdip_DeleteBrush( Brush )
  1689.         ;tab 2 text
  1690.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1691.         ;tab 2 text
  1692.         Gdip_TextToGraphics( G , "Page 2" , "s12 Center vCenter Bold c" Brush " x104 y5" , "Arial" , 100 , 30 )
  1693.         Gdip_DeleteBrush( Brush )
  1694.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1695.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1696.         Gdip_TextToGraphics( G , "Page 2" , "s12 Center vCenter Bold c" Brush " x105 y6" , "Arial" , 100 , 30 )
  1697.         Gdip_DeleteBrush( Brush )
  1698.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1699.         ;~ Gdip_DrawLine( G , Pen , 5 , 4 , 103 , 4 )
  1700.         Gdip_DrawLine( G , Pen , 5 , 3 , 103 , 3 )
  1701.         Gdip_DeletePen( Pen )
  1702.         Pen := Gdip_CreatePen( "0xFF4D535B" , 1 )
  1703.         ;~ Gdip_DrawLine( G , Pen , 107 , 4 , 205 , 4 )
  1704.         Gdip_DrawLine( G , Pen , 107 , 3 , 205 , 3 )
  1705.         Gdip_DeletePen( Pen )
  1706.         Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  1707.         Gdip_TextToGraphics( G , "Page 3" , "s12 Center vCenter Bold c" Brush " x206 y6" , "Arial" , 100 , 30 )
  1708.         Gdip_DeleteBrush( Brush )
  1709.         ;~ Brush := Gdip_BrushCreateSolid( "0xFFF0F0F0" )
  1710.         Brush := Gdip_BrushCreateSolid( This.Font_Color )
  1711.         Gdip_TextToGraphics( G , "Page 3" , "s12 Center vCenter Bold c" Brush " x207 y7" , "Arial" , 100 , 30 )
  1712.         Gdip_DeleteBrush( Brush )
  1713.         Gdip_DeleteGraphics( G )
  1714.         This.Tab3_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1715.         Gdip_DisposeImage(pBitmap)
  1716.     }
  1717.     _Switch_Tab1(){
  1718.         GuiControl,% This.Window ":Focus",% This.Hwnd
  1719.         if(This.Tab!=1){
  1720.             SetImage(This.Hwnd,This.Tab1_Bitmap)
  1721.             This.Tab:=1
  1722.             This._Sub_Redirect()
  1723.         }
  1724.     }
  1725.     _Switch_Tab2(){
  1726.         GuiControl,% This.Window ":Focus",% This.Hwnd
  1727.         if(This.Tab!=2){
  1728.             SetImage(This.Hwnd,This.Tab2_Bitmap)
  1729.             This.Tab:=2
  1730.             This._Sub_Redirect()
  1731.         }
  1732.     }
  1733.     _Switch_Tab3(){
  1734.         GuiControl,% This.Window ":Focus",% This.Hwnd
  1735.         if(This.Tab!=3){
  1736.             SetImage(This.Hwnd,This.Tab3_Bitmap)
  1737.             This.Tab:=3
  1738.             This._Sub_Redirect()
  1739.         }
  1740.     }
  1741.     _Sub_Redirect(){
  1742.         if(This.Function){
  1743.             This.Function.Call()
  1744.         }else if(This.Label){
  1745.             gosub,% This.Label
  1746.         }
  1747.     }
  1748. }
  1749. ;*******************************************************************************************************************
  1750. ;********************************         Tab Class End        *****************************************************
  1751. ;*******************************************************************************************************************
  1752. ;####################################################################################################################
  1753. ;###########################################      Switch Class      #################################################
  1754. ;####################################################################################################################
  1755. class Flat_Round_Switch_Type_1  {
  1756.     __New(x,y,w:=19,Text:="Text",Font:="Arial",FontSize:= "10 Bold" , FontColor:="FFFFFF" ,Window:="1",Background_Color:="36373A",State:=0,Label:="",Type:="",Tab1_Value:="",Tab2_Value:="",Tab3_Value:=""){
  1757.         This.State:=State
  1758.         This.X:=x
  1759.         This.Y:=y
  1760.         This.W:=w
  1761.         This.H:=21
  1762.         This.Text:=Text
  1763.         This.Font:=Font
  1764.         This.FontSize:=FontSize
  1765.         This.FontColor:= "0xFF" FontColor
  1766.         This.Background_Color:= "0xFF" Background_Color
  1767.         This.Window:=Window
  1768.         This.Create_Off_Bitmap()
  1769.         This.Create_On_Bitmap()
  1770.         This.Create_Trigger()
  1771.         This.Label:=Label
  1772.        
  1773.         This.Type:=Type
  1774.         This.Tab1_Value:=Tab1_Value
  1775.         This.Tab2_Value:=Tab2_Value
  1776.         This.Tab3_Value:=Tab3_Value
  1777.         sleep,20
  1778.         if(This.State)
  1779.             This.Draw_On()
  1780.         else
  1781.             This.Draw_Off()
  1782.     }
  1783.     Create_Trigger(){
  1784.         Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " 0xE hwndhwnd"
  1785.         This.Hwnd:=hwnd
  1786.         BD := THIS.Switch_State.BIND( THIS )
  1787.         GUICONTROL +G , % This.Hwnd , % BD
  1788.     }
  1789.     Create_Off_Bitmap(){
  1790.         ;Bitmap Created Using: HB Bitmap Maker
  1791.         pBitmap:=Gdip_CreateBitmap( This.W , 21 )
  1792.          G := Gdip_GraphicsFromImage( pBitmap )
  1793.         Gdip_SetSmoothingMode( G , 2 )
  1794.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1795.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , 23 )
  1796.         Gdip_DeleteBrush( Brush )
  1797.         Pen := Gdip_CreatePen( "0xFF44474A" , 1 )
  1798.         Gdip_DrawRoundedRectangle( G , Pen , 1 , 2 , 26 , 14 , 5 )
  1799.         Gdip_DeletePen( Pen )
  1800.         Pen := Gdip_CreatePen( "0xFF1B1D1E" , 1 )
  1801.         Gdip_DrawRoundedRectangle( G , Pen , 1 , 2 , 26 , 13 , 5 )
  1802.         Gdip_DeletePen( Pen )
  1803.         Brush := Gdip_BrushCreateSolid( "0xFF262827" )
  1804.         Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , 26 , 13 , 5 )
  1805.         Gdip_DeleteBrush( Brush )
  1806.         Brush := Gdip_BrushCreateSolid( "0xFF303334" )
  1807.         Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , 24 , 11 , 5 )
  1808.         Gdip_DeleteBrush( Brush )
  1809.         Brush := Gdip_BrushCreateSolid( "0x8827282B" )
  1810.         Gdip_FillEllipse( G , Brush , 0 , 0 , 18 , 18 )
  1811.         Gdip_DeleteBrush( Brush )
  1812.         Brush := Gdip_BrushCreateSolid( "0xFF1A1C1F" )
  1813.         Gdip_FillEllipse( G , Brush , 0 , 0 , 17 , 17 )
  1814.         Gdip_DeleteBrush( Brush )
  1815.         Brush := Gdip_CreateLineBrushFromRect( 3 , 2 , 11 , 14 , "0xFF60646A" , "0xFF393B3F" , 1 , 1 )
  1816.         Gdip_FillEllipse( G , Brush , 1 , 1 , 15 , 15 )
  1817.         Gdip_DeleteBrush( Brush )
  1818.         Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , 10 , 12 , "0xFF4D5055" , "0xFF36383B" , 1 , 1 )
  1819.         Gdip_FillEllipse( G , Brush , 2 , 2 , 13 , 13 )
  1820.         Gdip_DeleteBrush( Brush )
  1821.         Brush := Gdip_BrushCreateSolid( This.FontColor )
  1822.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter cFF000000 x32 y-1" , This.Font , This.W-33, This.H )
  1823.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c" Brush " x33 y0" , This.Font , This.W-33, This.H )
  1824.         Gdip_DeleteBrush( Brush )
  1825.         Gdip_DeleteGraphics( G )
  1826.         This.Off_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1827.         Gdip_DisposeImage(pBitmap)
  1828.     }
  1829.     Create_On_Bitmap(){
  1830.         ;Bitmap Created Using: HB Bitmap Maker
  1831.         pBitmap:=Gdip_CreateBitmap( This.W , 21 )
  1832.          G := Gdip_GraphicsFromImage( pBitmap )
  1833.         Gdip_SetSmoothingMode( G , 2 )
  1834.         Brush := Gdip_BrushCreateSolid( This.Background_Color )
  1835.         Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , 23 )
  1836.         Gdip_DeleteBrush( Brush )
  1837.         Pen := Gdip_CreatePen( "0xFF44474A" , 1 )
  1838.         Gdip_DrawRoundedRectangle( G , Pen , 1 , 2 , 26 , 14 , 5 )
  1839.         Gdip_DeletePen( Pen )
  1840.         Pen := Gdip_CreatePen( "0xFF1B1D1E" , 1 )
  1841.         Gdip_DrawRoundedRectangle( G , Pen , 1 , 2 , 26 , 13 , 5 )
  1842.         Gdip_DeletePen( Pen )
  1843.         if(Classic=1){
  1844.             ;~ Brush := Gdip_BrushCreateSolid( "0xFF716A24" )  ;inner top
  1845.             ;~ Brush := Gdip_BrushCreateSolid( "0xFF8846C2" )  ;inner top
  1846.             ;~ Brush := Gdip_BrushCreateSolid( "0xFF0044aa" )  ;inner top
  1847.            
  1848.            
  1849.            
  1850.             Brush := Gdip_BrushCreateSolid( "0xFF1a4168" )  ;inner top
  1851.         }else if(Classic=0){
  1852.             ;~ Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )  ;inner top
  1853.             ;~ Brush := Gdip_BrushCreateSolid( Format("0x{:08X}", ColorSet[1]-0x222222) )
  1854.             ;~ cc:="0xFF" ColorSet[1]
  1855.             cc:="0xFF" ColorSet[5]
  1856.             Match := StrSplit(RegExReplace(cc, "^0x(..)(..)(..)(..)$", "0x$1 0x$2 0x$3 0x$4"), " ")
  1857.             cc := Format("0x{:02X}{:02X}{:02X}{:02X}", Match.1, Max(Match.2-0x22,0), Max(Match.3-0x22,0), Max(Match.4-0x22,0))
  1858.             Brush := Gdip_BrushCreateSolid( cc )
  1859.         }
  1860.         Gdip_FillRoundedRectangle( G , Brush , 2 , 3 , 25 , 11 , 5 )
  1861.         Gdip_DeleteBrush( Brush )
  1862.         if(Classic=1){
  1863.             ;~ Brush := Gdip_BrushCreateSolid( "0xFFBAAD11" ) ;inner bottom
  1864.             ;~ Brush := Gdip_BrushCreateSolid( "0xFFA866E2" ) ;inner bottom
  1865.            
  1866.            
  1867.             ;~ Brush := Gdip_BrushCreateSolid( "0xFF0066CC" ) ;inner bottom
  1868.            
  1869.            
  1870.            
  1871.             Brush := Gdip_BrushCreateSolid( "0xFF174F88" ) ;inner bottom
  1872.            
  1873.            
  1874.         }else if(Classic=0){
  1875.             ;~ Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] ) ;inner bottom
  1876.             Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[5] ) ;inner bottom
  1877.         }
  1878.         Gdip_FillRoundedRectangle( G , Brush , 2 , 5 , 23 , 9 , 4 )
  1879.         Gdip_DeleteBrush( Brush )
  1880.         Brush := Gdip_BrushCreateSolid( "0x8827282B" )
  1881.         Gdip_FillEllipse( G , Brush , 11 , 0 , 18 , 18 )
  1882.         Gdip_DeleteBrush( Brush )
  1883.         Brush := Gdip_BrushCreateSolid( "0xFF1A1C1F" )
  1884.         Gdip_FillEllipse( G , Brush , 11 , 0 , 17 , 17 )
  1885.         Gdip_DeleteBrush( Brush )
  1886.         Brush := Gdip_CreateLineBrushFromRect( 3 , 2 , 11 , 14 , "0xFF60646A" , "0xFF393B3F" , 1 , 1 )
  1887.         Gdip_FillEllipse( G , Brush , 12 , 1 , 15 , 15 )
  1888.         Gdip_DeleteBrush( Brush )
  1889.         Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , 10 , 12 , "0xFF4D5055" , "0xFF36383B" , 1 , 1 )
  1890.         Gdip_FillEllipse( G , Brush , 13 , 2 , 13 , 13 )
  1891.         Gdip_DeleteBrush( Brush )
  1892.         Brush := Gdip_BrushCreateSolid( This.FontColor )
  1893.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter cFF000000 x32 y-1" , This.Font , This.W-33, This.H )
  1894.         Gdip_TextToGraphics( G , This.Text , "s" This.FontSize " vCenter c" Brush " x33 y0" , This.Font , This.W-33, This.H )
  1895.         Gdip_DeleteBrush( Brush )
  1896.         Gdip_DeleteGraphics( G )
  1897.         This.On_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1898.         Gdip_DisposeImage(pBitmap)
  1899.     }
  1900.     Switch_State(){
  1901.         GuiControl,% This.Window ":Focus",% This.Hwnd
  1902.         (This.State:=!This.State)?(This.Draw_On()):(This.Draw_Off())
  1903.         if(This.Label) 
  1904.             gosub,% This.Label
  1905.     }
  1906.     Draw_Off(){
  1907.         SetImage( This.Hwnd , This.Off_Bitmap )
  1908.     }
  1909.     Draw_On(){
  1910.         SetImage( This.Hwnd , This.On_Bitmap )
  1911.     }
  1912. }
  1913. ;#######################################################################################################################
  1914. ;##########################################  End Of Switch Class  ######################################################
  1915. ;#######################################################################################################################
  1916.  
  1917.  
  1918. Class Custom_Window {
  1919.     __New(x:="",y:="",w:=300,h:=200,Name:=1,Options:="+AlwaysOnTop -Caption -DPIScale",Title:="",Background_Bitmap:=""){
  1920.         This.X:=x
  1921.         This.Y:=y
  1922.         This.W:=w
  1923.         This.H:=h
  1924.         This.Name:=Name
  1925.         This.Title:=Title
  1926.         This.Options:=Options
  1927.         This.Background_Bitmap:=Background_Bitmap
  1928.         This.Create_Window()
  1929.     }
  1930.     Create_Window(){
  1931.         Gui,% This.Name ":New",%  This.Options " +LastFound"
  1932.         This.Hwnd:=WinExist()
  1933.         if(This.Background_Bitmap)
  1934.             This.Draw_Background_Bitmap()
  1935.     }
  1936.     Draw_Background_Bitmap(){
  1937.         This.Bitmap:=Gdip_CreateHBITMAPFromBitmap(This.Background_Bitmap)
  1938.         Gdip_DisposeImage(This.Background_Bitmap)
  1939.         Gui,% This.Name ":Add",Picture,% "x0 y0 w" This.W " h" This.H " 0xE hwndhwnd"
  1940.         ;~ GuiControlGet,hwnd,% This.Name ":hwnd",Static1
  1941.         This.Background_Hwnd:=hwnd
  1942.         SetImage(This.Background_Hwnd,This.Bitmap)
  1943.     }
  1944.     Show_Window(){
  1945.         if(This.X&&This.Y)
  1946.             Gui,% This.Name ":Show",% "x" This.X " y" This.Y " w" This.W " h" This.H,% This.Title
  1947.         else if(This.X&&!This.Y)
  1948.             Gui,% This.Name ":Show",% "x" This.X  " w" This.W " h" This.H,% This.Title
  1949.         else if(!This.X&&This.Y)
  1950.             Gui,% This.Name ":Show",% "y" This.Y  " w" This.W " h" This.H,% This.Title
  1951.         else
  1952.             Gui,% This.Name ":Show",% " w" This.W " h" This.H,% This.Title
  1953.     }
  1954. }
  1955.  
  1956. Main_Window(){
  1957.     ;Bitmap Created Using: HB Bitmap Maker
  1958.     pBitmap:=Gdip_CreateBitmap( 740 , 400 )
  1959.     G := Gdip_GraphicsFromImage( pBitmap )
  1960.     Gdip_SetSmoothingMode( G , 2 )
  1961.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  1962.     Gdip_FillRectangle( G , Brush , -2 , -2 , 746 , 406 )
  1963.     Gdip_DeleteBrush( Brush )
  1964.     ;Move Window
  1965.     Brush := Gdip_CreateLineBrushFromRect( 6 , 6 , 147 , 41 , "0xFF434447" , "0xFF232427" , 1 , 1 )
  1966.     Gdip_FillRectangle( G , Brush , 5 , 5 , 150 , 40 )
  1967.     Gdip_DeleteBrush( Brush )
  1968.     ;~ Brush := Gdip_CreateLineBrushFromRect( 5 , 5 , 149 , 39 , "0xaa0066cc" , "0xFF111111" , 2 , 1 )
  1969.     Brush := Gdip_CreateLineBrushFromRect( 5 , 5 , 149 , 39 , "0xaa" colorSet[1] , "0xFF111111" , 2 , 1 )
  1970.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  1971.     Gdip_DeleteBrush( Brush )
  1972.     Gdip_DrawRectangle( G , Pen , 5 , 5 , 150 , 40 )
  1973.     Gdip_DeletePen( Pen )
  1974.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1975.     Gdip_TextToGraphics( G , "HB Clipboard Master" , "s10 Center vCenter Bold c" Brush " x5 y5" , "Segoe UI" , 150 , 40 )
  1976.     Gdip_DeleteBrush( Brush )
  1977.     ;~ Brush := Gdip_BrushCreateSolid( "0xFF0077CC" )
  1978.     Brush := Gdip_BrushCreateSolid( "0xFF" colorSet[1] )
  1979.     Gdip_TextToGraphics( G , "HB Clipboard Master" , "s10 Center vCenter Bold c" Brush " x6 y6" , "Segoe UI" , 150 , 40 )
  1980.     Gdip_DeleteBrush( Brush )
  1981.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , -1 , 740 , 401 , "0xFF0066cc" , "0xFF000000" , 1 , 1 )
  1982.     Brush := Gdip_CreateLineBrushFromRect( 0 , -1 , 740 , 401 , "0xFF" colorSet[1] , "0xFF000000" , 1 , 1 )
  1983.     Gdip_FillRoundedRectangle( G , Brush , 405 , 5 , 330 , 80 , 15 )
  1984.     Gdip_DeleteBrush( Brush )
  1985.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1986.     Gdip_FillRoundedRectangle( G , Brush , 406 , 6 , 328 , 80 , 15 )
  1987.     Gdip_DeleteBrush( Brush )
  1988.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , -1 , 740 , 401 , "0xFF0066cc" , "0xFF000000" , 1 , 1 )
  1989.     Brush := Gdip_CreateLineBrushFromRect( 0 , -1 , 740 , 401 , "0xFF" colorSet[1], "0xFF000000" , 1 , 1 )
  1990.     Gdip_FillRoundedRectangle( G , Brush , 5 , 55 , 730 , 220 , 15 )
  1991.     Gdip_DeleteBrush( Brush )
  1992.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1993.     Gdip_FillRoundedRectangle( G , Brush , 6 , 56 , 728 , 218 , 15 )
  1994.     Gdip_DeleteBrush( Brush )
  1995.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  1996.     Gdip_FillRectangle( G , Brush , 406 , 20 , 328 , 50 )
  1997.     Gdip_DeleteBrush( Brush )
  1998.     ;~ Brush := Gdip_CreateLineBrushFromRect( 2 , 324 , 738 , 73 , "0xFF0066cc" , "0xFF000000" , 1 , 1 )
  1999.     ;~ Brush := Gdip_CreateLineBrushFromRect( 2 , 324 , 738 , 73 , "0xFF" colorSet[1], "0xFF000000" , 1 , 1 )
  2000.     Brush := Gdip_CreateLineBrushFromRect( 2 , 324 , 738 , 100 , "0xFF" colorSet[1], "0xFF000000" , 1 , 1 )
  2001.     Gdip_FillRoundedRectangle( G , Brush , 5 , 323 , 730 , 72 , 25 )
  2002.     Gdip_DeleteBrush( Brush )
  2003.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2004.     Gdip_FillRoundedRectangle( G , Brush , 6 , 324 , 728 , 70 , 25 )
  2005.     Gdip_DeleteBrush( Brush )
  2006.     ;pos 1 back
  2007.     ;~ Brush := Gdip_CreateLineBrush( 22 , 99 , 81 , 159 , "0xFF16508B" , "0xFF000000" , 1 )
  2008.     Brush := Gdip_CreateLineBrush( 22 , 99 , 81 , 159 , "0xFF" colorSet[1] , "0xFF000000" , 1 )
  2009.     Gdip_FillRoundedRectangle( G , Brush , 14 , 62 , 352 , 206 , 10 )
  2010.     Gdip_DeleteBrush( Brush )
  2011.     ;pos 1 top
  2012.     Brush := Gdip_BrushCreateSolid( "0xFF36373A" )
  2013.     Gdip_FillRoundedRectangle( G , Brush , 15 , 63 , 350 , 204 , 10 )
  2014.     Gdip_DeleteBrush( Brush )
  2015.     ;pos 2 back
  2016.     ;~ Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF16508B" , "0xFF000000" , 1 )
  2017.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF000000" , 1 )
  2018.     Gdip_FillRoundedRectangle( G , Brush , 374 , 62 , 352 , 206 , 10 )
  2019.     Gdip_DeleteBrush( Brush )
  2020.     ;pos 2 top
  2021.     Brush := Gdip_BrushCreateSolid( "0xFF36373A" )
  2022.     Gdip_FillRoundedRectangle( G , Brush , 375 , 63 , 350 , 204 , 10 )
  2023.     Gdip_DeleteBrush( Brush )
  2024.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2025.     Gdip_FillRectangle( G , Brush , 25 , 65 , 30 , 200 )
  2026.     Gdip_DeleteBrush( Brush )
  2027.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2028.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1], "0xFF222222" , 1 , 1 )
  2029.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2030.     Gdip_DeleteBrush( Brush )
  2031.     Gdip_DrawRectangle( G , Pen , 25 , 65 , 29 , 199 )
  2032.     Gdip_DeletePen( Pen )
  2033.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2034.     Gdip_FillRectangle( G , Brush , 60 , 65 , 30 , 200 )
  2035.     Gdip_DeleteBrush( Brush )
  2036.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2037.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2038.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2039.     Gdip_DeleteBrush( Brush )
  2040.     Gdip_DrawRectangle( G , Pen , 60 , 65 , 29 , 199 )
  2041.     Gdip_DeletePen( Pen )
  2042.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2043.     Gdip_FillRectangle( G , Brush , 95 , 65 , 40 , 200 )
  2044.     Gdip_DeleteBrush( Brush )
  2045.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2046.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2047.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2048.     Gdip_DeleteBrush( Brush )
  2049.     Gdip_DrawRectangle( G , Pen , 95 , 65 , 39 , 199 )
  2050.     Gdip_DeletePen( Pen )
  2051.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2052.     Gdip_FillRectangle( G , Brush , 140 , 65 , 40 , 200 )
  2053.     Gdip_DeleteBrush( Brush )
  2054.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2055.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2056.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2057.     Gdip_DeleteBrush( Brush )
  2058.     Gdip_DrawRectangle( G , Pen , 140 , 65 , 39 , 199 )
  2059.     Gdip_DeletePen( Pen )
  2060.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2061.     Gdip_FillRectangle( G , Brush , 185 , 65 , 60 , 200 )
  2062.     Gdip_DeleteBrush( Brush )
  2063.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2064.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2065.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2066.     Gdip_DeleteBrush( Brush )
  2067.     Gdip_DrawRectangle( G , Pen , 185 , 65 , 59 , 199 )
  2068.     Gdip_DeletePen( Pen )
  2069.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2070.     Gdip_FillRectangle( G , Brush , 250 , 65 , 60 , 200 )
  2071.     Gdip_DeleteBrush( Brush )
  2072.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2073.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2074.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2075.     Gdip_DeleteBrush( Brush )
  2076.     Gdip_DrawRectangle( G , Pen , 250 , 65 , 59 , 199 )
  2077.     Gdip_DeletePen( Pen )
  2078.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2079.     Gdip_FillRectangle( G , Brush , 385 , 65 , 30 , 200 )
  2080.     Gdip_DeleteBrush( Brush )
  2081.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2082.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2083.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2084.     Gdip_DeleteBrush( Brush )
  2085.     Gdip_DrawRectangle( G , Pen , 385 , 65 , 29 , 199 )
  2086.     Gdip_DeletePen( Pen )
  2087.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2088.     Gdip_FillRectangle( G , Brush , 420 , 65 , 30 , 200 )
  2089.     Gdip_DeleteBrush( Brush )
  2090.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2091.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2092.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2093.     Gdip_DeleteBrush( Brush )
  2094.     Gdip_DrawRectangle( G , Pen , 420 , 65 , 29 , 199 )
  2095.     Gdip_DeletePen( Pen )
  2096.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2097.     Gdip_FillRectangle( G , Brush , 455 , 65 , 40 , 200 )
  2098.     Gdip_DeleteBrush( Brush )
  2099.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2100.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2101.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2102.     Gdip_DeleteBrush( Brush )
  2103.     Gdip_DrawRectangle( G , Pen , 455 , 65 , 39 , 199 )
  2104.     Gdip_DeletePen( Pen )
  2105.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2106.     Gdip_FillRectangle( G , Brush , 500 , 65 , 40 , 200 )
  2107.     Gdip_DeleteBrush( Brush )
  2108.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2109.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2110.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2111.     Gdip_DeleteBrush( Brush )
  2112.     Gdip_DrawRectangle( G , Pen , 500 , 65 , 39 , 199 )
  2113.     Gdip_DeletePen( Pen )
  2114.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2115.     Gdip_FillRectangle( G , Brush , 545 , 65 , 60 , 200 )
  2116.     Gdip_DeleteBrush( Brush )
  2117.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2118.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2119.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2120.     Gdip_DeleteBrush( Brush )
  2121.     Gdip_DrawRectangle( G , Pen , 545 , 65 , 59 , 199 )
  2122.     Gdip_DeletePen( Pen )
  2123.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2124.     Gdip_FillRectangle( G , Brush , 609 , 65 , 60 , 200 )
  2125.     Gdip_DeleteBrush( Brush )
  2126.     ;~ Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0077CC" , "0xFF222222" , 1 , 1 )
  2127.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" colorSet[1] , "0xFF222222" , 1 , 1 )
  2128.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2129.     Gdip_DeleteBrush( Brush )
  2130.     Gdip_DrawRectangle( G , Pen , 610 , 65 , 59 , 199 )
  2131.     Gdip_DeletePen( Pen )
  2132.     ;----------------------------------------------------------------------------------------------------------------------------------
  2133.     ;bottom butts 1-a
  2134.     ;~ Brush := Gdip_CreateLineBrush( 74 , 280 , 99 , 310 , "0xFF3399FF" , "0xFF000000" , 1 )
  2135.     Brush := Gdip_CreateLineBrush( 74 , 280 , 99 , 310 , "0xFF" colorSet[1] , "0xFF000000" , 1 )
  2136.     Gdip_FillRoundedRectangle( G , Brush , 15 , 279 , 230 , 40 , 15 )
  2137.     Gdip_DeleteBrush( Brush )
  2138.     ;bottom butts 1-b
  2139.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2140.     Gdip_FillRoundedRectangle( G , Brush , 16 , 280 , 228 , 38 , 15 )
  2141.     Gdip_DeleteBrush( Brush )
  2142.     ;bottom butts 2-a
  2143.     ;~ Brush := Gdip_CreateLineBrush( 419 , 283 , 370 , 302 , "0xFF3399FF" , "0xFF000000" , 1 )
  2144.     Brush := Gdip_CreateLineBrush( 419 , 283 , 370 , 302 , "0xFF" colorSet[1] , "0xFF000000" , 1 )
  2145.     Gdip_FillRoundedRectangle( G , Brush , 255 , 279 , 230 , 40 , 15 )
  2146.     Gdip_DeleteBrush( Brush )
  2147.     ;bottom butts 2-b
  2148.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2149.     Gdip_FillRoundedRectangle( G , Brush , 256 , 280 , 228 , 38 , 15 )
  2150.     Gdip_DeleteBrush( Brush )
  2151.     ;bottom butts 3-a
  2152.     ;~ Brush := Gdip_CreateLineBrush( 544 , 284 , 557 , 306 , "0xFF3399FF" , "0xFF000000" , 1 )
  2153.     Brush := Gdip_CreateLineBrush( 544 , 284 , 557 , 306 , "0xFF" colorSet[1] , "0xFF000000" , 1 )
  2154.     Gdip_FillRoundedRectangle( G , Brush , 495 , 279 , 230 , 40 , 15 )
  2155.     Gdip_DeleteBrush( Brush )
  2156.     ;bottom butts 3-b
  2157.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2158.     Gdip_FillRoundedRectangle( G , Brush , 496 , 280 , 228 , 38 , 15 )
  2159.     Gdip_DeleteBrush( Brush )
  2160.     ;----------------------------------------------------------------------------------------------------------------------------------
  2161.     Gdip_DeleteGraphics( G )
  2162.     return pBitmap
  2163. }
  2164.  
  2165.  
  2166. PreviewWindow(){
  2167.     ;Bitmap Created Using: HB Bitmap Maker
  2168.     pBitmap:=Gdip_CreateBitmap( 700 , 175 )
  2169.     G := Gdip_GraphicsFromImage( pBitmap )
  2170.     Gdip_SetSmoothingMode( G , 2 )
  2171.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2172.     Gdip_FillRectangle( G , Brush , -2 , -2 , 704 , 180 )
  2173.     Gdip_DeleteBrush( Brush )
  2174.     Brush := Gdip_CreateLineBrush( 56 , 30 , 50 , 68 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2175.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2176.     Gdip_DeleteBrush( Brush )
  2177.     Gdip_DrawRectangle( G , Pen , 0 , 0 , 699 , 174 )
  2178.     Gdip_DeletePen( Pen )
  2179.     Brush := Gdip_CreateLineBrush( 69 , 13 , 151 , 98 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2180.     Gdip_FillRoundedRectangle( G , Brush , 5 , 5 , 690 , 130 , 15 )
  2181.     Gdip_DeleteBrush( Brush )
  2182.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2183.     Gdip_FillRoundedRectangle( G , Brush , 6 , 6 , 688 , 128 , 15 )
  2184.     Gdip_DeleteBrush( Brush )
  2185.     Gdip_DeleteGraphics( G )
  2186.     return pBitmap
  2187. }
  2188.  
  2189.  
  2190.  
  2191. Settings_Window(){  ;860 500
  2192.     ;Bitmap Created Using: HB Bitmap Maker
  2193.     pBitmap:=Gdip_CreateBitmap( 860 , 590 )
  2194.     G := Gdip_GraphicsFromImage( pBitmap )
  2195.     Gdip_SetSmoothingMode( G , 2 )
  2196.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2197.     Gdip_FillRectangle( G , Brush , -2 , -2 , 864 , 595 )
  2198.     Gdip_DeleteBrush( Brush )
  2199.     ;Move Window
  2200.     ;~ Brush := Gdip_CreateLineBrushFromRect( 5 , 6 , 153 , 61 , "0xFF38393C" , "0xFF000000" , 1 , 1 )
  2201.     ;~ Brush := Gdip_CreateLineBrushFromRect( 5 , 6 , 153 , 61 , "0xFF434447" , "0xFF232427" , 1 , 1 )
  2202.     Brush := Gdip_CreateLineBrushFromRect( 6 , 6 , 147 , 41 , "0xFF434447" , "0xFF232427" , 1 , 1 )
  2203.     Gdip_FillRectangle( G , Brush , 5 , 5 , 150 , 40 )
  2204.     Gdip_DeleteBrush( Brush )
  2205.     Brush := Gdip_CreateLineBrushFromRect( 5 , 6 , 151 , 39 , "0xFF" ColorSet[1] , "0xFF000000" , 2 , 1 )
  2206.     Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  2207.     Gdip_DeleteBrush( Brush )
  2208.     Gdip_DrawRectangle( G , Pen , 5 , 5 , 150 , 40 )
  2209.     Gdip_DeletePen( Pen )
  2210.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2211.     Gdip_TextToGraphics( G , "Hotkeys & Settings" , "s10 Center vCenter Bold c" Brush " x5 y6" , "Segoe UI" , 150 , 40 )
  2212.     Gdip_DeleteBrush( Brush )
  2213.     ;group 2 bottom
  2214.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2215.     Gdip_FillRoundedRectangle( G , Brush , 290 , 10 , 280 , 430 , 15 )
  2216.     Gdip_DeleteBrush( Brush )
  2217.     ;group 2 top
  2218.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2219.     Gdip_FillRoundedRectangle( G , Brush , 291 , 11 , 278 , 428 , 15 )
  2220.     Gdip_DeleteBrush( Brush )
  2221.     ;group 3 bottom
  2222.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2223.     Gdip_FillRoundedRectangle( G , Brush , 575 , 10 , 280 , 430 , 15 )
  2224.     Gdip_DeleteBrush( Brush )
  2225.     ;group 3 top
  2226.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2227.     Gdip_FillRoundedRectangle( G , Brush , 576 , 11 , 278 , 428 , 15 )
  2228.     Gdip_DeleteBrush( Brush )
  2229.     Brush := Gdip_CreateLineBrush( 324 , 16 , 362 , 57 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2230.     Gdip_FillRoundedRectangle( G , Brush , 300 , 15 , 260 , 50 , 15 )
  2231.     Gdip_DeleteBrush( Brush )
  2232.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2233.     Gdip_FillRoundedRectangle( G , Brush , 301 , 16 , 258 , 48 , 15 )
  2234.     Gdip_DeleteBrush( Brush )
  2235.     Brush := Gdip_CreateLineBrush( 324 , 16 , 362 , 57 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2236.     Gdip_FillRoundedRectangle( G , Brush , 295 , 75 , 270 , 360 , 15 )
  2237.     Gdip_DeleteBrush( Brush )
  2238.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2239.     Gdip_FillRoundedRectangle( G , Brush , 296 , 76 , 268 , 358 , 15 )
  2240.     Gdip_DeleteBrush( Brush )
  2241.     Brush := Gdip_CreateLineBrush( 324 , 16 , 362 , 57 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2242.     Gdip_FillRoundedRectangle( G , Brush , 585 , 15 , 260 , 50 , 15 )
  2243.     Gdip_DeleteBrush( Brush )
  2244.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2245.     Gdip_FillRoundedRectangle( G , Brush , 586 , 16 , 258 , 48 , 15 )
  2246.     Gdip_DeleteBrush( Brush )
  2247.     Brush := Gdip_CreateLineBrush( 324 , 16 , 362 , 57 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2248.     Gdip_FillRoundedRectangle( G , Brush , 580 , 75 , 270 , 360 , 15 )
  2249.     Gdip_DeleteBrush( Brush )
  2250.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2251.     Gdip_FillRoundedRectangle( G , Brush , 581 , 76 , 268 , 358 , 15 )
  2252.     Gdip_DeleteBrush( Brush )
  2253.     Brush := Gdip_CreateLineBrush( 301 , 111 , 321 , 155 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2254.     Gdip_FillRectangle( G , Brush , 300 , 90 , 30 , 330 )
  2255.     Gdip_DeleteBrush( Brush )
  2256.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2257.     Gdip_FillRectangle( G , Brush , 301 , 91 , 28 , 328 )
  2258.     Gdip_DeleteBrush( Brush )
  2259.     Brush := Gdip_CreateLineBrush( 588 , 182 , 611 , 225 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2260.     Gdip_FillRectangle( G , Brush , 585 , 90 , 30 , 330 )
  2261.     Gdip_DeleteBrush( Brush )
  2262.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2263.     Gdip_FillRectangle( G , Brush , 586 , 91 , 28 , 328 )
  2264.     Gdip_DeleteBrush( Brush )
  2265.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2266.     Gdip_TextToGraphics( G , "1" , "s16 Center  Bold c" Brush " x299 y109" , "Arial" , 30 , 30 )
  2267.     Gdip_DeleteBrush( Brush )
  2268.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2269.     Gdip_TextToGraphics( G , "1" , "s16 Center  Bold c" Brush " x300 y110" , "Arial" , 30 , 30 )
  2270.     Gdip_DeleteBrush( Brush )
  2271.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2272.     Gdip_TextToGraphics( G , "2" , "s16 Center  Bold c" Brush " x299 y139" , "Arial" , 30 , 30 )
  2273.     Gdip_DeleteBrush( Brush )
  2274.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2275.     Gdip_TextToGraphics( G , "2" , "s16 Center  Bold c" Brush " x300 y140" , "Arial" , 30 , 30 )
  2276.     Gdip_DeleteBrush( Brush )
  2277.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2278.     Gdip_TextToGraphics( G , "3" , "s16 Center  Bold c" Brush " x299 y169" , "Arial" , 30 , 30 )
  2279.     Gdip_DeleteBrush( Brush )
  2280.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2281.     Gdip_TextToGraphics( G , "3" , "s16 Center  Bold c" Brush " x300 y170" , "Arial" , 30 , 30 )
  2282.     Gdip_DeleteBrush( Brush )
  2283.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2284.     Gdip_TextToGraphics( G , "4" , "s16 Center  Bold c" Brush " x299 y199" , "Arial" , 30 , 30 )
  2285.     Gdip_DeleteBrush( Brush )
  2286.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2287.     Gdip_TextToGraphics( G , "4" , "s16 Center  Bold c" Brush " x300 y200" , "Arial" , 30 , 30 )
  2288.     Gdip_DeleteBrush( Brush )
  2289.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2290.     Gdip_TextToGraphics( G , "5" , "s16 Center  Bold c" Brush " x299 y229" , "Arial" , 30 , 30 )
  2291.     Gdip_DeleteBrush( Brush )
  2292.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2293.     Gdip_TextToGraphics( G , "5" , "s16 Center  Bold c" Brush " x300 y230" , "Arial" , 30 , 30 )
  2294.     Gdip_DeleteBrush( Brush )
  2295.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2296.     Gdip_TextToGraphics( G , "6" , "s16 Center  Bold c" Brush " x299 y259" , "Arial" , 30 , 30 )
  2297.     Gdip_DeleteBrush( Brush )
  2298.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2299.     Gdip_TextToGraphics( G , "6" , "s16 Center  Bold c" Brush " x300 y260" , "Arial" , 30 , 30 )
  2300.     Gdip_DeleteBrush( Brush )
  2301.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2302.     Gdip_TextToGraphics( G , "7" , "s16 Center  Bold c" Brush " x299 y289" , "Arial" , 30 , 30 )
  2303.     Gdip_DeleteBrush( Brush )
  2304.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2305.     Gdip_TextToGraphics( G , "7" , "s16 Center  Bold c" Brush " x300 y290" , "Arial" , 30 , 30 )
  2306.     Gdip_DeleteBrush( Brush )
  2307.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2308.     Gdip_TextToGraphics( G , "8" , "s16 Center  Bold c" Brush " x299 y319" , "Arial" , 30 , 30 )
  2309.     Gdip_DeleteBrush( Brush )
  2310.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2311.     Gdip_TextToGraphics( G , "8" , "s16 Center  Bold c" Brush " x300 y320" , "Arial" , 30 , 30 )
  2312.     Gdip_DeleteBrush( Brush )
  2313.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2314.     Gdip_TextToGraphics( G , "9" , "s16 Center  Bold c" Brush " x299 y349" , "Arial" , 30 , 30 )
  2315.     Gdip_DeleteBrush( Brush )
  2316.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2317.     Gdip_TextToGraphics( G , "9" , "s16 Center  Bold c" Brush " x300 y350" , "Arial" , 30 , 30 )
  2318.     Gdip_DeleteBrush( Brush )
  2319.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2320.     Gdip_TextToGraphics( G , "10" , "s16 Center  Bold c" Brush " x299 y379" , "Arial" , 30 , 30 )
  2321.     Gdip_DeleteBrush( Brush )
  2322.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2323.     Gdip_TextToGraphics( G , "10" , "s16 Center  Bold c" Brush " x300 y380" , "Arial" , 30 , 30 )
  2324.     Gdip_DeleteBrush( Brush )
  2325.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2326.     Gdip_TextToGraphics( G , "1" , "s16 Center  Bold c" Brush " x584 y109" , "Arial" , 30 , 30 )
  2327.     Gdip_DeleteBrush( Brush )
  2328.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2329.     Gdip_TextToGraphics( G , "1" , "s16 Center  Bold c" Brush " x585 y110" , "Arial" , 30 , 30 )
  2330.     Gdip_DeleteBrush( Brush )
  2331.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2332.     Gdip_TextToGraphics( G , "2" , "s16 Center  Bold c" Brush " x584 y139" , "Arial" , 30 , 30 )
  2333.     Gdip_DeleteBrush( Brush )
  2334.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2335.     Gdip_TextToGraphics( G , "2" , "s16 Center  Bold c" Brush " x585 y140" , "Arial" , 30 , 30 )
  2336.     Gdip_DeleteBrush( Brush )
  2337.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2338.     Gdip_TextToGraphics( G , "3" , "s16 Center  Bold c" Brush " x584 y169" , "Arial" , 30 , 30 )
  2339.     Gdip_DeleteBrush( Brush )
  2340.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2341.     Gdip_TextToGraphics( G , "3" , "s16 Center  Bold c" Brush " x585 y170" , "Arial" , 30 , 30 )
  2342.     Gdip_DeleteBrush( Brush )
  2343.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2344.     Gdip_TextToGraphics( G , "4" , "s16 Center  Bold c" Brush " x584 y199" , "Arial" , 30 , 30 )
  2345.     Gdip_DeleteBrush( Brush )
  2346.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2347.     Gdip_TextToGraphics( G , "4" , "s16 Center  Bold c" Brush " x585 y200" , "Arial" , 30 , 30 )
  2348.     Gdip_DeleteBrush( Brush )
  2349.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2350.     Gdip_TextToGraphics( G , "5" , "s16 Center  Bold c" Brush " x584 y229" , "Arial" , 30 , 30 )
  2351.     Gdip_DeleteBrush( Brush )
  2352.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2353.     Gdip_TextToGraphics( G , "5" , "s16 Center  Bold c" Brush " x585 y230" , "Arial" , 30 , 30 )
  2354.     Gdip_DeleteBrush( Brush )
  2355.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2356.     Gdip_TextToGraphics( G , "6" , "s16 Center  Bold c" Brush " x584 y259" , "Arial" , 30 , 30 )
  2357.     Gdip_DeleteBrush( Brush )
  2358.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2359.     Gdip_TextToGraphics( G , "6" , "s16 Center  Bold c" Brush " x585 y260" , "Arial" , 30 , 30 )
  2360.     Gdip_DeleteBrush( Brush )
  2361.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2362.     Gdip_TextToGraphics( G , "7" , "s16 Center  Bold c" Brush " x584 y289" , "Arial" , 30 , 30 )
  2363.     Gdip_DeleteBrush( Brush )
  2364.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2365.     Gdip_TextToGraphics( G , "7" , "s16 Center  Bold c" Brush " x585 y290" , "Arial" , 30 , 30 )
  2366.     Gdip_DeleteBrush( Brush )
  2367.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2368.     Gdip_TextToGraphics( G , "8" , "s16 Center  Bold c" Brush " x584 y319" , "Arial" , 30 , 30 )
  2369.     Gdip_DeleteBrush( Brush )
  2370.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2371.     Gdip_TextToGraphics( G , "8" , "s16 Center  Bold c" Brush " x585 y320" , "Arial" , 30 , 30 )
  2372.     Gdip_DeleteBrush( Brush )
  2373.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2374.     Gdip_TextToGraphics( G , "9" , "s16 Center  Bold c" Brush " x584 y349" , "Arial" , 30 , 30 )
  2375.     Gdip_DeleteBrush( Brush )
  2376.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2377.     Gdip_TextToGraphics( G , "9" , "s16 Center  Bold c" Brush " x585 y350" , "Arial" , 30 , 30 )
  2378.     Gdip_DeleteBrush( Brush )
  2379.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2380.     Gdip_TextToGraphics( G , "10" , "s16 Center  Bold c" Brush " x584 y379" , "Arial" , 30 , 30 )
  2381.     Gdip_DeleteBrush( Brush )
  2382.     Brush := Gdip_BrushCreateSolid( "0xFF" ColorSet[1] )
  2383.     Gdip_TextToGraphics( G , "10" , "s16 Center  Bold c" Brush " x585 y380" , "Arial" , 30 , 30 )
  2384.     Gdip_DeleteBrush( Brush )
  2385.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2386.     Gdip_FillRectangle( G , Brush , 335 , 90 , 105 , 330 )
  2387.     Gdip_DeleteBrush( Brush )
  2388.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2389.     Gdip_FillRectangle( G , Brush , 336 , 91 , 103 , 328 )
  2390.     Gdip_DeleteBrush( Brush )
  2391.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2392.     Gdip_FillRectangle( G , Brush , 620 , 90 , 105 , 330 )
  2393.     Gdip_DeleteBrush( Brush )
  2394.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2395.     Gdip_FillRectangle( G , Brush , 621 , 91 , 103 , 328 )
  2396.     Gdip_DeleteBrush( Brush )
  2397.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2398.     Gdip_FillRectangle( G , Brush , 445 , 90 , 70 , 330 )
  2399.     Gdip_DeleteBrush( Brush )
  2400.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2401.     Gdip_FillRectangle( G , Brush , 446 , 91 , 68 , 328 )
  2402.     Gdip_DeleteBrush( Brush )
  2403.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2404.     Gdip_FillRectangle( G , Brush , 730 , 90 , 70 , 330 )
  2405.     Gdip_DeleteBrush( Brush )
  2406.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2407.     Gdip_FillRectangle( G , Brush , 731 , 91 , 68 , 328 )
  2408.     Gdip_DeleteBrush( Brush )
  2409.     ;group 1 bottom
  2410.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2411.     Gdip_FillRoundedRectangle( G , Brush , 5 , 56 , 280 , 60 , 15 )
  2412.     Gdip_DeleteBrush( Brush )
  2413.     ;group 1 top
  2414.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2415.     Gdip_FillRoundedRectangle( G , Brush , 6 , 57 , 278 , 58 , 15 )
  2416.     Gdip_DeleteBrush( Brush )
  2417.     ;group 1 bottom
  2418.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2419.     Gdip_FillRoundedRectangle( G , Brush , 5 , 121 , 280 , 60 , 15 )
  2420.     Gdip_DeleteBrush( Brush )
  2421.     ;group 1 top
  2422.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2423.     Gdip_FillRoundedRectangle( G , Brush , 6 , 122 , 278 , 58 , 15 )
  2424.     Gdip_DeleteBrush( Brush )
  2425.     ;group 1 bottom
  2426.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2427.     Gdip_FillRoundedRectangle( G , Brush , 5 , 186 , 280 , 60 , 15 )
  2428.     Gdip_DeleteBrush( Brush )
  2429.     ;group 1 top
  2430.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2431.     Gdip_FillRoundedRectangle( G , Brush , 6 , 187 , 278 , 58 , 15 )
  2432.     Gdip_DeleteBrush( Brush )
  2433.     ;group 1 bottom
  2434.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2435.     Gdip_FillRoundedRectangle( G , Brush , 5 , 251 , 280 , 60 , 15 )
  2436.     Gdip_DeleteBrush( Brush )
  2437.     ;group 1 top
  2438.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2439.     Gdip_FillRoundedRectangle( G , Brush , 6 , 252 , 278 , 58 , 15 )
  2440.     Gdip_DeleteBrush( Brush )
  2441.     ;group 1 bottom
  2442.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2443.     Gdip_FillRoundedRectangle( G , Brush , 5 , 316 , 280 , 60 , 15 )
  2444.     Gdip_DeleteBrush( Brush )
  2445.     ;group 1 top
  2446.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2447.     Gdip_FillRoundedRectangle( G , Brush , 6 , 317 , 278 , 58 , 15 )
  2448.     Gdip_DeleteBrush( Brush )
  2449.     ;group 1 bottom
  2450.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2451.     Gdip_FillRoundedRectangle( G , Brush , 5 , 381 , 280 , 60 , 15 )
  2452.     Gdip_DeleteBrush( Brush )
  2453.     ;group 1 top
  2454.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2455.     Gdip_FillRoundedRectangle( G , Brush , 6 , 382 , 278 , 58 , 15 )
  2456.     Gdip_DeleteBrush( Brush )
  2457.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2458.     Gdip_TextToGraphics( G , "Save Clipboard Master 1 Clip" , "s10 Center vCenter Bold c" Brush " x4 y60" , "Arial" , 280 , 20 )
  2459.     Gdip_DeleteBrush( Brush )
  2460.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  2461.     Gdip_TextToGraphics( G , "Save Clipboard Master 1 Clip" , "s10 Center vCenter Bold c" Brush " x5 y61" , "Arial" , 280 , 20 )
  2462.     Gdip_DeleteBrush( Brush )
  2463.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2464.     Gdip_TextToGraphics( G , "Save Clipboard Master 2 Clip" , "s10 Center vCenter Bold c" Brush " x4 y125" , "Arial" , 280 , 20 )
  2465.     Gdip_DeleteBrush( Brush )
  2466.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  2467.     Gdip_TextToGraphics( G , "Save Clipboard Master 2 Clip" , "s10 Center vCenter Bold c" Brush " x5 y126" , "Arial" , 280 , 20 )
  2468.     Gdip_DeleteBrush( Brush )
  2469.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2470.     Gdip_TextToGraphics( G , "Switch Tabs" , "s10 Center vCenter Bold c" Brush " x4 y190" , "Arial" , 280 , 20 )
  2471.     Gdip_DeleteBrush( Brush )
  2472.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  2473.     Gdip_TextToGraphics( G , "Switch Tabs" , "s10 Center vCenter Bold c" Brush " x5 y191" , "Arial" , 280 , 20 )
  2474.     Gdip_DeleteBrush( Brush )
  2475.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2476.     Gdip_TextToGraphics( G , "Hide Window" , "s10 Center vCenter Bold c" Brush " x4 y255" , "Arial" , 280 , 20 )
  2477.     Gdip_DeleteBrush( Brush )
  2478.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  2479.     Gdip_TextToGraphics( G , "Hide Window" , "s10 Center vCenter Bold c" Brush " x5 y256" , "Arial" , 280 , 20 )
  2480.     Gdip_DeleteBrush( Brush )
  2481.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2482.     Gdip_TextToGraphics( G , "Teleport Window" , "s10 Center vCenter Bold c" Brush " x4 y320" , "Arial" , 280 , 20 )
  2483.     Gdip_DeleteBrush( Brush )
  2484.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  2485.     Gdip_TextToGraphics( G , "Teleport Window" , "s10 Center vCenter Bold c" Brush " x5 y321" , "Arial" , 280 , 20 )
  2486.     Gdip_DeleteBrush( Brush )
  2487.     Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  2488.     Gdip_TextToGraphics( G , "Save To First Available Slot" , "s10 Center vCenter Bold c" Brush " x4 y385" , "Arial" , 280 , 20 )
  2489.     Gdip_DeleteBrush( Brush )
  2490.     Brush := Gdip_BrushCreateSolid( "0xFFffffff" )
  2491.     Gdip_TextToGraphics( G , "Save To First Available Slot" , "s10 Center vCenter Bold c" Brush " x5 y386" , "Arial" , 280 , 20 )
  2492.     Gdip_DeleteBrush( Brush )
  2493.     ;group 1 bottom
  2494.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2495.     Gdip_FillRoundedRectangle( G , Brush , 5 , 447 , 850 , 49 , 15 )
  2496.     Gdip_DeleteBrush( Brush )
  2497.     ;group 1 bottom
  2498.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2499.     Gdip_FillRoundedRectangle( G , Brush , 6 , 448 , 848 , 47 , 15 )
  2500.     Gdip_DeleteBrush( Brush )
  2501.     ;group 1 bottom
  2502.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2503.     Gdip_FillRoundedRectangle( G , Brush , 15 , 452 , 270 , 40 , 10 )
  2504.     Gdip_DeleteBrush( Brush )
  2505.     ;group 1 bottom
  2506.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2507.     Gdip_FillRoundedRectangle( G , Brush , 16 , 453 , 268 , 38 , 10 )
  2508.     Gdip_DeleteBrush( Brush )
  2509.     ;group 1 bottom
  2510.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2511.     Gdip_FillRoundedRectangle( G , Brush , 295 , 452 , 270 , 40 , 10 )
  2512.     Gdip_DeleteBrush( Brush )
  2513.     ;group 1 bottom
  2514.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2515.     Gdip_FillRoundedRectangle( G , Brush , 296 , 453 , 268 , 38 , 10 )
  2516.     Gdip_DeleteBrush( Brush )
  2517.     ;group 1 bottom
  2518.     Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 )
  2519.     Gdip_FillRoundedRectangle( G , Brush , 575 , 452 , 270 , 40 , 10 )
  2520.     Gdip_DeleteBrush( Brush )
  2521.     ;group 1 bottom
  2522.     Brush := Gdip_BrushCreateSolid( "0xFF38393C" )
  2523.     Gdip_FillRoundedRectangle( G , Brush , 576 , 453 , 268 , 38 , 10 )
  2524.     Gdip_DeleteBrush( Brush )
  2525.     ;group 1 bottom
  2526.     Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF" ColorSet[1] , "0xFF000000" , 1 , 1 )
  2527.     Gdip_FillRoundedRectangle( G , Brush , 5 , 507 , 850 , 79 , 15 )
  2528.     Gdip_DeleteBrush( Brush )
  2529.     ;group 1 bottom
  2530.     Brush := Gdip_BrushCreateSolid( "0xFF333437" )
  2531.     Gdip_FillRoundedRectangle( G , Brush , 6 , 508 , 848 , 77 , 15 )
  2532.     Gdip_DeleteBrush( Brush )
  2533.     Gdip_DeleteGraphics( G )
  2534.     return pBitmap
  2535. }
  2536.  
  2537. ;######################################################################################################################################
  2538. ;#####################################################                          #######################################################
  2539. ;#####################################################        Gdip LITE         #######################################################
  2540. ;#####################################################                          #######################################################
  2541. ;######################################################################################################################################
  2542. ; Gdip standard library v1.45 by tic (Tariq Porter) 07/09/11
  2543. ; Modifed by Rseding91 using fincs 64 bit compatible Gdip library 5/1/2013
  2544. BitBlt(ddc, dx, dy, dw, dh, sdc, sx, sy, Raster=""){
  2545.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2546.     return DllCall("gdi32\BitBlt", Ptr, dDC, "int", dx, "int", dy, "int", dw, "int", dh, Ptr, sDC, "int", sx, "int", sy, "uint", Raster ? Raster : 0x00CC0020)
  2547. }
  2548. Gdip_DrawImage(pGraphics, pBitmap, dx="", dy="", dw="", dh="", sx="", sy="", sw="", sh="", Matrix=1){
  2549.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2550.     if (Matrix&1 = "")
  2551.         ImageAttr := Gdip_SetImageAttributesColorMatrix(Matrix)
  2552.     else if (Matrix != 1)
  2553.         ImageAttr := Gdip_SetImageAttributesColorMatrix("1|0|0|0|0|0|1|0|0|0|0|0|1|0|0|0|0|0|" Matrix "|0|0|0|0|0|1")
  2554.     if(sx = "" && sy = "" && sw = "" && sh = ""){
  2555.         if(dx = "" && dy = "" && dw = "" && dh = ""){
  2556.             sx := dx := 0, sy := dy := 0
  2557.             sw := dw := Gdip_GetImageWidth(pBitmap)
  2558.             sh := dh := Gdip_GetImageHeight(pBitmap)
  2559.         }else   {
  2560.             sx := sy := 0,sw := Gdip_GetImageWidth(pBitmap),sh := Gdip_GetImageHeight(pBitmap)
  2561.         }
  2562.     }
  2563.     E := DllCall("gdiplus\GdipDrawImageRectRect", Ptr, pGraphics, Ptr, pBitmap, "float", dx, "float", dy, "float", dw, "float", dh, "float", sx, "float", sy, "float", sw, "float", sh, "int", 2, Ptr, ImageAttr, Ptr, 0, Ptr, 0)
  2564.     if ImageAttr
  2565.         Gdip_DisposeImageAttributes(ImageAttr)
  2566.     return E
  2567. }
  2568. Gdip_SetImageAttributesColorMatrix(Matrix){
  2569.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2570.     VarSetCapacity(ColourMatrix, 100, 0)
  2571.     Matrix := RegExReplace(RegExReplace(Matrix, "^[^\d-\.]+([\d\.])", "$1", "", 1), "[^\d-\.]+", "|")
  2572.     StringSplit, Matrix, Matrix, |
  2573.     Loop, 25
  2574.     {
  2575.         Matrix := (Matrix%A_Index% != "") ? Matrix%A_Index% : Mod(A_Index-1, 6) ? 0 : 1
  2576.         NumPut(Matrix, ColourMatrix, (A_Index-1)*4, "float")
  2577.     }
  2578.     DllCall("gdiplus\GdipCreateImageAttributes", A_PtrSize ? "UPtr*" : "uint*", ImageAttr)
  2579.     DllCall("gdiplus\GdipSetImageAttributesColorMatrix", Ptr, ImageAttr, "int", 1, "int", 1, Ptr, &ColourMatrix, Ptr, 0, "int", 0)
  2580.     return ImageAttr
  2581. }
  2582. Gdip_GetImageWidth(pBitmap){
  2583.    DllCall("gdiplus\GdipGetImageWidth", A_PtrSize ? "UPtr" : "UInt", pBitmap, "uint*", Width)
  2584.    return Width
  2585. }
  2586. Gdip_GetImageHeight(pBitmap){
  2587.    DllCall("gdiplus\GdipGetImageHeight", A_PtrSize ? "UPtr" : "UInt", pBitmap, "uint*", Height)
  2588.    return Height
  2589. }
  2590. Gdip_DeletePen(pPen){
  2591.    return DllCall("gdiplus\GdipDeletePen", A_PtrSize ? "UPtr" : "UInt", pPen)
  2592. }
  2593. Gdip_DeleteBrush(pBrush){
  2594.    return DllCall("gdiplus\GdipDeleteBrush", A_PtrSize ? "UPtr" : "UInt", pBrush)
  2595. }
  2596. Gdip_DisposeImage(pBitmap){
  2597.    return DllCall("gdiplus\GdipDisposeImage", A_PtrSize ? "UPtr" : "UInt", pBitmap)
  2598. }
  2599. Gdip_DeleteGraphics(pGraphics){
  2600.    return DllCall("gdiplus\GdipDeleteGraphics", A_PtrSize ? "UPtr" : "UInt", pGraphics)
  2601. }
  2602. Gdip_DisposeImageAttributes(ImageAttr){
  2603.     return DllCall("gdiplus\GdipDisposeImageAttributes", A_PtrSize ? "UPtr" : "UInt", ImageAttr)
  2604. }
  2605. Gdip_DeleteFont(hFont){
  2606.    return DllCall("gdiplus\GdipDeleteFont", A_PtrSize ? "UPtr" : "UInt", hFont)
  2607. }
  2608. Gdip_DeleteStringFormat(hFormat){
  2609.    return DllCall("gdiplus\GdipDeleteStringFormat", A_PtrSize ? "UPtr" : "UInt", hFormat)
  2610. }
  2611. Gdip_DeleteFontFamily(hFamily){
  2612.    return DllCall("gdiplus\GdipDeleteFontFamily", A_PtrSize ? "UPtr" : "UInt", hFamily)
  2613. }
  2614. CreateCompatibleDC(hdc=0){
  2615.    return DllCall("CreateCompatibleDC", A_PtrSize ? "UPtr" : "UInt", hdc)
  2616. }
  2617. SelectObject(hdc, hgdiobj){
  2618.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2619.     return DllCall("SelectObject", Ptr, hdc, Ptr, hgdiobj)
  2620. }
  2621. DeleteObject(hObject){
  2622.    return DllCall("DeleteObject", A_PtrSize ? "UPtr" : "UInt", hObject)
  2623. }
  2624. GetDC(hwnd=0){
  2625.     return DllCall("GetDC", A_PtrSize ? "UPtr" : "UInt", hwnd)
  2626. }
  2627. GetDCEx(hwnd, flags=0, hrgnClip=0){
  2628.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2629.     return DllCall("GetDCEx", Ptr, hwnd, Ptr, hrgnClip, "int", flags)
  2630. }
  2631. ReleaseDC(hdc, hwnd=0){
  2632.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2633.     return DllCall("ReleaseDC", Ptr, hwnd, Ptr, hdc)
  2634. }
  2635. DeleteDC(hdc){
  2636.    return DllCall("DeleteDC", A_PtrSize ? "UPtr" : "UInt", hdc)
  2637. }
  2638. Gdip_SetClipRegion(pGraphics, Region, CombineMode=0){
  2639.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2640.     return DllCall("gdiplus\GdipSetClipRegion", Ptr, pGraphics, Ptr, Region, "int", CombineMode)
  2641. }
  2642. CreateDIBSection(w, h, hdc="", bpp=32, ByRef ppvBits=0){
  2643.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2644.     hdc2 := hdc ? hdc : GetDC()
  2645.     VarSetCapacity(bi, 40, 0)
  2646.     NumPut(w, bi, 4, "uint"), NumPut(h, bi, 8, "uint"), NumPut(40, bi, 0, "uint"), NumPut(1, bi, 12, "ushort"), NumPut(0, bi, 16, "uInt"), NumPut(bpp, bi, 14, "ushort")
  2647.     hbm := DllCall("CreateDIBSection", Ptr, hdc2, Ptr, &bi, "uint", 0, A_PtrSize ? "UPtr*" : "uint*", ppvBits, Ptr, 0, "uint", 0, Ptr)
  2648.     if !hdc
  2649.         ReleaseDC(hdc2)
  2650.     return hbm
  2651. }
  2652. Gdip_GraphicsFromImage(pBitmap){
  2653.     DllCall("gdiplus\GdipGetImageGraphicsContext", A_PtrSize ? "UPtr" : "UInt", pBitmap, A_PtrSize ? "UPtr*" : "UInt*", pGraphics)
  2654.     return pGraphics
  2655. }
  2656. Gdip_GraphicsFromHDC(hdc){
  2657.     DllCall("gdiplus\GdipCreateFromHDC", A_PtrSize ? "UPtr" : "UInt", hdc, A_PtrSize ? "UPtr*" : "UInt*", pGraphics)
  2658.     return pGraphics
  2659. }
  2660. Gdip_GetDC(pGraphics){
  2661.     DllCall("gdiplus\GdipGetDC", A_PtrSize ? "UPtr" : "UInt", pGraphics, A_PtrSize ? "UPtr*" : "UInt*", hdc)
  2662.     return hdc
  2663. }
  2664.  
  2665.  
  2666. Gdip_Startup(){
  2667.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2668.     if !DllCall("GetModuleHandle", "str", "gdiplus", Ptr)
  2669.         DllCall("LoadLibrary", "str", "gdiplus")
  2670.     VarSetCapacity(si, A_PtrSize = 8 ? 24 : 16, 0), si := Chr(1)
  2671.     DllCall("gdiplus\GdiplusStartup", A_PtrSize ? "UPtr*" : "uint*", pToken, Ptr, &si, Ptr, 0)
  2672.     return pToken
  2673. }
  2674. Gdip_TextToGraphics(pGraphics, Text, Options, Font="Arial", Width="", Height="", Measure=0){
  2675.     IWidth := Width, IHeight:= Height
  2676.     RegExMatch(Options, "i)X([\-\d\.]+)(p*)", xpos)
  2677.     RegExMatch(Options, "i)Y([\-\d\.]+)(p*)", ypos)
  2678.     RegExMatch(Options, "i)W([\-\d\.]+)(p*)", Width)
  2679.     RegExMatch(Options, "i)H([\-\d\.]+)(p*)", Height)
  2680.     RegExMatch(Options, "i)C(?!(entre|enter))([a-f\d]+)", Colour)
  2681.     RegExMatch(Options, "i)Top|Up|Bottom|Down|vCentre|vCenter", vPos)
  2682.     RegExMatch(Options, "i)NoWrap", NoWrap)
  2683.     RegExMatch(Options, "i)R(\d)", Rendering)
  2684.     RegExMatch(Options, "i)S(\d+)(p*)", Size)
  2685.     if !Gdip_DeleteBrush(Gdip_CloneBrush(Colour2))
  2686.         PassBrush := 1, pBrush := Colour2
  2687.     if !(IWidth && IHeight) && (xpos2 || ypos2 || Width2 || Height2 || Size2)
  2688.         return -1
  2689.     Style := 0, Styles := "Regular|Bold|Italic|BoldItalic|Underline|Strikeout"
  2690.     Loop, Parse, Styles, |
  2691.     {
  2692.         if RegExMatch(Options, "\b" A_loopField)
  2693.         Style |= (A_LoopField != "StrikeOut") ? (A_Index-1) : 8
  2694.     }
  2695.     Align := 0, Alignments := "Near|Left|Centre|Center|Far|Right"
  2696.     Loop, Parse, Alignments, |
  2697.     {
  2698.         if RegExMatch(Options, "\b" A_loopField)
  2699.             Align |= A_Index//2.1      ; 0|0|1|1|2|2
  2700.     }
  2701.     xpos := (xpos1 != "") ? xpos2 ? IWidth*(xpos1/100) : xpos1 : 0
  2702.     ypos := (ypos1 != "") ? ypos2 ? IHeight*(ypos1/100) : ypos1 : 0
  2703.     Width := Width1 ? Width2 ? IWidth*(Width1/100) : Width1 : IWidth
  2704.     Height := Height1 ? Height2 ? IHeight*(Height1/100) : Height1 : IHeight
  2705.     if !PassBrush
  2706.         Colour := "0x" (Colour2 ? Colour2 : "ff000000")
  2707.     Rendering := ((Rendering1 >= 0) && (Rendering1 <= 5)) ? Rendering1 : 4
  2708.     Size := (Size1 > 0) ? Size2 ? IHeight*(Size1/100) : Size1 : 12
  2709.     hFamily := Gdip_FontFamilyCreate(Font)
  2710.     hFont := Gdip_FontCreate(hFamily, Size, Style)
  2711.     FormatStyle := NoWrap ? 0x4000 | 0x1000 : 0x4000
  2712.     hFormat := Gdip_StringFormatCreate(FormatStyle)
  2713.     pBrush := PassBrush ? pBrush : Gdip_BrushCreateSolid(Colour)
  2714.     if !(hFamily && hFont && hFormat && pBrush && pGraphics)
  2715.         return !pGraphics ? -2 : !hFamily ? -3 : !hFont ? -4 : !hFormat ? -5 : !pBrush ? -6 : 0
  2716.     CreateRectF(RC, xpos, ypos, Width, Height)
  2717.     Gdip_SetStringFormatAlign(hFormat, Align)
  2718.     Gdip_SetTextRenderingHint(pGraphics, Rendering)
  2719.     ReturnRC := Gdip_MeasureString(pGraphics, Text, hFont, hFormat, RC)
  2720.     if vPos
  2721.     {
  2722.         StringSplit, ReturnRC, ReturnRC, |
  2723.         if (vPos = "vCentre") || (vPos = "vCenter")
  2724.             ypos += (Height-ReturnRC4)//2
  2725.         else if (vPos = "Top") || (vPos = "Up")
  2726.             ypos := 0
  2727.         else if (vPos = "Bottom") || (vPos = "Down")
  2728.             ypos := Height-ReturnRC4
  2729.         CreateRectF(RC, xpos, ypos, Width, ReturnRC4)
  2730.         ReturnRC := Gdip_MeasureString(pGraphics, Text, hFont, hFormat, RC)
  2731.     }
  2732.     if !Measure
  2733.         E := Gdip_DrawString(pGraphics, Text, hFont, hFormat, pBrush, RC)
  2734.     if !PassBrush
  2735.         Gdip_DeleteBrush(pBrush)
  2736.     Gdip_DeleteStringFormat(hFormat)
  2737.     Gdip_DeleteFont(hFont)
  2738.     Gdip_DeleteFontFamily(hFamily)
  2739.     return E ? E : ReturnRC
  2740. }
  2741. Gdip_DrawString(pGraphics, sString, hFont, hFormat, pBrush, ByRef RectF){
  2742.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2743.     if (!A_IsUnicode)
  2744.     {
  2745.         nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, 0, "int", 0)
  2746.         VarSetCapacity(wString, nSize*2)
  2747.         DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, &wString, "int", nSize)
  2748.     }
  2749.     return DllCall("gdiplus\GdipDrawString", Ptr, pGraphics, Ptr, A_IsUnicode ? &sString : &wString, "int", -1, Ptr, hFont, Ptr, &RectF, Ptr, hFormat, Ptr, pBrush)
  2750. }
  2751. Gdip_CreateLineBrush(x1, y1, x2, y2, ARGB1, ARGB2, WrapMode=1){
  2752.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2753.     CreatePointF(PointF1, x1, y1), CreatePointF(PointF2, x2, y2)
  2754.     DllCall("gdiplus\GdipCreateLineBrush", Ptr, &PointF1, Ptr, &PointF2, "Uint", ARGB1, "Uint", ARGB2, "int", WrapMode, A_PtrSize ? "UPtr*" : "UInt*", LGpBrush)
  2755.     return LGpBrush
  2756. }
  2757. Gdip_CreateLineBrushFromRect(x, y, w, h, ARGB1, ARGB2, LinearGradientMode=1, WrapMode=1){
  2758.     CreateRectF(RectF, x, y, w, h)
  2759.     DllCall("gdiplus\GdipCreateLineBrushFromRect", A_PtrSize ? "UPtr" : "UInt", &RectF, "int", ARGB1, "int", ARGB2, "int", LinearGradientMode, "int", WrapMode, A_PtrSize ? "UPtr*" : "UInt*", LGpBrush)
  2760.     return LGpBrush
  2761. }
  2762. Gdip_CloneBrush(pBrush){
  2763.     DllCall("gdiplus\GdipCloneBrush", A_PtrSize ? "UPtr" : "UInt", pBrush, A_PtrSize ? "UPtr*" : "UInt*", pBrushClone)
  2764.     return pBrushClone
  2765. }
  2766. Gdip_FontFamilyCreate(Font){
  2767.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2768.     if (!A_IsUnicode)
  2769.     {
  2770.         nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &Font, "int", -1, "uint", 0, "int", 0)
  2771.         VarSetCapacity(wFont, nSize*2)
  2772.         DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &Font, "int", -1, Ptr, &wFont, "int", nSize)
  2773.     }
  2774.     DllCall("gdiplus\GdipCreateFontFamilyFromName", Ptr, A_IsUnicode ? &Font : &wFont, "uint", 0, A_PtrSize ? "UPtr*" : "UInt*", hFamily)
  2775.     return hFamily
  2776. }
  2777. Gdip_SetStringFormatAlign(hFormat, Align){
  2778.    return DllCall("gdiplus\GdipSetStringFormatAlign", A_PtrSize ? "UPtr" : "UInt", hFormat, "int", Align)
  2779. }
  2780. Gdip_StringFormatCreate(Format=0, Lang=0){
  2781.    DllCall("gdiplus\GdipCreateStringFormat", "int", Format, "int", Lang, A_PtrSize ? "UPtr*" : "UInt*", hFormat)
  2782.    return hFormat
  2783. }
  2784. Gdip_FontCreate(hFamily, Size, Style=0){
  2785.    DllCall("gdiplus\GdipCreateFont", A_PtrSize ? "UPtr" : "UInt", hFamily, "float", Size, "int", Style, "int", 0, A_PtrSize ? "UPtr*" : "UInt*", hFont)
  2786.    return hFont
  2787. }
  2788. Gdip_CreatePen(ARGB, w){
  2789.    DllCall("gdiplus\GdipCreatePen1", "UInt", ARGB, "float", w, "int", 2, A_PtrSize ? "UPtr*" : "UInt*", pPen)
  2790.    return pPen
  2791. }
  2792. Gdip_CreatePenFromBrush(pBrush, w){
  2793.     DllCall("gdiplus\GdipCreatePen2", A_PtrSize ? "UPtr" : "UInt", pBrush, "float", w, "int", 2, A_PtrSize ? "UPtr*" : "UInt*", pPen)
  2794.     return pPen
  2795. }
  2796. Gdip_BrushCreateSolid(ARGB=0xff000000){
  2797.     DllCall("gdiplus\GdipCreateSolidFill", "UInt", ARGB, A_PtrSize ? "UPtr*" : "UInt*", pBrush)
  2798.     return pBrush
  2799. }
  2800. Gdip_BrushCreateHatch(ARGBfront, ARGBback, HatchStyle=0){
  2801.     DllCall("gdiplus\GdipCreateHatchBrush", "int", HatchStyle, "UInt", ARGBfront, "UInt", ARGBback, A_PtrSize ? "UPtr*" : "UInt*", pBrush)
  2802.     return pBrush
  2803. }
  2804. CreateRectF(ByRef RectF, x, y, w, h){
  2805.    VarSetCapacity(RectF, 16)
  2806.    NumPut(x, RectF, 0, "float"), NumPut(y, RectF, 4, "float"), NumPut(w, RectF, 8, "float"), NumPut(h, RectF, 12, "float")
  2807. }
  2808. Gdip_SetTextRenderingHint(pGraphics, RenderingHint){
  2809.     return DllCall("gdiplus\GdipSetTextRenderingHint", A_PtrSize ? "UPtr" : "UInt", pGraphics, "int", RenderingHint)
  2810. }
  2811. Gdip_MeasureString(pGraphics, sString, hFont, hFormat, ByRef RectF){
  2812.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2813.     VarSetCapacity(RC, 16)
  2814.     if !A_IsUnicode
  2815.     {
  2816.         nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, "uint", 0, "int", 0)
  2817.         VarSetCapacity(wString, nSize*2)
  2818.         DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, &wString, "int", nSize)
  2819.     }
  2820.     DllCall("gdiplus\GdipMeasureString", Ptr, pGraphics, Ptr, A_IsUnicode ? &sString : &wString, "int", -1, Ptr, hFont, Ptr, &RectF, Ptr, hFormat, Ptr, &RC, "uint*", Chars, "uint*", Lines)
  2821.     return &RC ? NumGet(RC, 0, "float") "|" NumGet(RC, 4, "float") "|" NumGet(RC, 8, "float") "|" NumGet(RC, 12, "float") "|" Chars "|" Lines : 0
  2822. }
  2823. CreateRect(ByRef Rect, x, y, w, h){
  2824.     VarSetCapacity(Rect, 16)
  2825.     NumPut(x, Rect, 0, "uint"), NumPut(y, Rect, 4, "uint"), NumPut(w, Rect, 8, "uint"), NumPut(h, Rect, 12, "uint")
  2826. }
  2827. CreateSizeF(ByRef SizeF, w, h){
  2828.    VarSetCapacity(SizeF, 8)
  2829.    NumPut(w, SizeF, 0, "float"), NumPut(h, SizeF, 4, "float")
  2830. }
  2831. CreatePointF(ByRef PointF, x, y){
  2832.    VarSetCapacity(PointF, 8)
  2833.    NumPut(x, PointF, 0, "float"), NumPut(y, PointF, 4, "float")
  2834. }
  2835. Gdip_DrawArc(pGraphics, pPen, x, y, w, h, StartAngle, SweepAngle){
  2836.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2837.     return DllCall("gdiplus\GdipDrawArc", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h, "float", StartAngle, "float", SweepAngle)
  2838. }
  2839. Gdip_DrawPie(pGraphics, pPen, x, y, w, h, StartAngle, SweepAngle){
  2840.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2841.     return DllCall("gdiplus\GdipDrawPie", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h, "float", StartAngle, "float", SweepAngle)
  2842. }
  2843. Gdip_DrawLine(pGraphics, pPen, x1, y1, x2, y2){
  2844.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2845.     return DllCall("gdiplus\GdipDrawLine", Ptr, pGraphics, Ptr, pPen, "float", x1, "float", y1, "float", x2, "float", y2)
  2846. }
  2847. Gdip_DrawLines(pGraphics, pPen, Points){
  2848.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2849.     StringSplit, Points, Points, |
  2850.     VarSetCapacity(PointF, 8*Points0)
  2851.     Loop, %Points0%
  2852.     {
  2853.         StringSplit, Coord, Points%A_Index%, `,
  2854.         NumPut(Coord1, PointF, 8*(A_Index-1), "float"), NumPut(Coord2, PointF, (8*(A_Index-1))+4, "float")
  2855.     }
  2856.     return DllCall("gdiplus\GdipDrawLines", Ptr, pGraphics, Ptr, pPen, Ptr, &PointF, "int", Points0)
  2857. }
  2858. Gdip_FillRectangle(pGraphics, pBrush, x, y, w, h){
  2859.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2860.     return DllCall("gdiplus\GdipFillRectangle", Ptr, pGraphics, Ptr, pBrush, "float", x, "float", y, "float", w, "float", h)
  2861. }
  2862. Gdip_FillRoundedRectangle(pGraphics, pBrush, x, y, w, h, r){
  2863.     Region := Gdip_GetClipRegion(pGraphics)
  2864.     Gdip_SetClipRect(pGraphics, x-r, y-r, 2*r, 2*r, 4)
  2865.     Gdip_SetClipRect(pGraphics, x+w-r, y-r, 2*r, 2*r, 4)
  2866.     Gdip_SetClipRect(pGraphics, x-r, y+h-r, 2*r, 2*r, 4)
  2867.     Gdip_SetClipRect(pGraphics, x+w-r, y+h-r, 2*r, 2*r, 4)
  2868.     E := Gdip_FillRectangle(pGraphics, pBrush, x, y, w, h)
  2869.     Gdip_SetClipRegion(pGraphics, Region, 0)
  2870.     Gdip_SetClipRect(pGraphics, x-(2*r), y+r, w+(4*r), h-(2*r), 4)
  2871.     Gdip_SetClipRect(pGraphics, x+r, y-(2*r), w-(2*r), h+(4*r), 4)
  2872.     Gdip_FillEllipse(pGraphics, pBrush, x, y, 2*r, 2*r)
  2873.     Gdip_FillEllipse(pGraphics, pBrush, x+w-(2*r), y, 2*r, 2*r)
  2874.     Gdip_FillEllipse(pGraphics, pBrush, x, y+h-(2*r), 2*r, 2*r)
  2875.     Gdip_FillEllipse(pGraphics, pBrush, x+w-(2*r), y+h-(2*r), 2*r, 2*r)
  2876.     Gdip_SetClipRegion(pGraphics, Region, 0)
  2877.     Gdip_DeleteRegion(Region)
  2878.     return E
  2879. }
  2880. Gdip_GetClipRegion(pGraphics){
  2881.     Region := Gdip_CreateRegion()
  2882.     DllCall("gdiplus\GdipGetClip", A_PtrSize ? "UPtr" : "UInt", pGraphics, "UInt*", Region)
  2883.     return Region
  2884. }
  2885. Gdip_SetClipRect(pGraphics, x, y, w, h, CombineMode=0){
  2886.    return DllCall("gdiplus\GdipSetClipRect",  A_PtrSize ? "UPtr" : "UInt", pGraphics, "float", x, "float", y, "float", w, "float", h, "int", CombineMode)
  2887. }
  2888. Gdip_SetClipPath(pGraphics, Path, CombineMode=0){
  2889.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2890.     return DllCall("gdiplus\GdipSetClipPath", Ptr, pGraphics, Ptr, Path, "int", CombineMode)
  2891. }
  2892. Gdip_ResetClip(pGraphics){
  2893.    return DllCall("gdiplus\GdipResetClip", A_PtrSize ? "UPtr" : "UInt", pGraphics)
  2894. }
  2895. Gdip_FillEllipse(pGraphics, pBrush, x, y, w, h){
  2896.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2897.     return DllCall("gdiplus\GdipFillEllipse", Ptr, pGraphics, Ptr, pBrush, "float", x, "float", y, "float", w, "float", h)
  2898. }
  2899. Gdip_FillRegion(pGraphics, pBrush, Region){
  2900.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2901.     return DllCall("gdiplus\GdipFillRegion", Ptr, pGraphics, Ptr, pBrush, Ptr, Region)
  2902. }
  2903. Gdip_FillPath(pGraphics, pBrush, Path){
  2904.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2905.     return DllCall("gdiplus\GdipFillPath", Ptr, pGraphics, Ptr, pBrush, Ptr, Path)
  2906. }
  2907. Gdip_CreateRegion(){
  2908.     DllCall("gdiplus\GdipCreateRegion", "UInt*", Region)
  2909.     return Region
  2910. }
  2911. Gdip_DeleteRegion(Region){
  2912.     return DllCall("gdiplus\GdipDeleteRegion", A_PtrSize ? "UPtr" : "UInt", Region)
  2913. }
  2914. Gdip_CreateBitmap(Width, Height, Format=0x26200A){
  2915.     DllCall("gdiplus\GdipCreateBitmapFromScan0", "int", Width, "int", Height, "int", 0, "int", Format, A_PtrSize ? "UPtr" : "UInt", 0, A_PtrSize ? "UPtr*" : "uint*", pBitmap)
  2916.     Return pBitmap
  2917. }
  2918. Gdip_SetSmoothingMode(pGraphics, SmoothingMode){
  2919.    return DllCall("gdiplus\GdipSetSmoothingMode", A_PtrSize ? "UPtr" : "UInt", pGraphics, "int", SmoothingMode)
  2920. }
  2921. Gdip_DrawRectangle(pGraphics, pPen, x, y, w, h){
  2922.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2923.     return DllCall("gdiplus\GdipDrawRectangle", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h)
  2924. }
  2925. Gdip_DrawRoundedRectangle(pGraphics, pPen, x, y, w, h, r){
  2926.     Gdip_SetClipRect(pGraphics, x-r, y-r, 2*r, 2*r, 4)
  2927.     Gdip_SetClipRect(pGraphics, x+w-r, y-r, 2*r, 2*r, 4)
  2928.     Gdip_SetClipRect(pGraphics, x-r, y+h-r, 2*r, 2*r, 4)
  2929.     Gdip_SetClipRect(pGraphics, x+w-r, y+h-r, 2*r, 2*r, 4)
  2930.     E := Gdip_DrawRectangle(pGraphics, pPen, x, y, w, h)
  2931.     Gdip_ResetClip(pGraphics)
  2932.     Gdip_SetClipRect(pGraphics, x-(2*r), y+r, w+(4*r), h-(2*r), 4)
  2933.     Gdip_SetClipRect(pGraphics, x+r, y-(2*r), w-(2*r), h+(4*r), 4)
  2934.     Gdip_DrawEllipse(pGraphics, pPen, x, y, 2*r, 2*r)
  2935.     Gdip_DrawEllipse(pGraphics, pPen, x+w-(2*r), y, 2*r, 2*r)
  2936.     Gdip_DrawEllipse(pGraphics, pPen, x, y+h-(2*r), 2*r, 2*r)
  2937.     Gdip_DrawEllipse(pGraphics, pPen, x+w-(2*r), y+h-(2*r), 2*r, 2*r)
  2938.     Gdip_ResetClip(pGraphics)
  2939.     return E
  2940. }
  2941. Gdip_DrawEllipse(pGraphics, pPen, x, y, w, h){
  2942.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2943.     return DllCall("gdiplus\GdipDrawEllipse", Ptr, pGraphics, Ptr, pPen, "float", x, "float", y, "float", w, "float", h)
  2944. }
  2945. Gdip_CreateHBITMAPFromBitmap(pBitmap, Background=0xffffffff){
  2946.     DllCall("gdiplus\GdipCreateHBITMAPFromBitmap", A_PtrSize ? "UPtr" : "UInt", pBitmap, A_PtrSize ? "UPtr*" : "uint*", hbm, "int", Background)
  2947.     return hbm
  2948. }
  2949. SetImage(hwnd, hBitmap){
  2950.     SendMessage, 0x172, 0x0, hBitmap,, ahk_id %hwnd%
  2951.     E := ErrorLevel
  2952.     DeleteObject(E)
  2953.     return E
  2954. }
  2955. Gdip_FillPolygon(pGraphics, pBrush, Points, FillMode=0){
  2956.     Ptr := A_PtrSize ? "UPtr" : "UInt"
  2957.     StringSplit, Points, Points, |
  2958.     VarSetCapacity(PointF, 8*Points0)
  2959.     Loop, %Points0%
  2960.     {
  2961.         StringSplit, Coord, Points%A_Index%, `,
  2962.         NumPut(Coord1, PointF, 8*(A_Index-1), "float"), NumPut(Coord2, PointF, (8*(A_Index-1))+4, "float")
  2963.     }
  2964.     return DllCall("gdiplus\GdipFillPolygon", Ptr, pGraphics, Ptr, pBrush, Ptr, &PointF, "int", Points0, "int", FillMode)
  2965. }
RAW Paste Data