vanheartnet

AutoCDM

Aug 30th, 2020 (edited)
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.68 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Auto Copy Delete Move
  4. ;@Ahk2Exe-Set FileVersion, 3.0.0.0
  5. ;@Ahk2Exe-SetInternalName AutoCDM
  6. ;@Ahk2Exe-SetName GPoints AutoCDM
  7. ;@Ahk2Exe-SetOrigFileName AutoCDM
  8. ;@Ahk2Exe-Set ProductName, AutoCDM
  9. ;@Ahk2Exe-Set ProductVersion, 3.0.0.0
  10. ;@Ahk2Exe-Set Description, AutoCDM
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12.  
  13.  
  14.  
  15. #SingleInstance,Force
  16. #Persistent
  17. #NoEnv
  18. Menu,tray, NoStandard
  19. Menu,Tray,Add,Show
  20. Menu,Tray,Add,
  21. Menu,Tray,Add,Exit
  22. SetWorkingDir, %A_ScriptDir%
  23. SetBatchLines, -1
  24. #MaxHotkeysPerInterval 99000000
  25. #HotkeyInterval 99000000
  26. #KeyHistory 0
  27. ListLines Off
  28. Process, Priority, , A
  29. SetKeyDelay, -1, -1
  30. SetMouseDelay, -1
  31. SetDefaultMouseSpeed, 0
  32. SetWinDelay, -1
  33. SetControlDelay, -1
  34. SendMode Input
  35. #Include <Gdip_All>
  36. #Include <GdipHelper>
  37. pToken:=Gdip_Startup()
  38. gosub, Check_Updates
  39.  
  40. ;~ ################################################################################################################################
  41. ;~ ############################################### Auto Execute #################################################################
  42. ;~ ################################################################################################################################
  43. IfNotExist, Path Folders
  44. FileCreateDir, Path Folders
  45. IfNotExist, Path Folders\FolderListDelete.txt
  46. {
  47. FileAppend,,Path Folders\FolderListDelete.txt
  48. FileAppend,,Path Folders\FolderListCopySRC.txt
  49. FileAppend,,Path Folders\FolderListCopyDST.txt
  50. FileAppend,,Path Folders\FolderListMoveSRC.txt
  51. FileAppend,,Path Folders\FolderListMoveDST.txt
  52. }
  53. FileRead,ListDelete,Path Folders\FolderListDelete.txt
  54.  
  55. ;~ **************************************** Delete *************************************************************
  56. Loop,read,Path Folders\FolderListDelete.txt
  57. {
  58. Loop,parse,A_LoopReadLine,`n
  59. {
  60. jj:=A_LoopField
  61. IfNotExist,% jj
  62. continue
  63. else{
  64. Loop,%jj%\*.*,1
  65. {
  66. FileRemoveDir,%jj%\%A_LoopFileName%,1
  67. if (Errorlevel=1){
  68. FileDelete,%jj%\%A_LoopFilename%
  69. }
  70. }
  71. }
  72. }
  73. }
  74. ;~ **************************************** Copy *************************************************************
  75. Loop,read,Path Folders\FolderListCopySRC.txt
  76. {
  77. Loop,parse,A_LoopReadLine,`n
  78. {
  79. LineSRC++
  80. CSRC:=A_LoopField
  81. IfNotExist,% CSRC
  82. continue
  83. else{
  84. LineDST:=0
  85. Loop,Read,Path Folders\FolderListCopyDST.txt
  86. {
  87. Loop,parse,A_LoopReadLine,`n
  88. {
  89. LineDST++
  90. CDST:=A_LoopField
  91. If(LineSRC=LineDST){
  92. IfNotExist,% CDST
  93. Continue
  94. else{
  95. Loop,%CSRC%\*.*,1
  96. {
  97. FileCopyDir,% A_LoopFileDir,%CDST%,1
  98. if(Errorlevel=1){
  99. FileCopy,%CSRC%\*.*,%CDST%,1
  100. }
  101. }
  102. }
  103. }
  104. }
  105. }
  106. }
  107. }
  108. }
  109.  
  110. ;~ **************************************** Move *************************************************************
  111. Loop,read,Path Folders\FolderListMoveSRC.txt
  112. {
  113. Loop,Parse,A_LoopReadLine,`n
  114. {
  115. LineSRCM++
  116. MSRC:=A_LoopField
  117. IfNotExist,% MSRC
  118. continue
  119. else{
  120. LineDSTM:=0
  121. Loop,read,Path Folders\FolderListMoveDST.txt
  122. {
  123. Loop,parse,A_LoopReadLine,`n
  124. {
  125. LineDSTM++
  126. MDST:=A_LoopField
  127. if(LineSRCM=LineDSTM){
  128. IfNotExist,% MDST
  129. Continue
  130. else{
  131. Loop,%MSRC%\*.*,1
  132. {
  133. FileMoveDir,%MSRC%\%A_LoopFileName%,%MDST%\%A_LoopFilename%,2
  134. if(Errorlevel=1){
  135. FileMove,%MSRC%\%A_LoopFileName%,%MDST%\%A_LoopFileName%,1
  136. }
  137. }
  138. }
  139. }
  140. }
  141. }
  142. }
  143. }
  144. }
  145.  
  146.  
  147. ;~ ################################################################################################################################
  148. ;~ ############################################### GUI #################################################################
  149. ;~ ################################################################################################################################
  150.  
  151.  
  152.  
  153. Global Window1:=[], Radio1:=[], ButtonRed:=[],SS,Edit1,Edit2,Switch:=[],State,Ste
  154. Gui,1:Color,333333,666666
  155. Window1.Push( New Window_1(x:=0, y:=0, w:=602, h:=400, Window:="1", Option:="+AlwaysOntop -Caption", Title:="Title"))
  156. Gui,1:Add,Text,x150 y13 w300 h40 BackgroundTrans gMove_Window,
  157. Gui,1:Font, s10 Bold Italic underline,Arial
  158. Gui,1:Add,Text,x345 y26 w60 h20 Center BackgroundTrans, v3
  159. Gui,1:Font,
  160. Gui,1:Font,cWhite s8 Bold,Arial
  161. Gui,1:Add,Text,x20 y68 w60 h20 Right gRadio1 BackgroundTrans, COPY
  162. Gui,1:Add,Text,x+60 y68 w70 h20 Right gRadio2 BackgroundTrans, DELETE
  163. Gui,1:Add,Text,x+55 y68 w60 h20 Right gRadio3 BackgroundTrans, MOVE
  164. Gui,1:Font,
  165. Gui,1:Font,cLime s8 Bold,Arial
  166. Gui,1:Add,Text,x450 y80 h20 c888888 BackgroundTrans, V A N H E A R T N E T
  167. Gui,1:Add,Text,x451 y81 h20 BackgroundTrans, V A N H E A R T N E T
  168.  
  169. Gui,1:Add,Groupbox,x15 y60 w340 h25
  170. Radio1[1]:=New Radio_1(x:=20, y:=65, w:=22, h:=22, Window:="1", State:=0, Text:="Copy",Label:="Radio1")
  171. Radio1[2]:=New Radio_1(x+=120, y:=65, w:=22, h:=22, Window:="1", State:=1, Text:="Delete",Label:="Radio2")
  172. Radio1[3]:=New Radio_1(x+=120, y:=65, w:=22, h:=22, Window:="1", State:=0, Text:="Move",Label:="Radio3")
  173.  
  174. ButtonRed.Push( New Button_1(x:=50, y:=340, w:=149, h:=39, Window:="1", Text:="SAVE", Background:="FF0000",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="AddtoList"))
  175. ButtonRed.Push( New Button_1(x+=170, y:=340, w:=149, h:=39, Window:="1", Text:="Restart", Background:="FF0000",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BTN1"))
  176. ButtonRed.Push( New Button_1(x+=170, y:=340, w:=149, h:=39, Window:="1", Text:="Exit", Background:="FF0000",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="GuiClose"))
  177.  
  178.  
  179. ifexist,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AutoCDM.lnk
  180. Ste:=1
  181. else
  182. Ste:=0
  183. Switch.Push( New SWITCH_1( x:=480, y:=30, w:= 100, h:= 30, state:=Ste, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="FF0000", Switch_Border:="FF0000" , Switch_Border2:="00FF00", Text_Color3:="FF0000", Font_Size:=14 , Text1:="OFF", Text2:="ON", Text_Color1:="FFFF00", Text_Color2:="FF0000",Window:="1", Label:="SwitchC"))
  184. Gui,1:Font,
  185. Gui,1:Font,cAqua s8 Bold underline, Arial
  186. Gui,1:Add,Text,x490 y15 h20 cWhite BackgroundTrans, Run on Startup
  187. Gui,1:Font,
  188. Gui,1:Font,cAqua s8 Bold, Arial
  189. Gui,1:Add,Edit,x30 y110 w545 h210 Border +HScroll vEdit1,% ListDelete
  190. Gui,1:Add,Edit,x305 y110 w265 h210 Border +HScroll vEdit2 Hidden,
  191. ;~ Gui,1:Show, w602 h400 ,AUTO CDM
  192. SetTimer,Hover,50
  193. SetTimer,Shutdown, 1000
  194. TrayTip, Auto CDM `t, 10 secs...,,1
  195. return
  196.  
  197.  
  198.  
  199. ;~ ################################################################################################################################
  200. ;~ ############################################### LABELS AND FUNCTIONS ################################################
  201. ;~ ################################################################################################################################
  202.  
  203.  
  204. SwitchC(){
  205. if(Ste=0){
  206. SoundBeep, 2000
  207. Switch[ A_GuiControl ].Draw_Bitmap_ON()
  208. IfNotExist,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup
  209. FileCreateDir,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup
  210. StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
  211. FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AutoCDM.lnk,%SPath%
  212. Ste:=1
  213. }else{
  214. SoundBeep, 2000
  215. Switch[ A_GuiControl ].Draw_Bitmap_OFF()
  216. FileDelete,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AutoCDM.lnk
  217. Ste:=0
  218. }
  219. }
  220.  
  221. BTN1(){
  222. GuiControl , % ButtonRed[ A_GuiControl ].Window ": Focus" , % ButtonRed[ A_GuiControl ].Hwnd
  223. ; Add the button press function call and test
  224. if( ! ButtonRed[ A_GuiControl ].Draw_Button_Pressed() )
  225. return
  226. SoundBeep, 2000
  227. Reload
  228. }
  229.  
  230. AddtoList(){
  231. GuiControl , % ButtonRed[ A_GuiControl ].Window ": Focus" , % ButtonRed[ A_GuiControl ].Hwnd
  232. ; Add the button press function call and test
  233. if( ! ButtonRed[ A_GuiControl ].Draw_Button_Pressed() )
  234. return
  235. SoundBeep, 2000
  236. Gui,1:Submit,Nohide
  237. if (Radio1[1].State=1){
  238. FileDelete,Path Folders\FolderListCopySRC.txt
  239. FileDelete,Path Folders\FolderListCopyDST.txt
  240. FileAppend,% Edit1,Path Folders\FolderListCopySRC.txt
  241. FileAppend,% Edit2,Path Folders\FolderListCopyDST.txt
  242. }
  243. else if (Radio1[2].State=1){
  244. FileDelete,Path Folders\FolderListDelete.txt
  245. FileAppend,%Edit1%,Path Folders\FolderListDelete.txt
  246. }
  247. else{
  248. FileDelete,Path Folders\FolderListMoveSRC.txt
  249. FileDelete,Path Folders\FolderListMoveDST.txt
  250. FileAppend,% Edit1,Path Folders\FolderListMoveSRC.txt
  251. FileAppend,% Edit2,Path Folders\FolderListMoveDST.txt
  252. }
  253. }
  254.  
  255. Radio1(){
  256. if(Radio1[1].State=0){
  257. SoundBeep, 5000
  258. Radio1[1].State:=1
  259. Radio1[1].Draw_Radio_ON()
  260. Radio1[2].State:=0
  261. Radio1[2].Draw_Radio_OFF()
  262. Radio1[3].State:=0
  263. Radio1[3].Draw_Radio_OFF()
  264. FileRead,ReadCopySRC,Path Folders\FolderListCopySRC.txt
  265. FileRead,ReadCopyDST,Path Folders\FolderListCopyDST.txt
  266. GuiControl,1:,Edit1,% ReadCopySRC
  267. GuiControl,1:,Edit2,% ReadCopyDST
  268. GuiControl,1:Show,Edit2
  269. GuiControl,1:Move,Edit1,w265
  270. }
  271. }
  272.  
  273. Radio2(){
  274. if(Radio1[2].State=0){
  275. SoundBeep, 5000
  276. Radio1[2].State:=1
  277. Radio1[2].Draw_Radio_ON()
  278. Radio1[1].State:=0
  279. Radio1[1].Draw_Radio_OFF()
  280. Radio1[3].State:=0
  281. Radio1[3].Draw_Radio_OFF()
  282. FileRead,ReadDelete,Path Folders\FolderListDelete.txt
  283. GuiControl,1:,Edit1,% ReadDelete
  284. GuiControl,1:Hide,Edit2
  285. GuiControl,1:Move,Edit1,w545
  286. }
  287. }
  288. Radio3(){
  289. if(Radio1[3].State=0){
  290. SoundBeep, 5000
  291. Radio1[3].State:=1
  292. Radio1[3].Draw_Radio_ON()
  293. Radio1[1].State:=0
  294. Radio1[1].Draw_Radio_OFF()
  295. Radio1[2].State:=0
  296. Radio1[2].Draw_Radio_OFF()
  297. FileRead,ReadMoveSRC,Path Folders\FolderListMoveSRC.txt
  298. FileRead,ReadMoveDST,Path Folders\FolderListMoveDST.txt
  299. GuiControl,1:,Edit1,% ReadMoveSRC
  300. GuiControl,1:,Edit2,% ReadMoveDST
  301. GuiControl,1:Show,Edit2
  302. GuiControl,1:Move,Edit1,w265
  303. }
  304. }
  305.  
  306. Shutdown(){
  307. SS++
  308. If (SS=10)
  309. ExitApp
  310. else
  311. sleep 1000
  312.  
  313. }
  314.  
  315. Class Button_1{
  316. __New(x:=10, y:=10, w:=600, h:=400, Window:="1", Text:="Text", Background:="FF0000",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BTN1"){
  317. This.X:=x
  318. This.Y:=y
  319. This.W:=w
  320. This.H:=h
  321. This.Window:=Window
  322. This.Text:=Text
  323. This.Background:="0xFF" Background
  324. This.Button_BG_Color:="0xFF" Button_BG_Color
  325. This.Button_Border_Color:="0xFF" Button_Border_Color
  326. This.Button_Font_Color:="0xFF" Button_Font_Color
  327. This.Label:=Label
  328. This.Create_Button_Default()
  329. This.Create_Button_Hover()
  330. This.Create_Button_Pressed()
  331. This.Adding_Control()
  332. Sleep 20
  333. This.Draw_Button_Default()
  334.  
  335. }
  336. Adding_Control(){
  337. static
  338. num := ButtonRed.Length()+1
  339. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  340. This.Number := Num , This.Hwnd := Hwnd
  341. }
  342. Create_Button_Default(){
  343. ;Bitmap Created Using: HB Bitmap Maker
  344. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  345. G := Gdip_GraphicsFromImage( pBitmap )
  346. Gdip_SetSmoothingMode( G , 4 )
  347. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  348. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+5 , This.H+5 )
  349. Gdip_DeleteBrush( Brush )
  350. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  351. Gdip_DrawRoundedRectangle( G , Pen , 5 , 4 , 140 , 30 , 5 )
  352. Gdip_DeletePen( Pen )
  353. ;BUTTON BACKGROUND
  354. Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF880000" , "0xFFD7E4F0" , 1 , 1 )
  355. Gdip_FillRoundedRectangle( G , Brush , 6 , 4 , 138 , 30 , 5 )
  356. Gdip_DeleteBrush( Brush )
  357. ;TOP GRADE
  358. Brush := Gdip_CreateLineBrushFromRect( 120 , 31 , -21 , 0 , "0xFFFF0000" , "0xFF333333" , 1 , 1 )
  359. Gdip_FillRoundedRectangle( G , Brush , 9 , 6 , 133 , 24 , 0 )
  360. Gdip_DeleteBrush( Brush )
  361. ;textTop
  362. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFffff00" , "0xFFffffff" , 1 , 1 )
  363. ;textTop
  364. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y-1" , "Segoe UI" , 150 , 40 )
  365. Gdip_DeleteBrush( Brush )
  366. ;textBottom
  367. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  368. ;textBottom
  369. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y-1" , "Segoe UI" , 150 , 40 )
  370. Gdip_DeleteBrush( Brush )
  371. Gdip_DeleteGraphics( G )
  372. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  373. Gdip_DisposeImage(pBitmap)
  374. }
  375. Create_Button_Hover(){
  376. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  377. G := Gdip_GraphicsFromImage( pBitmap )
  378. Gdip_SetSmoothingMode( G , 4 )
  379. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  380. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+5 , This.H+5 )
  381. Gdip_DeleteBrush( Brush )
  382. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  383. Gdip_DrawRoundedRectangle( G , Pen , 5 , 4 , 140 , 30 , 5 )
  384. Gdip_DeletePen( Pen )
  385. ;BUTTON BACKGROUND
  386. Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF880000" , "0xFFD7E4F0" , 1 , 1 )
  387. Gdip_FillRoundedRectangle( G , Brush , 6 , 4 , 138 , 30 , 5 )
  388. Gdip_DeleteBrush( Brush )
  389. ;TOP GRADE
  390. Brush := Gdip_CreateLineBrushFromRect( 120 , 3 , -21 , 100 , "0xFFF63437" , "0xFF00FFFF" , 1 , 1 )
  391. Gdip_FillRoundedRectangle( G , Brush , 7 , 6 , 136 , 26 , 6 )
  392. Gdip_DeleteBrush( Brush )
  393. ;textTop
  394. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFffffff" , "0xFF00ff00" , 1 , 1 )
  395. ;textTop
  396. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y-1" , "Segoe UI" , 150 , 40 )
  397. Gdip_DeleteBrush( Brush )
  398. ;textBottom
  399. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  400. ;textBottom
  401. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y-1" , "Segoe UI" , 150 , 40 )
  402. Gdip_DeleteBrush( Brush )
  403. Gdip_DeleteGraphics( G )
  404. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  405. Gdip_DisposeImage(pBitmap)
  406. }
  407. Create_Button_Pressed(){
  408. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  409. G := Gdip_GraphicsFromImage( pBitmap )
  410. Gdip_SetSmoothingMode( G , 4 )
  411. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  412. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+5 , This.H+5 )
  413. Gdip_DeleteBrush( Brush )
  414. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  415. Gdip_DrawRoundedRectangle( G , Pen , 5 , 4 , 140 , 30 , 5 )
  416. Gdip_DeletePen( Pen )
  417. ;BUTTON BACKGROUND
  418. Brush := Gdip_BrushCreateSolid( "0xFF880000" )
  419. Gdip_FillRoundedRectangle( G , Brush , 4 , 4 , 142 , 31 , 5 )
  420. Gdip_DeleteBrush( Brush )
  421. ;TOP GRADE
  422. Brush := Gdip_BrushCreateSolid( "0xFFF63437" )
  423. Gdip_FillRoundedRectangle( G , Brush , 6 , 4 , 139 , 30 , 3 )
  424. Gdip_DeleteBrush( Brush )
  425. ;textTop
  426. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF000000" , 1 , 1 )
  427. ;textTop
  428. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y-1" , "Segoe UI" , 150 , 40 )
  429. Gdip_DeleteBrush( Brush )
  430. ;textBottom
  431. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFF333333" , 1 )
  432. ;textBottom
  433. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y-1" , "Segoe UI" , 150 , 40 )
  434. Gdip_DeleteBrush( Brush )
  435. Gdip_DeleteGraphics( G )
  436. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  437. Gdip_DisposeImage(pBitmap)
  438. }
  439. Draw_Button_Default(){
  440. SetImage( This.Hwnd , This.Default_Bitmap )
  441. }
  442. Draw_Button_Hover(){
  443. SetImage( This.Hwnd , This.Hover_Bitmap )
  444. }
  445. Draw_Button_Pressed(){
  446. SetImage( This.Hwnd , This.Pressed_Bitmap )
  447.  
  448. SetTimer , Hover , Off
  449. While( GetKeyState( "LButton" ) )
  450. sleep , 10
  451. SetTimer , Hover , On
  452. MouseGetPos,,,, ctrl , 2
  453. if( This.Hwnd != ctrl ){
  454. This.Draw_Button_Default()
  455. return False
  456. }else {
  457. This.Draw_Button_Hover()
  458. return true
  459. }
  460. }
  461. }
  462.  
  463. Hover(){
  464. static Index , Hover_On
  465. MouseGetPos,,,, ctrl , 2
  466. if( ! Hover_On && ctrl ){
  467. loop , % ButtonRed.Length()
  468. if( ctrl = ButtonRed[ A_Index ].hwnd )
  469. {
  470. ButtonRed[ A_Index ].Draw_Button_Hover() , Index := A_Index , Hover_On := 1 , break
  471. SoundBeep,200
  472. }
  473. }else if( Hover_On = 1 )
  474. if( ctrl != ButtonRed[ Index ].Hwnd )
  475. ButtonRed[ Index ].Draw_Button_Default() , Hover_On := 0
  476. }
  477. Class Radio_1{
  478. __New(x:=10, y:=10, w:=200, h:=30, Window:="1", State:=1, Text:="Text",Label:="Label"){
  479. This.X:=x
  480. This.Y:=y
  481. This.W:=w
  482. This.H:=h
  483. This.Window:=Window
  484. This.Label:=Label
  485. This.Text:=Text
  486. This.State:=State
  487. This.Create_Radio_OFF()
  488. This.Create_Radio_ON()
  489. This.Add_Control()
  490. If(This.State=1)
  491. This.Draw_Radio_ON()
  492. else
  493. This.Draw_Radio_OFF()
  494. }
  495. Add_Control(){
  496. Local
  497. num := Radio1.Length()+1
  498. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  499. This.Number := Num , This.Hwnd := Hwnd
  500. }
  501. Create_Radio_ON(){
  502. ;Bitmap Created Using: HB Bitmap Maker
  503. pBitmap:=Gdip_CreateBitmap( This.W, This.H )
  504. G := Gdip_GraphicsFromImage( pBitmap )
  505. Gdip_SetSmoothingMode( G , 4 )
  506. ;Background
  507. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  508. Gdip_FillRectangle( G , Brush , -1 , -1 , 23 , 23 )
  509. Gdip_DeleteBrush( Brush )
  510. ;background
  511. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  512. Gdip_FillEllipse( G , Brush , 1 , 0 , 20 , 20 )
  513. Gdip_DeleteBrush( Brush )
  514. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
  515. Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  516. Gdip_DeleteBrush( Brush )
  517. Gdip_DrawEllipse( G , Pen , 1 , 0 , 20 , 20 )
  518. Gdip_DeletePen( Pen )
  519. ;CenterColor
  520. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  521. Gdip_FillEllipse( G , Brush , 6 , 5 , 10 , 10 )
  522. Gdip_DeleteBrush( Brush )
  523. Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  524. Gdip_DrawEllipse( G , Pen , 6 , 5 , 10 , 10 )
  525. Gdip_DeletePen( Pen )
  526. Gdip_DeleteGraphics( G )
  527. This.Radio_ON := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  528. Gdip_DisposeImage(pBitmap)
  529. }
  530. Create_Radio_OFF(){
  531. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  532. G := Gdip_GraphicsFromImage( pBitmap )
  533. Gdip_SetSmoothingMode( G , 4 )
  534. ;Background
  535. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  536. Gdip_FillRectangle( G , Brush , -1 , -1 , 23 , 23 )
  537. Gdip_DeleteBrush( Brush )
  538. ;background
  539. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  540. Gdip_FillEllipse( G , Brush , 1 , 1 , 20 , 20 )
  541. Gdip_DeleteBrush( Brush )
  542. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
  543. Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  544. Gdip_DeleteBrush( Brush )
  545. Gdip_DrawEllipse( G , Pen , 1 , 1 , 20 , 20 )
  546. Gdip_DeletePen( Pen )
  547. ;CenterColor
  548. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  549. Gdip_FillEllipse( G , Brush , 6 , 6 , 10 , 10 )
  550. Gdip_DeleteBrush( Brush )
  551. Pen := Gdip_CreatePen( "0xFF000000" , 1 )
  552. Gdip_DrawEllipse( G , Pen , 6 , 6 , 10 , 10 )
  553. Gdip_DeletePen( Pen )
  554. Gdip_DeleteGraphics( G )
  555. This.Radio_OFF := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  556. Gdip_DisposeImage(pBitmap)
  557. }
  558. Draw_Radio_ON(){
  559. SetImage( This.Hwnd , This.Radio_ON )
  560.  
  561. }
  562. Draw_Radio_OFF(){
  563. SetImage( This.Hwnd , This.Radio_OFF )
  564.  
  565. }
  566. }
  567.  
  568. Class Window_1{
  569. __New(x:=10, y:=10, w:=600, h:=400, Window:="1", Option:="+AlwaysOntop -Caption", Title:="Title"){
  570. This.X:=x
  571. This.Y:=y
  572. This.W:=w
  573. This.H:=h
  574. This.Window:=Window
  575. This.Option:=Option
  576. This.Title:=Title
  577. This.Create_Window()
  578. This.Add_Window()
  579. Sleep 20
  580. This.Draw_Window()
  581. }
  582. Add_Window(){
  583. static
  584. num := Window1.Length()+1
  585. Gui,% This.Window ":" This.Option
  586. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  587. This.Number := Num , This.Hwnd := Hwnd
  588. }
  589. Create_Window(){
  590. ;Bitmap Created Using: HB Bitmap Maker
  591. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  592. G := Gdip_GraphicsFromImage( pBitmap )
  593. Gdip_SetSmoothingMode( G , 4 )
  594. ;Background
  595. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  596. Gdip_FillRectangle( G , Brush , -1 , -1 , 602 , 402 )
  597. Gdip_DeleteBrush( Brush )
  598. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFFFF0000" , 1 )
  599. Pen := Gdip_CreatePenFromBrush( Brush , 10 )
  600. Gdip_DeleteBrush( Brush )
  601. Gdip_DrawRoundedRectangle( G , Pen , 5 , 5 , 590 , 388 , 12 )
  602. Gdip_DeletePen( Pen )
  603. Brush := Gdip_CreateLineBrush( 100 , 18 , 100 , 100 , "0xFFFF0000" , "0xFF222222" , 1 )
  604. Gdip_FillRoundedRectangle( G , Brush , 150 , 13 , 300 , 40 , 5 )
  605. Gdip_DeleteBrush( Brush )
  606. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFFFFFFFF" , 1 , 1 )
  607. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  608. Gdip_DeleteBrush( Brush )
  609. Gdip_DrawRoundedRectangle( G , Pen , 150 , 12 , 300 , 40 , 5 )
  610. Gdip_DeletePen( Pen )
  611. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0000FF" , "0xFFFFFFFF" , 1 , 1 )
  612. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  613. Gdip_DeleteBrush( Brush )
  614. Gdip_DrawRoundedRectangle( G , Pen , 20 , 100 , 560 , 230 , 5 )
  615. Gdip_DeletePen( Pen )
  616. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  617. Gdip_TextToGraphics( G , "AUTO CDM" , "s22 Center vCenter Bold c" Brush " x148 y11" , "Segoe UI" , 300 , 40 )
  618. Gdip_DeleteBrush( Brush )
  619. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFffffff" , "0xFF0000ff" , 1 )
  620. Gdip_TextToGraphics( G , "AUTO CDM" , "s22 Center vCenter Bold c" Brush " x151 y14" , "Segoe UI" , 300 , 40 )
  621. Gdip_DeleteBrush( Brush )
  622. Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF0000ff" , 0 )
  623. Gdip_TextToGraphics( G , "AUTO CDM" , "s22 Center vCenter Bold c" Brush " x150 y13" , "Segoe UI" , 300 , 40 )
  624. Gdip_DeleteBrush( Brush )
  625. Gdip_DeleteGraphics( G )
  626. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  627. Gdip_DisposeImage(pBitmap)
  628. }
  629. Draw_Window(){
  630. SetImage( This.Hwnd , This.Default_Bitmap )
  631. }
  632. }
  633.  
  634. ;SWITCH
  635. Class SWITCH_1{
  636. __New( x:=10, y:=10, w:= 100, h:= 30, state:=0, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text1:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="1", Label:="SwitchC"){
  637. This.X:=x
  638. This.Y:=y
  639. This.W:=w
  640. This.H:=h
  641. This.Window:=Window
  642. This.State:=state
  643. This.Font_Size := Font_Size
  644. This.Text_Color3:= "0xFF" Text_Color3
  645. This.BG_Color:= "0xFF" BG_Color
  646. This.Switch_BG_Color:= "0xFF" Switch_BG_Color
  647. This.Switch_F_Color:= "0xFF" Switch_F_Color
  648. This.Switch_Border:="0xFF" Switch_Border
  649. This.Switch_Border2:="0xFF" Switch_Border2
  650. This.Text1:=Text1
  651. This.Text2:=Text2
  652. This.Text_Color1:= "0xFF" Text_Color1
  653. This.Text_Color2:= "0xFF" Text_Color2
  654. This.Label:=Label
  655. This.Create_Switch_OFF()
  656. This.Create_Switch_ON()
  657. This.Adding_Control()
  658. sleep 20
  659. (This.State=0)?(This.Draw_Bitmap_OFF()):(This.Draw_Bitmap_ON())
  660. }
  661.  
  662. Adding_Control(){
  663. static
  664. num := Switch.Length()+1
  665. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  666. This.Number := Num , This.Hwnd := Hwnd
  667. }
  668. Create_Switch_OFF(){
  669. ;Bitmap Created Using: HB Bitmap Maker
  670. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  671. G := Gdip_GraphicsFromImage( pBitmap )
  672. Gdip_SetSmoothingMode( G , 4 )
  673. ;background
  674. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  675. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  676. Gdip_DeleteBrush( Brush )
  677. ;rounddedbackground
  678. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  679. Gdip_FillRoundedRectangle( G , Brush , 6 , 3 , 89 , 24 , 5 )
  680. Gdip_DeleteBrush( Brush )
  681. Pen := Gdip_CreatePen( "0xFFff0000" , 1 )
  682. Gdip_DrawRoundedRectangle( G , Pen , 5 , 3 , 90 , 24 , 5 )
  683. Gdip_DeletePen( Pen )
  684. ;backcolor
  685. Brush := Gdip_BrushCreateSolid( "0xFF666666" )
  686. Gdip_FillRoundedRectangle( G , Brush , 7 , 4 , 50 , 22 , 5 )
  687. Gdip_DeleteBrush( Brush )
  688. ;fontcolor
  689. Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF404040" , "0xFFffffff" , 1 , 1 )
  690. Gdip_FillRoundedRectangle( G , Brush , 7 , 4 , 50 , 22 , 5 )
  691. Gdip_DeleteBrush( Brush )
  692. Pen := Gdip_CreatePen( "0xFFffffff" , 1 )
  693. Gdip_DrawRoundedRectangle( G , Pen , 7 , 4 , 50 , 22 , 5 )
  694. Gdip_DeletePen( Pen )
  695. ;BACK CIRCLE
  696. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  697. Gdip_FillEllipse( G , Brush , 16 , 9 , 12 , 12 )
  698. Gdip_DeleteBrush( Brush )
  699. ;FONTCIRCLE
  700. Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
  701. Gdip_FillEllipse( G , Brush , 17 , 10 , 10 , 10 )
  702. Gdip_DeleteBrush( Brush )
  703. ;BACK TEXT
  704. Brush := Gdip_BrushCreateSolid( "0xFFFFFFFF" )
  705. ;BACK TEXT
  706. Gdip_TextToGraphics( G , "OFF" , "s12 Center vCenter Bold c" Brush " x50 y-10" , "Segoe UI" , 50 , 50 )
  707. Gdip_DeleteBrush( Brush )
  708. ;FONT TEXT
  709. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  710. ;FONT TEXT
  711. Gdip_TextToGraphics( G , "OFF" , "s12 Center vCenter Bold c" Brush " x51 y-9" , "Segoe UI" , 50 , 50 )
  712. Gdip_DeleteBrush( Brush )
  713. Gdip_DeleteGraphics( G )
  714. This.Draw_OFF_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  715. Gdip_DisposeImage(pBitmap)
  716. }
  717.  
  718. Create_Switch_ON(){
  719. ;Bitmap Created Using: HB Bitmap Maker
  720. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  721. G := Gdip_GraphicsFromImage( pBitmap )
  722. Gdip_SetSmoothingMode( G , 4 )
  723. ;background
  724. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
  725. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  726. Gdip_DeleteBrush( Brush )
  727. ;rounddedbackground
  728. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  729. Gdip_FillRoundedRectangle( G , Brush , 6 , 3 , 89 , 24 , 5 )
  730. Gdip_DeleteBrush( Brush )
  731. ;backcolor
  732. Brush := Gdip_BrushCreateSolid( "0xFF666666" )
  733. Gdip_FillRoundedRectangle( G , Brush , 44 , 4 , 50 , 22 , 5 )
  734. Gdip_DeleteBrush( Brush )
  735. ;fontcolor
  736. Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF404040" , "0xFFffffff" , 1 , 1 )
  737. Gdip_FillRoundedRectangle( G , Brush , 44 , 4 , 50 , 22 , 5 )
  738. Gdip_DeleteBrush( Brush )
  739. Pen := Gdip_CreatePen( "0xFF00ff00" , 1 )
  740. Gdip_DrawRoundedRectangle( G , Pen , 7 , 3 , 89 , 24 , 5 )
  741. Gdip_DeletePen( Pen )
  742. Pen := Gdip_CreatePen( "0xFFffffff" , 1 )
  743. Gdip_DrawRoundedRectangle( G , Pen , 44 , 4 , 50 , 22 , 5 )
  744. Gdip_DeletePen( Pen )
  745. ;BACK CIRCLE
  746. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  747. Gdip_FillEllipse( G , Brush , 76 , 9 , 12 , 12 )
  748. Gdip_DeleteBrush( Brush )
  749. ;FONTCIRCLE
  750. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  751. Gdip_FillEllipse( G , Brush , 77 , 10 , 10 , 10 )
  752. Gdip_DeleteBrush( Brush )
  753. ;BACK TEXT
  754. Brush := Gdip_BrushCreateSolid( "0xFFFFFFFF" )
  755. ;BACK TEXT
  756. Gdip_TextToGraphics( G , "ON" , "s12 Center vCenter Bold c" Brush " x0 y-10" , "Segoe UI" , 50 , 50 )
  757. Gdip_DeleteBrush( Brush )
  758. ;FONT TEXT
  759. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  760. ;FONT TEXT
  761. Gdip_TextToGraphics( G , "ON" , "s12 Center vCenter Bold c" Brush " x1 y-9" , "Segoe UI" , 50 , 50 )
  762. Gdip_DeleteBrush( Brush )
  763. Gdip_DeleteGraphics( G )
  764. This.Draw_ON_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  765. Gdip_DisposeImage(pBitmap)
  766. }
  767. Draw_Bitmap_ON(){
  768. SetImage( This.Hwnd , This.Draw_ON_Bitmap )
  769. }
  770. Draw_Bitmap_OFF(){
  771. SetImage( This.Hwnd , This.Draw_OFF_Bitmap )
  772. }
  773.  
  774. }
  775. Move_Window(){
  776. PostMessage,0xA1,2
  777. }
  778.  
  779.  
  780.  
  781.  
  782.  
  783. Show:
  784. SetTimer, Shutdown , Off
  785. Gui,1:Show,w602 h400,AUTO CDM
  786. Send {End}
  787.  
  788. return
  789.  
  790. Esc::
  791. GuiClose:
  792. SoundBeep, 2000
  793. Gdip_Shutdown(pToken)
  794. ExitApp
  795.  
  796.  
  797.  
  798. Check_Updates:
  799. ;~ =======================================CHECK VERSION=====================================================
  800. V=3.0.0.0
  801. MFlink=http://www.mediafire.com/file/ido5b1vrvc5jols/AutoCDM.rar/file
  802. pastebin=https://pastebin.com/zcfSCQ0m
  803. ;~ ============================================================================================
  804. message=BULLSF Updater
  805. message1=`n`nThank You`n`n-VANHEARTNET
  806. message2=BULLSF Updater`n`nLatest version is now available and ready to download`nYou will redirect to a download link.`n`nThank You`n`n-VANHEARTNET
  807. ;~ ============================================================================================
  808.  
  809. URLDownloadToFile,%pastebin%,%A_Temp%\%message% version.dat
  810. if errorlevel=0
  811. {
  812. fileread,version,%A_Temp%\%message% version.dat
  813. IfNotInString,version,%V%
  814. {
  815. Loop,read,%A_Temp%\%message% version.dat
  816. {
  817. str := A_LoopReadLine
  818. s:=StrSplit(str,"version=")
  819. Loop,parse,A_LoopReadLine,`n
  820. {
  821. IfNotInString,str,version=
  822. continue
  823. else
  824. {
  825. rar:=StrSplit(s.2,"</div>")
  826. url1:=rar.1
  827. V2:=url1
  828. break 2
  829. }
  830. }
  831. }
  832.  
  833. MsgBox, 262180, %message%, A new version is Available!`n`nDo you want to download?`nversion : %V2%,10
  834. IfMsgBox,Yes
  835. Run,%MFlink%
  836. }
  837. }
  838. return
  839. ;~ ==================================================================================================================
Add Comment
Please, Sign In to add comment