Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
- ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
- ;@Ahk2Exe-Set FileDescription, Auto Copy Delete Move
- ;@Ahk2Exe-Set FileVersion, 3.0.0.0
- ;@Ahk2Exe-SetInternalName AutoCDM
- ;@Ahk2Exe-SetName GPoints AutoCDM
- ;@Ahk2Exe-SetOrigFileName AutoCDM
- ;@Ahk2Exe-Set ProductName, AutoCDM
- ;@Ahk2Exe-Set ProductVersion, 3.0.0.0
- ;@Ahk2Exe-Set Description, AutoCDM
- ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
- #SingleInstance,Force
- #Persistent
- #NoEnv
- Menu,tray, NoStandard
- Menu,Tray,Add,Show
- Menu,Tray,Add,
- Menu,Tray,Add,Exit
- SetWorkingDir, %A_ScriptDir%
- SetBatchLines, -1
- #MaxHotkeysPerInterval 99000000
- #HotkeyInterval 99000000
- #KeyHistory 0
- ListLines Off
- Process, Priority, , A
- SetKeyDelay, -1, -1
- SetMouseDelay, -1
- SetDefaultMouseSpeed, 0
- SetWinDelay, -1
- SetControlDelay, -1
- SendMode Input
- #Include <Gdip_All>
- #Include <GdipHelper>
- pToken:=Gdip_Startup()
- gosub, Check_Updates
- ;~ ################################################################################################################################
- ;~ ############################################### Auto Execute #################################################################
- ;~ ################################################################################################################################
- IfNotExist, Path Folders
- FileCreateDir, Path Folders
- IfNotExist, Path Folders\FolderListDelete.txt
- {
- FileAppend,,Path Folders\FolderListDelete.txt
- FileAppend,,Path Folders\FolderListCopySRC.txt
- FileAppend,,Path Folders\FolderListCopyDST.txt
- FileAppend,,Path Folders\FolderListMoveSRC.txt
- FileAppend,,Path Folders\FolderListMoveDST.txt
- }
- FileRead,ListDelete,Path Folders\FolderListDelete.txt
- ;~ **************************************** Delete *************************************************************
- Loop,read,Path Folders\FolderListDelete.txt
- {
- Loop,parse,A_LoopReadLine,`n
- {
- jj:=A_LoopField
- IfNotExist,% jj
- continue
- else{
- Loop,%jj%\*.*,1
- {
- FileRemoveDir,%jj%\%A_LoopFileName%,1
- if (Errorlevel=1){
- FileDelete,%jj%\%A_LoopFilename%
- }
- }
- }
- }
- }
- ;~ **************************************** Copy *************************************************************
- Loop,read,Path Folders\FolderListCopySRC.txt
- {
- Loop,parse,A_LoopReadLine,`n
- {
- LineSRC++
- CSRC:=A_LoopField
- IfNotExist,% CSRC
- continue
- else{
- LineDST:=0
- Loop,Read,Path Folders\FolderListCopyDST.txt
- {
- Loop,parse,A_LoopReadLine,`n
- {
- LineDST++
- CDST:=A_LoopField
- If(LineSRC=LineDST){
- IfNotExist,% CDST
- Continue
- else{
- Loop,%CSRC%\*.*,1
- {
- FileCopyDir,% A_LoopFileDir,%CDST%,1
- if(Errorlevel=1){
- FileCopy,%CSRC%\*.*,%CDST%,1
- }
- }
- }
- }
- }
- }
- }
- }
- }
- ;~ **************************************** Move *************************************************************
- Loop,read,Path Folders\FolderListMoveSRC.txt
- {
- Loop,Parse,A_LoopReadLine,`n
- {
- LineSRCM++
- MSRC:=A_LoopField
- IfNotExist,% MSRC
- continue
- else{
- LineDSTM:=0
- Loop,read,Path Folders\FolderListMoveDST.txt
- {
- Loop,parse,A_LoopReadLine,`n
- {
- LineDSTM++
- MDST:=A_LoopField
- if(LineSRCM=LineDSTM){
- IfNotExist,% MDST
- Continue
- else{
- Loop,%MSRC%\*.*,1
- {
- FileMoveDir,%MSRC%\%A_LoopFileName%,%MDST%\%A_LoopFilename%,2
- if(Errorlevel=1){
- FileMove,%MSRC%\%A_LoopFileName%,%MDST%\%A_LoopFileName%,1
- }
- }
- }
- }
- }
- }
- }
- }
- }
- ;~ ################################################################################################################################
- ;~ ############################################### GUI #################################################################
- ;~ ################################################################################################################################
- Global Window1:=[], Radio1:=[], ButtonRed:=[],SS,Edit1,Edit2,Switch:=[],State,Ste
- Gui,1:Color,333333,666666
- Window1.Push( New Window_1(x:=0, y:=0, w:=602, h:=400, Window:="1", Option:="+AlwaysOntop -Caption", Title:="Title"))
- Gui,1:Add,Text,x150 y13 w300 h40 BackgroundTrans gMove_Window,
- Gui,1:Font, s10 Bold Italic underline,Arial
- Gui,1:Add,Text,x345 y26 w60 h20 Center BackgroundTrans, v3
- Gui,1:Font,
- Gui,1:Font,cWhite s8 Bold,Arial
- Gui,1:Add,Text,x20 y68 w60 h20 Right gRadio1 BackgroundTrans, COPY
- Gui,1:Add,Text,x+60 y68 w70 h20 Right gRadio2 BackgroundTrans, DELETE
- Gui,1:Add,Text,x+55 y68 w60 h20 Right gRadio3 BackgroundTrans, MOVE
- Gui,1:Font,
- Gui,1:Font,cLime s8 Bold,Arial
- Gui,1:Add,Text,x450 y80 h20 c888888 BackgroundTrans, V A N H E A R T N E T
- Gui,1:Add,Text,x451 y81 h20 BackgroundTrans, V A N H E A R T N E T
- Gui,1:Add,Groupbox,x15 y60 w340 h25
- Radio1[1]:=New Radio_1(x:=20, y:=65, w:=22, h:=22, Window:="1", State:=0, Text:="Copy",Label:="Radio1")
- Radio1[2]:=New Radio_1(x+=120, y:=65, w:=22, h:=22, Window:="1", State:=1, Text:="Delete",Label:="Radio2")
- Radio1[3]:=New Radio_1(x+=120, y:=65, w:=22, h:=22, Window:="1", State:=0, Text:="Move",Label:="Radio3")
- 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"))
- 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"))
- 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"))
- ifexist,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AutoCDM.lnk
- Ste:=1
- else
- Ste:=0
- 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"))
- Gui,1:Font,
- Gui,1:Font,cAqua s8 Bold underline, Arial
- Gui,1:Add,Text,x490 y15 h20 cWhite BackgroundTrans, Run on Startup
- Gui,1:Font,
- Gui,1:Font,cAqua s8 Bold, Arial
- Gui,1:Add,Edit,x30 y110 w545 h210 Border +HScroll vEdit1,% ListDelete
- Gui,1:Add,Edit,x305 y110 w265 h210 Border +HScroll vEdit2 Hidden,
- ;~ Gui,1:Show, w602 h400 ,AUTO CDM
- SetTimer,Hover,50
- SetTimer,Shutdown, 1000
- TrayTip, Auto CDM `t, 10 secs...,,1
- return
- ;~ ################################################################################################################################
- ;~ ############################################### LABELS AND FUNCTIONS ################################################
- ;~ ################################################################################################################################
- SwitchC(){
- if(Ste=0){
- SoundBeep, 2000
- Switch[ A_GuiControl ].Draw_Bitmap_ON()
- IfNotExist,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup
- FileCreateDir,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup
- StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
- FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AutoCDM.lnk,%SPath%
- Ste:=1
- }else{
- SoundBeep, 2000
- Switch[ A_GuiControl ].Draw_Bitmap_OFF()
- FileDelete,%A_AppData%\Microsoft\Windows\Start Menu\Programs\Startup\AutoCDM.lnk
- Ste:=0
- }
- }
- BTN1(){
- GuiControl , % ButtonRed[ A_GuiControl ].Window ": Focus" , % ButtonRed[ A_GuiControl ].Hwnd
- ; Add the button press function call and test
- if( ! ButtonRed[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 2000
- Reload
- }
- AddtoList(){
- GuiControl , % ButtonRed[ A_GuiControl ].Window ": Focus" , % ButtonRed[ A_GuiControl ].Hwnd
- ; Add the button press function call and test
- if( ! ButtonRed[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 2000
- Gui,1:Submit,Nohide
- if (Radio1[1].State=1){
- FileDelete,Path Folders\FolderListCopySRC.txt
- FileDelete,Path Folders\FolderListCopyDST.txt
- FileAppend,% Edit1,Path Folders\FolderListCopySRC.txt
- FileAppend,% Edit2,Path Folders\FolderListCopyDST.txt
- }
- else if (Radio1[2].State=1){
- FileDelete,Path Folders\FolderListDelete.txt
- FileAppend,%Edit1%,Path Folders\FolderListDelete.txt
- }
- else{
- FileDelete,Path Folders\FolderListMoveSRC.txt
- FileDelete,Path Folders\FolderListMoveDST.txt
- FileAppend,% Edit1,Path Folders\FolderListMoveSRC.txt
- FileAppend,% Edit2,Path Folders\FolderListMoveDST.txt
- }
- }
- Radio1(){
- if(Radio1[1].State=0){
- SoundBeep, 5000
- Radio1[1].State:=1
- Radio1[1].Draw_Radio_ON()
- Radio1[2].State:=0
- Radio1[2].Draw_Radio_OFF()
- Radio1[3].State:=0
- Radio1[3].Draw_Radio_OFF()
- FileRead,ReadCopySRC,Path Folders\FolderListCopySRC.txt
- FileRead,ReadCopyDST,Path Folders\FolderListCopyDST.txt
- GuiControl,1:,Edit1,% ReadCopySRC
- GuiControl,1:,Edit2,% ReadCopyDST
- GuiControl,1:Show,Edit2
- GuiControl,1:Move,Edit1,w265
- }
- }
- Radio2(){
- if(Radio1[2].State=0){
- SoundBeep, 5000
- Radio1[2].State:=1
- Radio1[2].Draw_Radio_ON()
- Radio1[1].State:=0
- Radio1[1].Draw_Radio_OFF()
- Radio1[3].State:=0
- Radio1[3].Draw_Radio_OFF()
- FileRead,ReadDelete,Path Folders\FolderListDelete.txt
- GuiControl,1:,Edit1,% ReadDelete
- GuiControl,1:Hide,Edit2
- GuiControl,1:Move,Edit1,w545
- }
- }
- Radio3(){
- if(Radio1[3].State=0){
- SoundBeep, 5000
- Radio1[3].State:=1
- Radio1[3].Draw_Radio_ON()
- Radio1[1].State:=0
- Radio1[1].Draw_Radio_OFF()
- Radio1[2].State:=0
- Radio1[2].Draw_Radio_OFF()
- FileRead,ReadMoveSRC,Path Folders\FolderListMoveSRC.txt
- FileRead,ReadMoveDST,Path Folders\FolderListMoveDST.txt
- GuiControl,1:,Edit1,% ReadMoveSRC
- GuiControl,1:,Edit2,% ReadMoveDST
- GuiControl,1:Show,Edit2
- GuiControl,1:Move,Edit1,w265
- }
- }
- Shutdown(){
- SS++
- If (SS=10)
- ExitApp
- else
- sleep 1000
- }
- Class Button_1{
- __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"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.Text:=Text
- This.Background:="0xFF" Background
- This.Button_BG_Color:="0xFF" Button_BG_Color
- This.Button_Border_Color:="0xFF" Button_Border_Color
- This.Button_Font_Color:="0xFF" Button_Font_Color
- This.Label:=Label
- This.Create_Button_Default()
- This.Create_Button_Hover()
- This.Create_Button_Pressed()
- This.Adding_Control()
- Sleep 20
- This.Draw_Button_Default()
- }
- Adding_Control(){
- static
- num := ButtonRed.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Button_Default(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+5 , This.H+5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 5 , 4 , 140 , 30 , 5 )
- Gdip_DeletePen( Pen )
- ;BUTTON BACKGROUND
- Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF880000" , "0xFFD7E4F0" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 4 , 138 , 30 , 5 )
- Gdip_DeleteBrush( Brush )
- ;TOP GRADE
- Brush := Gdip_CreateLineBrushFromRect( 120 , 31 , -21 , 0 , "0xFFFF0000" , "0xFF333333" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 9 , 6 , 133 , 24 , 0 )
- Gdip_DeleteBrush( Brush )
- ;textTop
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFffff00" , "0xFFffffff" , 1 , 1 )
- ;textTop
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y-1" , "Segoe UI" , 150 , 40 )
- Gdip_DeleteBrush( Brush )
- ;textBottom
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- ;textBottom
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y-1" , "Segoe UI" , 150 , 40 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Button_Hover(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+5 , This.H+5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 5 , 4 , 140 , 30 , 5 )
- Gdip_DeletePen( Pen )
- ;BUTTON BACKGROUND
- Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF880000" , "0xFFD7E4F0" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 4 , 138 , 30 , 5 )
- Gdip_DeleteBrush( Brush )
- ;TOP GRADE
- Brush := Gdip_CreateLineBrushFromRect( 120 , 3 , -21 , 100 , "0xFFF63437" , "0xFF00FFFF" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 7 , 6 , 136 , 26 , 6 )
- Gdip_DeleteBrush( Brush )
- ;textTop
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFffffff" , "0xFF00ff00" , 1 , 1 )
- ;textTop
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y-1" , "Segoe UI" , 150 , 40 )
- Gdip_DeleteBrush( Brush )
- ;textBottom
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- ;textBottom
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y-1" , "Segoe UI" , 150 , 40 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Button_Pressed(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+5 , This.H+5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 5 , 4 , 140 , 30 , 5 )
- Gdip_DeletePen( Pen )
- ;BUTTON BACKGROUND
- Brush := Gdip_BrushCreateSolid( "0xFF880000" )
- Gdip_FillRoundedRectangle( G , Brush , 4 , 4 , 142 , 31 , 5 )
- Gdip_DeleteBrush( Brush )
- ;TOP GRADE
- Brush := Gdip_BrushCreateSolid( "0xFFF63437" )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 4 , 139 , 30 , 3 )
- Gdip_DeleteBrush( Brush )
- ;textTop
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFF000000" , 1 , 1 )
- ;textTop
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y-1" , "Segoe UI" , 150 , 40 )
- Gdip_DeleteBrush( Brush )
- ;textBottom
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFF333333" , 1 )
- ;textBottom
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y-1" , "Segoe UI" , 150 , 40 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Button_Default(){
- SetImage( This.Hwnd , This.Default_Bitmap )
- }
- Draw_Button_Hover(){
- SetImage( This.Hwnd , This.Hover_Bitmap )
- }
- Draw_Button_Pressed(){
- SetImage( This.Hwnd , This.Pressed_Bitmap )
- SetTimer , Hover , Off
- While( GetKeyState( "LButton" ) )
- sleep , 10
- SetTimer , Hover , On
- MouseGetPos,,,, ctrl , 2
- if( This.Hwnd != ctrl ){
- This.Draw_Button_Default()
- return False
- }else {
- This.Draw_Button_Hover()
- return true
- }
- }
- }
- Hover(){
- static Index , Hover_On
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On && ctrl ){
- loop , % ButtonRed.Length()
- if( ctrl = ButtonRed[ A_Index ].hwnd )
- {
- ButtonRed[ A_Index ].Draw_Button_Hover() , Index := A_Index , Hover_On := 1 , break
- SoundBeep,200
- }
- }else if( Hover_On = 1 )
- if( ctrl != ButtonRed[ Index ].Hwnd )
- ButtonRed[ Index ].Draw_Button_Default() , Hover_On := 0
- }
- Class Radio_1{
- __New(x:=10, y:=10, w:=200, h:=30, Window:="1", State:=1, Text:="Text",Label:="Label"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.Label:=Label
- This.Text:=Text
- This.State:=State
- This.Create_Radio_OFF()
- This.Create_Radio_ON()
- This.Add_Control()
- If(This.State=1)
- This.Draw_Radio_ON()
- else
- This.Draw_Radio_OFF()
- }
- Add_Control(){
- Local
- num := Radio1.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Radio_ON(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W, This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;Background
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 23 , 23 )
- Gdip_DeleteBrush( Brush )
- ;background
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillEllipse( G , Brush , 1 , 0 , 20 , 20 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawEllipse( G , Pen , 1 , 0 , 20 , 20 )
- Gdip_DeletePen( Pen )
- ;CenterColor
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_FillEllipse( G , Brush , 6 , 5 , 10 , 10 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF000000" , 1 )
- Gdip_DrawEllipse( G , Pen , 6 , 5 , 10 , 10 )
- Gdip_DeletePen( Pen )
- Gdip_DeleteGraphics( G )
- This.Radio_ON := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Radio_OFF(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;Background
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 23 , 23 )
- Gdip_DeleteBrush( Brush )
- ;background
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillEllipse( G , Brush , 1 , 1 , 20 , 20 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawEllipse( G , Pen , 1 , 1 , 20 , 20 )
- Gdip_DeletePen( Pen )
- ;CenterColor
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillEllipse( G , Brush , 6 , 6 , 10 , 10 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF000000" , 1 )
- Gdip_DrawEllipse( G , Pen , 6 , 6 , 10 , 10 )
- Gdip_DeletePen( Pen )
- Gdip_DeleteGraphics( G )
- This.Radio_OFF := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Radio_ON(){
- SetImage( This.Hwnd , This.Radio_ON )
- }
- Draw_Radio_OFF(){
- SetImage( This.Hwnd , This.Radio_OFF )
- }
- }
- Class Window_1{
- __New(x:=10, y:=10, w:=600, h:=400, Window:="1", Option:="+AlwaysOntop -Caption", Title:="Title"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.Option:=Option
- This.Title:=Title
- This.Create_Window()
- This.Add_Window()
- Sleep 20
- This.Draw_Window()
- }
- Add_Window(){
- static
- num := Window1.Length()+1
- Gui,% This.Window ":" This.Option
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Window(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;Background
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 602 , 402 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF222222" , "0xFFFF0000" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 10 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 5 , 5 , 590 , 388 , 12 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrush( 100 , 18 , 100 , 100 , "0xFFFF0000" , "0xFF222222" , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 150 , 13 , 300 , 40 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFFFFFFFF" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 150 , 12 , 300 , 40 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF0000FF" , "0xFFFFFFFF" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 20 , 100 , 560 , 230 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_TextToGraphics( G , "AUTO CDM" , "s22 Center vCenter Bold c" Brush " x148 y11" , "Segoe UI" , 300 , 40 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFffffff" , "0xFF0000ff" , 1 )
- Gdip_TextToGraphics( G , "AUTO CDM" , "s22 Center vCenter Bold c" Brush " x151 y14" , "Segoe UI" , 300 , 40 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateHatch( "0xFF222222" , "0xFF0000ff" , 0 )
- Gdip_TextToGraphics( G , "AUTO CDM" , "s22 Center vCenter Bold c" Brush " x150 y13" , "Segoe UI" , 300 , 40 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Window(){
- SetImage( This.Hwnd , This.Default_Bitmap )
- }
- }
- ;SWITCH
- Class SWITCH_1{
- __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"){
- This.X:=x
- This.Y:=y
- This.W:=w
- This.H:=h
- This.Window:=Window
- This.State:=state
- This.Font_Size := Font_Size
- This.Text_Color3:= "0xFF" Text_Color3
- This.BG_Color:= "0xFF" BG_Color
- This.Switch_BG_Color:= "0xFF" Switch_BG_Color
- This.Switch_F_Color:= "0xFF" Switch_F_Color
- This.Switch_Border:="0xFF" Switch_Border
- This.Switch_Border2:="0xFF" Switch_Border2
- This.Text1:=Text1
- This.Text2:=Text2
- This.Text_Color1:= "0xFF" Text_Color1
- This.Text_Color2:= "0xFF" Text_Color2
- This.Label:=Label
- This.Create_Switch_OFF()
- This.Create_Switch_ON()
- This.Adding_Control()
- sleep 20
- (This.State=0)?(This.Draw_Bitmap_OFF()):(This.Draw_Bitmap_ON())
- }
- Adding_Control(){
- static
- num := Switch.Length()+1
- Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Switch_OFF(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;background
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- ;rounddedbackground
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 3 , 89 , 24 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFff0000" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 5 , 3 , 90 , 24 , 5 )
- Gdip_DeletePen( Pen )
- ;backcolor
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_FillRoundedRectangle( G , Brush , 7 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- ;fontcolor
- Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF404040" , "0xFFffffff" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 7 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFffffff" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 7 , 4 , 50 , 22 , 5 )
- Gdip_DeletePen( Pen )
- ;BACK CIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillEllipse( G , Brush , 16 , 9 , 12 , 12 )
- Gdip_DeleteBrush( Brush )
- ;FONTCIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
- Gdip_FillEllipse( G , Brush , 17 , 10 , 10 , 10 )
- Gdip_DeleteBrush( Brush )
- ;BACK TEXT
- Brush := Gdip_BrushCreateSolid( "0xFFFFFFFF" )
- ;BACK TEXT
- Gdip_TextToGraphics( G , "OFF" , "s12 Center vCenter Bold c" Brush " x50 y-10" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- ;FONT TEXT
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- ;FONT TEXT
- Gdip_TextToGraphics( G , "OFF" , "s12 Center vCenter Bold c" Brush " x51 y-9" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_OFF_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Switch_ON(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- ;background
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 35 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- ;rounddedbackground
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 6 , 3 , 89 , 24 , 5 )
- Gdip_DeleteBrush( Brush )
- ;backcolor
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_FillRoundedRectangle( G , Brush , 44 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- ;fontcolor
- Brush := Gdip_CreateLineBrushFromRect( 0 , 10 , 100 , 100 , "0xFF404040" , "0xFFffffff" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 44 , 4 , 50 , 22 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF00ff00" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 7 , 3 , 89 , 24 , 5 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFFffffff" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 44 , 4 , 50 , 22 , 5 )
- Gdip_DeletePen( Pen )
- ;BACK CIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillEllipse( G , Brush , 76 , 9 , 12 , 12 )
- Gdip_DeleteBrush( Brush )
- ;FONTCIRCLE
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_FillEllipse( G , Brush , 77 , 10 , 10 , 10 )
- Gdip_DeleteBrush( Brush )
- ;BACK TEXT
- Brush := Gdip_BrushCreateSolid( "0xFFFFFFFF" )
- ;BACK TEXT
- Gdip_TextToGraphics( G , "ON" , "s12 Center vCenter Bold c" Brush " x0 y-10" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- ;FONT TEXT
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- ;FONT TEXT
- Gdip_TextToGraphics( G , "ON" , "s12 Center vCenter Bold c" Brush " x1 y-9" , "Segoe UI" , 50 , 50 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_ON_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Bitmap_ON(){
- SetImage( This.Hwnd , This.Draw_ON_Bitmap )
- }
- Draw_Bitmap_OFF(){
- SetImage( This.Hwnd , This.Draw_OFF_Bitmap )
- }
- }
- Move_Window(){
- PostMessage,0xA1,2
- }
- Show:
- SetTimer, Shutdown , Off
- Gui,1:Show,w602 h400,AUTO CDM
- Send {End}
- return
- Esc::
- GuiClose:
- SoundBeep, 2000
- Gdip_Shutdown(pToken)
- ExitApp
- Check_Updates:
- ;~ =======================================CHECK VERSION=====================================================
- V=3.0.0.0
- MFlink=http://www.mediafire.com/file/ido5b1vrvc5jols/AutoCDM.rar/file
- pastebin=https://pastebin.com/zcfSCQ0m
- ;~ ============================================================================================
- message=BULLSF Updater
- message1=`n`nThank You`n`n-VANHEARTNET
- 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
- ;~ ============================================================================================
- URLDownloadToFile,%pastebin%,%A_Temp%\%message% version.dat
- if errorlevel=0
- {
- fileread,version,%A_Temp%\%message% version.dat
- IfNotInString,version,%V%
- {
- Loop,read,%A_Temp%\%message% version.dat
- {
- str := A_LoopReadLine
- s:=StrSplit(str,"version=")
- Loop,parse,A_LoopReadLine,`n
- {
- IfNotInString,str,version=
- continue
- else
- {
- rar:=StrSplit(s.2,"</div>")
- url1:=rar.1
- V2:=url1
- break 2
- }
- }
- }
- MsgBox, 262180, %message%, A new version is Available!`n`nDo you want to download?`nversion : %V2%,10
- IfMsgBox,Yes
- Run,%MFlink%
- }
- }
- return
- ;~ ==================================================================================================================
Add Comment
Please, Sign In to add comment