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, Server Advance Auto-Shutdown
- ;@Ahk2Exe-Set FileVersion, 1.2.2.0
- ;@Ahk2Exe-SetInternalName Advance Auto-Shutdown
- ;@Ahk2Exe-SetName Advance Auto-Shutdown
- ;@Ahk2Exe-SetOrigFileName Advance Auto-Shutdown
- ;@Ahk2Exe-Set ProductName, Advance Auto-Shutdown
- ;@Ahk2Exe-Set ProductVersion, 1.2.2.0
- ;@Ahk2Exe-Set Description, PISONET-AUTOSHUTDOWN
- ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
- ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
- ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
- ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
- ;@Ahk2Exe-SetMainIcon icon1.ico
- ;@Ahk2Exe-AddResource Icon1.ico, 160 ; Replaces 'H on blue'
- ;@Ahk2Exe-AddResource Icon1.ico, 206 ; Replaces 'S on green'
- ;@Ahk2Exe-AddResource Icon1.ico, 207 ; Replaces 'H on red'
- ;@Ahk2Exe-AddResource Icon1.ico, 208 ; Replaces 'S on red'
- #SingleInstance,Force
- #Persistent
- #NoEnv
- ;~ #NoTrayIcon
- Menu,tray, NoStandard
- Menu, Tray, Tip, Server
- Menu, Tray, Add, Advance Auto Shutdown,Advance1
- Menu, Tray, Add, Exit,AUTOSERVERGuiClose
- 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
- DetectHiddenWindows, On
- SendMode Input
- #Include <Class_CustomFont>
- #Include <Gdip_All>
- #Include <GdipHelper>
- if not A_IsAdmin
- {
- Run, *RunAs "%A_ScriptFullpath%"
- ExitApp
- }
- pToken := Gdip_Startup()
- IfNotExist,%A_Appdata%\Fonts
- FileCreateDir,%A_Appdata%\Fonts
- IfNotExist,%A_Appdata%\Fonts\Pixel LCD-7.ttf
- FileInstall,Pixel LCD-7.ttf,%A_Appdata%\Fonts\Pixel LCD-7.ttf,1
- IfNotExist,%A_Appdata%\Fonts\FivoSansModern-ExtBlack-Oblique.otf
- FileInstall,FivoSansModern-ExtBlack-Oblique.otf,%A_Appdata%\Fonts\FivoSansModern-ExtBlack-Oblique.otf,1
- IfNotExist,%A_Appdata%\Fonts\Money Honey.ttf
- FileInstall,Money Honey.ttf,%A_Appdata%\Fonts\Money Honey.ttf
- IfNotExist,%A_Appdata%\Fonts\Republiko_PersonalUse.otf
- FileInstall,Republiko_PersonalUse.otf,%A_Appdata%\Fonts\Republiko_PersonalUse.otf
- IfNotExist,%A_Appdata%\Fonts\Multicolore Pro.otf
- FileInstall,Multicolore Pro.otf,%A_Appdata%\Fonts\Multicolore Pro.otf
- font1 := New CustomFont( A_AppData "\Fonts\Pixel LCD-7.ttf")
- font2 := New CustomFont( A_AppData "\Fonts\Money Honey.ttf")
- Font3 := New CustomFont( A_AppData "\Fonts\FivoSansModern-ExtBlack-Oblique.otf")
- Font4 := New CustomFont( A_AppData "\Fonts\Republiko_PersonalUse.otf")
- Font5 := New CustomFont( A_AppData "\Fonts\Multicolore Pro.otf")
- IfNotExist,\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown\Auto\Users
- {
- FileCreateDir,\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown\Auto\Users
- FileSetAttrib,+H,\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown
- }
- ifNotexist,VANHEARTNET\PNG\Rewards
- FileCreateDir,VANHEARTNET\PNG\Rewards
- IfNotExist,VANHEARTNET\PNG\Rewards\RewardDefault.png
- FileInstall,DefaultPNG.png,VANHEARTNET\PNG\Rewards\RewardDefault.png
- IfExist,%A_Temp%\Rnumb.dat
- FileDelete,%A_Temp%\Rnumb.dat
- IfNotExist,\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown\Auto\Member
- FileCreateDir,\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown\Auto\Member
- ;~ ################################################################################################################################################################
- ;~ ################################################################################################################################################################
- ;~ ################################################################################################################################################################
- FormatTime,TimeNow,%A_Now%,MM-dd-yyyy--hh:mm:ss tt
- Global HB_Button:=[], Switch1:=[]
- IniRead,POINTSYSTEM,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,POINTSYSTEM
- IniRead,AUTOBACKUP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,AUTOBACKUP
- IniRead,AUTOBACKUPPATH,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,AUTOBACKUPPATH
- IniRead,SERVERPATH,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATH
- IniRead,SECPERPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SECPERPOINTS
- IniRead,SERVERPATHFULL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATHFULL
- IniRead,REWARD,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REWARD
- if(SERVERPATHFULL="NONE"){
- IniWrite,\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown\Auto\Member,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATHFULL
- SERVERPATHFULL=\\%A_IPAddress1%\Users\%A_UserName%\Documents\AdvanceAutoshutdown\Auto\Member
- }
- StringReplace,SERVERPATHFULL2,SERVERPATHFULL,Member,Rewards,All
- StringReplace,SERVERPATHFULL3,SERVERPATHFULL,\Member,,All
- IniRead,ADDPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ADDPOINTS
- IniRead,BONUSPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSPOINTS
- IniRead,BONUSTIME,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSTIME
- IniRead,REQUSEPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REQUSEPOINTS
- IfNotExist,% SERVERPATHFULL2
- FileCreateDir,% SERVERPATHFULL2
- FileDelete,%A_Temp%\data.file
- Loop,VANHEARTNET\PNG\*.png,1
- {
- NumL1++
- USRNME1:=A_LoopFileName
- if (NumL1=1)
- FileAppend,% USRNME1 "|",%A_Temp%\data.file
- else
- FileAppend,% "|" USRNME1,%A_Temp%\data.file
- }
- FileRead,WL,%A_Temp%\data.file
- Gui,AUTOSERVER:+AlwaysOnTop -Caption -DPIScale
- Gui,AUTOSERVER:Color,333333,aaaaaa
- Gui,AUTOSERVER:Add,GroupBox,x5 y1 w790 h590 BackgroundTrans,
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 250 , y := 120 , w := 200 , h := 50 , Button_Color := "1ad1ff" , Button_Background_Color := "333333" , Text := "SAVE" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "Save" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 250 , y+=50 , w := 200 , h := 65 , Button_Color := "ff471a" , Button_Background_Color := "333333" , Text := "OTHER SETTINGS" , Font := "Arial" , Font_Size := 14 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "POINT_SYSTEM_CONFIG" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 250 , y:=236 , w := 110 , h := 40 , Button_Color := "FFFF00" , Button_Background_Color := "333333" , Text := "Shutdown" , Font := "Arial" , Font_Size := 14 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "ShutdownPC" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x+=110 , y:=236 , w := 110 , h := 40 , Button_Color := "FFFF00" , Button_Background_Color := "333333" , Text := "Restart" , Font := "Arial" , Font_Size := 14 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "RestartPC" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 235 , y := 278,w := 110 , h := 40 , Button_Color := "ff66ff" , Button_Background_Color := "333333" , Text := "Add PC" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "AddPC" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x+=110 , y:=278 ,w := 110 , h := 40 , Button_Color := "ff66ff" , Button_Background_Color := "333333" , Text := "Delete PC" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "DeletePC" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 250 , y+=40 ,w := 200 , h := 40 , Button_Color := "ff66ff" , Button_Background_Color := "333333" , Text := "Add Wallpaper" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "ADD1" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 250 , y+=40 ,w := 200 , h := 40 , Button_Color := "ff66ff" , Button_Background_Color := "333333" , Text := "Delete Wallpaper" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "DeleteWallpaper" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 30, y := 495 , w := 300 , h := 40 , Button_Color := "009900" , Button_Background_Color := "333333" , Text := "Change Backup Folder" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "ChangeBPath" ) )
- Gui,AUTOSERVER:Font,s36 cf2bb24, Republiko
- Gui,AUTOSERVER:Add,Text,x55 y20 BackgroundTrans gMove, ADVANCE AUTO-SHUTDOWN
- Gui,AUTOSERVER:Add,Progress,x10 y12 w780 h65 cBlack BackgroundBlack
- Gui,AUTOSERVER:Add,Text,x55 y20 BackgroundTrans gMove, ADVANCE AUTO-SHUTDOWN
- Gui,AUTOSERVER:Font,s36 c666666
- Gui,AUTOSERVER:Add,Text,x50 y20 BackgroundTrans, ADVANCE AUTO-SHUTDOWN
- Gui,AUTOSERVER:Add,Progress,x15 y80 w300 h30 cff66ff Backgroundff66ff,100
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s12 c666666,Money Honey
- Gui,AUTOSERVER:Add,Text,x20 y90 BackgroundTrans, C r e a t e d b y : V A N H E A R T N E T
- Gui,AUTOSERVER:Font,s12 cLime,Money Honey
- Gui,AUTOSERVER:Add,Text,x23 y90 BackgroundTrans, C r e a t e d b y : V A N H E A R T N E T
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s12 c33ccff,fivo Sans Modern ExtBlk
- Gui,AUTOSERVER:Add,Text,x20 y410 Left BackgroundTrans, ENABLE POINT SYSTEM
- Gui,AUTOSERVER:Add,Text,x20 y+10 Left BackgroundTrans, AUTO BACKUP MEMBER
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s12 bold,Arial Black
- Gui,AUTOSERVER:Add,GroupBox,x15 y100 w770 h300 BackgroundTrans,
- Gui,AUTOSERVER:Add,Edit, x30 y130 w200 Border Center Disabled vEdit1,%A_IPAddress1%
- Gui,AUTOSERVER:Add,Edit, x30 y+10 w200 Border Center Disabled vEdit2,%A_UserName%
- Gui,AUTOSERVER:Add,Edit, x30 y+10 w200 -E0x200 Border Center vEdit3,% SERVERPATH
- Gui,AUTOSERVER:Add,Edit, x30 y+10 w200 -E0x200 Border Center Hidden vEdit5,
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s10 cwhite Bold
- Gui,AUTOSERVER:Add,Radio,x70 y295 w60 vRadio1 gRadio1 checked, Main
- Gui,AUTOSERVER:Add,Radio,x+10 w60 vRadio2 gRadio2, PC
- Gui,AUTOSERVER:Font,s12 bold cblack,Arial Black
- Gui,AUTOSERVER:Add,DDL,x30 y+10 w200 Border vDDL1 gDDL1,% WL
- Gui,AUTOSERVER:Add,DDL,x30 y+10 w200 Border vDDL2 gDDL2 Disabled,
- Gui,AUTOSERVER:Add,Edit, x30 y460 w300 -E0x200 Border LEFT vEdit7,% AUTOBACKUPPATH
- Gui,AUTOSERVER:Add,Progress,x10 y540 w780 h40 cBlack BackgroundBlack
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s8 c666666,Multicolore Pro
- Gui,AUTOSERVER:Add,Text,x20 y545 w765 BackgroundTrans, Advance Auto-Shutdown helps you saves electricity in your Pisonet/Coin Operated computer by shutting down your computer after the countdown timer ended.
- Gui,AUTOSERVER:Font,s8 cffff00
- Gui,AUTOSERVER:Add,Text,x18 y545 w765 BackgroundTrans, Advance Auto-Shutdown helps you saves electricity in your Pisonet/Coin Operated computer by shutting down your computer after the countdown timer ended.
- Gui,AUTOSERVER:Add,Progress,x475 y125 w302 h262 Backgroundc1c1c1,
- IfExist,VANHEARTNET\PNG\Wallpaper1.png
- Gui,AUTOSERVER:Add,Picture,x480 y130 w290 h250 Border BackgroundTrans vWallpic,VANHEARTNET\PNG\Wallpaper1.png
- else{
- FileInstall,Wallpaper1.png,VANHEARTNET\PNG\Wallpaper1.png,1
- Gui,AUTOSERVER:Add,Picture,x480 y130 w290 h250 Border BackgroundTrans vWallpic,VANHEARTNET\PNG\Wallpaper1.png
- }
- Switch1[1]:=New Switch_1( x:=260, y:=405, w:= 100, h:= 30, state:=POINTSYSTEM, BG_Color:="333333", 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:="AUTOSERVER", Label:="Switch1")
- Switch1[2]:=New Switch_1( x:=260, y+=25, w:= 100, h:= 30, state:=AUTOBACKUP, BG_Color:="333333", 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:="AUTOSERVER", Label:="Switch2")
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s12 Bold
- Gui,AUTOSERVER:Add,GroupBox,x340 y395 w450 h142 BackgroundTrans,
- Gui,AUTOSERVER:Add,Edit, x345 y452 w200 -E0x200 Border Center limit16 vEdit6,
- Gui,AUTOSERVER:Add,Edit, x345 y505 w200 -E0x200 Border Center limit16 vEdit8,
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s8 Bold cwhite
- Gui,AUTOSERVER:Add,Text,x345 y440 w200 BackgroundTrans,USERNAME
- Gui,AUTOSERVER:Add,Text,x345 y492 w200 BackgroundTrans,PASSWORD
- Gui,AUTOSERVER:Font,
- Gui,AUTOSERVER:Font,s14 Bold cRed,Multicolore Pro
- Gui,AUTOSERVER:Add,Text,x345 y410 w440 Center BackgroundTrans,CREATE MEMBER
- Gui,AUTOSERVER:Add,Text,x346 y410 w440 Center BackgroundTrans,CREATE MEMBER
- Gui,AUTOSERVER:Font,s10
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 560 , y:=450,w := 200 , h := 80 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "SUBMIT" , Font := "Arial" , Font_Size := 20 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "AUTOSERVER" , Label := "Create" ) )
- Gui,AUTOSERVER:Show,w800 h600,Auto Shutdown Server
- Send, {End}
- if(AUTOBACKUP=1)
- SetTimer, AutoBackupFiles, 5000
- SetTimer, HB_Button_Hover , 50
- return
- ShutdownPC:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- if(Radio2=1){
- if(DDL1="") or (DDL1="ERROR")
- return
- FileAppend,,%SERVERPATHFULL3%\Users\%DDL1%Shutdown.file
- FileSetAttrib,+H,%SERVERPATHFULL3%\Users\%DDL1%Shutdown.file
- }
- return
- RestartPC:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- if(Radio2=1){
- if(DDL1="") or (DDL1="ERROR")
- return
- FileAppend,,%SERVERPATHFULL3%\Users\%DDL1%Restart.file
- FileSetAttrib,+H,%SERVERPATHFULL3%\Users\%DDL1%Restart.file
- }
- return
- POINT_SYSTEM_CONFIG:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- Gui,AUTOSERVER:Submit,Nohide
- ;~ Gui,2:Submit,Nohide
- Gui,AUTOSERVER:Hide
- Gui,2:Default
- SoundBeep, 5000
- IfWinNotExist, OTHER SETTINGS
- {
- Gui,2:-DPIscale +OwnerAUTOSERVER +AlwaysOntop
- Gui,2:Color,333333,aaaaaa
- Gui,2:Add,Progress,x10 y12 w780 h65 cBlack BackgroundBlack
- Gui,2:Font,s36 cf2bb24, Republiko
- Gui,2:Add,Text,x55 y20 BackgroundTrans, ADVANCE AUTO-SHUTDOWN
- Gui,2:Font,s36 c666666
- Gui,2:Add,Text,x50 y20 BackgroundTrans, ADVANCE AUTO-SHUTDOWN
- Gui,2:Font,
- Gui,2:Font,s8 bold cLime
- Gui,2:Add,GroupBox,x10 y80 w220 h250, POINTS SETTINGS
- Gui,2:Font,
- Gui,2:Font,s10 bold
- Gui,2:Add,Edit,x20 y100 w50 -E0x200 Border Center Number limit3 r1 vEdit01, % ADDPOINTS
- Gui,2:Add,Edit,x20 y+10 w50 -E0x200 Border Center Number limit3 r1 vEdit02, % SECPERPOINTS
- Gui,2:Add,Edit,x20 y+10 w50 -E0x200 Border Center Number limit3 r1 vEdit03, % BONUSPOINTS
- Gui,2:Add,Edit,x20 y+10 w50 -E0x200 Border Center Number limit3 r1 vEdit04, % BONUSTIME
- Gui,2:Add,Edit,x20 y+10 w50 -E0x200 Border Center Number limit3 r1 vEdit05, % REQUSEPOINTS
- Gui,2:Font,
- Gui,2:Font,s10 cwhite bold
- Gui,2:Add,Text,x+10 y105 Left, Default Points
- Gui,2:Add,Text, y+18 Left, MINUTES
- Gui,2:Add,Text, y+18 Left, BONUS POINTS
- Gui,2:Add,Text, y+18 Left, MINUTES
- Gui,2:Add,Text, y+18 Left, USE POINTS
- Switch1[3]:=New Switch_1( x:=180, y:=500, w:= 100, h:= 30, state:=REWARD, BG_Color:="333333", 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:="2", Label:="Switch3")
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 20 , y:=270,w := 180 , h := 50 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "SAVE" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "SaveSet" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 655 , y:=380,w := 130 , h := 40 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "SAVE" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "SaveInfo" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 655 , y+=45,w := 130 , h := 40 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "Delete Member" , Font := "Arial" , Font_Size := 12 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "DeleteMember" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 655 , y:=500,w := 130 , h := 40 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "ADD" , Font := "Arial" , Font_Size := 12 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "AddReward" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 655 , y+=42,w := 130 , h := 40 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "Delete" , Font := "Arial" , Font_Size := 12 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "DeleteReward" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 655 , y:=610,w := 130 , h := 40 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "SEND" , Font := "Arial" , Font_Size := 12 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "SendUser" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 655 , y+=45,w := 130 , h := 40 , Button_Color := "6699ff" , Button_Background_Color := "333333" , Text := "SEND" , Font := "Arial" , Font_Size := 12 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "SendAll" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x := 15 , y:=535 ,w := 110 , h := 40 , Button_Color := "BCC2CE" , Button_Background_Color := "333333" , Text := "Save USERS" , Font := "Arial" , Font_Size := 10 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "SaveAll" ) )
- HB_Button.Push( New HB_Plain_Rounded_Button_Type_1( x +=w+5 , y:=535 ,w := 110 , h := 40 , Button_Color := "BCC2CE" , Button_Background_Color := "333333" , Text := "Restore USERS" , Font := "Arial" , Font_Size := 10 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "2" , Label := "Restore_USERS" ) )
- Gui,2:Font,
- Gui,2:Font,s8 bold cLime
- Gui,2:Add,GroupBox,x10 y340 w780 h130,INFORMATION
- Gui,2:Font,
- Gui,2:Font,s18 bold cRed,Multicolore Pro
- Gui,2:Add,Text,x25 y360 Left w250 vName,
- Gui,2:Font,
- Gui,2:Font,s10 bold
- Gui,2:Add,Edit,x20 y400 w150 -E0x200 Border Center Number r1 vEdit06,
- Gui,2:Add,Edit,x+10 w150 -E0x200 Border Center Password r1 vEdit07,
- Gui,2:Font,s8 bold caqua
- Gui,2:Add,Progress,x+10 y400 w150 h22 c222222 Background888888
- Gui,2:Add,Progress,x+10 y400 w150 h22 c222222 Background888888
- Gui,2:Add,Text,x340 y405 Center w150 vRegdate BackgroundTrans,
- Gui,2:Add,Text,x+10 Center w150 vPCLogin BackgroundTrans,
- Gui,2:Font,s10 bold c888888
- Gui,2:Add,Text,x20 y430 Center w150 Border ,TOTAL POINTS
- Gui,2:Add,Text,x+10 y430 Center w150 Border, PASSWORD
- Gui,2:Add,Text,x+10 y430 Center w150 Border,REGISTERED
- Gui,2:Add,Text,x+10 y430 Center w150 Border,PC LOGIN
- Gui,2:Font,
- Gui,2:Font,s10 bold c4d0000,
- Gui,2:Add,ListView,x260 y85 w520 h245 vList1 Grid AltSubmit -Multi NoSortHdr +ReadOnly +Border gList1,USERNAME|POINTS
- Gui,2:+OWndialogs
- LV_ModifyCol(1,"Center")
- LV_ModifyCol(2,"Center")
- LV_ModifyCol(1,300)
- LV_ModifyCol(2,210)
- Loop,%SERVERPATHFULL%\*.*,2
- {
- A++
- IniRead,TOTPO,%SERVERPATHFULL%\%A_LoopFileName%\data.ini:VAN:$data,Account,TotalPoints
- LV_Add("col1",A_LoopFileName)
- LV_Modify(A,"col2",TOTPO)
- }
- Gui,2:Font,s8 bold cLime
- Gui,2:Add,GroupBox,x10 y475 w780 h120,REWARDS SECTION
- Gui,2:Font,
- Gui,2:Font,s10 bold
- if(REWARD=1)
- Gui,2:Add,Edit,x500 y508 w150 Border Center Number r1 vEdit08,
- else
- Gui,2:Add,Edit,x500 y508 w150 Border Center Number r1 Disabled vEdit08,
- Loop
- {
- RewardCount++
- IniRead,RewardNum,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%RewardCount%
- if(RewardNum="" || RewardNum="ERROR"){
- RewardS++
- if(RewardS=50){
- RewardCount:=0
- Break
- }
- }
- else
- {
- FileAppend,Reward%RewardCount%|,%A_Temp%\Rnumb.dat:VAN:$data
- }
- }
- FileRead,RewardCC,%A_Temp%\Rnumb.dat:VAN:$data
- Gui,2:Font,s12
- if(REWARD=1)
- Gui,2:Add,Listbox,x500 y+15 w150 h40 Border Center r1 vList2 gList2,% RewardCC
- else
- Gui,2:Add,Listbox,x500 y+15 w150 h40 Border Center Disabled r1 vList2 gList2,% RewardCC
- Gui,2:Font,s8 c999999
- Gui,2:Add,Text,x500 y495 Center w150,Reward Points
- Gui,2:Font,
- Gui,2:Font,s12 c33ccff,fivo Sans Modern ExtBlk
- Gui,2:Add,Text,x20 y505 Left w160,REWARD SYSTEM
- Gui,2:Font,
- Gui,2:Font,s12 Bold
- Gui,2:Add,Edit,x250 y495 w230 Border r4 vEdit09,
- Gui,2:Font,s8 Bold cwhite
- Gui,2:Add,Text,x20 y600 Center w150,Send Message to User :
- Gui,2:Add,Text,x20 y+35 Center w150,Send Message to All :
- Gui,2:Font,s12 Bold cred
- Gui,2:Add,Edit,x20 y615 w620 Border limit150 r1 vEdit10,
- Gui,2:Add,Edit,x20 y+20 w620 Border limit150 r1 vEdit11,
- Gui,2:Show,w800 h700,OTHER SETTINGS
- }else{
- Gui,AUTOSERVER:Hide
- Gui,2:Show
- }
- return
- Restore_USERS:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:+OWndialogs
- Gui,2:Submit,Nohide
- pas1:=0
- IfExist,BKUP_USERS.txt
- {
- MsgBox, 262180, Warning, All Existing Accounts will be overwritten.`nDo you still wants to restore?
- IfMsgBox,Yes
- {
- Loop,read,BKUP_USERS.txt
- {
- Loop,parse,A_LoopReadLine,`n
- {
- if A_LoopField contains [,]
- {
- StringReplace,Bracket1,A_LoopField,[,,All
- StringReplace,Bracket2,Bracket1,],,All
- FileAppend,% A_LoopField
- Name1:=A_LoopField
- FileRemoveDir,%SERVERPATHFULL%\%Bracket2%,1
- Sleep,100
- FileCreateDir,%SERVERPATHFULL%\%Bracket2%
- }
- else
- {
- if(pas1=0)
- {
- IniWrite,%A_LoopField%,%SERVERPATHFULL%\%Bracket2%\data.ini:VAN:$data,Account,passuser
- pas1:=1
- }
- else
- {
- IniWrite,%A_LoopField%,%SERVERPATHFULL%\%Bracket2%\data.ini:VAN:$data,Account,TotalPoints
- IniWrite,0,%SERVERPATHFULL%\%Bracket2%\data.ini:VAN:$data,Account,Logpoints
- IniWrite,%TimeNow%,%SERVERPATHFULL%\%Bracket2%\data.ini:VAN:$data,Account,Regdate
- IniWrite,%TimeNow%,%SERVERPATHFULL%\%Bracket2%\data.ini:VAN:$data,Account,Lastlog
- pas1:=0
- }
- }
- }
- }
- MsgBox, 262208, Message, All Users are restored!`n`nThank You!!!
- }
- }
- return
- SaveAll:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- IfExist,BKUP_USERS.txt
- FileDelete,BKUP_USERS.txt
- Loop,%SERVERPATHFULL%\*.*,2
- {
- IniRead,BKP,%SERVERPATHFULL%\%A_LoopFileName%\data.ini:VAN:$data,Account,passuser
- IniRead,BKTP,%SERVERPATHFULL%\%A_LoopFileName%\data.ini:VAN:$data,Account,TotalPoints
- FileRead,samp,%SERVERPATHFULL%\%A_LoopFileName%\data.ini:VAN:$data
- FileAppend,[%A_LoopFileName%]`n%BKP%`n%BKTP%`n,BKUP_USERS.txt
- }
- MsgBox, 262208, Message, All Users are Saved!`n`nThank You!!!
- return
- SendUser:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- if(Edit10="")
- return
- FileAppend,%Edit10%`n,%SERVERPATHFULL%\%TextR1%\Inbx.dat:VAN:$data
- GuiControl,2:,Edit10,
- return
- SendAll:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- if(Edit11="")
- return
- Loop,%SERVERPATHFULL%\*.*,2
- {
- FileAppend,%Edit11%`n,%SERVERPATHFULL%\%A_LoopFileName%\Inbx.dat:VAN:$data
- }
- GuiControl,2:,Edit11,
- return
- List2:
- Gui,2:Submit,Nohide
- if(A_GuiEvent="DoubleClick"){
- EditL2:=True
- IniRead,LL2,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,% List2
- FileRead,LL3,%SERVERPATHFULL2%\%List2%.dat:VAN:$data
- GuiControl,2:,Edit08, % LL2
- GuiControl,2:,Edit09,% LL3
- }
- return
- DeleteReward:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- if(List2="" || List2="ERROR")
- return
- IniDelete,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,%List2%
- StringReplace,Rewardtrim,RewardCC,%List2%|,,All
- GuiControl,2:,List2,% "|" Rewardtrim
- RewardCC:=Rewardtrim
- FileDelete,VANHEARTNET\PNG\Rewards\%List2%.png
- FileDelete,%SERVERPATHFULL2%\%List2%.dat
- return
- AddReward:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- Gui,2:+OwnDialogs
- FileDelete,%A_Temp%\Rnumb.dat
- if(EditL2=True){
- IniWrite,% Edit08,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,% List2
- FileDelete,%SERVERPATHFULL2%\%List2%.dat
- Sleep 20
- FileAppend,% Edit09,%SERVERPATHFULL2%\%List2%.dat:VAN:$data
- GuiControl,2:,Edit08,
- GuiControl,2:,Edit09,
- EditL2:=False
- return
- }
- else
- {
- if(Edit08="")
- return
- if(Edit09=""){
- MsgBox, Please Iput RewardCODE
- return
- }
- Loop
- {
- Jo++
- IniRead,RewardNum,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%Jo%
- if(RewardNum="" || RewardNum="ERROR"){
- IniWrite,% Edit08,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%Jo%
- FileAppend,% Edit09,%SERVERPATHFULL2%\Reward%Jo%.dat:VAN:$data
- FileSelectFile,RewardPNG,,,SELECT REWARD TEMPLATE,All Files 200x150 (*.*)
- if(Errorlevel=0)
- FileCopy,% RewardPNG,VANHEARTNET\PNG\Rewards\Reward%Jo%.png
- else
- FileCopy,VANHEARTNET\PNG\Rewards\RewardDefault.png,VANHEARTNET\PNG\Rewards\Reward%Jo%.png
- Jo:=0
- Break
- }
- }
- GuiControl,2:,Edit08,
- GuiControl,2:,Edit09,
- RewardCount:=0
- RewardS:=0
- Loop
- {
- RewardCount++
- IniRead,RewardNum,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%RewardCount%
- if(RewardNum="" || RewardNum="ERROR"){
- RewardS++
- if(RewardS=50){
- RewardCount:=0
- Break
- }
- }else
- FileAppend,Reward%RewardCount%|,%A_Temp%\Rnumb.dat:VAN:$data
- }
- FileRead,RewardCC,%A_Temp%\Rnumb.dat:VAN:$data
- GuiControl,2:,List2,% "|" RewardCC
- FileDelete,%A_Temp%\Rnumb.dat
- }
- return
- DeleteMember:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- if(TextR1="" || TextR1="ERROR")
- return
- MsgBox, 262180, Message, Member : %TextR1% `n`nDo you really want to remove this member from the List?, 20
- IfMsgBox,Yes
- {
- FileRemoveDir,%SERVERPATHFULL%\%TextR1%,1
- if(Errorlevel=1)
- return
- LV_Delete(GU)
- MsgBox, 262208, Message, Delete Member`, Complete!, 10
- GuiControl,2:,Edit06,
- GuiControl,2:,Edit07,
- GuiControl,2:,Regdate,
- GuiControl,2:,PCLogin,
- }
- return
- SaveInfo:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- IniWrite,% Edit06,%SERVERPATHFULL%\%TextR1%\data.ini:VAN:$data,Account,TotalPoints
- IniWrite,% Edit07,%SERVERPATHFULL%\%TextR1%\data.ini:VAN:$data,Account,passuser
- LV_Modify(GU,"Col2",Edit06)
- return
- List1:
- Gui,2:Submit,Nohide
- if (A_GuiEvent="DoubleClick")
- {
- GET := LV_GetText(EVE,A_EventInfo)
- GU := A_EventInfo
- LV_GetText(TextR1,GU,1)
- LV_GetText(TextR2,GU,2)
- GuiControl,2:,Name,% TextR1
- GuiControl,2:,Edit06,% TextR2
- IniRead,Pass1,%SERVERPATHFULL%\%TextR1%\data.ini:VAN:$data,Account,passuser
- IniRead,Regdate,%SERVERPATHFULL%\%TextR1%\data.ini:VAN:$data,Account,Regdate
- IniRead,PCLOGIN,%SERVERPATHFULL%\%TextR1%\data.ini:VAN:$data,Account,PCLOGIN
- GuiControl,2:,Edit07,% Pass1
- GuiControl,2:,Regdate,% Regdate
- if(PCLOGIN="" || PCLOGIN="ERROR")
- PCLOGIN=NONE
- GuiControl,2:,PCLogin,% PCLOGIN
- }
- return
- SaveSet:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:Submit,Nohide
- IniWrite,% Edit01,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ADDPOINTS
- IniWrite,% Edit02,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SECPERPOINTS
- IniWrite,% Edit03,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSPOINTS
- IniWrite,% Edit04,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSTIME
- IniWrite,% Edit05,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REQUSEPOINTS
- return
- Create:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- Gui,AUTOSERVER:Submit,Nohide
- SoundBeep, 5000
- if Edit6 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- return
- }
- else if Edit8 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- return
- }
- else if (Edit6="" || Edit8="")
- {
- MsgBox, 262160, Error, You must Input Character
- return
- }
- loop,%SERVERPATHFULL%\*.*,2
- {
- if(A_LoopFilename=Edit6){
- MsgBox, 262160, Error, Username is already taken. Please choose another Name., 10
- GuiControl,AUTOSERVER:,Edit6,
- GuiControl,AUTOSERVER:,Edit8,
- return
- }
- }
- FileCreateDir,%SERVERPATHFULL%\%Edit6%
- if(Errorlevel=1)
- return
- IniWrite,%Edit8%,%SERVERPATHFULL%\%Edit6%\data.ini:VAN:$data,Account,passuser
- IniWrite,0,%SERVERPATHFULL%\%Edit6%\data.ini:VAN:$data,Account,TotalPoints
- IniWrite,0,%SERVERPATHFULL%\%Edit6%\data.ini:VAN:$data,Account,Logpoints
- IniWrite,%TimeNow%,%SERVERPATHFULL%\%Edit6%\data.ini:VAN:$data,Account,Regdate
- IniWrite,%TimeNow%,%SERVERPATHFULL%\%Edit6%\data.ini:VAN:$data,Account,Lastlog
- MsgBox, 262208, Success, Account created., 5
- GuiControl,AUTOSERVER:,Edit6,
- GuiControl,AUTOSERVER:,Edit8,
- IfWinExist,OTHER SETTINGS
- {
- Gui,2:Default
- LV_Add("",Edit6,"0")
- }
- return
- Advance1:
- Gui,AUTOSERVER:Show
- return
- AddPC:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,AUTOSERVER:Submit,Nohide
- if (Radio1=1)
- return
- if Edit5 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- return
- }
- if(Edit5="")
- {
- MsgBox, 262160, Error, Please Input PC name.
- GuiControl,AUTOSERVER:Focus,Edit5
- GuiControl,AUTOSERVER:,Edit5,Add PC name Here!
- ToolTip,Input PC Name Here,60,280
- Sleep,5000
- ToolTip,
- return
- }
- FileCreateDir,VANHEARTNET\PNG\USERS\%Edit5%
- if(Errorlevel=0)
- MsgBox, 262208, Success, PC name created!, 5
- gosub, Radio2
- GuiControl,AUTOSERVER:,Edit5,
- return
- DeletePC:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,AUTOSERVER:Submit,Nohide
- if (Radio1=1)
- return
- MsgBox, 262180, Warning, Do you really want to remove PC name on the List?, 10
- IfMsgBox,Yes
- {
- If(Radio2=1)
- {
- FileRemoveDir,VANHEARTNET\PNG\USERS\%DDL1%,1
- if(Errorlevel=0)
- MsgBox, 262208, Success, PC name Deleted!, 5
- gosub, Radio2
- }
- }
- return
- DeleteWallpaper:
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- if(Radio1=1){
- FileDelete,VANHEARTNET\PNG\%DDL1%
- gosub, US
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:move,Wallpic,w290 h250
- GuiControl,AUTOSERVER:,Wallpic,VANHEARTNET\PNG\%DDL1%
- }
- else{
- FileDelete,VANHEARTNET\PNG\USERS\%DDL1%\%DDL2%
- gosub, US
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:move,Wallpic,w290 h250
- GuiControl,AUTOSERVER:,Wallpic,VANHEARTNET\PNG\USERS\%DDL1%\%DDL2%
- }
- return
- DDL1:
- Gui,AUTOSERVER:Submit,Nohide
- if(Radio1=1)
- {
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:move,Wallpic,w290 h250
- GuiControl,AUTOSERVER:,Wallpic,VANHEARTNET\PNG\%DDL1%
- }
- else
- {
- gosub, US
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:move,Wallpic,w290 h250
- GuiControl,AUTOSERVER:,Wallpic,VANHEARTNET\PNG\USERS\%DDL1%\%DDL2%
- }
- return
- DDL2:
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:move,Wallpic,w290 h250
- GuiControl,AUTOSERVER:,Wallpic,VANHEARTNET\PNG\USERS\%DDL1%\%DDL2%
- return
- US:
- Gui,AUTOSERVER:Submit,Nohide
- FileDelete,%A_Temp%\data.file
- if(Radio1=1){
- NumL1:=0
- Loop,VANHEARTNET\PNG\*.png,1
- {
- NumL1++
- USRNME1:=A_LoopFileName
- if (NumL1=1)
- FileAppend,% USRNME1 "|",%A_Temp%\data.file
- else
- FileAppend,% "|" USRNME1,%A_Temp%\data.file
- }
- FileRead,WL2,%A_Temp%\data.file
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:,DDL1,|%WL2%
- }Else{
- NumL1:=0
- Loop,VANHEARTNET\PNG\USERS\%DDL1%\*.png,1
- {
- NumL1++
- USRNME1:=A_LoopFileName
- if (NumL1=1)
- FileAppend,% USRNME1 "|",%A_Temp%\data.file
- else
- FileAppend,% "|" USRNME1,%A_Temp%\data.file
- }
- FileRead,WL2,%A_Temp%\data.file
- Gui,AUTOSERVER:Submit,Nohide
- GuiControl,AUTOSERVER:,DDL2,|%WL2%
- }
- return
- Add1:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- gui,AUTOSERVER:submit,nohide
- gui,AUTOSERVER:+OwnDialogs
- If(Radio1=1)
- {
- NN:=0
- FileSelectFile,Main,,,SELECT WALLPAPER,All Files (*.*)
- if(Errorlevel=0)
- {
- Loop
- {
- NN++
- IfExist,VANHEARTNET\PNG\Wallpaper%NN%.png
- continue
- else{
- FileCopy,% Main,VANHEARTNET\PNG\Wallpaper%NN%.png
- Break
- }
- }
- }
- gosub, US
- gui,AUTOSERVER:submit,nohide
- GuiControl,AUTOSERVER:,DDL1,|%WL2%
- }
- else
- {
- NN:=0
- FileSelectFile,Main,,,SELECT WALLPAPER,All Files (*.*)
- if(Errorlevel=0)
- {
- Loop
- {
- NN++
- IfExist,VANHEARTNET\PNG\USERS\%DDL1%\Wallpaper%NN%.png
- continue
- else{
- FileCopy,% Main,VANHEARTNET\PNG\USERS\%DDL1%\Wallpaper%NN%.png
- Break
- }
- }
- }
- gosub, US
- }
- return
- Radio1:
- GuiControl,AUTOSERVER:Disable,DDL2
- gosub, US
- GuiControl,AUTOSERVER:Hide,Edit5
- GuiControl,AUTOSERVER:,Edit5,
- return
- Radio2:
- gui,AUTOSERVER:submit,nohide
- GuiControl,AUTOSERVER:Show,Edit5
- GuiControl,AUTOSERVER:Enable,DDL2
- FileDelete,%A_Temp%\data.file
- NumL1:=0
- Loop,VANHEARTNET\PNG\USERS\*.*,2
- {
- NumL1++
- USRNME1:=A_LoopFileName
- if (NumL1=1)
- FileAppend,% USRNME1 "|",%A_Temp%\data.file
- else
- FileAppend,% "|" USRNME1,%A_Temp%\data.file
- }
- FileRead,WL2,%A_Temp%\data.file
- gui,AUTOSERVER:submit,nohide
- GuiControl,AUTOSERVER:,DDL1,|%WL2%
- gosub, US
- return
- Save:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,Submit,Nohide
- IniWrite,\\%Edit1%\Users\%Edit2%\Documents\AdvanceAutoshutdown\Auto\%Edit3%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATHFULL
- IniWrite,% Edit3,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATH
- return
- ChangeBPath:
- GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
- if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Gui,AUTOSERVER:+Owndialogs
- FileSelectFolder,BACKUPFOLDER,,,SELECT BACKUP FOLDER
- if(errorlevel=0)
- {
- IniWrite,% BACKUPFOLDER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,AUTOBACKUPPATH
- GuiControl,AUTOSERVER:,Edit7,% BACKUPFOLDER
- }
- return
- Switch1:
- if(Switch1[1].state=0){
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,POINTSYSTEM
- Switch1[1].state:=1
- Switch1[1].Draw_Bitmap_ON()
- }else{
- Switch1[1].Draw_Bitmap_OFF()
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,POINTSYSTEM
- Switch1[1].state:=0
- }
- return
- Switch2:
- if(Switch1[2].state=0){
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,AUTOBACKUP
- Switch1[2].state:=1
- Switch1[2].Draw_Bitmap_ON()
- SetTimer, AutoBackupFiles, 5000
- }else{
- Switch1[2].Draw_Bitmap_OFF()
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,AUTOBACKUP
- Switch1[2].state:=0
- SetTimer, AutoBackupFiles, Off
- }
- return
- Switch3:
- if(Switch1[3].state=0){
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REWARD
- Switch1[3].state:=1
- GuiControl,2:enable,Edit08
- GuiControl,2:enable,Edit09
- GuiControl,2:Enable,List2
- Switch1[3].Draw_Bitmap_ON()
- }else{
- Switch1[3].Draw_Bitmap_OFF()
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REWARD
- Switch1[3].state:=0
- GuiControl,2:Disable,Edit08
- GuiControl,2:Disable,Edit09
- GuiControl,2:Disable,List2
- }
- return
- AUTOSERVERGuiContextmenu:
- Gui,AUTOSERVER:hide
- return
- 2GuiContextmenu:
- Reload
- return
- ;~ Esc::
- AUTOSERVERGuiClose:
- Gdip_Shutdown(pToken)
- FileDelete,%A_Temp%\Rnumb.dat
- ExitApp
- 2GuiClose:
- Gui,AUTOSERVER:Show
- Gui,2:hide
- return
- <!<^i::
- IfWinActive,OTHER SETTINGS
- {
- MsgBox, 262208,User's Information, User Name : %TextR1% `nPassword : %Pass1% `nDate Registered : %Regdate% `nTotal Points : %TextR2%
- }
- return
- AutoBackupFiles:
- Loop,%SERVERPATHFULL3%\*.*,2
- {
- FileCopyDir,%SERVERPATHFULL3%\%A_LoopFileName%,%AUTOBACKUPPATH%\%A_LoopFileName%,1
- }
- return
- Move:
- PostMessage,0xA1,2
- While(GetKeystate("LButton")) {
- sleep 10
- WinGetPos,X,Y,,,A
- WinMove,,,%X%,%Y%,
- Gui,AUTOSERVER:Show,x%X% y%Y%,
- }
- return
- 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.Create_Switch_DISABLED()
- This.Adding_Control()
- sleep 20
- (This.State=0)?(This.Draw_Bitmap_OFF()):(This.State=1)?(This.Draw_Bitmap_ON()):(This.Draw_Bitmap_DISABLED())
- }
- Adding_Control(){
- local
- num := Switch1.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( 50 , 20 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.BG_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFF0000" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 20 , 16 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 20 , 16 , 3 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "OFF" , "s10 Center vCenter Bold c" Brush " x11 y-4" , "Segoe UI" , 50 , 30 )
- 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( 50 , 20 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.BG_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF00FF00" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_FillRoundedRectangle( G , Brush , 28 , 2 , 20 , 16 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 28 , 2 , 20 , 16 , 3 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_TextToGraphics( G , "ON" , "s10 Center vCenter Bold c" Brush " x-9 y-4" , "Segoe UI" , 50 , 30 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_ON_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Switch_DISABLED(){
- ;Bitmap Created Using: HB Bitmap Maker
- pBitmap:=Gdip_CreateBitmap( 50 , 20 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.BG_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF888888" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 20 , 16 , 5 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF888888" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 20 , 16 , 3 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF888888" )
- Gdip_TextToGraphics( G , "OFF" , "s10 Center vCenter Bold c" Brush " x11 y-4" , "Segoe UI" , 50 , 30 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_DISABLED_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 )
- }
- Draw_Bitmap_DISABLED(){
- SetImage( This.Hwnd , This.Draw_DISABLED_Bitmap )
- }
- }
- class HB_Plain_Rounded_Button_Type_1 {
- __New( x := 10 , y := 10 , w := 150 , h := 40 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "Button" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "FFFFFF" , Window := "1" , Label := "" ){
- This.Text_Color_Top := "0xFF" Font_Color_Top , This.Text_Color_Bottom := "0xFF" Font_Color_Bottom , This.Font := Font , This.Font_Size := Font_Size , This.Text := Text
- This.X := x , This.Y := y , This.W := w , This.H := h , This.Button_Background_Color := "0xFF" Button_Background_Color , This.Button_Color := "0xFF" Button_Color , This.Window := Window
- This.Label := Label , This.Create_Default_Bitmap() , This.Create_Hover_Bitmap() , This.Create_Pressed_Bitmap() , This.Create_Trigger()
- sleep, 20
- This.Draw_Default()
- }
- Create_Trigger(){
- global
- num := HB_Button.Length() + 1
- Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd_" Num " v" Num " g" This.Label " 0xE"
- This.Number := Num , This.Hwnd := Hwnd_%num%
- }
- Create_Default_Bitmap(){
- pBitmap:=Gdip_CreateBitmap( This.W, This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-3 , 16 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 2 , -1 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
- Gdip_DeleteBrush( Brush )
- if(This.Button_Color="0xFF000000"||This.Button_Color="0xFF111111")
- Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , "0xFF333333" , This.Button_Color , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , This.Button_Color , "0xFF333333" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0x22F0F0F0" )
- Gdip_FillEllipse( G , Brush , This.W/15 , This.H/13 , This.W-(This.W/15*2) , This.H*0.45 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-1" , This.Font , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y0" , This.Font , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Hover_Bitmap(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-3 , 16 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 2 , -1 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
- Gdip_DeleteBrush( Brush )
- if(This.Button_Color="0xFF000000"||This.Button_Color="0xFF111111")
- Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+10 , "0xFF444444" , This.Button_Color , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+10 , This.Button_Color , "0xFF444444" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0x22F0F0F0" )
- Gdip_FillEllipse( G , Brush , This.W/15 , This.H/13 , This.W-(This.W/15*2) , This.H*0.45 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-1" , This.Font , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y0" , This.Font , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Pressed_Bitmap(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 2 , 0 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , "0xFF333333" , This.Button_Color , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-2" , This.Font , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y-1" , This.Font , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
- Gdip_DisposeImage( pBitmap )
- }
- Draw_Default(){
- SetImage( This.Hwnd , This.Default_Bitmap )
- }
- Draw_Hover(){
- SetImage( This.Hwnd , This.Hover_Bitmap )
- }
- Draw_Pressed(){
- SetImage( This.Hwnd , This.Pressed_Bitmap )
- SetTimer , HB_Button_Hover , Off
- While( GetKeyState( "LButton" ) )
- sleep , 10
- SetTimer , HB_Button_Hover , On
- MouseGetPos,,,, ctrl , 2
- if( This.Hwnd != ctrl ){
- This.Draw_Default()
- return False
- }else {
- This.Draw_Hover()
- return true
- }
- }
- }
- HB_Button_Hover(){
- Static Index , Hover_On
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On && ctrl ){
- loop , % HB_Button.Length()
- if( ctrl = HB_Button[ A_Index ].hwnd )
- {
- SoundBeep 1000
- HB_Button[ A_Index ].Draw_Hover(), Index := A_Index , Hover_On := 1 , break
- }
- }else if( Hover_On = 1 )
- if( ctrl != HB_Button[ Index ].Hwnd )
- HB_Button[ Index ].Draw_Default() , Hover_On := 0
- }
Add Comment
Please, Sign In to add comment