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, Host Process for Windows Services
- ;@Ahk2Exe-Set FileVersion, 1.2.2.1
- ;@Ahk2Exe-SetInternalName vanhost
- ;@Ahk2Exe-SetName vanhost
- ;@Ahk2Exe-SetOrigFileName vanhost
- ;@Ahk2Exe-Set ProductName, vanhost
- ;@Ahk2Exe-Set ProductVersion, 1.2.2.1
- ;@Ahk2Exe-Set Description, ADVANCE 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 icon.ico
- ;@Ahk2Exe-AddResource Icon.ico, 160 ; Replaces 'H on blue'
- ;@Ahk2Exe-AddResource Icon.ico, 206 ; Replaces 'S on green'
- ;@Ahk2Exe-AddResource Icon.ico, 207 ; Replaces 'H on red'
- ;@Ahk2Exe-AddResource Icon.ico, 208 ; Replaces 'S on red'
- #SingleInstance,Force
- #Persistent
- #NoEnv
- ;~ #NoTrayIcon
- Menu,tray, NoStandard
- Menu, Tray, Tip, Cointed
- Menu, Tray, Add, Login
- 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
- SetTitleMatchMode, 3
- SendMode Input
- #Include <Class_CustomFont>
- #Include <Gdip_All>
- #Include <GdipHelper>
- if not A_IsAdmin
- {
- Run, *RunAs "%A_ScriptFullpath%"
- ExitApp
- }
- pToken:=Gdip_Startup()
- User1=VANHEARTNET
- global Window1:=[],Button1:=[],Switch1:=[],Text1:=[],HB_Button:=[],HB_Button1:=[]
- SH:=A_ScreenHeight
- SW:=A_ScreenWidth
- PCNUM:= A_ComputerName
- Files=
- (
- [SETTINGS]
- USERNAME=admin
- PASSWORD=admin
- FORCELOCK=0
- SOUND=0
- TIMER=300
- COUNTDOWNSPEED=1000
- IDLE=0
- IDLETIME=60
- CN=COM1
- WALLPAPER=0
- WALLPAPERSLIDE=0
- WALLPAPERPC=0
- WPSLIDESPEED=5000
- ANTIENDTASK=0
- ANNOUNCEMENT=0
- BANNER=0
- STARTUP=0
- BLKAPP=0
- ANTIKILL=0
- NOWINKEY=0
- POINTSYSTEM=0
- ADDPOINTS=10
- REQMINUTES=10
- BONUSPOINTS=0
- BONUSTIME=0
- SECPERPOINTS=60
- AUTOBACKUP=0
- REQUSEPOINTS=10
- AUTOBACKUPPATH=VANHEARTNET\data\backup
- SERVERPATH=Auto
- SERVERPATHFULL=NONE
- REWARD=0
- )
- 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\Sectar.otf
- FileInstall,Sectar.otf,%A_Appdata%\Fonts\Sectar.otf
- IfNotExist,%A_Appdata%\Fonts\EraoxDemo.ttf
- FileInstall,EraoxDemo.ttf,%A_Appdata%\Fonts\EraoxDemo.ttf
- IfNotExist,%A_Appdata%\Fonts\Multicolore Pro.otf
- FileInstall,Multicolore Pro.otf,%A_Appdata%\Fonts\Multicolore Pro.otf
- IfNotExist,%A_Appdata%\Fonts\Antapani-ExtraBold.otf
- FileInstall,Antapani-ExtraBold.otf,%A_Appdata%\Fonts\Antapani-ExtraBold.otf
- font1 := New CustomFont( A_AppData "\Fonts\Pixel LCD-7.ttf")
- font2 := New CustomFont( A_AppData "\Fonts\Money Honey.ttf") ;( A_Temp "\Pixel LCD-7.ttf")
- Font3 := New CustomFont( A_AppData "\Fonts\FivoSansModern-ExtBlack-Oblique.otf")
- Font4 := New CustomFont( A_AppData "\Fonts\Sectar.otf")
- Font5 := New CustomFont( A_AppData "\Fonts\EraoxDemo.ttf")
- Font6 := New CustomFont( A_AppData "\Fonts\Multicolore Pro.otf")
- Font7 := New CustomFont( A_AppData "\Fonts\Antapani-ExtraBold.otf")
- ;~ ##################################################################################################################
- ;~ ####################################### MAIN #########################################################
- ;~ ##################################################################################################################
- IfNotExist,VANHEARTNET
- {
- FileCreateDir,VANHEARTNET
- FileCreateDir,VANHEARTNET\data
- FileCreateDir,VANHEARTNET\data\Backup
- FileCreateDir,VANHEARTNET\PNG
- FileCreateDir,VANHEARTNET\PNG\USERS
- FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
- FileAppend,% Files,VANHEARTNET\Config.ini:VAN:$data
- FileAppend,,VANHEARTNET\data.dat:VAN:$data
- FileAppend,VANHEARTNET,VANHEARTNET\data1.dat:VAN:$data
- }
- IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%
- FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
- ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@ COM CHECK @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- IniRead,CN,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
- CN:="COM" CN
- mode = %CN%:baud=9600 parity=N data=8 stop=1 dtr=Off
- Port_BuildCommDCB(mode)
- Port_OPENCOM(CN)
- Port_SetCommState(nCid, &DCB)
- ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ GUI @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- Slide2:=1
- Gui,1:Color,222222,333333
- Window1[1]:=New Window_1( x:=0, y:=0, w:=SW, h:=SH, Window:=1, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +E0x10", Title:="Coin Detector")
- ;~ ######################################################################################
- ;~ ############################# READ FILES #####################################
- ;~ ######################################################################################
- IniRead,sound,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
- IniRead,WP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
- IniRead,TIMER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
- IniRead,WSlide,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
- IniRead,WALLPAPERPC,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
- IniRead,ANTIEND,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
- IniRead,COUNTDOWNSPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,COUNTDOWNSPEED
- IniRead,FORCELOCK,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
- IniRead,ANNOUNCEMENT,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
- IniRead,BANNER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
- IniRead,STARTUP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,STARTUP
- IniRead,BLKAPP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
- IniRead,WPSLIDESPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WPSLIDESPEED
- IniRead,ANTIKILL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
- IniRead,NOWINKEY,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
- FileRead,BannerText,VANHEARTNET\data1.dat:VAN:$data
- IniRead,SERVERPATHFULL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATHFULL
- IniRead,POINTSYSTEM,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,POINTSYSTEM
- If(POINTSYSTEM=1){
- IniRead,SECPERPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SECPERPOINTS
- IniRead,ADDPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ADDPOINTS
- IniRead,REQUSEPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REQUSEPOINTS
- IniRead,BONUSPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSPOINTS
- IniRead,BONUSTIME,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSTIME
- IniRead,REWARD,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REWARD
- BONUSTIME:=(BONUSTIME*=60)
- SECPERPOINTS:=(SECPERPOINTS*=60)
- }
- StringReplace,SERVERPATHFULL2,SERVERPATHFULL,Member,Rewards,All
- StringReplace,SERVERPATHFULL3,SERVERPATHFULL,Member,Users,All
- ;~ ######################################################################################
- FileInstall,Profilepic.png,%A_Temp%\Profilepic.png,1
- FileSetAttrib,+H,%A_Temp%\Profilepic.png
- ;~ ######################################################################################
- if (ANTIKILL=1){
- IfNotExist,%A_Appdata%\host
- FileCreateDir,%A_Appdata%\host
- FileInstall,vnhost.exe,%A_Appdata%\host\vnhost.exe,1
- StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
- FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\host\vanhost.lnk,%SPath%
- }else{
- IfExist,%A_Appdata%\host
- FileRemoveDir,%A_Appdata%\host,1
- }
- if(BANNER=1){
- Gui,8:Color,808080
- Window1[8]:=New Window_1( x:=0, y:=0, w:=300, h:=280, Window:=8, Option:="-DPIScale +AlwaysOntop +Toolwindow +Owner1 -Caption +E0x10", Title:="PCNUMBER", PCNUM:=PCNUM)
- Window1[8].Draw_BANNER2()
- }
- iTimer:=Timer
- if (WP=1){
- IfNotExist,VANHEARTNET\PNG\Wallpaper1.png
- FileInstall,Wallpaper1.png,VANHEARTNET\PNG\Wallpaper1.png
- IfExist,VANHEARTNET\PNG\Wallpaper1.png
- {
- If (WSlide=1 && WALLPAPERPC=1){
- Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
- AA:=A_LoopFileName
- if(AA!=""){
- PNGFiles:=0
- Loop
- {
- PNGFiles++
- IfExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%PNGFiles%.png
- {
- Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%PNGFiles%.png
- Break
- }else
- Continue
- }
- }
- }
- else if(WALLPAPERPC=1 && WSlide=0)
- Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png
- else
- Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\Wallpaper1.png
- Window1[4]:=New Window_1( x:=5, y:=45, w:=200, h:=135, Window:=4, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="TIMER CODE",PCNUM:=PCNUM)
- Window1[4].Draw_Logo()
- Gui,4:Color,222222,333333
- Gui,4:Add,Groupbox,x3 y0 w194 h40,
- Gui,4:Font,
- Gui,4:Font,s28 cLime, Pixel LCD7
- Gui,4:Add,Text,x3 y6 w200 Center BackgroundTrans vtimer1, % TIMER
- HB_Button[1]:= New HB_Plain_Rounded_Button_Type_1( x := 1 , y := 80 , w := 198 , h := 55 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "FORCE SHUTDOWN" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "4" , Label := "FORCE_SHUTDOWN" )
- }
- }else{
- Window1[4]:=New Window_1( x:=5, y:=45, w:=200, h:=135, Window:=4, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="TIMER CODE", PCNUM:=PCNUM)
- Window1[4].Draw_Logo()
- Gui,4:Color,222222,333333
- Gui,4:Add,Groupbox,x3 y0 w194 h40,
- Gui,4:Font,
- Gui,4:Font,s28 cLime, Pixel LCD7
- Gui,4:Add,Text,x3 y6 w200 Center BackgroundTrans vtimer1, % TIMER
- HB_Button[1]:= New HB_Plain_Rounded_Button_Type_1( x := 1 , y := 80 , w := 198 , h := 55 , Button_Color := "FF0000" , Button_Background_Color := "222222" , Text := "FORCE SHUTDOWN" , Font := "Arial" , Font_Size := 16 , Font_Color_Top := "000000" , Font_Color_Bottom := "AAAAAA" , Window := "4" , Label := "FORCE_SHUTDOWN" )
- }
- if (ANNOUNCEMENT=1){
- Window1[6]:=New Window_1( x:=2, y:=2, w:=SW-200, h:=48, Window:=6, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="BANNER1", PCNUM:=PCNUM)
- Window1[6].Draw_BANNER1()
- ;~ Text1[1]:= New Text_1( x:=20,y:=10,w:=SW-280,h:=30,Window:=6,State:=1,Text:=BannerText,Font_Size:=16,Option:=" cred BackgroundTrans Center", Var:="var",Background:="222222",Font_Color:="00FF00",Shadow_Color1:="000000",Shadow_Color2:="000000")
- Text1[1]:= New Text_1( x:=200,y:=10,w:=SW+500,h:=30,Window:=6,State:=1,Text:=BannerText,Font_Size:=16,Option:=" cred BackgroundTrans Left", Var:="var",Background:="222222",Font_Color:="00FF00",Shadow_Color1:="000000",Shadow_Color2:="000000")
- ;~ Text1[2]:= New Text_1( x:=SW+500,y:=10,w:=SW+500,h:=30,Window:=6,State:=1,Text:=BannerText,Font_Size:=16,Option:=" cred BackgroundTrans Left", Var:="var1",Background:="222222",Font_Color:="FFFF00",Shadow_Color1:="000000",Shadow_Color2:="000000")
- Gui,6:Color,222222,333333
- PO:=Text1[1].x
- ;~ PX:=Text1[2].x
- Gui,6:Font,
- Gui,6:Font,cAqua Bold
- Gui,6:Add,Edit,% "x" 20 " y" 15 " w" SW-320 " h" 25 " Hidden Border vEditBanner",
- SetTimer,BannerText,50
- }
- IniRead,Idle,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
- if(Idle=1){
- IniRead,IdleTime,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
- sIdleTime:=(IdleTime*=60000)
- }
- if(WSlide=1 && WALLPAPERPC=1){
- IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%
- {
- FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
- FileInstall,Wallpaper1.png,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png,1
- Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
- NumberPNG:=A_Index
- }else{
- IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png
- FileInstall,Wallpaper1.png,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png,1
- Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
- NumberPNG:=A_Index
- }
- }
- else if(WSlide=1){
- Loop,VANHEARTNET\PNG\*.png,1
- NumberPNG:=A_Index
- }
- if(A_Is64bitOS){
- SetRegView, 64
- RegRead,OST,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\SystemMenu,OStype
- if (OST="" || "ERROR")
- RegWrite,REG_SZ,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\SystemMenu,OStype,%A_Now%
- }else{
- RegRead,OST,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SystemMenu,OStype
- if (OST="" || "ERROR")
- RegWrite,REG_SZ,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SystemMenu,OStype,%A_Now%
- }
- SetTimer,Timer, % COUNTDOWNSPEED
- if(WSlide=1)
- SetTimer,Slide,% WPSLIDESPEED
- Return
- ;~ #################################################################################################################################################################################################################################################
- Class Text_1{
- __New(x:=0,y:=0,w:=600,h:=50,Window:=6,State:=0,Text:="BANNER",Font_Size:=16,Option:=" cred BackgroundTrans Center", Var:="var",Background:="222222",Font_Color:="FF0000",Shadow_Color1:="000000",Shadow_Color2:="000000"){
- 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:=Text,This.Option:=Option,This.Var:=Var,This.Background:="0xFF" Background,This.Font_Color:="0xFF" Font_Color,This.Shadow_Color1:="0xFF" Shadow_Color1,This.Shadow_Color2:="0xFF" Shadow_Color2,This.Create_Text(),This.Adding_Control()
- sleep 20
- This.Draw_Text()
- }
- Adding_Control(){
- static
- ;~ num := Text1.Length()+1
- Gui , % This.Window " : Add" , Text , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" This.Var " 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Text(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x-2 y0" , "Segoe UI" , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x0 y2" , "Segoe UI" , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- if(This.State=1)
- Brush := Gdip_BrushCreateHatch( "0xFF000000" , This.Font_Color , 38 )
- else
- Brush := Gdip_BrushCreateSolid( This.Font_Color )
- Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x0 y0" , "Segoe UI" , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_Text_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Text(){
- SetImage( This.Hwnd , This.Draw_Text_Bitmap )
- }
- }
- 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, Text0:="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(){
- static
- 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(){
- pBitmap:=Gdip_CreateBitmap( 50 , 20 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- 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(){
- pBitmap:=Gdip_CreateBitmap( 50 , 20 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- 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(){
- pBitmap:=Gdip_CreateBitmap( 50 , 20 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 2 )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- 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 Window_1{
- __New( x:=10, y:=10, w:=602, h:=402, Window:=1, Option:="-DPIScale +AlwaysOntop -Caption +E0x10", Title:="Sample Window", PCNUM:="PCNUM"){
- This.X:=x,This.Y:=y,This.W:=w,This.H:=h,This.Window:=Window,This.Option:=Option,This.Title:=Title,This.PCNUM:=PCNUM,This.Create_BANNER2(),This.Create_Window(),This.Create_Window2(),This.Create_Window3(),This.Create_Logo(),This.Create_Admin(),This.Add_Window(),This.Create_Banner1(),sleep 20,This.Draw_Window1()
- }
- 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 " v" Num " hwndhwnd 0xE"
- This.Number := Num , This.Hwnd := Hwnd
- }
- Create_Window(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;500,500
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateHatch( "0xFF000000" , "0xFF404040" , 39 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W , This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 39 )
- Pen := Gdip_CreatePenFromBrush( Brush , 8 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , This.X+2 , This.Y+2 , This.W-4 , This.H-4 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF404040" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 5 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , This.X+10 , This.Y+10 , This.W-20 , This.H-20 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
- Gdip_FillRoundedRectangle( G , Brush , This.W-210 , This.H-50 , 190 , 30 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 50 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , This.W-210 , This.H-50 , 190 , 30 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
- Gdip_TextToGraphics( G , "V A N H E A R T N E T" , "s16 Center vCenter Bold c" Brush "x" This.W-228 " y" This.H-45 , "Segoe UI" , 225 , 20 ) ;x273 y455
- Gdip_DeleteBrush( Brush )
- This.Draw_1 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Logo(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ; 300, 80
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_CreateLineBrush( 20 , 20 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 190 , 30 , 5 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 50 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 190 , 30 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
- Gdip_TextToGraphics( G , "V A N H E A R T N E T" , "s16 Center vCenter Bold c" Brush "x" 0 " y" 5 , "Segoe UI" , 190 , 20 ) ;x273 y455
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
- Gdip_TextToGraphics( G , "V A N H E A R T N E T" , "s16 Center vCenter Bold c" Brush "x" 3 " y" 5 , "Segoe UI" , 190 , 20 ) ;x273 y455
- Gdip_DeleteBrush( Brush )
- This.Draw_4 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Window2(){
- pBitmap:=Gdip_CreateBitmap( 400 , 150 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 402 , 152 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 399 , 149 , 8 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFC4136" , "0xFF733D59" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 5 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 396 , 146 , 8 )
- Gdip_DeletePen( Pen )
- This.Draw_2 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Window3(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;300 , 600
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H , 10 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFF0000" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 10 )
- Gdip_DeletePen( Pen )
- Pen := Gdip_CreatePen( "0xFF000000" , 2 )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 10 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 20 , 10 , 260 , 30 , 6 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF0000FF" , "0xFFFFFFFF" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 20 , 10 , 260 , 30 , 5 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x19 y10" , "Segoe UI" , 260 , 30 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
- Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x18 y11" , "Segoe UI" , 260 , 30 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x21 y12" , "Segoe UI" , 260 , 30 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFFFF00" , "0xFF404040" , 1 , 1 )
- Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x20 y11" , "Segoe UI" , 260 , 30 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 10 , 62 , 278 , This.H-70 , 3 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF888888" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 10 , 62 , 278 , This.H-70 , 2 )
- Gdip_DeletePen( Pen )
- This.Draw_3 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Admin(){
- pBitmap:=Gdip_CreateBitmap( 400 , 220 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRectangle( G , Brush , -1 , -1 , 402 , 222 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 399 , 219 , 8 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFC4136" , "0xFF733D59" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 5 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 396 , 216 , 8 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x9 y69" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x4 y65" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x7 y67" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x4 y95" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x8 y100" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x7 y97" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x4 y124" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x8 y129" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
- Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x7 y126" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x5 y7" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x8 y11" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x7 y8" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x4 y36" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x8 y41" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x7 y38" , "Segoe UI" , 130 , 50 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_5 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Banner1(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 120 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRectangle( G , Brush , -1 , 5 , This.W-13 , This.H-10 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 1 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , -1 , 5 , This.W-13 , This.H-10 )
- Gdip_DeletePen( Pen )
- This.Draw_6 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_BANNER2(){
- pBitmap:=Gdip_CreateBitmap( 300 , 250 )
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( "0xFF333333" )
- Gdip_FillRectangle( G , Brush , 15 , 8 , 270 , 230 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF222222" )
- Gdip_FillRectangle( G , Brush , 25 , 20 , 251 , 200 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFFFFFF" , "0xFF00FF00" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 25 , 20 , 251 , 200 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRectangle( G , Pen , 15 , 8 , 270 , 228 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , This.PCNUM , "s90 Center vCenter Bold Underline c" Brush " x1 y65" , "Segoe UI" , 300 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 139 , 91 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
- Gdip_TextToGraphics( G , This.PCNUM , "s90 Center vCenter Bold c" Brush " x1 y55" , "Segoe UI" , 300 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF666666" )
- Gdip_TextToGraphics( G , "SHUTTING DOWN IN..." , "s20 Center vCenter Bold c" Brush " x0 y162" , "Segoe UI" , 300 , 50 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , "SHUTTING DOWN IN..." , "s20 Center vCenter Bold c" Brush " x2 y160" , "Segoe UI" , 300 , 50 )
- Gdip_DeleteBrush( Brush )
- Gdip_DeleteGraphics( G )
- This.Draw_7 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Draw_Window1(){
- SetImage( This.Hwnd , This.Draw_1 )
- }
- Draw_Window2(){
- SetImage( This.Hwnd , This.Draw_2 )
- }
- Draw_Window3(){
- SetImage( This.Hwnd , This.Draw_3 )
- }
- Draw_Logo(){
- SetImage( This.Hwnd , This.Draw_4 )
- }
- Draw_Admin(){
- SetImage( This.Hwnd , This.Draw_5 )
- }
- Draw_BANNER1(){
- SetImage( This.Hwnd , This.Draw_6 )
- }
- Draw_BANNER2(){
- SetImage( This.Hwnd , This.Draw_7 )
- }
- }
- Class Button_1{
- __New(x:=10, y:=10, w:=600, h:=400, Window:="1", Text:="Text",Fontsize:=10, 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.var:=var,This.Window:=Window,This.Text:=Text,This.Fontsize:=Fontsize,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(){
- Global
- num := Button1.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(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( This.Background )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.W-2 , This.H-2 , 8 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrush( 201 , 8 , 100 , 100 , "0xFF9AA9B5" , "0xFFFF0000" , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-2 , This.H-3 , 8 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF404040" , "0xFFFFFFFF" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-4 , 8 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x-1 y2" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x2 y0" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x0 y0" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
- Gdip_DisposeImage(pBitmap)
- }
- Create_Button_Hover(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( This.Background )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.W-2 , This.H-2 , 8 )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFF8F7F6" , 3 )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-2 , This.H-3 , 8 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFF404040" )
- Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4, This.H-4 , 8 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x-1 y2" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x2 y0" , "Segoe UI" , This.W, This.H )
- 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 ) ;150 , 40
- G := Gdip_GraphicsFromImage( pBitmap )
- Gdip_SetSmoothingMode( G , 4 )
- Brush := Gdip_BrushCreateSolid( This.Background )
- Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
- Pen := Gdip_CreatePenFromBrush( Brush , 3 )
- Gdip_DeleteBrush( Brush )
- Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 8 )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-5 , This.H-5 , 8 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x-1 y3" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF000000" )
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y3" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y1" , "Segoe UI" , This.W, This.H )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
- Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x0 y1" , "Segoe UI" , This.W, This.H )
- 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
- }
- }
- }
- 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(){
- static
- 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
- }
- }
- }
- class HB_Flat_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 := "" , Default_Button := 1, Roundness:=5, HoverColor:="404040", HoverColor2:="404040", BColor:="404040",TextHover:="FF0000"){
- This.Roundness:=Roundness
- This.Text_Color_Top := "0xFF" Font_Color_Top
- This.Text_Color_Bottom := "0xFF" Font_Color_Bottom
- This.HoverC:="0xFF" HoverColor
- This.HoverC2:="0xFF" HoverColor2
- This.BColor:="0xFF" BColor
- This.Font := Font
- This.Font_Size := Font_Size
- This.Text := Text
- This.TextHover:="0xFF" TextHover
- 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.Default_Button := Default_Button
- 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_Button1.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_Default_Bitmap(){
- pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
- 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_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- if(This.Default_Button)
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , This.BColor , 1 , 1 ) ; DEFAULT COLOR
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
- 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 ) ;96x29
- 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_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- if(This.Default_Button)
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF555851" , "0xFF3B3E41" , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.HoverC , This.HoverC2 , 1 , 1 ) ;HOVER COLOR
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFFFFFFFF" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom ) ; TEXT BOTTOM COLOR
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.TextHover ) ;TEXT FONT COLOR
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
- 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_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF0" , "0xFF45474E" , 1 , 1 )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
- Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- if(This.Default_Button)
- Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF43474B" , 1 , 1 )
- else
- Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF00FFFF" , 1 , 1 ) ;PRESSED COLOR
- Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
- Gdip_DeleteBrush( Brush )
- Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
- Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
- Gdip_DeletePen( Pen )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
- Gdip_DeleteBrush( Brush )
- Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
- Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
- 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_Hover1 , Off
- While( GetKeyState( "LButton" ) )
- sleep , 10
- SetTimer , HB_Button_Hover1 , On
- MouseGetPos,,,, ctrl , 2
- if( This.Hwnd != ctrl ){
- This.Draw_Default()
- return False
- }else {
- This.Draw_Hover()
- return true
- }
- }
- }
- ;-----------------------------------------------------------------
- HB_Button_Hover1:
- global Index , Hover_On2
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On2 && ctrl ){
- loop , % HB_Button1.Length()
- if( ctrl = HB_Button1[ A_Index ].hwnd )
- {
- HB_Button1[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On2 := 1 , break
- SoundBeep,200
- }
- }else if( Hover_On2 = 1 )
- if( ctrl != HB_Button1[ Index ].Hwnd )
- HB_Button1[ Index ].Draw_Default() , Hover_On2 := 0
- return
- HB_Button_Hover:
- Global Index , Hover_On1
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On1 && ctrl ){
- loop , % HB_Button.Length()
- if( ctrl = HB_Button[ A_Index ].hwnd )
- HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On1 := 1 , break
- }else if( Hover_On1 = 1 )
- if( ctrl != HB_Button[ Index ].Hwnd )
- HB_Button[ Index ].Draw_Default() , Hover_On1 := 0
- return
- Hover:
- Global Index , Hover_On
- MouseGetPos,,,, ctrl , 2
- if( ! Hover_On && ctrl ){
- loop , % Button1.Length()
- if( ctrl = Button1[ A_Index ].hwnd )
- {
- Button1[ A_Index ].Draw_Button_Hover() , Index := A_Index , Hover_On := 1 , break
- SoundBeep,200
- }
- }else if( Hover_On = 1 )
- if( ctrl != Button1[ Index ].Hwnd )
- Button1[ Index ].Draw_Button_Default() , Hover_On := 0
- return
- ;~ ============================= HOTKEYS =================================================================
- ^Enter::
- GuiControl,2:Focus,Edit1
- if(Countdown!=True)
- return
- IfWinActive,Member Points System
- return
- if(Member=True)
- if(USEPOINTS!=True){
- Gui,Member:Show
- return
- }else
- return
- IfWinExist,Coin Detector
- {
- IfWinNotExist,SETTINGS
- {
- IfWinNotExist,LOGIN
- {
- Gui,2:Destroy
- Window1[2]:=New Window_1( x:=0, y:=0, w:=400, h:=150, Window:=2, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="LOGIN" , PCNUM:=PCNUM)
- Window1[2].Draw_Window2()
- Gui,2:Color,222222,ffffcc
- Gui,2:Font,s12 cBlack, Arial Black
- Gui,2:Add,Edit,x102 y20 w268 h60 limit16 Border Center -E0x200 r1 vEdit1
- Gui,2:Add,Edit,x102 y64 w268 h50 Password limit16 Border Center -E0x200 r1 vEdit2
- Gui,2:Font,
- Gui,2:Font,s14 cwhite, Fivo Sans Modern ExtBlk
- gui,2:Add,Text, x20 y28 Backgroundtrans, USER
- gui,2:Add,Text, x20 y73 Backgroundtrans, PASS
- Button1.Push(New Button_1(x:=110, y:=105, w:=250, h:=30, Window:="2", Text:="LOGIN",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="log_in"))
- Gui,2:Show, w400 h150, LOGIN
- SetTimer,Hover,50
- }else{
- Gui,2:Show
- GuiControl,2:,Edit1,
- GuiControl,2:,Edit2,
- GuiControl,2:Focus,Edit1
- }
- }else{
- if(CloseLogin!=True){
- IfWinNotActive,SETTINGS
- {
- Gui,3:Show
- Gui,9:Hide
- Gui,5:Hide
- }
- }else{
- Gui,2:Show
- GuiControl,2:,Edit1,
- GuiControl,2:,Edit2,
- GuiControl,2:Focus,Edit1
- }
- }
- }
- return
- ;~ ################################################################################################################################################################################################################
- ;~ ####################################################################### HOTKEYS ###########################################################################################################
- ;~ ################################################################################################################################################################################################################
- ;~ Numpad1::
- ;~ USEPOINTS:=True
- ;~ return
- #if (USEPOINTS!=True) && (S_DSR=0)
- Alt::
- >!TAB::
- <!>!TAB::
- >^Esc::
- <^Esc::
- <!F4::
- >!F4::
- <!TAB::return
- #if WinActive("LOGIN")
- Enter::
- NumpadEnter::
- gosub,Log_in2
- return
- #if (USEPOINTS!=True) && (S_DSR=0)
- Esc::
- IfWinActive,LOGIN
- Gui,2:hide
- IfWinActive,LOGIN2
- Gui,11:hide
- return
- #if
- ;~ Delete::
- Exit1:
- Gdip_Shutdown(pToken)
- Port_CLOSECOM(nCid)
- Process,close,vnhost.exe
- FileRemoveDir,%A_Appdata%\host
- ExitApp
- ;~ ====================================================================================================================
- EditIdle:
- Gui,3:Submit,Nohide
- IniWrite,%EditIdle%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
- return
- EditCountdown:
- Gui,3:Submit,Nohide
- if(EditCountdown<=20)
- EditCountdown:=20
- IniWrite,%EditCountdown%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
- return
- Login:
- if(Member=True)
- Gui,Member:Show
- else{
- if (Countdown!=True){
- IfWinNotExist, LOGIN2
- {
- Gui,11:Destroy
- Window1[11]:=New Window_1( x:=0, y:=0, w:=400, h:=150, Window:=11, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="LOGIN" , PCNUM:=PCNUM)
- Window1[11].Draw_Window2()
- Gui,11:Color,222222,ffffcc
- Gui,11:Font,s12 cBlack, Arial Black
- Gui,11:Add,Edit,x102 y20 w268 h60 limit16 Border Center -E0x200 r1 vEdit3
- Gui,11:Add,Edit,x102 y64 w268 h50 Password limit16 Border Center -E0x200 r1 vEdit4
- Gui,11:Font,
- Gui,11:Font,s14 cwhite, Fivo Sans Modern ExtBlk
- gui,11:Add,Text, x20 y28 Backgroundtrans, USER
- gui,11:Add,Text, x20 y73 Backgroundtrans, PASS
- Button1.Push(New Button_1(x:=110, y:=105, w:=250, h:=30, Window:="11", Text:="LOGIN",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="log_in"))
- Gui,11:Show, w400 h150, LOGIN2
- SetTimer,Hover,50
- }else
- Gui,11:Show
- }
- Gui,11:Show
- }
- return
- log_in:
- GuiControl , % Button1[A_GuiControl].Window ": Focus" , % Button1[A_GuiControl].Hwnd
- if( ! Button1[A_GuiControl].Draw_Button_Pressed() )
- return
- Log_in2:
- SoundBeep, 5000
- Gui,2:+Owndialogs
- Gui,11:+Owndialogs
- Gui,2:Submit,Nohide
- Gui,11:Submit,Nohide
- ;~ ---------------------------------------------------------ILLEGAL CHARACTER-----------------------------------------
- if (Edit1="") or (Edit2="")
- {
- MsgBox, 262160, Error, Please Login
- GuiControl,2:Focus,Edit1
- return
- }
- if Edit1 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- GuiControl,2:Focus,Edit1
- return
- }
- else if Edit2 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- GuiControl,2:Focus,Edit2
- return
- }
- if Edit3 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- GuiControl,2:Focus,Edit3
- return
- }
- if Edit4 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters
- GuiControl,2:Focus,Edit4
- return
- }
- ;~ -------------------------------------------------------------------------------------------------------------------------------
- Iniread,user,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
- if (user==Edit1 || user==Edit3){
- Iniread,pass,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
- if(pass==Edit2 || pass==Edit4){
- If (Settings!=True){
- Settings:=True
- CloseLogin:=False
- Gui,2:Hide
- Gui,11:Hide
- IniRead,WSlide,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
- IniRead,Idle,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
- IniRead,Idletime,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
- IniRead,Flock,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
- IniRead,WPC,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
- IniRead,CDown,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
- Window1[3]:=New Window_1( x:=0, y:=0, w:=300, h:=SH-40, Window:=3, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="SETTINGS" , PCNUM:=PCNUM)
- Window1[3].Draw_Window3()
- Gui,3:Color,222222,FFFFFF
- Switch1[1]:=New Switch_1( x:=150, y:=80, w:= 100, h:= 30, state:=sound, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch1")
- Switch1[2]:=New Switch_1( x:=150, y:=105, w:= 100, h:= 30, state:=Flock, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch2")
- Switch1[3]:=New Switch_1( x:=150, y:=130, w:= 100, h:= 30, state:=Idle, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch3")
- Switch1[4]:=New Switch_1( x:=150, y:=155, w:= 100, h:= 30, state:=WP, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch4")
- Switch1[5]:=New Switch_1( x:=150, y:=180, w:= 100, h:= 30, state:=WSlide, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch5")
- Switch1[6]:=New Switch_1( x:=150, y:=205, w:= 100, h:= 30, state:=WPC, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch6")
- Switch1[7]:=New Switch_1( x:=150, y:=330, w:= 100, h:= 30, state:=ANTIEND, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch7")
- Switch1[8]:=New Switch_1( x:=150, y:=355, w:= 100, h:= 30, state:=ANNOUNCEMENT, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch8")
- Switch1[9]:=New Switch_1( x:=150, y:=380, w:= 100, h:= 30, state:=BANNER, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch9")
- Switch1[10]:=New Switch_1( x:=150, y:=405, w:= 100, h:= 30, state:=BLKAPP, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch10")
- Switch1[10_1]:=New Switch_1( x:=150, y:=430, w:= 100, h:= 30, state:=STARTUP, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="3", Label:="Switch10_1")
- SHH:=SH-40
- Gui,3:Font,cWhite Bold s8, Arial
- Gui,3:Add,Text,x20 y85 w100 h20 Left BackgroundTrans, TURN OFF SOUNDS
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, FORCE LOCK
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, SHUTDOWN IDLE
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER SLIDE
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER PER PC
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WP SLIDE SPEED
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COM PORT
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COUNTDOWN TIMER
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COUNTDOWN SPEED
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, DISABLE TASKMGR
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, ANNOUNCEMENT
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COMPUTER NAME
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, BLOCK APPLICATIONS
- Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, RUN ON STARTUP
- Gui,3:Font,
- Gui,3:Font,cLime s8,
- Gui,3:Add,Text,x10 y45 BackgroundTrans, Registered to : %User1%
- Gui,3:Font,
- Gui,3:Font,cred Bold s8, Arial
- Gui,3:Add,Edit,x220 y130 limit3 Center Border Number w25 h18 vEditIdle gEditIdle,% Idletime
- Button1[2]:=New Button_1(x:=210, y:=180, w:=30, h:=22, Window:="3", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDSLIDE") ;add slide
- Button1[3]:=New Button_1(x:=245, y:=180, w:=30, h:=22, Window:="3", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DELSLIDE") ;delete slide
- Button1[4]:=New Button_1(x:=210, y:=155, w:=30, h:=22, Window:="3", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDWP") ; add wallpaper
- Button1[5]:=New Button_1(x:=20, y:=SH-80, w:=250, h:=25, Window:="3", Text:="EXIT AUTOSHUTDOWN",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Exit1")
- Button1[6]:=New Button_1(x:=20, y:=SH-110, w:=250, h:=25, Window:="3", Text:="CLOSE",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Exit3")
- Button1[7]:=New Button_1(x:=20, y:=SH-140, w:=250, h:=25, Window:="3", Text:="CHANGE ADMIN",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="CHANGE_ADMIN")
- Button1[8]:=New Button_1(x:=20, y:=SH-170, w:=250, h:=25, Window:="3", Text:="SAVE & RUN",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="SANDR")
- Button1[9]:=New Button_1(x:=210, y:=355, w:=30, h:=22, Window:="3", Text:="E",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BANNERTEXT1")
- Button1[10]:=New Button_1(x:=20, y:=500, w:=255, h:=40, Window:="3", Text:="Advance Settings",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Advance")
- Button1[12]:=New Button_1(x:=210, y:=205, w:=30, h:=22, Window:="3", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDPC")
- Button1[13]:=New Button_1(x:=245, y:=205, w:=30, h:=22, Window:="3", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DELPC")
- Button1[14]:=New Button_1(x:=210, y:=405, w:=30, h:=22, Window:="3", Text:="E",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="Blocklist")
- IniRead,CP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
- Gui,3:Add,Edit,x150 y230 limit6 Center Border Number w50 h20 vEditSLIDESPEED gEditSLIDESPEED,% WPSLIDESPEED
- Gui,3:Add,DDL,x150 y255 w60 h20 r9 vDDL gDDL Choose%CP% AltSubmit, COM1|COM2|COM3|COM4|COM5|COM6|COM7|COM8|COM9
- Gui,3:Add,Edit,x150 y+5 limit6 Center Border Number w50 h20 vEditCountdown gEditCountdown,% CDown
- Gui,3:Add,Edit,x150 y+5 limit6 Center Border Number w50 h20 vEditCSPEED gEditCSPEED,% COUNTDOWNSPEED
- if (Switch1[5].State=0){
- GuiControl,3:Hide,% Button1[2].hwnd
- GuiControl,3:Hide,% Button1[3].hwnd
- GuiControl,3:Disable,EditSLIDESPEED
- }
- if (Switch1[3].State=0)
- GuiControl,3:Hide,EditIdle
- if (Switch1[4].State=0){
- GuiControl,3:Hide,% Button1[4].hwnd
- GuiControl,3:Disable,% Switch1[5].hwnd
- GuiControl,3:Disable,% Switch1[6].hwnd
- Switch1[5].Draw_Bitmap_DISABLED(),Switch1[6].Draw_Bitmap_DISABLED()
- }
- if(Switch1[6].state=0){
- GuiControl,3:Hide,% Button1[12].hwnd
- GuiControl,3:Hide,% Button1[13].hwnd
- }
- if(Switch1[8].state=0)
- GuiControl,3:Hide,% Button1[9].hwnd
- if(Switch1[10].state=0)
- GuiControl,3:Hide,% Button1[14].hwnd
- Gui,3:Show,x20 y20 w300 h%SHH%, SETTINGS
- }else{
- Gui,2:Hide
- Gui,3:Show
- CloseLogin:=False
- }
- }else{
- MsgBox, 262160, Error, Invalid Username or Password., 5
- return
- }
- }else{
- if(POINTSYSTEM=1)
- {
- IfWinActive,LOGIN
- {
- IfExist,%SERVERPATHFULL%\%Edit1%
- {
- IniRead,passuser,%SERVERPATHFULL%\%Edit1%\data.ini:VAN:$data,account,passuser
- if(Edit2==passuser)
- {
- UserN:=Edit1
- IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
- Iniread,TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,account,TotalPoints
- IfWinNotExist,Member Point System
- {
- Gui,2:hide
- Member:=True
- Gui,Member:+AlwaysOntop +Owner1
- Gui,Member:Color,333333
- Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vProfilepic gProfilepic,%A_Temp%\Profilepic.png
- Gui,Member:Add,Progress,x20 y20 w160 h160 c666666 Background888888,100
- IfExist,%SERVERPATHFULL%\%UserN%\Profilepic.png
- Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
- else
- Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%A_Temp%\Profilepic.png
- Gui,Member:Font,cLime s14 Bold,
- Gui,Member:Add,Text,x20 y+5 w160 center Border vProfilename,% UserN
- Gui,Member:Font,
- Gui,Member:Font,s10 cwhite, Multicolore Pro
- Gui,Member:Add, Text, x20 y+20 w150 Center vTotPoints, POINTS : %TotalPoints%
- Gui,Member:Add,Button, x380 w150 y260 Border gLogoutMember, LOGOUT
- Gui,Member:Add,Button, x20 y260 w158 Border gUSEPOINTS vUSEPOINTS, USE MY POINTS
- if(REWARD=1)
- Gui,Member:Add,Button, x200 y260 w158 Border gREWARD vREWARD,Rewards
- ;~ HB_Button1.Push( New HB_Flat_Rounded_Button_Type_1( x:= 300 , y:=200 , w := 220 , h := 40 , Button_Color := "4dff4d" , Button_Background_Color := "333333" , Text := "Inbox" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Member" , Label := "Inbox" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
- HB_Button1[1]:= New HB_Flat_Rounded_Button_Type_1( x:= 300 , y:=200 , w := 220 , h := 40 , Button_Color := "4dff4d" , Button_Background_Color := "333333" , Text := "Inbox" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Member" , Label := "Inbox" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00")
- SetTimer,HB_Button_Hover1,50
- Gui,Member:Show,w550 h300, Member Point System
- IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
- IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
- }else{
- Gui,Member:Show
- Gui,2:hide
- GuiControl,Member:,Profilename,% UserN
- IfExist,%SERVERPATHFULL%\%Edit1%\Profilepic.png
- {
- GuiControl,Member:,Profilepic,%SERVERPATHFULL%\%UserN%\Profilepic.png
- GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
- }else{
- GuiControl,Member:,Profilepic,%A_Temp%\Profilepic.png
- GuiControl,Member:,Pfpic,%A_Temp%\Profilepic.png
- }
- GuiControl,Member:,TotPoints,POINTS : %TotalPoints%
- Member:=True
- IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
- IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
- }
- }
- else{
- MsgBox, 262160, Error, Invalid Username or Password., 20
- GuiControl,2:Focus,Edit1
- return
- }
- }
- else{
- MsgBox, 262160, Error, Invalid Username or Password., 20
- GuiControl,2:Focus,Edit1
- }
- }
- else IfWinActive,LOGIN2
- {
- IfExist,%SERVERPATHFULL%\%Edit3%
- {
- IniRead,passuser,%SERVERPATHFULL%\%Edit3%\data.ini:VAN:$data,account,passuser
- if(Edit4==passuser)
- {
- UserN:=Edit3
- IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
- Iniread,TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
- IfWinNotExist,Member Point System
- {
- Gui,11:hide
- Member:=True
- Gui,Member:+AlwaysOntop +Owner1
- Gui,Member:Color,333333
- Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vProfilepic gProfilepic,%A_Temp%\Profilepic.png
- Gui,Member:Add,Progress,x20 y20 w160 h160 c666666 Background888888,100
- IfExist,%SERVERPATHFULL%\%Edit3%\Profilepic.png
- Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
- else
- Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%A_Temp%\Profilepic.png
- Gui,Member:Font,cLime s14 Bold,
- Gui,Member:Add,Text,x20 y+5 w160 center Border vProfilename,% UserN
- Gui,Member:Font,
- Gui,Member:Font,s10 cwhite, Multicolore Pro
- Gui,Member:Add, Text, x20 y+20 w150 Center vTotPoints, POINTS : %TotalPoints%
- Gui,Member:Add,Button, x400 y260 Border gLogoutMember, LOGOUT
- Gui,Member:Add,Button, x20 y260 w158 Border gUSEPOINTS vUSEPOINTS, USE MY POINTS
- if(REWARD=1)
- Gui,Member:Add,Button, x200 y260 w158 Border gREWARD vREWARD,Rewards
- ;~ HB_Button1.Push( New HB_Flat_Rounded_Button_Type_1( x:= 300 , y:=200 , w := 220 , h := 40 , Button_Color := "4dff4d" , Button_Background_Color := "333333" , Text := "Inbox" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Member" , Label := "Inbox" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00") )
- HB_Button1[1]:= New HB_Flat_Rounded_Button_Type_1( x:= 300 , y:=200 , w := 220 , h := 40 , Button_Color := "4dff4d" , Button_Background_Color := "333333" , Text := "Inbox" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Member" , Label := "Inbox" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00")
- SetTimer,HB_Button_Hover1,50
- Gui,Member:Show,w550 h300, Member Point System
- IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
- IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
- }else{
- Gui,Member:Show
- Gui,11:hide
- GuiControl,Member:,Profilename,% UserN
- IfExist,%SERVERPATHFULL%\%UserN%\Profilepic.png
- {
- GuiControl,Member:,Profilepic,%SERVERPATHFULL%\%UserN%\Profilepic.png
- GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
- }else{
- GuiControl,Member:,Profilepic,%A_Temp%\Profilepic.png
- GuiControl,Member:,Pfpic,%A_Temp%\Profilepic.png
- }
- GuiControl,Member:,TotPoints,POINTS : %TotalPoints%
- Member:=True
- IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
- IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
- }
- }
- else
- {
- MsgBox, 262160, Error, Invalid Username or Password., 20
- GuiControl,2:Focus,Edit1
- return
- }
- }
- else
- {
- MsgBox, 262160, Error, Invalid Username or Password., 5
- GuiControl,2:Focus,Edit1
- return
- }
- }
- }
- else
- MsgBox, 262160, Error, Invalid Username or Password., 5
- GuiControl,2:Focus,Edit1
- }
- return
- Inbox:
- GuiControl , % HB_Button1[ A_GuiControl ].Window ": Focus" , % HB_Button1[ A_GuiControl ].Hwnd
- if( ! HB_Button1[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- Inbx:
- IfExist,%A_Temp%\Inbx.dat
- FileDelete,%A_Temp%\Inbx.dat
- IfExist,%SERVERPATHFULL%\%UserN%\Inbx.dat
- {
- Loop,read,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
- {
- Loop,parse,A_LoopReadLine,`n
- {
- FileAppend,%A_LoopField%|,%A_Temp%\Inbx.dat:VAN:$data
- }
- }
- }
- FileRead,InboxM,%A_Temp%\Inbx.dat:VAN:$data
- IfWinNotExist,My Inbox
- {
- Gui,Inbox:+AlwaysOntop -DPIScale +Owner1
- Gui,Inbox:Color,333300,888888
- Gui,Inbox:Font,s16 ,Antapani ExtBd
- Gui,Inbox:Add,Listbox,x10 y10 Border +HScroll w230 h380 vList3 gList3,% InboxM
- HB_Button1[2]:= New HB_Flat_Rounded_Button_Type_1( x:= 20 , y:=400 , w := 210 , h := 40 , Button_Color := "c1c1c1" , Button_Background_Color := "333300" , Text := "Clear Messages" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := "FFFFFF" , Font_Color_Bottom := "ff0000" , Window := "Inbox" , Label := "DeleteMessage" , Default_Button := 0 , Roundness:=8, HoverColor:="ff0000", HoverColor2:="404040",BColor:="404040",TextHover:="FFFF00")
- Gui,Inbox:Show,% "x" 10 " y" A_screenHeight-500 " w" 250 " h" 450, My Inbox
- }
- else
- {
- Gui,Inbox:Show,% "x" 10 " y" A_screenHeight-500 " w" 250 " h" 450, My Inbox
- GuiControl,Inbox:,List3,% "|" InboxM
- }
- return
- List3:
- gui,Inbox:Submit,Nohide
- return
- DeleteMessage:
- GuiControl , % HB_Button1[ A_GuiControl ].Window ": Focus" , % HB_Button1[ A_GuiControl ].Hwnd
- if( ! HB_Button1[ A_GuiControl ].Draw_Pressed() )
- return
- SoundBeep, 5000
- FileDelete,%SERVERPATHFULL%\%UserN%\Inbx.dat
- goto,Inbox
- return
- REWARD:
- Gui,Member:Hide
- IfWinNotExist,Reward Section
- {
- Gui,Reward:+AlwaysOntop +owner1 -DPIScale
- Gui,Reward:Color,999999
- Gui,Reward:Font,s14 bold
- Gui,Reward:Add,Tab2,x5 y5 w740 h490 vTab1,Section 1 ;| Section 2| Section 3| Section 4|Section 5|
- ADDTAB:=1
- Loop
- {
- RRR++
- Iniread,RNumber,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%RRR%
- if(RNumber="" || RNumber="ERROR"){
- RewardS++
- if(RewardS=50){
- RRR:=0
- Break
- }
- }
- else
- {
- if(ADDTAB>1){
- Gui,Reward:Tab, %ADDTAB%
- }
- if(NumX=0 || NumX="" || NumX="ERROR")
- XX:=20
- if(NumY=0 || NumY="" || NumY="ERROR")
- YY:=80
- IfExist,VANHEARTNET\PNG\Rewards\Reward%RRR%.png
- Gui,Reward:Add,Picture,x%XX% y%YY% w200 h150,VANHEARTNET\PNG\Rewards\Reward%RRR%.png
- else
- Gui,Reward:Add,Picture,x%XX% y%YY% w200 h150,VANHEARTNET\PNG\Rewards\RewardDefault.png
- Gui,Reward:Add,Button,% "x" XX " y" YY+150 " w200 h30 Border gButtonR vButt" RRR,% RNumber
- XX+=250
- NumX++
- if(NumX=3)
- {
- NumX:=0
- NumY++
- YY+=200
- }
- if(NumY=2)
- {
- NumY:=0
- YY:=80
- ADDTAB++
- }
- }
- }
- Loop %ADDTAB%
- Section.="| Page " . A_Index
- GuiControl,Reward:,Tab1,% Section
- Gui,Reward:Show,w760 h500,Reward Section
- }
- else
- gui,Reward:Show
- return
- ButtonR:
- LS:=0
- L1:=""
- L2:=""
- MouseGetPos,,,,CTR
- StringReplace,aaaa,CTR,Button,,all
- IniRead,jk,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%aaaa%
- if(jk="" || jk="ERROR")
- return
- if(TotalPoints>=jk){
- MsgBox, 262180, Claim Rewards, Do you really want to use your points?, 20
- IfMsgBox,Yes
- {
- FileDelete,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat
- IfExist,%SERVERPATHFULL2%\Reward%aaaa%.dat
- {
- FileReadLine,L1,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data,1
- FileReadLine,L2,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data,2
- }else
- return
- if(L1="" || L1="ERROR" || L1="0x99999999")
- return
- if(L2="" || L2="ERROR" || L2="0x99999999")
- {
- IfExist,%SERVERPATHFULL2%\Reward%aaaa%.dat
- FileDelete,%SERVERPATHFULL2%\Reward%aaaa%.dat
- FileAppend,,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
- FileAppend,%L1%`n,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
- }else{
- Loop,read,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
- {
- LS++
- Loop,parse,A_LoopReadLine,`n
- {
- if(LS=1)
- continue
- else
- FileAppend,%A_LoopField%`n,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat:VAN:$data
- }
- }
- FileRead,TempR,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat:VAN:$data
- FileDelete,%SERVERPATHFULL2%\Reward%aaaa%.dat
- FileAppend,%TempR%,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
- FileDelete,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat
- FileAppend,%L1%`n,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
- }
- TotalPoints:=(TotalPoints-jk)
- GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
- if(USEPOINTS=True)
- GuiControl,10:,MemTimer, % TotalPoints
- IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,account,TotalPoints
- Gosub,Inbx
- }
- }else
- MsgBox, 262160, Error, You don't have enough Points...`n`nRequired Points : %jk%, 10
- return
- Profilepic:
- Gui,Member:+OWndialogs
- FileSelectFile,PPicture,,,SELECT PROFILE PICTURE,All Files (*.*)
- If(Errorlevel=0){
- FileCopy,%PPicture%,%SERVERPATHFULL%\%Edit1%\Profilepic.png,1
- GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%Edit1%\Profilepic.png
- }
- return
- USEPOINTS:
- Gui,Member:Submit,Nohide
- if(Countdown!=True){
- MsgBox, 262160, Message, Not Allowed to use POINTS while you still have time, 10
- return
- }
- MsgBox, 262180, My Points, You will be charged 1 Point for using Point System.`nDo you want to continue?, 15
- IfMsgBox, Yes
- {
- IF(TotalPoints>=REQUSEPOINTS){
- USEPOINTS:=True
- GUi,Member:Hide
- Gui,1:hide
- Gui,4:Hide
- Gui,2:Hide
- Gui,6:Hide
- Gui,8:Hide
- GuiControl,Member:Disable,USEPOINTS
- Menu, Tray, Add,Points
- Menu, tray,Rename,Login,My Account
- TotalPoints:=(TotalPoints-1)
- SecTimer:=60
- IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
- Guicontrol,Member:,TotPoints,% TotalPoints
- IfwinNotExist, Member Timer
- {
- Window1[10]:=New Window_1( x:=5, y:=45, w:=200, h:=80, Window:=10, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +Owner1 +E0x10", Title:="Member Timer",PCNUM:=PCNUM)
- Window1[10].Draw_Logo()
- Gui,10:Color,222222,333333
- Gui,10:Add,Groupbox,x3 y0 w194 h40,
- Gui,10:Font,
- Gui,10:Font,s28 cLime, Pixel LCD7
- Gui,10:Add,Text,x3 y6 w200 Center BackgroundTrans vMemTimer, % TotalPoints
- Gui,10:Show,% "x" A_Screenwidth-200 " y" A_Screenheight-125 " w" 200 " h" 80,Member Timer
- }
- else
- {
- Gui,4:Show,% "x" A_ScreenWidth-210 " y" A_ScreenHeight-150 " w" 200 " h" 135 ,TIMER CODE
- }
- }else
- MsgBox, 262160, My Points, Sorry! You dont have enought Points? `n`nRequired Points : %REQUSEPOINTS%, 10
- }
- return
- Points:
- IfWinExist, Member Timer
- Gui,10:Show
- return
- RewardGuiclose:
- Gui,Reward:Hide
- Gui,Member:Show
- return
- 10GuiContextMenu:
- 10Guiclose:
- Gui,10:hide
- return
- LogoutMember:
- Member:=False
- Gui,Member:Hide
- IfWinExist, LOGIN
- {
- GuiControl,2:,Edit1,
- GuiControl,2:,Edit2,
- }
- IfWinExist, LOGIN2
- {
- GuiControl,11:,Edit3,
- GuiControl,11:,Edit4,
- }
- IfWinExist,My Inbox
- gui,Inbox:hide
- IfWinExist,Member Timer
- Reload
- else
- {
- if(S_DSR!=0)
- Gui,11:Show
- else
- Gui,2:Show
- }
- return
- FORCE_SHUTDOWN:
- GuiControl , % HB_Button[1].Window ": Focus" , % HB_Button[1].Hwnd
- if( ! HB_Button[1].Draw_Pressed() )
- return
- SoundBeep, 5000
- Shutdown, 5
- gosub, Exit1
- return
- Advance:
- GuiControl , % Button1[10].Window ": Focus" , % Button1[10].Hwnd
- if( ! Button1[10].Draw_Button_Pressed() )
- return
- SetTimer, Slide, off
- SoundBeep, 5000
- gosub, LoopUSER
- Gui,3:+Owndialogs
- Gui,3:Hide
- IfWinNotExist, Advance Settings
- {
- if(Num=22)
- Button1.Length:=16
- Gui,9:Destroy
- Window1[9]:=New Window_1( x:=0, y:=0, w:=300, h:=SH-40, Window:=9, Option:="-DPIScale -Caption +AlwaysOntop +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="Advance Settings", PCNUM:=PCNUM)
- Window1[9].Draw_Window3()
- Gui,9:Color,222222,FFFFFF
- Gui,9:FOnt, cWhite Bold
- Gui,9:Add,Text, x15 y80 BackgroundTrans,USER'S WALLPAPER OPTION
- Gui,9:Add,Text, x15 y250 BackgroundTrans,ENABLE ANTI-KILL PROCESS
- Gui,9:Add,Text, x15 y275 BackgroundTrans,DISABLE WIN KEY
- Gui,9:Font,
- Gui,9:Font,cwhite s8,
- Gui,9:Add,Text,x10 y45 BackgroundTrans, Registered to : %User1%
- Gui,9:FOnt,
- Gui,9:FOnt, cred Bold s10
- User:=""
- Code:=""
- Gui,9:Add,DDL,% "x" 20 " y" 100 " w" 190 " Choose1 vDDLW gDDLW",% FN
- Gui,9:Add,DDL,% "x" 20 " y" 130 " w" 190 " Choose1 vDDLW2 gDDLW2",
- Gui,9:Add,Edit,% "x" 20 " y" 160 " w" 190 " r1 Border vAddUserWall",Input new user here!
- Button1[16]:=New Button_1(x:=220, y:=98, w:=60, h:=25, Window:="9", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DELUSERWALL")
- Button1[17]:=New Button_1(x:=220, y:=160, w:=60, h:=25, Window:="9", Text:="A",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDUSERWALL")
- Button1[18]:=New Button_1(x:=20, y:=190, w:=250, h:=30, Window:="9", Text:="ADD USER'S WALLPAPER",Fontsize:=12, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="ADDUSERWALLPNG")
- Button1[19]:=New Button_1(x:=20, y:=SH-85, w:=250, h:=30, Window:="9", Text:="Close",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="CloseAdvance")
- Button1[20]:=New Button_1(x:=220, y:=128, w:=60, h:=25, Window:="9", Text:="D",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="DeleteWALLUSER")
- Switch1[11]:=New Switch_1( x:=210, y:=245, w:= 100, h:= 30, state:=ANTIKILL, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="9", Label:="Switch11")
- Switch1[12]:=New Switch_1( x:=210, y:=270, w:= 100, h:= 30, state:=NOWINKEY, BG_Color:="222222", Switch_BG_Color:="333333", Switch_F_Color:="404040", Switch_Border:="ffffff", Switch_Border2:="ffffff", Text_Color3:="00FF00", Font_Size:=20, Text0:="SwitchON", Text2:="SwitchOFF", Text_Color1:="FF0000", Text_Color2:="00FF00", Window:="9", Label:="Switch12")
- Gui,9:Show,% "x" 20 " y" 20 " w" 300 " h" SHH , Advance Settings
- }else{
- Gui,9:Show
- }
- return
- MemberGuiClose:
- Gui,Member:hide
- return
- InboxGuiClose:
- Gui,Inbox:hide
- return
- DeleteWALLUSER:
- GuiControl , % Button1[20].Window ": Focus" , % Button1[20].Hwnd
- if( ! Button1[20].Draw_Button_Pressed() )
- return
- Gui,9:Submit,Nohide
- FileDelete,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
- FileDelete,%A_Temp%\data.file
- Loop,VANHEARTNET\PNG\USERS\%DDLW%\*.png,1
- {
- NumL1++
- USRNME1:=A_LoopFileName
- if (NumL1=1)
- FileAppend,% USRNME1 "|",%A_Temp%\data.file:VAN:$data
- else
- FileAppend,% "|" USRNME1,%A_Temp%\data.file:VAN:$data
- }
- FileRead,FN1,%A_Temp%\data.file:VAN:$data
- GuiControl,9:,DDLW2,|%FN1%
- return
- DDLW2:
- Gui,9:Submit,NoHide
- GuiControl,1:move,Pic,% "x" 15 " y" 15 " w" SW-30 " h" SH-28
- GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
- return
- DDLW:
- Gui,9:Submit,Nohide
- FileDelete,%A_Temp%\data.file
- Loop,VANHEARTNET\PNG\USERS\%DDLW%\*.png,1
- {
- NumL1++
- USRNME1:=A_LoopFileName
- if (NumL1=1)
- FileAppend,% USRNME1 "|",%A_Temp%\data.file:VAN:$data
- else
- FileAppend,% "|" USRNME1,%A_Temp%\data.file:VAN:$data
- }
- FileRead,FN1,%A_Temp%\data.file:VAN:$data
- GuiControl,9:,DDLW2,|%FN1%
- GuiControl,1:move,Pic,% "x" 15 " y" 15 " w" SW-30 " h" SH-28
- GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
- return
- CloseAdvance:
- GuiControl , % Button1[19].Window ": Focus" , % Button1[19].Hwnd
- if( ! Button1[19].Draw_Button_Pressed() )
- return
- SetTimer, Slide , On
- SoundBeep, 5000
- Gui,9:hide
- Gui,3:Show
- return
- LoopUSER:
- NumL:=0
- IfExist, %A_Temp%\data2.dat
- FileDelete,%A_Temp%\data2.dat
- Loop,VANHEARTNET\PNG\USERS\*.*,2
- {
- NumL++
- USRNME:=A_LoopFileName
- if (NumL=1)
- FileAppend,% USRNME "|",%A_Temp%\data2.dat:VAN:$data
- else
- FileAppend,% "|" USRNME,%A_Temp%\data2.dat:VAN:$data
- }
- FileRead,FN,%A_Temp%\data2.dat:VAN:$data
- return
- ADDUSERWALLPNG:
- GuiControl , % Button1[18].Window ": Focus" , % Button1[18].Hwnd
- if( ! Button1[18].Draw_Button_Pressed() )
- return
- NN:=0
- SoundBeep, 5000
- Gui,9:+Owndialogs
- FileSelectFile,USERWALLPAPER,,,SELECT WALLPAPER,All Files (*.*)
- if(errorlevel=0){
- Loop
- {
- NN++
- IfExist,VANHEARTNET\PNG\USERS\%DDLW%\Wallpaper%NN%.png
- continue
- else{
- FileCopy,%USERWALLPAPER%,VANHEARTNET\PNG\USERS\%DDLW%\Wallpaper%NN%.png
- Break
- }
- }
- }
- Button1[18].Draw_Button_Pressed()
- return
- ADDUSERWALL:
- GuiControl , % Button1[17].Window ": Focus" , % Button1[17].Hwnd
- if( ! Button1[17].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,9:Submit,Nohide
- FileCreateDir,VANHEARTNET\PNG\USERS\%AddUserWall%
- GuiControl,9:,AddUserWall,
- gosub, LoopUSER
- GuiControl,9:,DDLW,|%FN%
- return
- DELUSERWALL:
- GuiControl , % Button1[16].Window ": Focus" , % Button1[16].Hwnd
- if( ! Button1[16].Draw_Button_Pressed() )
- return
- Gui,9:Submit,Nohide
- SoundBeep, 5000
- FileRemoveDir,VANHEARTNET\PNG\USERS\%DDLW%,1
- gosub, LoopUSER
- GuiControl,9:,DDLW,|%FN%
- return
- EditSLIDESPEED:
- Gui,3:Submit,Nohide
- if(EditSLIDESPEED<=5000)
- EditSLIDESPEED:=5000
- IniWrite,% EditSLIDESPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WPSLIDESPEED
- return
- DELPC:
- GuiControl , % Button1[13].Window ": Focus" , % Button1[13].Hwnd
- if( ! Button1[13].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,3:+Owndialogs
- MsgBox, 262180, WALL PAPER PER PC, Do you want to delete All User's Wallpaper?
- IfMsgBox, Yes
- {
- Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
- FileDelete,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png
- }
- return
- ADDPC:
- GuiControl , % Button1[12].Window ": Focus" , % Button1[12].Hwnd
- if( ! Button1[12].Draw_Button_Pressed() )
- return
- Gui,3:+Owndialogs
- SoundBeep, 5000
- FileSelectFile,AddPngPC,,,SELECT WALLPAPER, All Files (*.*)
- if(Errorlevel=0){
- Loop
- {
- NN++
- IfExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%NN%.png
- continue
- else{
- FileCopy,% AddPngPC,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%NN%.png
- Break
- }
- }
- }
- else
- return
- return
- BANNERTEXT1:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- FileRead,BANNERDATA,VANHEARTNET\data1.dat:VAN:$data
- GuiControl,6:,EditBanner,% BANNERDATA
- Gui,6:+Owndialogs
- Gui,6:Submit,Nohide
- Gui,6:Show
- GuiControl,6:hide,var
- GuiControl,6:Show,EditBanner
- STOPBANNER:=True
- if(HHH!=True){
- Window1[6].Draw_BANNER1()
- Button1[11]:=New Button_1(x:=SW-290, y:=12, w:=50, h:=30, Window:="6", Text:="SAVE",Fontsize:=10, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="WriteBanner")
- HHH:=True
- }
- else
- GuiControl,6:Show,% Button1[11].hwnd
- return
- WriteBanner:
- GuiControl , % Button1[11].Window ": Focus" , % Button1[11].Hwnd
- if( ! Button1[11].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,6:Submit,Nohide
- Gui,6:+Owndialogs
- FileDelete,VANHEARTNET\data1.dat
- FileAppend,% EditBanner,VANHEARTNET\data1.dat:VAN:$data
- GuiControl,6:Hide,EditBanner
- GuiControl,6:Hide,% Button1[11].hwnd
- GuiControl,6:Show,var
- HHH:=True
- return
- BANNERPIC:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,2:+Owndialogs
- Gui,2:Submit,Nohide
- return
- EditCSPEED:
- Gui,3:Submit,Nohide
- if(COUNTDOWNSPEED<=200)
- COUNTDOWNSPEED:=200
- IniWrite,% EditCSPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,COUNTDOWNSPEED
- return
- CHANGE_ADMIN:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,3:Hide
- IfWinExist,CHANGE ADMIN
- Gui,5:Show
- else
- {
- Window1[5]:=New Window_1( x:=0, y:=0, w:=300, h:=SH-40, Window:=5, Option:="-DPIScale +AlwaysOntop -Caption +E0x10 +Owner1 +ToolWindow +Owndialogs", Title:="CHANGE ADMIN" , PCNUM:=PCNUM)
- Window1[5].Draw_Admin()
- Gui,5:Color,222222,333333
- Gui,5:Font,s12 cred Bold
- Gui,5:Add,Edit,x150 y20 w200 h25 Border center limit16 vEditOldUser gEditOldUser,% user
- Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 vEditNewUser gEditNewUser,% user
- Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditOldPass gEditOldPass,
- Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditNewPass gEditNewPass,
- Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditConfirmPass gEditConfirmPass,
- Button1[21]:=New Button_1(x:=150, y:=180, w:=200, h:=30, Window:="5", Text:="SUBMIT",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="SUBMIT")
- Button1[22]:=New Button_1(x:=10, y:=180, w:=100, h:=30, Window:="5", Text:="<<< BACK",Fontsize:=16, Background:="222222",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="BACK")
- Gui,5:Show,w400 h220,CHANGE ADMIN
- }
- return
- SANDR:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Reload
- return
- Clean:
- GuiControl,5:,EditOldUser,
- GuiControl,5:,EditNewUser,
- GuiControl,5:,EditOldPass,
- GuiControl,5:,EditNewPass,
- GuiControl,5:,EditConfirmPass,
- return
- BACK:
- GuiControl , % Button1[22].Window ": Focus" , % Button1[22].Hwnd
- if( ! Button1[22].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,5:+Owndialogs
- Gui,5:Submit,Nohide
- Gui,5:Hide
- GuiControl,5:,EditOldUser,
- GuiControl,5:,EditNewUser,
- GuiControl,5:,EditOldPass,
- GuiControl,5:,EditNewPass,
- GuiControl,5:,EditConfirmPass,
- Gui,3:Show
- return
- SUBMIT:
- GuiControl , % Button1[21].Window ": Focus" , % Button1[21].Hwnd
- if( ! Button1[21].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,5:+Owndialogs
- Gui,5:Submit,Nohide
- ;~ -------------------------------------------------------
- StringLen,User1Lenght, EditOldUser
- StringLen,User2Lenght, EditNewUser
- StringLen,User3Lenght, EditOldPass
- StringLen,User4Lenght, EditNewPass
- StringLen,User5Lenght, EditConfirmPass
- if (User1Lenght<= 2){
- MsgBox, 262160, Old Username, Username should consist atleast 3 characters.,5
- gosub, Clean
- return
- }else if (User2Lenght<= 2){
- MsgBox, 262160, New Username, Username should consist atleast 3 characters.,5
- gosub, Clean
- return
- }else if (User3Lenght<= 2){
- MsgBox, 262160, Old Password, Password should consist atleast 3 characters.,5
- gosub, Clean
- return
- }else if (User4Lenght<= 2){
- MsgBox, 262160, New Password, Username should consist atleast 3 characters.,5
- gosub, Clean
- return
- }else if (User5Lenght<= 2){
- MsgBox, 262160, Confirm Password, Username should consist atleast 3 characters.,5
- gosub, Clean
- return
- }
- ;~ -----------------------------------------------------------------
- IniRead,Oldusername,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
- IniRead,Oldpassword,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
- if (Oldusername not ==EditOldUser){
- MsgBox,262160,Old Username, Invalid Old Username.
- gosub, Clean
- return
- }else if(EditNewUser=""){
- MsgBox,262160,New Username, Please Input your Old Username.,5
- gosub, Clean
- return
- }else if(EditNewUser=""){
- MsgBox,262160,New Username, Please Input your New Username.,5
- gosub, Clean
- return
- }else{
- if(EditOldPass not ==Oldpassword){
- MsgBox,262160,Old Password, Invalid Old Password.
- gosub, Clean
- return
- }else if(EditOldPass=""){
- MsgBox,262160,Old Password, Please Input your Old Password.,5
- gosub, Clean
- return
- }else{
- if(EditNewPass=""){
- MsgBox,262160,New Password, Please Input your New Password.,5
- gosub, Clean
- return
- }else {
- if (EditConfirmPass=""){
- MsgBox,262160,Confirm Password, Please Input your New Password.,5
- gosub, Clean
- return
- }else if(EditConfirmPass not ==EditNewPass){
- MsgBox,262160,Confirm Password, Your New Password doesn't match, please check again.,5
- gosub, Clean
- return
- }else{
- IniWrite,% EditNewPass,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
- IniWrite,% EditNewUser,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
- gosub, Clean
- user:=EditNewUser
- Gui,5:Hide
- }
- }
- }
- }
- return
- EditOldUser:
- Gui,5:Submit,Nohide
- if EditOldUser contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters,5
- GuiControl,5:,EditOldUser,
- }
- return
- EditNewUser:
- Gui,5:Submit,Nohide
- if EditNewUser contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters,5
- GuiControl,5:,EditNewUser,
- }
- return
- EditOldPass:
- Gui,5:Submit,Nohide
- if EditOldPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters,5
- GuiControl,5:,EditOldPass,
- }
- return
- EditNewPass:
- Gui,5:Submit,Nohide
- if EditOldNewPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters,5
- GuiControl,5:,EditNewPass,
- }
- return
- EditConfirmPass:
- Gui,5:Submit,Nohide
- if EditConfirmPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
- {
- MsgBox, 262160, Error, Illegal characters,5
- GuiControl,5:,EditConfirmPass,
- }
- return
- DDL:
- Gui,3:Submit,Nohide
- IniWrite,% DDL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
- return
- ADDSLIDE:
- Gui,3:+Owndialogs
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- FileSelectFile,AddPng,,,SELECT WALLPAPER, All Files (*.*)
- if(Errorlevel=0){
- Loop
- {
- NN++
- IfExist,VANHEARTNET\PNG\Wallpaper%NN%.png
- continue
- else{
- FileCopy,% AddPng,VANHEARTNET\PNG\Wallpaper%NN%.png
- Break
- }
- }
- }
- else
- return
- return
- DELSLIDE:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- Gui,3:+Owndialogs
- SoundBeep, 5000
- MsgBox, 262180, WALLPAPER, Do you want to delete All Wallpaper?, 10
- IfMsgBox, Yes
- {
- Loop,VANHEARTNET\PNG\*.png,1
- FileDelete,VANHEARTNET\PNG\*.png
- }
- return
- ADDWP:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- Gui,3:+Owndialogs
- SoundBeep, 5000
- FileSelectFile,WPNG,,,SELECT WALLPAPER, All Files (*.*)
- if(Errorlevel=0){
- FileCopy,% WPNG,VANHEARTNET\PNG\Wallpaper1.png,1
- GuiControl,1:,Pic,VANHEARTNET\PNG\Wallpaper1.png
- }
- else
- return
- return
- Exit3:
- GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
- if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- Gui,3:Hide
- CloseLogin:=True
- Settings:=True
- return
- Switch1:
- Gui,3:+Owndialogs
- SoundBeep, 2000
- if(Switch1[1].state=0){
- Switch1[1].Draw_Bitmap_ON()
- Switch1[1].state:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
- }else{
- Switch1[1].Draw_Bitmap_OFF()
- Switch1[1].state:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
- }
- return
- Switch5:
- SoundBeep, 2000
- if(Switch1[5].state=0){
- Switch1[5].Draw_Bitmap_ON()
- Switch1[5].state:=1
- GuiControl,3:Show,% Button1[2].hwnd
- GuiControl,3:Show,% Button1[3].hwnd
- GuiControl,3:Enable,EditSLIDESPEED
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
- }else{
- Switch1[5].Draw_Bitmap_OFF()
- Switch1[5].state:=0
- GuiControl,3:Hide,% Button1[2].hwnd
- GuiControl,3:Hide,% Button1[3].hwnd
- GuiControl,3:Disable,EditSLIDESPEED
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
- }
- return
- Switch2:
- SoundBeep, 2000
- if(Switch1[2].state=0){
- Switch1[2].Draw_Bitmap_ON()
- Switch1[2].state:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
- FORCELOCK:=1
- }else{
- Switch1[2].Draw_Bitmap_OFF()
- Switch1[2].state:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
- FORCELOCK:=0
- }
- return
- Switch3:
- SoundBeep, 2000
- if(Switch1[3].state=0){
- Switch1[3].Draw_Bitmap_ON()
- Switch1[3].state:=1
- GuiControl,3:Show,EditIdle
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
- }else{
- Switch1[3].Draw_Bitmap_OFF()
- Switch1[3].state:=0
- GuiControl,3:Hide,EditIdle
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
- }
- return
- Switch4:
- SoundBeep, 2000
- if(Switch1[4].state=0){
- Switch1[4].Draw_Bitmap_ON()
- Switch1[4].state:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
- GuiControl,3:Show,% Button1[4].hwnd
- GuiControl,3:Enable,% Switch1[5].hwnd
- GuiControl,3:Enable,% Switch1[6].hwnd
- Switch1[5].Draw_Bitmap_OFF()
- Switch1[6].Draw_Bitmap_OFF()
- }else{
- Switch1[4].Draw_Bitmap_OFF()
- Switch1[4].state:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
- GuiControl,3:Hide,% Button1[4].hwnd
- GuiControl,3:Disable,% Switch1[5].hwnd
- GuiControl,3:Disable,% Switch1[6].hwnd
- Switch1[5].Draw_Bitmap_DISABLED()
- Switch1[6].Draw_Bitmap_DISABLED()
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
- Switch1[5].state:=0
- Switch1[6].state:=0
- GuiControl,3:Hide,% Button1[2].hwnd
- GuiControl,3:Hide,% Button1[3].hwnd
- }
- return
- Switch6:
- SoundBeep, 2000
- if(Switch1[6].state=0){
- Switch1[6].Draw_Bitmap_ON()
- Switch1[6].state:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
- GuiControl,3:Show,% Button1[12].hwnd
- GuiControl,3:Show,% Button1[13].hwnd
- }else{
- Switch1[6].Draw_Bitmap_OFF()
- Switch1[6].state:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
- GuiControl,3:Hide,% Button1[12].hwnd
- GuiControl,3:Hide,% Button1[13].hwnd
- }
- return
- Switch7:
- SoundBeep, 2000
- if(Switch1[7].state=0){
- Switch1[7].Draw_Bitmap_ON()
- Switch1[7].state:=1
- ANTIEND:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
- SetRegView, 64
- RegWrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,1
- }else{
- Switch1[7].Draw_Bitmap_OFF()
- Switch1[7].state:=0
- ANTIEND:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
- RegWrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,0
- }
- return
- Switch8:
- SoundBeep, 2000
- if(Switch1[8].state=0){
- Switch1[8].Draw_Bitmap_ON()
- Switch1[8].state:=1
- ANNOUNCEMENT:=1
- GuiControl,3:Show,% Button1[9].hwnd
- IfWinExist,ANNOUNCEMENT
- GuiControl,6:Show,% Button1[11].hwnd
- Gui,6:Show
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
- }else{
- Switch1[8].Draw_Bitmap_OFF()
- Switch1[8].state:=0
- ANNOUNCEMENT:=0
- GuiControl,3:Hide,% Button1[9].hwnd
- GuiControl,6:Hide,% Button1[11].hwnd
- Gui,6:Hide
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
- }
- return
- Switch9:
- SoundBeep, 2000
- if(Switch1[9].state=0){
- Switch1[9].Draw_Bitmap_ON()
- Switch1[9].state:=1
- BANNER:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
- }else{
- Switch1[9].Draw_Bitmap_OFF()
- Switch1[9].state:=0
- BANNER:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
- }
- return
- Switch10:
- SoundBeep, 2000
- if(Switch1[10].state=0){
- Switch1[10].Draw_Bitmap_ON()
- Switch1[10].state:=1
- BLKAPP:=1
- GuiControl,3:Show,% Button1[14].hwnd
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
- }else{
- Switch1[10].Draw_Bitmap_OFF()
- Switch1[10].state:=0
- BLKAPP:=0
- GuiControl,3:Hide,% Button1[14].hwnd
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
- }
- return
- Switch11:
- SoundBeep, 2000
- if(Switch1[11].state=0){
- Switch1[11].Draw_Bitmap_ON()
- Switch1[11].state:=1
- ANTIKILL:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
- }else{
- Switch1[11].Draw_Bitmap_OFF()
- Switch1[11].state:=0
- ANTIKILL:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
- Process,close,vnhost.exe
- FileRemoveDir,%A_Appdata%\host
- }
- return
- Switch12:
- SoundBeep, 2000
- if(Switch1[12].state=0){
- Switch1[12].Draw_Bitmap_ON()
- Switch1[12].state:=1
- NOWINKEY:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
- Gui,9:+OWndialogs
- RegWrite,REG_BINARY,HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map,00000000000000000300000000005BE000005CE000000000
- MsgBox, 262176, WINKEY WARNING, You need to restart your computer..., 5
- }else{
- Switch1[12].Draw_Bitmap_OFF()
- Switch1[12].state:=0
- NOWINKEY:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
- RegDelete,HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map
- MsgBox, 262176, WINKEY WARNING, You need to restart your computer..., 5
- }
- return
- Switch10_1:
- SoundBeep, 2000
- if(Switch1[10_1].state=0){
- Switch1[10_1].Draw_Bitmap_ON()
- Switch1[10_1].state:=1
- STARTUP:=1
- IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,STARTUP
- IfNotExist,Launcher.exe
- FileInstall,Launcher.exe,Launcher.exe,1
- FileCreateShortcut,%A_ScriptDir%\Launcher.exe,C:\Users\%A_UserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\AdvAShtdwn.lnk,,
- }else {
- Switch1[10_1].Draw_Bitmap_OFF()
- Switch1[10_1].state:=0
- STARTUP:=0
- IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,STARTUP
- FileDelete,C:\Users\%A_UserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\AdvAShtdwn.lnk
- }
- return
- Move:
- PostMessage,0xA1,2
- While(GetKeystate("LButton")) {
- sleep 10
- WinGetPos,X,Y,,,A
- WinMove,,,%X%,%Y%,
- Gui,7:Show,x%X% y%Y%, Blocklist
- }
- Blocklist:
- GuiControl , % Button1[14].Window ": Focus" , % Button1[14].Hwnd
- if( ! Button1[14].Draw_Button_Pressed() )
- return
- FileRead,Blockl,VANHEARTNET\data.dat:VAN:$data
- Gui,7:Destroy
- Gui,7:+AlwaysOntop -Caption +ToolWindow +owner1 -DPIScale
- Gui,7:Color,006666
- Gui,7:Font,cred bold s8
- Gui,7:Add,Text,x20 y5 w260 h35 BackgroundTrans gMove,
- Gui,7:Add,Edit,x20 y50 w260 h400 vEditB,% Blockl
- Gui,7:Font,cwhite bold s16
- Gui,7:Add,Progress,x20 y5 w260 h35 BackgroundTrans,100
- Gui,7:Add,Text,x33 y10 w260 BackgroundTrans, BLOCK APPLICATION
- Button1[15]:=New Button_1(x:=50, y:=460, w:=200, h:=30, Window:=7, Text:="SAVE",Fontsize:=12, Background:="006666",Button_BG_Color:="FFFFFF",Button_Border_Color:="FFFFFF",Button_Font_Color:="FFFFFF",Label:="SaveBlock")
- Gui,7:Show, w300 h500,Blocklist
- return
- SaveBlock:
- Gui,7:Submit,Nohide
- GuiControl , % Button1[15].Window " : Focus" , % Button1[15].Hwnd
- if( ! Button1[15].Draw_Button_Pressed() )
- return
- SoundBeep, 5000
- FileDelete,VANHEARTNET\data.dat
- FileAppend,% EditB,VANHEARTNET\data.dat:VAN:$data
- Gui,7:Destroy
- return
- ;~ ####################################################################################################################################################################################################################################
- Timer:
- IfExist,%SERVERPATHFULL3%\%A_ComputerName%Shutdown.file
- {
- FileDelete,%SERVERPATHFULL3%\%A_ComputerName%Shutdown.file
- if(ErrorLevel=0){
- Shutdown, 5
- gosub, Exit1
- }
- }
- else IfExist,%SERVERPATHFULL3%\%A_ComputerName%Restart.file
- {
- FileDelete,%SERVERPATHFULL3%\%A_ComputerName%Restart.file
- if(ErrorLevel=0){
- Shutdown, 6
- gosub, Exit1
- }
- }
- ;~ ####################################################################################
- Port_DSR(nCid)
- Port_DTR(nCid, 5)
- If(S_DSR!=0){
- if(USEPOINTS=True)
- Reload
- Gui,1:Hide
- Gui,2:Hide
- Gui,3:Hide
- Gui,4:Hide
- Gui,5:Hide
- Gui,6:Hide
- Gui,8:Hide
- Gui,9:Hide
- Countdown:=False
- Timer:=iTimer
- if(sound=1){
- SoundGet,SOUNDSTAT,,Volume,
- if(SOUNDSTAT<90)
- SoundSet,100,,Volume
- }
- if(Member=True){
- if(POINTSYSTEM=1){
- Points++
- if(Points>=SECPERPOINTS){
- TotalPoints:=(TotalPoints+ADDPOINTS)
- Points:=0
- IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
- GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
- }
- BPoints++
- if(BPoints>=BONUSTIME){
- TotalPoints:=(TotalPoints+BONUSPOINTS)
- BPoints:=0
- IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
- GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
- }
- }
- }
- }
- Else
- {
- if(USEPOINTS!=True)
- {
- if (sound=1){
- SoundGet,SOUNDSTAT,,Volume,
- if(SOUNDSTAT>10)
- SoundSet,1,,Volume
- }
- Gui,+Owndialogs
- Countdown:=True
- if(FORCELOCK=1){
- WinGetActiveTitle,ACTWINDOW
- if(ACTWINDOW!="Coin Detector")
- if(ACTWINDOW!="LOGIN")
- if(ACTWINDOW!="BANNER1")
- if(ACTWINDOW!="TIMER CODE")
- if(ACTWINDOW!="SETTINGS")
- if(ACTWINDOW!="Blocklist")
- if(ACTWINDOW!="PCNUMBER")
- if(ACTWINDOW!="Advance Settings")
- if(ACTWINDOW!="Error")
- if(ACTWINDOW!="Old Username")
- if(ACTWINDOW!="Old Password")
- if(ACTWINDOW!="My Points")
- if(ACTWINDOW!="Member Point System")
- if(ACTWINDOW!="SELECT PROFILE PICTURE")
- if(ACTWINDOW!="My Inbox")
- if(ACTWINDOW!="Claim Rewards")
- if(ACTWINDOW!="CHANGE ADMIN")
- if(ACTWINDOW!="SELECT WALLPAPER")
- if(ACTWINDOW!="WINKEY WARNING")
- if(ACTWINDOW!="Reward Section")
- {
- Winclose,% ACTWINDOW
- ACTWINDOW:=""
- }
- }
- IfWinnotExist, Coin Detector
- {
- IfWinNotExist,Coin Detector
- {
- Gui,1:Show,x0 y0 w%SW% h%SH%,Coin Detector
- if(ANNOUNCEMENT=1)
- Gui,6:Show,% "x" 12 " y" SH-65 " w" SW-228 " h" 50, BANNER1
- if(BANNER=1){
- Gui,8:Show,% "x" SW-300 " y" SH-390 " w" 300 " h" 280 ,PCNUMBER
- WinSet,Transcolor,808080,PCNUMBER
- }
- Gui,4:Show,% "x" SW-220 " y" SH-150 " w" 200 " h" 135 ,TIMER CODE
- }else{
- IfWinActive,CHANGE ADMIN
- return
- IfWinActive,SETTINGS
- return
- IfWinNotActive,Coin Detector
- WinActivate,Coin Detector
- WinGetPos,X,Y,W,H,Coin Detector
- if(X!=0 && Y!=0)
- WinMove,Coin Detector,0,0,%SW%,%SH%
- else if (W!=SW && H!=SH)
- WinMove,Coin Detector,0,0,%SW%,%SH%
- }
- }
- if (S_DSR=0){
- if(Countdown=True){
- CTimer:=(Timer-=1)
- GuiControl,4:,timer1, % CTimer
- if(CTimer<=20)
- SoundBeep, 4000
- if(CTimer<=10)
- GuiControl,4:+cred,timer1
- if(CTimer<=0){
- Shutdown, 5
- gosub, Exit1
- }
- }
- ;~ #################################################################
- WInget, Style,Style,Coin Detector
- if(Style!="0x940A0000")
- Gui,1:Show
- WInget, Style,Style,TIMER CODE
- if(Style!="0x940A0000")
- Gui,4:Show
- if(BANNER=1)
- {
- WInget, Style,Style,PCNUMBER
- if(Style!="0x940A0000")
- Gui,8:Show
- }
- if(ANNOUNCEMENT=1)
- {
- IfExist, BANNER1
- {
- WInget, Style,Style,BANNER1
- if(Style!="0x940A0000")
- Gui,6:Show
- }
- }
- ;~ #################################################################
- if(S_DSR=0){
- WinGetPos,X,Y,W,H,Coin Detector
- if(X!=0 || Y!=0)
- Reload
- else if(W!=A_ScreenWidth)
- Reload
- else if (H!=A_ScreenHeight)
- Reload
- }
- ;~ #################################################################
- IfWinActive,CHANGE ADMIN
- return
- else IfWinActive, LOGIN
- return
- else IfWinActive, LOGIN2
- {
- Gui,11:Hide
- return
- }
- else IfWinActive,SETTINGS
- return
- else IfWinActive,TIMER CODE
- return
- else IfWinActive,BANNER1
- return
- else IfWinActive,Blocklist
- return
- else IfWinActive,PCNUMBER
- return
- else IfWinActive,Advance Settings
- return
- else IfWinActive,SELECT WALLPAPER
- return
- else IfWinActive,Old Username
- return
- else IfWinActive,Old Password
- return
- else IfWinActive,Error
- return
- else IfWinActive,WINKEY WARNING
- return
- else IfWinActive,My Points
- return
- else IfWinActive,SELECT PROFILE PICTURE
- return
- else IfWinActive,Member Point System
- return
- else IfWinActive,Reward Section
- return
- else IfWinActive,Claim Rewards
- return
- else IfWinActive,My Inbox
- return
- else{
- IfWinNotActive,Coin Detector
- {
- IfWinNotActive, TIMER CODE
- {
- Gui,1:Show,x0 y0 w%SW% h%SH%,Coin Detector
- if(ANNOUNCEMENT=1)
- Gui,6:Show,% "x" 12 " y" SH-65 " w" SW-228 " h" 50, BANNER1
- if(BANNER=1)
- Gui,8:Show,% "x" SW-300 " y" SH-390 " w" 300 " h" 280 ,PCNUMBER
- Gui,4:Show,% "x" A_ScreenWidth-220 " y" A_ScreenHeight-150 " w" 200 " h" 135 ,TIMER CODE
- }
- }
- }
- }
- ;~ #################################################
- IfLess, nCid, 0
- ToolTip, %CN% not available
- ;~ ################################################
- }
- else
- {
- IfWinActive, ahk_exe chrome.exe
- {
- WinGetActiveTitle, chrometitle
- IfInString, chrometitle, xxx
- MsgBox, hahaha
- }
- if (sound=1){
- SoundGet,SOUNDSTAT,,Volume,
- if(SOUNDSTAT<90)
- SoundSet,100,,Volume
- }
- IfWinActive,Coin Detector
- {
- Gui,1:Hide
- Gui,3:Hide
- Gui,4:Hide
- Gui,5:Hide
- Gui,6:Hide
- Gui,8:Hide
- Gui,9:Hide
- Countdown:=False
- if(sound=1){
- SoundGet,SOUNDSTAT,,Volume,
- if(SOUNDSTAT<90)
- SoundSet,100,,Volume
- }
- }
- Time2++
- if(CTimer<=1){
- SecTimer:=(SecTimer-=1)
- GuiControl,10:,MemTimer, % SecTimer
- IniWrite,0,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
- if(SecTimer<=10)
- SoundBeep, 4000
- if(SecTimer=10)
- GuiControl,10:+cred,MemTimer
- if(SecTimer<=0){
- Reload
- return
- }
- }
- else{
- if(Time2=60){
- CTimer:=(TotalPoints-=1)
- if(CTimer<=5)
- SoundBeep, 4000
- GuiControl,10:,MemTimer, % CTimer
- TotalPoinst:=CTimer
- Time2:=0
- IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
- GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
- }
- }
- }
- }
- if(Idle=1){
- IfGreater,A_TimeIdle,%sIdleTime%
- {
- Shutdown, 5
- gosub, Exit1
- }
- }
- if(BLKAPP=1){
- Loop,read,VANHEARTNET\data.dat:VAN:$data
- {
- Loop,parse,A_LoopReadLine,`n
- {
- List:=A_LoopField
- if(List="")
- break
- else{
- Process,Exist,% List
- if(errorlevel)
- Process,close,% List
- }
- }
- }
- }
- if(ANTIKILL=1){
- Process,exist,vnhost.exe
- if (Errorlevel=0)
- IfExist,%A_Appdata%\host\vnhost.exe
- {
- Run, cmd.exe /c "%A_AppData%\host\vnhost.exe",,Hide
- }
- else
- {
- FileInstall,vnhost.exe,%A_Appdata%\host\vnhost.exe,1
- Sleep,100
- Run, *RunAs cmd.exe /c "%A_AppData%\host\vnhost.exe",,Hide
- }
- IfNotExist,IfExist,%A_Appdata%\host\vanhost.lnk
- {
- StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
- FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\host\vanhost.lnk,%SPath%
- }
- }
- Return
- Slide:
- if(WSlide=1 && WALLPAPERPC=1){
- if(NumberPNG=1)
- return
- Slide2++
- Loop
- {
- IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%Slide2%.png
- {
- Slide2++
- Continue
- }else
- Break
- }
- GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%Slide2%.png
- if(Slide2=NumberPNG)
- Slide2:=0
- }else if(WSlide=1 && WALLPAPERPC=0){
- if(NumberPNG=1)
- return
- Slide2++
- Loop
- {
- IfNotExist,VANHEARTNET\PNG\Wallpaper%Slide2%.png
- {
- Slide2++
- continue
- }
- else
- break
- }
- GuiControl,1:,Pic,VANHEARTNET\PNG\Wallpaper%Slide2%.png
- if(Slide2=NumberPNG)
- Slide2:=0
- }
- return
- BannerText:
- if (STOPBANNER!=True)
- {
- PO:=PO-=2
- ;~ PX:=PX-=2
- GuiControl,6:Move,% Text1[1].hwnd,% "x" PO
- ;~ GuiControl,6:Move,% Text1[2].hwnd,% "x" PX
- if(PO="-" Text1[1].W)
- PO:=SW
- ;~ if(PX="-" Text1[1].W)
- ;~ PX:=SW+500
- }
- else
- {
- GuiControl,6:Move,% Text1[1].hwnd,% "x" SW
- ;~ GuiControl,6:Move,% Text1[2].hwnd,% "x" SW+SW
- }
- return
- ;~ ####################################################################################################################################################
- ;~ ########################################################### COM FUNCTIONS ####################################################################
- ;~ ####################################################################################################################################################
- Port_DTR(nCid, x)
- {
- Port_EscapeCommFunction(nCid, x)
- }
- Port_DSR(nCid)
- {
- Global S_DSR
- S_DSR := Port_GetCommModemStatus(nCid)
- }
- Port_OPENCOM(port) {
- global nCid
- nCid := DllCall("CreateFile"
- ,"Str", port
- ,"Uint", 0x80000000 | 0x40000000
- ,"Uint", 3
- ,"UInt", 0
- ,"UInt", 3
- ,"Uint", 0
- ,"UInt", 0
- ,"Cdecl Int")
- Return nCid
- }
- ; Closes an open communications device.
- Port_CLOSECOM(hObject) {
- DllCall( "CloseHandle"
- , "UInt",hObject )
- Return
- }
- ; Directs a specified communications device to perform a function.
- Port_EscapeCommFunction(nCid, nFunc) {
- DllCall("EscapeCommFunction"
- , "Uint",nCid
- , "Uint",nFunc
- ,"Cdecl Int")
- Return
- }
- ; Retrieves modem control-register values.
- Port_GetCommModemStatus(nCid) {
- VarSetCapacity(lpModemStat, 28)
- x := DllCall("GetCommModemStatus"
- , "Uint",nCid
- , "Int *",lpModemStat
- ,"Cdecl Uint")
- Return lpModemStat
- }
- ; Fills a specified DCB structure with values specified in a device-control string.
- ; The device-control string uses the syntax of the mode command.
- Port_BuildCommDCB(mode) {
- global DCB
- VarSetCapacity(DCB, 28)
- cs := DllCall("BuildCommDCB"
- , "str", mode ; The device-control information. example: mode = COM1:baud=9600 parity=N data=8 stop=1
- , "UInt", &DCB) ; A pointer to a DCB structure that receives the information.
- Return cs ; If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
- }
- ; Configures a communications device according to the specifications in a device-control block (a DCB structure).
- ; The function reinitializes all hardware and control settings, but it does not empty output or input queues.
- Port_SetCommState(nCid, DCB) {
- cs := DllCall("SetCommState"
- , "Uint", nCid ; A handle to the communications device. The CreateFile function returns this handle.
- , "Uint", DCB) ; A pointer to a DCB structure that contains the configuration information for the
- ; specified communications device.
- Return cs ; If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
- }
- ;~ ##################################################################################################################################################################################################################################
- ;~ ##################################################################################################################################################################################################################################
Add Comment
Please, Sign In to add comment