vanheartnet

Autoshutdown vanhost FREE

Jan 2nd, 2021 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 121.26 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Host Process for Windows Services
  4. ;@Ahk2Exe-Set FileVersion, 1.2.2.1
  5. ;@Ahk2Exe-SetInternalName vanhost
  6. ;@Ahk2Exe-SetName vanhost
  7. ;@Ahk2Exe-SetOrigFileName vanhost
  8. ;@Ahk2Exe-Set ProductName, vanhost
  9. ;@Ahk2Exe-Set ProductVersion, 1.2.2.1
  10. ;@Ahk2Exe-Set Description, ADVANCE AUTOSHUTDOWN
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12. ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
  13. ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
  14. ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
  15. ;@Ahk2Exe-SetMainIcon icon.ico
  16. ;@Ahk2Exe-AddResource Icon.ico, 160 ; Replaces 'H on blue'
  17. ;@Ahk2Exe-AddResource Icon.ico, 206 ; Replaces 'S on green'
  18. ;@Ahk2Exe-AddResource Icon.ico, 207 ; Replaces 'H on red'
  19. ;@Ahk2Exe-AddResource Icon.ico, 208 ; Replaces 'S on red'
  20.  
  21.  
  22.  
  23.  
  24. #SingleInstance,Force
  25. #Persistent
  26. #NoEnv
  27. ;~ #NoTrayIcon
  28. Menu,tray, NoStandard
  29. Menu, Tray, Tip, Cointed
  30. Menu, Tray, Add, Login
  31. SetWorkingDir, %A_ScriptDir%
  32. SetBatchLines, -1
  33. #MaxHotkeysPerInterval 99000000
  34. #HotkeyInterval 99000000
  35. #KeyHistory 0
  36. ListLines Off
  37. Process, Priority, , A
  38. SetKeyDelay, -1, -1
  39. SetMouseDelay, -1
  40. SetDefaultMouseSpeed, 0
  41. SetWinDelay, -1
  42. SetControlDelay, -1
  43. DetectHiddenWindows, On
  44. SetTitleMatchMode, 3
  45. SendMode Input
  46. #Include <Class_CustomFont>
  47. #Include <Gdip_All>
  48. #Include <GdipHelper>
  49. if not A_IsAdmin
  50. {
  51. Run, *RunAs "%A_ScriptFullpath%"
  52. ExitApp
  53. }
  54. pToken:=Gdip_Startup()
  55. User1=VANHEARTNET
  56. global Window1:=[],Button1:=[],Switch1:=[],Text1:=[],HB_Button:=[],HB_Button1:=[]
  57. SH:=A_ScreenHeight
  58. SW:=A_ScreenWidth
  59. PCNUM:= A_ComputerName
  60. Files=
  61. (
  62. [SETTINGS]
  63. USERNAME=admin
  64. PASSWORD=admin
  65. FORCELOCK=0
  66. SOUND=0
  67. TIMER=300
  68. COUNTDOWNSPEED=1000
  69. IDLE=0
  70. IDLETIME=60
  71. CN=COM1
  72. WALLPAPER=0
  73. WALLPAPERSLIDE=0
  74. WALLPAPERPC=0
  75. WPSLIDESPEED=5000
  76. ANTIENDTASK=0
  77. ANNOUNCEMENT=0
  78. BANNER=0
  79. STARTUP=0
  80. BLKAPP=0
  81. ANTIKILL=0
  82. NOWINKEY=0
  83. POINTSYSTEM=0
  84. ADDPOINTS=10
  85. REQMINUTES=10
  86. BONUSPOINTS=0
  87. BONUSTIME=0
  88. SECPERPOINTS=60
  89. AUTOBACKUP=0
  90. REQUSEPOINTS=10
  91. AUTOBACKUPPATH=VANHEARTNET\data\backup
  92. SERVERPATH=Auto
  93. SERVERPATHFULL=NONE
  94. REWARD=0
  95. )
  96. IfNotExist,%A_Appdata%\Fonts
  97. FileCreateDir,%A_Appdata%\Fonts
  98. IfNotExist,%A_Appdata%\Fonts\Pixel LCD-7.ttf
  99. FileInstall,Pixel LCD-7.ttf,%A_Appdata%\Fonts\Pixel LCD-7.ttf,1
  100. IfNotExist,%A_Appdata%\Fonts\FivoSansModern-ExtBlack-Oblique.otf
  101. FileInstall,FivoSansModern-ExtBlack-Oblique.otf,%A_Appdata%\Fonts\FivoSansModern-ExtBlack-Oblique.otf,1
  102. IfNotExist,%A_Appdata%\Fonts\Money Honey.ttf
  103. FileInstall,Money Honey.ttf,%A_Appdata%\Fonts\Money Honey.ttf
  104. IfNotExist,%A_Appdata%\Fonts\Sectar.otf
  105. FileInstall,Sectar.otf,%A_Appdata%\Fonts\Sectar.otf
  106. IfNotExist,%A_Appdata%\Fonts\EraoxDemo.ttf
  107. FileInstall,EraoxDemo.ttf,%A_Appdata%\Fonts\EraoxDemo.ttf
  108. IfNotExist,%A_Appdata%\Fonts\Multicolore Pro.otf
  109. FileInstall,Multicolore Pro.otf,%A_Appdata%\Fonts\Multicolore Pro.otf
  110. IfNotExist,%A_Appdata%\Fonts\Antapani-ExtraBold.otf
  111. FileInstall,Antapani-ExtraBold.otf,%A_Appdata%\Fonts\Antapani-ExtraBold.otf
  112.  
  113. font1 := New CustomFont( A_AppData "\Fonts\Pixel LCD-7.ttf")
  114. font2 := New CustomFont( A_AppData "\Fonts\Money Honey.ttf") ;( A_Temp "\Pixel LCD-7.ttf")
  115. Font3 := New CustomFont( A_AppData "\Fonts\FivoSansModern-ExtBlack-Oblique.otf")
  116. Font4 := New CustomFont( A_AppData "\Fonts\Sectar.otf")
  117. Font5 := New CustomFont( A_AppData "\Fonts\EraoxDemo.ttf")
  118. Font6 := New CustomFont( A_AppData "\Fonts\Multicolore Pro.otf")
  119. Font7 := New CustomFont( A_AppData "\Fonts\Antapani-ExtraBold.otf")
  120. ;~ ##################################################################################################################
  121. ;~ ####################################### MAIN #########################################################
  122. ;~ ##################################################################################################################
  123. IfNotExist,VANHEARTNET
  124. {
  125. FileCreateDir,VANHEARTNET
  126. FileCreateDir,VANHEARTNET\data
  127. FileCreateDir,VANHEARTNET\data\Backup
  128. FileCreateDir,VANHEARTNET\PNG
  129. FileCreateDir,VANHEARTNET\PNG\USERS
  130. FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
  131. FileAppend,% Files,VANHEARTNET\Config.ini:VAN:$data
  132. FileAppend,,VANHEARTNET\data.dat:VAN:$data
  133. FileAppend,VANHEARTNET,VANHEARTNET\data1.dat:VAN:$data
  134. }
  135. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%
  136. FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
  137.  
  138. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  139. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@ COM CHECK @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  140. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  141. IniRead,CN,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
  142. CN:="COM" CN
  143. mode = %CN%:baud=9600 parity=N data=8 stop=1 dtr=Off
  144. Port_BuildCommDCB(mode)
  145. Port_OPENCOM(CN)
  146. Port_SetCommState(nCid, &DCB)
  147. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  148. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@ GUI @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  149. ;~ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
  150. Slide2:=1
  151. Gui,1:Color,222222,333333
  152.  
  153. Window1[1]:=New Window_1( x:=0, y:=0, w:=SW, h:=SH, Window:=1, Option:="-DPIScale +AlwaysOntop +Toolwindow -Caption +E0x10", Title:="Coin Detector")
  154. ;~ ######################################################################################
  155. ;~ ############################# READ FILES #####################################
  156. ;~ ######################################################################################
  157. IniRead,sound,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
  158. IniRead,WP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
  159. IniRead,TIMER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
  160. IniRead,WSlide,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  161. IniRead,WALLPAPERPC,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  162. IniRead,ANTIEND,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
  163. IniRead,COUNTDOWNSPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,COUNTDOWNSPEED
  164. IniRead,FORCELOCK,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  165. IniRead,ANNOUNCEMENT,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
  166. IniRead,BANNER,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
  167. IniRead,STARTUP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,STARTUP
  168. IniRead,BLKAPP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
  169. IniRead,WPSLIDESPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WPSLIDESPEED
  170. IniRead,ANTIKILL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
  171. IniRead,NOWINKEY,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
  172. FileRead,BannerText,VANHEARTNET\data1.dat:VAN:$data
  173. IniRead,SERVERPATHFULL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SERVERPATHFULL
  174. IniRead,POINTSYSTEM,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,POINTSYSTEM
  175. If(POINTSYSTEM=1){
  176. IniRead,SECPERPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SECPERPOINTS
  177. IniRead,ADDPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ADDPOINTS
  178. IniRead,REQUSEPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REQUSEPOINTS
  179. IniRead,BONUSPOINTS,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSPOINTS
  180. IniRead,BONUSTIME,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BONUSTIME
  181. IniRead,REWARD,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,REWARD
  182. BONUSTIME:=(BONUSTIME*=60)
  183. SECPERPOINTS:=(SECPERPOINTS*=60)
  184. }
  185. StringReplace,SERVERPATHFULL2,SERVERPATHFULL,Member,Rewards,All
  186. StringReplace,SERVERPATHFULL3,SERVERPATHFULL,Member,Users,All
  187. ;~ ######################################################################################
  188. FileInstall,Profilepic.png,%A_Temp%\Profilepic.png,1
  189. FileSetAttrib,+H,%A_Temp%\Profilepic.png
  190. ;~ ######################################################################################
  191. if (ANTIKILL=1){
  192. IfNotExist,%A_Appdata%\host
  193. FileCreateDir,%A_Appdata%\host
  194. FileInstall,vnhost.exe,%A_Appdata%\host\vnhost.exe,1
  195. StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
  196. FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\host\vanhost.lnk,%SPath%
  197. }else{
  198. IfExist,%A_Appdata%\host
  199. FileRemoveDir,%A_Appdata%\host,1
  200. }
  201. if(BANNER=1){
  202. Gui,8:Color,808080
  203. 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)
  204. Window1[8].Draw_BANNER2()
  205.  
  206. }
  207. iTimer:=Timer
  208. if (WP=1){
  209. IfNotExist,VANHEARTNET\PNG\Wallpaper1.png
  210. FileInstall,Wallpaper1.png,VANHEARTNET\PNG\Wallpaper1.png
  211. IfExist,VANHEARTNET\PNG\Wallpaper1.png
  212. {
  213. If (WSlide=1 && WALLPAPERPC=1){
  214. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  215. AA:=A_LoopFileName
  216. if(AA!=""){
  217. PNGFiles:=0
  218. Loop
  219. {
  220. PNGFiles++
  221. IfExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%PNGFiles%.png
  222. {
  223. Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%PNGFiles%.png
  224. Break
  225. }else
  226. Continue
  227. }
  228. }
  229. }
  230. else if(WALLPAPERPC=1 && WSlide=0)
  231. Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png
  232. else
  233. Gui,1:Add,Picture,% "x" 15 " y" 15 " w" SW-30 " h" SH-28 " vPic",VANHEARTNET\PNG\Wallpaper1.png
  234. 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)
  235. Window1[4].Draw_Logo()
  236. Gui,4:Color,222222,333333
  237. Gui,4:Add,Groupbox,x3 y0 w194 h40,
  238. Gui,4:Font,
  239. Gui,4:Font,s28 cLime, Pixel LCD7
  240. Gui,4:Add,Text,x3 y6 w200 Center BackgroundTrans vtimer1, % TIMER
  241. 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" )
  242. }
  243. }else{
  244. 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)
  245. Window1[4].Draw_Logo()
  246. Gui,4:Color,222222,333333
  247. Gui,4:Add,Groupbox,x3 y0 w194 h40,
  248. Gui,4:Font,
  249. Gui,4:Font,s28 cLime, Pixel LCD7
  250. Gui,4:Add,Text,x3 y6 w200 Center BackgroundTrans vtimer1, % TIMER
  251. 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" )
  252. }
  253. if (ANNOUNCEMENT=1){
  254. 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)
  255. Window1[6].Draw_BANNER1()
  256. ;~ 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")
  257. 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")
  258. ;~ 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")
  259.  
  260. Gui,6:Color,222222,333333
  261. PO:=Text1[1].x
  262. ;~ PX:=Text1[2].x
  263. Gui,6:Font,
  264. Gui,6:Font,cAqua Bold
  265. Gui,6:Add,Edit,% "x" 20 " y" 15 " w" SW-320 " h" 25 " Hidden Border vEditBanner",
  266. SetTimer,BannerText,50
  267. }
  268. IniRead,Idle,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  269. if(Idle=1){
  270. IniRead,IdleTime,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
  271. sIdleTime:=(IdleTime*=60000)
  272. }
  273. if(WSlide=1 && WALLPAPERPC=1){
  274. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%
  275. {
  276. FileCreateDir,VANHEARTNET\PNG\USERS\%A_ComputerName%
  277. FileInstall,Wallpaper1.png,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png,1
  278. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  279. NumberPNG:=A_Index
  280. }else{
  281. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png
  282. FileInstall,Wallpaper1.png,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper1.png,1
  283. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  284. NumberPNG:=A_Index
  285. }
  286. }
  287. else if(WSlide=1){
  288. Loop,VANHEARTNET\PNG\*.png,1
  289. NumberPNG:=A_Index
  290. }
  291. if(A_Is64bitOS){
  292. SetRegView, 64
  293. RegRead,OST,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\SystemMenu,OStype
  294. if (OST="" || "ERROR")
  295. RegWrite,REG_SZ,HKEY_LOCAL_MACHINE,SOFTWARE\Microsoft\Windows\CurrentVersion\SystemMenu,OStype,%A_Now%
  296. }else{
  297. RegRead,OST,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SystemMenu,OStype
  298. if (OST="" || "ERROR")
  299. RegWrite,REG_SZ,HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\SystemMenu,OStype,%A_Now%
  300. }
  301. SetTimer,Timer, % COUNTDOWNSPEED
  302. if(WSlide=1)
  303. SetTimer,Slide,% WPSLIDESPEED
  304. Return
  305. ;~ #################################################################################################################################################################################################################################################
  306. Class Text_1{
  307. __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"){
  308. 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()
  309. sleep 20
  310. This.Draw_Text()
  311. }
  312. Adding_Control(){
  313. static
  314. ;~ num := Text1.Length()+1
  315. Gui , % This.Window " : Add" , Text , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" This.Var " 0xE"
  316. This.Number := Num , This.Hwnd := Hwnd
  317. }
  318. Create_Text(){
  319. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  320. G := Gdip_GraphicsFromImage( pBitmap )
  321. Gdip_SetSmoothingMode( G , 4 )
  322. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  323. Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x-2 y0" , "Segoe UI" , This.W , This.H )
  324. Gdip_DeleteBrush( Brush )
  325. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  326. Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x0 y2" , "Segoe UI" , This.W , This.H )
  327. Gdip_DeleteBrush( Brush )
  328. if(This.State=1)
  329. Brush := Gdip_BrushCreateHatch( "0xFF000000" , This.Font_Color , 38 )
  330. else
  331. Brush := Gdip_BrushCreateSolid( This.Font_Color )
  332. Gdip_TextToGraphics( G , This.Text , "s30 Left vCenter Bold c" Brush " x0 y0" , "Segoe UI" , This.W , This.H )
  333. Gdip_DeleteBrush( Brush )
  334. Gdip_DeleteGraphics( G )
  335. This.Draw_Text_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  336. Gdip_DisposeImage(pBitmap)
  337. }
  338. Draw_Text(){
  339. SetImage( This.Hwnd , This.Draw_Text_Bitmap )
  340. }
  341. }
  342. Class Switch_1{
  343. __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"){
  344. 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
  345. (This.State=0)?(This.Draw_Bitmap_OFF()):(This.State=1)?(This.Draw_Bitmap_ON()):(This.Draw_Bitmap_DISABLED())
  346. }
  347. Adding_Control(){
  348. static
  349. num := Switch1.Length()+1
  350. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  351. This.Number := Num , This.Hwnd := Hwnd
  352. }
  353. Create_Switch_OFF(){
  354. pBitmap:=Gdip_CreateBitmap( 50 , 20 )
  355. G := Gdip_GraphicsFromImage( pBitmap )
  356. Gdip_SetSmoothingMode( G , 2 )
  357. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  358. Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
  359. Gdip_DeleteBrush( Brush )
  360. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  361. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
  362. Gdip_DeleteBrush( Brush )
  363. Pen := Gdip_CreatePen( "0xFFFF0000" , 1 )
  364. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
  365. Gdip_DeletePen( Pen )
  366. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
  367. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 20 , 16 , 5 )
  368. Gdip_DeleteBrush( Brush )
  369. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  370. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 20 , 16 , 3 )
  371. Gdip_DeletePen( Pen )
  372. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  373. Gdip_TextToGraphics( G , "OFF" , "s10 Center vCenter Bold c" Brush " x11 y-4" , "Segoe UI" , 50 , 30 )
  374. Gdip_DeleteBrush( Brush )
  375. Gdip_DeleteGraphics( G )
  376. This.Draw_OFF_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  377. Gdip_DisposeImage(pBitmap)
  378. }
  379. Create_Switch_ON(){
  380. pBitmap:=Gdip_CreateBitmap( 50 , 20 )
  381. G := Gdip_GraphicsFromImage( pBitmap )
  382. Gdip_SetSmoothingMode( G , 2 )
  383. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  384. Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
  385. Gdip_DeleteBrush( Brush )
  386. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  387. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
  388. Gdip_DeleteBrush( Brush )
  389. Pen := Gdip_CreatePen( "0xFF00FF00" , 1 )
  390. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
  391. Gdip_DeletePen( Pen )
  392. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  393. Gdip_FillRoundedRectangle( G , Brush , 28 , 2 , 20 , 16 , 5 )
  394. Gdip_DeleteBrush( Brush )
  395. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 2 )
  396. Gdip_DrawRoundedRectangle( G , Pen , 28 , 2 , 20 , 16 , 3 )
  397. Gdip_DeletePen( Pen )
  398. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  399. Gdip_TextToGraphics( G , "ON" , "s10 Center vCenter Bold c" Brush " x-9 y-4" , "Segoe UI" , 50 , 30 )
  400. Gdip_DeleteBrush( Brush )
  401. Gdip_DeleteGraphics( G )
  402. This.Draw_ON_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  403. Gdip_DisposeImage(pBitmap)
  404. }
  405. Create_Switch_DISABLED(){
  406. pBitmap:=Gdip_CreateBitmap( 50 , 20 )
  407. G := Gdip_GraphicsFromImage( pBitmap )
  408. Gdip_SetSmoothingMode( G , 2 )
  409. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  410. Gdip_FillRectangle( G , Brush , -1 , -1 , 52 , 22 )
  411. Gdip_DeleteBrush( Brush )
  412. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  413. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , 48 , 18 , 5 )
  414. Gdip_DeleteBrush( Brush )
  415. Pen := Gdip_CreatePen( "0xFF888888" , 1 )
  416. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , 48 , 18 , 5 )
  417. Gdip_DeletePen( Pen )
  418. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  419. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , 20 , 16 , 5 )
  420. Gdip_DeleteBrush( Brush )
  421. Pen := Gdip_CreatePen( "0xFF888888" , 2 )
  422. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 20 , 16 , 3 )
  423. Gdip_DeletePen( Pen )
  424. Brush := Gdip_BrushCreateSolid( "0xFF888888" )
  425. Gdip_TextToGraphics( G , "OFF" , "s10 Center vCenter Bold c" Brush " x11 y-4" , "Segoe UI" , 50 , 30 )
  426. Gdip_DeleteBrush( Brush )
  427. Gdip_DeleteGraphics( G )
  428. This.Draw_DISABLED_Bitmap:= Gdip_CreateHBITMAPFromBitmap(pBitmap)
  429. Gdip_DisposeImage(pBitmap)
  430. }
  431. Draw_Bitmap_ON(){
  432. SetImage( This.Hwnd , This.Draw_ON_Bitmap )
  433. }
  434. Draw_Bitmap_OFF(){
  435. SetImage( This.Hwnd , This.Draw_OFF_Bitmap )
  436. }
  437. Draw_Bitmap_DISABLED(){
  438. SetImage( This.Hwnd , This.Draw_DISABLED_Bitmap )
  439. }
  440. }
  441. Class Window_1{
  442. __New( x:=10, y:=10, w:=602, h:=402, Window:=1, Option:="-DPIScale +AlwaysOntop -Caption +E0x10", Title:="Sample Window", PCNUM:="PCNUM"){
  443. 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()
  444. }
  445. Add_Window(){
  446. static
  447. Num:=Window1.Length()+1
  448. Gui, % This.Window " :" This.Option
  449. Gui, % This.Window ":Add" , Picture,% "x" This.X " y" This.Y " w" This.W " h" This.H " v" Num " hwndhwnd 0xE"
  450. This.Number := Num , This.Hwnd := Hwnd
  451. }
  452. Create_Window(){
  453. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;500,500
  454. G := Gdip_GraphicsFromImage( pBitmap )
  455. Gdip_SetSmoothingMode( G , 4 )
  456. Brush := Gdip_BrushCreateHatch( "0xFF000000" , "0xFF404040" , 39 )
  457. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W , This.H )
  458. Gdip_DeleteBrush( Brush )
  459. Brush := Gdip_BrushCreateHatch( "0xFF333333" , "0xFF000000" , 39 )
  460. Pen := Gdip_CreatePenFromBrush( Brush , 8 )
  461. Gdip_DeleteBrush( Brush )
  462. Gdip_DrawRectangle( G , Pen , This.X+2 , This.Y+2 , This.W-4 , This.H-4 )
  463. Gdip_DeletePen( Pen )
  464. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF404040" , 1 )
  465. Pen := Gdip_CreatePenFromBrush( Brush , 5 )
  466. Gdip_DeleteBrush( Brush )
  467. Gdip_DrawRectangle( G , Pen , This.X+10 , This.Y+10 , This.W-20 , This.H-20 )
  468. Gdip_DeletePen( Pen )
  469. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
  470. Gdip_FillRoundedRectangle( G , Brush , This.W-210 , This.H-50 , 190 , 30 , 5 )
  471. Gdip_DeleteBrush( Brush )
  472. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 50 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  473. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  474. Gdip_DeleteBrush( Brush )
  475. Gdip_DrawRoundedRectangle( G , Pen , This.W-210 , This.H-50 , 190 , 30 , 5 )
  476. Gdip_DeletePen( Pen )
  477. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  478. 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
  479. Gdip_DeleteBrush( Brush )
  480. This.Draw_1 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  481. Gdip_DisposeImage(pBitmap)
  482. }
  483. Create_Logo(){
  484. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ; 300, 80
  485. G := Gdip_GraphicsFromImage( pBitmap )
  486. Gdip_SetSmoothingMode( G , 4 )
  487. Brush := Gdip_CreateLineBrush( 20 , 20 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
  488. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 190 , 30 , 5 )
  489. Gdip_DeleteBrush( Brush )
  490. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 50 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  491. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  492. Gdip_DeleteBrush( Brush )
  493. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , 190 , 30 , 5 )
  494. Gdip_DeletePen( Pen )
  495. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  496. 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
  497. Gdip_DeleteBrush( Brush )
  498. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 50 , "0xFF000000" , "0xFFFFFFFF" , 1 , 1 )
  499. 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
  500. Gdip_DeleteBrush( Brush )
  501. This.Draw_4 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  502. Gdip_DisposeImage(pBitmap)
  503. }
  504. Create_Window2(){
  505. pBitmap:=Gdip_CreateBitmap( 400 , 150 )
  506. G := Gdip_GraphicsFromImage( pBitmap )
  507. Gdip_SetSmoothingMode( G , 4 )
  508. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  509. Gdip_FillRectangle( G , Brush , -1 , -1 , 402 , 152 )
  510. Gdip_DeleteBrush( Brush )
  511. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  512. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 399 , 149 , 8 )
  513. Gdip_DeleteBrush( Brush )
  514. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFC4136" , "0xFF733D59" , 1 )
  515. Pen := Gdip_CreatePenFromBrush( Brush , 5 )
  516. Gdip_DeleteBrush( Brush )
  517. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 396 , 146 , 8 )
  518. Gdip_DeletePen( Pen )
  519. This.Draw_2 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  520. Gdip_DisposeImage(pBitmap)
  521. }
  522. Create_Window3(){
  523. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;300 , 600
  524. G := Gdip_GraphicsFromImage( pBitmap )
  525. Gdip_SetSmoothingMode( G , 4 )
  526. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  527. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H , 10 )
  528. Gdip_DeleteBrush( Brush )
  529. Pen := Gdip_CreatePen( "0xFFFF0000" , 3 )
  530. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 10 )
  531. Gdip_DeletePen( Pen )
  532. Pen := Gdip_CreatePen( "0xFF000000" , 2 )
  533. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 10 )
  534. Gdip_DeletePen( Pen )
  535. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF333333" , "0xFF222222" , 1 )
  536. Gdip_FillRoundedRectangle( G , Brush , 20 , 10 , 260 , 30 , 6 )
  537. Gdip_DeleteBrush( Brush )
  538. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFF0000FF" , "0xFFFFFFFF" , 1 )
  539. Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  540. Gdip_DeleteBrush( Brush )
  541. Gdip_DrawRoundedRectangle( G , Pen , 20 , 10 , 260 , 30 , 5 )
  542. Gdip_DeletePen( Pen )
  543. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  544. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x19 y10" , "Segoe UI" , 260 , 30 )
  545. Gdip_DeleteBrush( Brush )
  546. Brush := Gdip_BrushCreateSolid( "0xFF00FF00" )
  547. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x18 y11" , "Segoe UI" , 260 , 30 )
  548. Gdip_DeleteBrush( Brush )
  549. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  550. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x21 y12" , "Segoe UI" , 260 , 30 )
  551. Gdip_DeleteBrush( Brush )
  552. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFFFF00" , "0xFF404040" , 1 , 1 )
  553. Gdip_TextToGraphics( G , "S E T T I N G S" , "s16 Center vCenter Bold c" Brush " x20 y11" , "Segoe UI" , 260 , 30 )
  554. Gdip_DeleteBrush( Brush )
  555. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  556. Gdip_FillRoundedRectangle( G , Brush , 10 , 62 , 278 , This.H-70 , 3 )
  557. Gdip_DeleteBrush( Brush )
  558. Pen := Gdip_CreatePen( "0xFF888888" , 3 )
  559. Gdip_DrawRoundedRectangle( G , Pen , 10 , 62 , 278 , This.H-70 , 2 )
  560. Gdip_DeletePen( Pen )
  561. This.Draw_3 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  562. Gdip_DisposeImage(pBitmap)
  563. }
  564. Create_Admin(){
  565. pBitmap:=Gdip_CreateBitmap( 400 , 220 )
  566. G := Gdip_GraphicsFromImage( pBitmap )
  567. Gdip_SetSmoothingMode( G , 4 )
  568. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  569. Gdip_FillRectangle( G , Brush , -1 , -1 , 402 , 222 )
  570. Gdip_DeleteBrush( Brush )
  571. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  572. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , 399 , 219 , 8 )
  573. Gdip_DeleteBrush( Brush )
  574. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFC4136" , "0xFF733D59" , 1 )
  575. Pen := Gdip_CreatePenFromBrush( Brush , 5 )
  576. Gdip_DeleteBrush( Brush )
  577. Gdip_DrawRoundedRectangle( G , Pen , 2 , 2 , 396 , 216 , 8 )
  578. Gdip_DeletePen( Pen )
  579. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  580. Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x9 y69" , "Segoe UI" , 130 , 50 )
  581. Gdip_DeleteBrush( Brush )
  582. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  583. Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x4 y65" , "Segoe UI" , 130 , 50 )
  584. Gdip_DeleteBrush( Brush )
  585. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  586. Gdip_TextToGraphics( G , "OLD PASS" , "S16 Right vCenter Bold c" Brush " x7 y67" , "Segoe UI" , 130 , 50 )
  587. Gdip_DeleteBrush( Brush )
  588. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  589. Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x4 y95" , "Segoe UI" , 130 , 50 )
  590. Gdip_DeleteBrush( Brush )
  591. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  592. Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x8 y100" , "Segoe UI" , 130 , 50 )
  593. Gdip_DeleteBrush( Brush )
  594. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  595. Gdip_TextToGraphics( G , "NEW PASS" , "S16 Right vCenter Bold c" Brush " x7 y97" , "Segoe UI" , 130 , 50 )
  596. Gdip_DeleteBrush( Brush )
  597. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  598. Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x4 y124" , "Segoe UI" , 130 , 50 )
  599. Gdip_DeleteBrush( Brush )
  600. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  601. Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x8 y129" , "Segoe UI" , 130 , 50 )
  602. Gdip_DeleteBrush( Brush )
  603. Brush := Gdip_BrushCreateSolid( "0xFFff0000" )
  604. Gdip_TextToGraphics( G , "CONFIRM PASS" , "S16 Right vCenter Bold c" Brush " x7 y126" , "Segoe UI" , 130 , 50 )
  605. Gdip_DeleteBrush( Brush )
  606. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  607. Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x5 y7" , "Segoe UI" , 130 , 50 )
  608. Gdip_DeleteBrush( Brush )
  609. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  610. Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x8 y11" , "Segoe UI" , 130 , 50 )
  611. Gdip_DeleteBrush( Brush )
  612. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  613. Gdip_TextToGraphics( G , "OLD USER" , "S16 Right vCenter Bold c" Brush " x7 y8" , "Segoe UI" , 130 , 50 )
  614. Gdip_DeleteBrush( Brush )
  615. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  616. Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x4 y36" , "Segoe UI" , 130 , 50 )
  617. Gdip_DeleteBrush( Brush )
  618. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  619. Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x8 y41" , "Segoe UI" , 130 , 50 )
  620. Gdip_DeleteBrush( Brush )
  621. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  622. Gdip_TextToGraphics( G , "NEW USER" , "S16 Right vCenter Bold c" Brush " x7 y38" , "Segoe UI" , 130 , 50 )
  623. Gdip_DeleteBrush( Brush )
  624. Gdip_DeleteGraphics( G )
  625. This.Draw_5 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  626. Gdip_DisposeImage(pBitmap)
  627. }
  628. Create_Banner1(){
  629. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  630. G := Gdip_GraphicsFromImage( pBitmap )
  631. Gdip_SetSmoothingMode( G , 4 )
  632. Brush := Gdip_CreateLineBrushFromRect( 0 , 120 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
  633. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  634. Gdip_DeleteBrush( Brush )
  635. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  636. Gdip_FillRectangle( G , Brush , -1 , 5 , This.W-13 , This.H-10 )
  637. Gdip_DeleteBrush( Brush )
  638. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
  639. Pen := Gdip_CreatePenFromBrush( Brush , 1 )
  640. Gdip_DeleteBrush( Brush )
  641. Gdip_DrawRectangle( G , Pen , -1 , 5 , This.W-13 , This.H-10 )
  642. Gdip_DeletePen( Pen )
  643. This.Draw_6 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  644. Gdip_DisposeImage(pBitmap)
  645. }
  646. Create_BANNER2(){
  647. pBitmap:=Gdip_CreateBitmap( 300 , 250 )
  648. G := Gdip_GraphicsFromImage( pBitmap )
  649. Gdip_SetSmoothingMode( G , 4 )
  650. Brush := Gdip_BrushCreateSolid( "0xFF333333" )
  651. Gdip_FillRectangle( G , Brush , 15 , 8 , 270 , 230 )
  652. Gdip_DeleteBrush( Brush )
  653. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  654. Gdip_FillRectangle( G , Brush , 25 , 20 , 251 , 200 )
  655. Gdip_DeleteBrush( Brush )
  656. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFFFFFF" , "0xFF00FF00" , 1 )
  657. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  658. Gdip_DeleteBrush( Brush )
  659. Gdip_DrawRectangle( G , Pen , 25 , 20 , 251 , 200 )
  660. Gdip_DeletePen( Pen )
  661. Brush := Gdip_CreateLineBrush( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 )
  662. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  663. Gdip_DeleteBrush( Brush )
  664. Gdip_DrawRectangle( G , Pen , 15 , 8 , 270 , 228 )
  665. Gdip_DeletePen( Pen )
  666. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  667. Gdip_TextToGraphics( G , This.PCNUM , "s90 Center vCenter Bold Underline c" Brush " x1 y65" , "Segoe UI" , 300 , 50 )
  668. Gdip_DeleteBrush( Brush )
  669. Brush := Gdip_CreateLineBrushFromRect( 139 , 91 , 100 , 100 , "0xFFFF0000" , "0xFF00FF00" , 1 , 1 )
  670. Gdip_TextToGraphics( G , This.PCNUM , "s90 Center vCenter Bold c" Brush " x1 y55" , "Segoe UI" , 300 , 50 )
  671. Gdip_DeleteBrush( Brush )
  672. Brush := Gdip_BrushCreateSolid( "0xFF666666" )
  673. Gdip_TextToGraphics( G , "SHUTTING DOWN IN..." , "s20 Center vCenter Bold c" Brush " x0 y162" , "Segoe UI" , 300 , 50 )
  674. Gdip_DeleteBrush( Brush )
  675. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  676. Gdip_TextToGraphics( G , "SHUTTING DOWN IN..." , "s20 Center vCenter Bold c" Brush " x2 y160" , "Segoe UI" , 300 , 50 )
  677. Gdip_DeleteBrush( Brush )
  678. Gdip_DeleteGraphics( G )
  679. This.Draw_7 := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  680. Gdip_DisposeImage(pBitmap)
  681. }
  682. Draw_Window1(){
  683. SetImage( This.Hwnd , This.Draw_1 )
  684. }
  685. Draw_Window2(){
  686. SetImage( This.Hwnd , This.Draw_2 )
  687. }
  688. Draw_Window3(){
  689. SetImage( This.Hwnd , This.Draw_3 )
  690. }
  691. Draw_Logo(){
  692. SetImage( This.Hwnd , This.Draw_4 )
  693. }
  694. Draw_Admin(){
  695. SetImage( This.Hwnd , This.Draw_5 )
  696. }
  697. Draw_BANNER1(){
  698. SetImage( This.Hwnd , This.Draw_6 )
  699. }
  700. Draw_BANNER2(){
  701. SetImage( This.Hwnd , This.Draw_7 )
  702. }
  703. }
  704. Class Button_1{
  705. __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"){
  706. 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()
  707. }
  708. Adding_Control(){
  709. Global
  710. num := Button1.Length()+1
  711. Gui , % This.Window " : Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  712. This.Number := Num , This.Hwnd := Hwnd
  713. }
  714. Create_Button_Default(){
  715. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
  716. G := Gdip_GraphicsFromImage( pBitmap )
  717. Gdip_SetSmoothingMode( G , 4 )
  718. Brush := Gdip_BrushCreateSolid( This.Background )
  719. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  720. Gdip_DeleteBrush( Brush )
  721. Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
  722. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.W-2 , This.H-2 , 8 )
  723. Gdip_DeleteBrush( Brush )
  724. Brush := Gdip_CreateLineBrush( 201 , 8 , 100 , 100 , "0xFF9AA9B5" , "0xFFFF0000" , 1 )
  725. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  726. Gdip_DeleteBrush( Brush )
  727. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-2 , This.H-3 , 8 )
  728. Gdip_DeletePen( Pen )
  729. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFF404040" , "0xFFFFFFFF" , 1 , 1 )
  730. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-4 , 8 )
  731. Gdip_DeleteBrush( Brush )
  732. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  733. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x-1 y2" , "Segoe UI" , This.W, This.H )
  734. Gdip_DeleteBrush( Brush )
  735. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  736. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , This.W, This.H )
  737. Gdip_DeleteBrush( Brush )
  738. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  739. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x2 y0" , "Segoe UI" , This.W, This.H )
  740. Gdip_DeleteBrush( Brush )
  741. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  742. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x0 y0" , "Segoe UI" , This.W, This.H )
  743. Gdip_DeleteBrush( Brush )
  744. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  745. Gdip_DisposeImage(pBitmap)
  746. }
  747. Create_Button_Hover(){
  748. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
  749. G := Gdip_GraphicsFromImage( pBitmap )
  750. Gdip_SetSmoothingMode( G , 4 )
  751. Brush := Gdip_BrushCreateSolid( This.Background )
  752. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  753. Gdip_DeleteBrush( Brush )
  754. Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
  755. Gdip_FillRoundedRectangle( G , Brush , 1 , 1 , This.W-2 , This.H-2 , 8 )
  756. Gdip_DeleteBrush( Brush )
  757. Pen := Gdip_CreatePen( "0xFFF8F7F6" , 3 )
  758. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-2 , This.H-3 , 8 )
  759. Gdip_DeletePen( Pen )
  760. Brush := Gdip_BrushCreateSolid( "0xFF404040" )
  761. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4, This.H-4 , 8 )
  762. Gdip_DeleteBrush( Brush )
  763. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  764. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x-1 y2" , "Segoe UI" , This.W, This.H )
  765. Gdip_DeleteBrush( Brush )
  766. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  767. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x1 y2" , "Segoe UI" , This.W, This.H )
  768. Gdip_DeleteBrush( Brush )
  769. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  770. Gdip_TextToGraphics( G , This.Text , "s" This.Fontsize " Center vCenter Bold c" Brush " x2 y0" , "Segoe UI" , This.W, This.H )
  771. Gdip_DeleteBrush( Brush )
  772. Gdip_DeleteGraphics( G )
  773. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  774. Gdip_DisposeImage(pBitmap)
  775. }
  776. Create_Button_Pressed(){
  777. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;150 , 40
  778. G := Gdip_GraphicsFromImage( pBitmap )
  779. Gdip_SetSmoothingMode( G , 4 )
  780. Brush := Gdip_BrushCreateSolid( This.Background )
  781. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  782. Gdip_DeleteBrush( Brush )
  783. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , 100 , 100 , "0xFFFF0000" , "0xFF000000" , 1 , 1 )
  784. Pen := Gdip_CreatePenFromBrush( Brush , 3 )
  785. Gdip_DeleteBrush( Brush )
  786. Gdip_DrawRoundedRectangle( G , Pen , 1 , 1 , This.W-3 , This.H-3 , 8 )
  787. Gdip_DeletePen( Pen )
  788. Brush := Gdip_BrushCreateSolid( "0xFFC4E2FC" )
  789. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-5 , This.H-5 , 8 )
  790. Gdip_DeleteBrush( Brush )
  791. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  792. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x-1 y3" , "Segoe UI" , This.W, This.H )
  793. Gdip_DeleteBrush( Brush )
  794. Brush := Gdip_BrushCreateSolid( "0xFF000000" )
  795. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x1 y3" , "Segoe UI" , This.W, This.H )
  796. Gdip_DeleteBrush( Brush )
  797. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  798. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x2 y1" , "Segoe UI" , This.W, This.H )
  799. Gdip_DeleteBrush( Brush )
  800. Brush := Gdip_BrushCreateSolid( "0xFFFF0000" )
  801. Gdip_TextToGraphics( G , This.Text , "s16 Center vCenter Bold c" Brush " x0 y1" , "Segoe UI" , This.W, This.H )
  802. Gdip_DeleteBrush( Brush )
  803. Gdip_DeleteGraphics( G )
  804. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  805. Gdip_DisposeImage(pBitmap)
  806. }
  807. Draw_Button_Default(){
  808. SetImage( This.Hwnd , This.Default_Bitmap )
  809. }
  810. Draw_Button_Hover(){
  811. SetImage( This.Hwnd , This.Hover_Bitmap )
  812. }
  813. Draw_Button_Pressed(){
  814. SetImage( This.Hwnd , This.Pressed_Bitmap )
  815. SetTimer , Hover , Off
  816. While( GetKeyState( "LButton" ) )
  817. sleep , 10
  818. SetTimer , Hover , On
  819. MouseGetPos,,,, ctrl , 2
  820. if( This.Hwnd != ctrl ){
  821. This.Draw_Button_Default()
  822. return False
  823. }else {
  824. This.Draw_Button_Hover()
  825. return true
  826. }
  827. }
  828. }
  829. class HB_Plain_Rounded_Button_Type_1 {
  830. __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 := "" ){
  831. 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()
  832. }
  833. Create_Trigger(){
  834. static
  835. num := HB_Button.Length() + 1
  836. 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"
  837. This.Number := Num , This.Hwnd := Hwnd_%num%
  838. }
  839. Create_Default_Bitmap(){
  840. pBitmap:=Gdip_CreateBitmap( This.W, This.H )
  841. G := Gdip_GraphicsFromImage( pBitmap )
  842. Gdip_SetSmoothingMode( G , 2 )
  843. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  844. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  845. Gdip_DeleteBrush( Brush )
  846. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  847. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-3 , 16 )
  848. Gdip_DeleteBrush( Brush )
  849. Brush := Gdip_CreateLineBrushFromRect( 2 , -1 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
  850. Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
  851. Gdip_DeleteBrush( Brush )
  852. if(This.Button_Color="0xFF000000"||This.Button_Color="0xFF111111")
  853. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , "0xFF333333" , This.Button_Color , 1 , 1 )
  854. else
  855. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , This.Button_Color , "0xFF333333" , 1 , 1 )
  856. Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
  857. Gdip_DeleteBrush( Brush )
  858. Brush := Gdip_BrushCreateSolid( "0x22F0F0F0" )
  859. Gdip_FillEllipse( G , Brush , This.W/15 , This.H/13 , This.W-(This.W/15*2) , This.H*0.45 )
  860. Gdip_DeleteBrush( Brush )
  861. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  862. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-1" , This.Font , This.W , This.H )
  863. Gdip_DeleteBrush( Brush )
  864. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  865. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y0" , This.Font , This.W , This.H )
  866. Gdip_DeleteBrush( Brush )
  867. Gdip_DeleteGraphics( G )
  868. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  869. Gdip_DisposeImage(pBitmap)
  870. }
  871. Create_Hover_Bitmap(){
  872. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  873. G := Gdip_GraphicsFromImage( pBitmap )
  874. Gdip_SetSmoothingMode( G , 2 )
  875. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  876. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  877. Gdip_DeleteBrush( Brush )
  878. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  879. Gdip_FillRoundedRectangle( G , Brush , 2 , 2 , This.W-4 , This.H-3 , 16 )
  880. Gdip_DeleteBrush( Brush )
  881. Brush := Gdip_CreateLineBrushFromRect( 2 , -1 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
  882. Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
  883. Gdip_DeleteBrush( Brush )
  884. if(This.Button_Color="0xFF000000"||This.Button_Color="0xFF111111")
  885. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+10 , "0xFF444444" , This.Button_Color , 1 , 1 )
  886. else
  887. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+10 , This.Button_Color , "0xFF444444" , 1 , 1 )
  888. Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
  889. Gdip_DeleteBrush( Brush )
  890. Brush := Gdip_BrushCreateSolid( "0x22F0F0F0" )
  891. Gdip_FillEllipse( G , Brush , This.W/15 , This.H/13 , This.W-(This.W/15*2) , This.H*0.45 )
  892. Gdip_DeleteBrush( Brush )
  893. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  894. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-1" , This.Font , This.W , This.H )
  895. Gdip_DeleteBrush( Brush )
  896. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  897. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y0" , This.Font , This.W , This.H )
  898. Gdip_DeleteBrush( Brush )
  899. Gdip_DeleteGraphics( G )
  900. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  901. Gdip_DisposeImage(pBitmap)
  902. }
  903. Create_Pressed_Bitmap(){
  904. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  905. G := Gdip_GraphicsFromImage( pBitmap )
  906. Gdip_SetSmoothingMode( G , 2 )
  907. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  908. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  909. Gdip_DeleteBrush( Brush )
  910. Brush := Gdip_BrushCreateSolid( "0xFF222222" )
  911. Gdip_DeleteBrush( Brush )
  912. Brush := Gdip_CreateLineBrushFromRect( 2 , 0 , This.W-4 , This.H-3 , "0xFF555555" , "0xFF000000" , 1 , 1 )
  913. Gdip_FillRoundedRectangle( G , Brush , 2 , 0 , This.W-4 , This.H-3 , 16 )
  914. Gdip_DeleteBrush( Brush )
  915. Brush := Gdip_CreateLineBrushFromRect( 4 , -1 , This.W-6 , This.H+5 , "0xFF333333" , This.Button_Color , 1 , 1 )
  916. Gdip_FillRoundedRectangle( G , Brush , 3 , 1 , This.W-6 , This.H-5 , 16 )
  917. Gdip_DeleteBrush( Brush )
  918. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  919. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x-1 y-2" , This.Font , This.W , This.H )
  920. Gdip_DeleteBrush( Brush )
  921. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  922. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter Bold c" Brush " x0 y-1" , This.Font , This.W , This.H )
  923. Gdip_DeleteBrush( Brush )
  924. Gdip_DeleteGraphics( G )
  925. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  926. Gdip_DisposeImage( pBitmap )
  927. }
  928. Draw_Default(){
  929. SetImage( This.Hwnd , This.Default_Bitmap )
  930. }
  931. Draw_Hover(){
  932. SetImage( This.Hwnd , This.Hover_Bitmap )
  933. }
  934. Draw_Pressed(){
  935. SetImage( This.Hwnd , This.Pressed_Bitmap )
  936. SetTimer , HB_Button_Hover , Off
  937. While( GetKeyState( "LButton" ) )
  938. sleep , 10
  939. SetTimer , HB_Button_Hover , On
  940. MouseGetPos,,,, ctrl , 2
  941. if( This.Hwnd != ctrl ){
  942. This.Draw_Default()
  943. return False
  944. }else {
  945. This.Draw_Hover()
  946. return true
  947. }
  948. }
  949. }
  950. class HB_Flat_Rounded_Button_Type_1 {
  951. __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"){
  952. This.Roundness:=Roundness
  953. This.Text_Color_Top := "0xFF" Font_Color_Top
  954. This.Text_Color_Bottom := "0xFF" Font_Color_Bottom
  955. This.HoverC:="0xFF" HoverColor
  956. This.HoverC2:="0xFF" HoverColor2
  957. This.BColor:="0xFF" BColor
  958. This.Font := Font
  959. This.Font_Size := Font_Size
  960. This.Text := Text
  961. This.TextHover:="0xFF" TextHover
  962. This.X := x
  963. This.Y := y
  964. This.W := w
  965. This.H := h
  966. This.Button_Background_Color := "0xFF" Button_Background_Color
  967. This.Button_Color := "0xFF" Button_Color
  968. This.Window := Window
  969. This.Label := Label
  970. This.Default_Button := Default_Button
  971. This.Create_Default_Bitmap()
  972. This.Create_Hover_Bitmap()
  973. This.Create_Pressed_Bitmap()
  974. This.Create_Trigger()
  975. sleep, 20
  976. This.Draw_Default()
  977. }
  978. Create_Trigger(){
  979. global
  980. num := HB_Button1.Length()+1
  981. Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  982. This.Number := Num , This.Hwnd := Hwnd
  983. }
  984. Create_Default_Bitmap(){
  985. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  986. G := Gdip_GraphicsFromImage( pBitmap )
  987. Gdip_SetSmoothingMode( G , 2 )
  988. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  989. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  990. Gdip_DeleteBrush( Brush )
  991. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  992. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  993. Gdip_DeleteBrush( Brush )
  994. if(This.Default_Button)
  995. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
  996. else
  997. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , This.BColor , 1 , 1 ) ; DEFAULT COLOR
  998. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  999. Gdip_DeleteBrush( Brush )
  1000. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  1001. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  1002. Gdip_DeletePen( Pen )
  1003. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  1004. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
  1005. Gdip_DeleteBrush( Brush )
  1006. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  1007. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
  1008. Gdip_DeleteBrush( Brush )
  1009. Gdip_DeleteGraphics( G )
  1010. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1011. Gdip_DisposeImage(pBitmap)
  1012. }
  1013. Create_Hover_Bitmap(){
  1014. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  1015. G := Gdip_GraphicsFromImage( pBitmap )
  1016. Gdip_SetSmoothingMode( G , 2 )
  1017. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  1018. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  1019. Gdip_DeleteBrush( Brush )
  1020. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  1021. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  1022. Gdip_DeleteBrush( Brush )
  1023. if(This.Default_Button)
  1024. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF555851" , "0xFF3B3E41" , 1 , 1 )
  1025. else
  1026. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.HoverC , This.HoverC2 , 1 , 1 ) ;HOVER COLOR
  1027. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  1028. Gdip_DeleteBrush( Brush )
  1029. Pen := Gdip_CreatePen( "0xFFFFFFFF" , 1 )
  1030. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  1031. Gdip_DeletePen( Pen )
  1032. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom ) ; TEXT BOTTOM COLOR
  1033. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
  1034. Gdip_DeleteBrush( Brush )
  1035. Brush := Gdip_BrushCreateSolid( This.TextHover ) ;TEXT FONT COLOR
  1036. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
  1037. Gdip_DeleteBrush( Brush )
  1038. Gdip_DeleteGraphics( G )
  1039. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  1040. Gdip_DisposeImage(pBitmap)
  1041. }
  1042. Create_Pressed_Bitmap(){
  1043. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  1044. G := Gdip_GraphicsFromImage( pBitmap )
  1045. Gdip_SetSmoothingMode( G , 2 )
  1046. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  1047. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  1048. Gdip_DeleteBrush( Brush )
  1049. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF0" , "0xFF45474E" , 1 , 1 )
  1050. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  1051. Gdip_DeleteBrush( Brush )
  1052. Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
  1053. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
  1054. Gdip_DeleteBrush( Brush )
  1055. Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
  1056. Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
  1057. Gdip_DeleteBrush( Brush )
  1058. if(This.Default_Button)
  1059. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF43474B" , 1 , 1 )
  1060. else
  1061. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF00FFFF" , 1 , 1 ) ;PRESSED COLOR
  1062. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
  1063. Gdip_DeleteBrush( Brush )
  1064. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  1065. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  1066. Gdip_DeletePen( Pen )
  1067. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  1068. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
  1069. Gdip_DeleteBrush( Brush )
  1070. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  1071. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
  1072. Gdip_DeleteBrush( Brush )
  1073. Gdip_DeleteGraphics( G )
  1074. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  1075. Gdip_DisposeImage( pBitmap )
  1076. }
  1077. Draw_Default(){
  1078. SetImage( This.Hwnd , This.Default_Bitmap )
  1079. }
  1080. Draw_Hover(){
  1081. SetImage( This.Hwnd , This.Hover_Bitmap )
  1082. }
  1083. Draw_Pressed(){
  1084. SetImage( This.Hwnd , This.Pressed_Bitmap )
  1085. SetTimer , HB_Button_Hover1 , Off
  1086. While( GetKeyState( "LButton" ) )
  1087. sleep , 10
  1088. SetTimer , HB_Button_Hover1 , On
  1089. MouseGetPos,,,, ctrl , 2
  1090. if( This.Hwnd != ctrl ){
  1091. This.Draw_Default()
  1092. return False
  1093. }else {
  1094. This.Draw_Hover()
  1095. return true
  1096. }
  1097. }
  1098. }
  1099. ;-----------------------------------------------------------------
  1100. HB_Button_Hover1:
  1101. global Index , Hover_On2
  1102. MouseGetPos,,,, ctrl , 2
  1103. if( ! Hover_On2 && ctrl ){
  1104. loop , % HB_Button1.Length()
  1105. if( ctrl = HB_Button1[ A_Index ].hwnd )
  1106. {
  1107. HB_Button1[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On2 := 1 , break
  1108. SoundBeep,200
  1109. }
  1110. }else if( Hover_On2 = 1 )
  1111. if( ctrl != HB_Button1[ Index ].Hwnd )
  1112. HB_Button1[ Index ].Draw_Default() , Hover_On2 := 0
  1113. return
  1114. HB_Button_Hover:
  1115. Global Index , Hover_On1
  1116. MouseGetPos,,,, ctrl , 2
  1117. if( ! Hover_On1 && ctrl ){
  1118. loop , % HB_Button.Length()
  1119. if( ctrl = HB_Button[ A_Index ].hwnd )
  1120. HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On1 := 1 , break
  1121. }else if( Hover_On1 = 1 )
  1122. if( ctrl != HB_Button[ Index ].Hwnd )
  1123. HB_Button[ Index ].Draw_Default() , Hover_On1 := 0
  1124. return
  1125. Hover:
  1126. Global Index , Hover_On
  1127. MouseGetPos,,,, ctrl , 2
  1128. if( ! Hover_On && ctrl ){
  1129. loop , % Button1.Length()
  1130. if( ctrl = Button1[ A_Index ].hwnd )
  1131. {
  1132. Button1[ A_Index ].Draw_Button_Hover() , Index := A_Index , Hover_On := 1 , break
  1133. SoundBeep,200
  1134. }
  1135. }else if( Hover_On = 1 )
  1136. if( ctrl != Button1[ Index ].Hwnd )
  1137. Button1[ Index ].Draw_Button_Default() , Hover_On := 0
  1138. return
  1139. ;~ ============================= HOTKEYS =================================================================
  1140. ^Enter::
  1141. GuiControl,2:Focus,Edit1
  1142. if(Countdown!=True)
  1143. return
  1144. IfWinActive,Member Points System
  1145. return
  1146. if(Member=True)
  1147. if(USEPOINTS!=True){
  1148. Gui,Member:Show
  1149. return
  1150. }else
  1151. return
  1152. IfWinExist,Coin Detector
  1153. {
  1154. IfWinNotExist,SETTINGS
  1155. {
  1156. IfWinNotExist,LOGIN
  1157. {
  1158. Gui,2:Destroy
  1159. 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)
  1160. Window1[2].Draw_Window2()
  1161. Gui,2:Color,222222,ffffcc
  1162. Gui,2:Font,s12 cBlack, Arial Black
  1163. Gui,2:Add,Edit,x102 y20 w268 h60 limit16 Border Center -E0x200 r1 vEdit1
  1164. Gui,2:Add,Edit,x102 y64 w268 h50 Password limit16 Border Center -E0x200 r1 vEdit2
  1165. Gui,2:Font,
  1166. Gui,2:Font,s14 cwhite, Fivo Sans Modern ExtBlk
  1167. gui,2:Add,Text, x20 y28 Backgroundtrans, USER
  1168. gui,2:Add,Text, x20 y73 Backgroundtrans, PASS
  1169. 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"))
  1170. Gui,2:Show, w400 h150, LOGIN
  1171. SetTimer,Hover,50
  1172. }else{
  1173. Gui,2:Show
  1174. GuiControl,2:,Edit1,
  1175. GuiControl,2:,Edit2,
  1176. GuiControl,2:Focus,Edit1
  1177. }
  1178. }else{
  1179. if(CloseLogin!=True){
  1180. IfWinNotActive,SETTINGS
  1181. {
  1182. Gui,3:Show
  1183. Gui,9:Hide
  1184. Gui,5:Hide
  1185. }
  1186. }else{
  1187.  
  1188. Gui,2:Show
  1189. GuiControl,2:,Edit1,
  1190. GuiControl,2:,Edit2,
  1191. GuiControl,2:Focus,Edit1
  1192. }
  1193. }
  1194. }
  1195. return
  1196. ;~ ################################################################################################################################################################################################################
  1197. ;~ ####################################################################### HOTKEYS ###########################################################################################################
  1198. ;~ ################################################################################################################################################################################################################
  1199.  
  1200. ;~ Numpad1::
  1201. ;~ USEPOINTS:=True
  1202. ;~ return
  1203.  
  1204. #if (USEPOINTS!=True) && (S_DSR=0)
  1205. Alt::
  1206. >!TAB::
  1207. <!>!TAB::
  1208. >^Esc::
  1209. <^Esc::
  1210. <!F4::
  1211. >!F4::
  1212. <!TAB::return
  1213.  
  1214. #if WinActive("LOGIN")
  1215. Enter::
  1216. NumpadEnter::
  1217. gosub,Log_in2
  1218. return
  1219.  
  1220. #if (USEPOINTS!=True) && (S_DSR=0)
  1221. Esc::
  1222. IfWinActive,LOGIN
  1223. Gui,2:hide
  1224. IfWinActive,LOGIN2
  1225. Gui,11:hide
  1226. return
  1227. #if
  1228. ;~ Delete::
  1229. Exit1:
  1230. Gdip_Shutdown(pToken)
  1231. Port_CLOSECOM(nCid)
  1232. Process,close,vnhost.exe
  1233. FileRemoveDir,%A_Appdata%\host
  1234. ExitApp
  1235.  
  1236. ;~ ====================================================================================================================
  1237. EditIdle:
  1238. Gui,3:Submit,Nohide
  1239. IniWrite,%EditIdle%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
  1240. return
  1241. EditCountdown:
  1242. Gui,3:Submit,Nohide
  1243. if(EditCountdown<=20)
  1244. EditCountdown:=20
  1245. IniWrite,%EditCountdown%,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
  1246. return
  1247. Login:
  1248. if(Member=True)
  1249. Gui,Member:Show
  1250. else{
  1251. if (Countdown!=True){
  1252. IfWinNotExist, LOGIN2
  1253. {
  1254. Gui,11:Destroy
  1255. 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)
  1256. Window1[11].Draw_Window2()
  1257. Gui,11:Color,222222,ffffcc
  1258. Gui,11:Font,s12 cBlack, Arial Black
  1259. Gui,11:Add,Edit,x102 y20 w268 h60 limit16 Border Center -E0x200 r1 vEdit3
  1260. Gui,11:Add,Edit,x102 y64 w268 h50 Password limit16 Border Center -E0x200 r1 vEdit4
  1261. Gui,11:Font,
  1262. Gui,11:Font,s14 cwhite, Fivo Sans Modern ExtBlk
  1263. gui,11:Add,Text, x20 y28 Backgroundtrans, USER
  1264. gui,11:Add,Text, x20 y73 Backgroundtrans, PASS
  1265. 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"))
  1266. Gui,11:Show, w400 h150, LOGIN2
  1267. SetTimer,Hover,50
  1268. }else
  1269. Gui,11:Show
  1270. }
  1271. Gui,11:Show
  1272. }
  1273. return
  1274.  
  1275. log_in:
  1276. GuiControl , % Button1[A_GuiControl].Window ": Focus" , % Button1[A_GuiControl].Hwnd
  1277. if( ! Button1[A_GuiControl].Draw_Button_Pressed() )
  1278. return
  1279. Log_in2:
  1280. SoundBeep, 5000
  1281. Gui,2:+Owndialogs
  1282. Gui,11:+Owndialogs
  1283. Gui,2:Submit,Nohide
  1284. Gui,11:Submit,Nohide
  1285.  
  1286. ;~ ---------------------------------------------------------ILLEGAL CHARACTER-----------------------------------------
  1287. if (Edit1="") or (Edit2="")
  1288. {
  1289. MsgBox, 262160, Error, Please Login
  1290. GuiControl,2:Focus,Edit1
  1291. return
  1292. }
  1293. if Edit1 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1294. {
  1295. MsgBox, 262160, Error, Illegal characters
  1296. GuiControl,2:Focus,Edit1
  1297. return
  1298. }
  1299. else if Edit2 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1300. {
  1301. MsgBox, 262160, Error, Illegal characters
  1302. GuiControl,2:Focus,Edit2
  1303. return
  1304. }
  1305. if Edit3 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1306. {
  1307. MsgBox, 262160, Error, Illegal characters
  1308. GuiControl,2:Focus,Edit3
  1309. return
  1310. }
  1311. if Edit4 contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  1312. {
  1313. MsgBox, 262160, Error, Illegal characters
  1314. GuiControl,2:Focus,Edit4
  1315. return
  1316. }
  1317. ;~ -------------------------------------------------------------------------------------------------------------------------------
  1318. Iniread,user,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
  1319. if (user==Edit1 || user==Edit3){
  1320. Iniread,pass,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
  1321. if(pass==Edit2 || pass==Edit4){
  1322. If (Settings!=True){
  1323. Settings:=True
  1324. CloseLogin:=False
  1325. Gui,2:Hide
  1326. Gui,11:Hide
  1327. IniRead,WSlide,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  1328. IniRead,Idle,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  1329. IniRead,Idletime,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLETIME
  1330. IniRead,Flock,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  1331. IniRead,WPC,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  1332. IniRead,CDown,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,TIMER
  1333. 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)
  1334. Window1[3].Draw_Window3()
  1335. Gui,3:Color,222222,FFFFFF
  1336. 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")
  1337. 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")
  1338. 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")
  1339. 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")
  1340. 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")
  1341. 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")
  1342. 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")
  1343. 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")
  1344. 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")
  1345. 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")
  1346. 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")
  1347. SHH:=SH-40
  1348. Gui,3:Font,cWhite Bold s8, Arial
  1349. Gui,3:Add,Text,x20 y85 w100 h20 Left BackgroundTrans, TURN OFF SOUNDS
  1350. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, FORCE LOCK
  1351. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, SHUTDOWN IDLE
  1352. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER
  1353. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER SLIDE
  1354. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WALLPAPER PER PC
  1355. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, WP SLIDE SPEED
  1356. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COM PORT
  1357. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COUNTDOWN TIMER
  1358. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COUNTDOWN SPEED
  1359. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, DISABLE TASKMGR
  1360. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, ANNOUNCEMENT
  1361. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, COMPUTER NAME
  1362. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, BLOCK APPLICATIONS
  1363. Gui,3:Add,Text,x20 y+5 w150 h20 Left BackgroundTrans, RUN ON STARTUP
  1364. Gui,3:Font,
  1365. Gui,3:Font,cLime s8,
  1366. Gui,3:Add,Text,x10 y45 BackgroundTrans, Registered to : %User1%
  1367. Gui,3:Font,
  1368. Gui,3:Font,cred Bold s8, Arial
  1369. Gui,3:Add,Edit,x220 y130 limit3 Center Border Number w25 h18 vEditIdle gEditIdle,% Idletime
  1370. 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
  1371. 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
  1372. 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
  1373. 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")
  1374. 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")
  1375. 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")
  1376. 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")
  1377. 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")
  1378. 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")
  1379. 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")
  1380. 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")
  1381. 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")
  1382. IniRead,CP,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
  1383. Gui,3:Add,Edit,x150 y230 limit6 Center Border Number w50 h20 vEditSLIDESPEED gEditSLIDESPEED,% WPSLIDESPEED
  1384. Gui,3:Add,DDL,x150 y255 w60 h20 r9 vDDL gDDL Choose%CP% AltSubmit, COM1|COM2|COM3|COM4|COM5|COM6|COM7|COM8|COM9
  1385. Gui,3:Add,Edit,x150 y+5 limit6 Center Border Number w50 h20 vEditCountdown gEditCountdown,% CDown
  1386. Gui,3:Add,Edit,x150 y+5 limit6 Center Border Number w50 h20 vEditCSPEED gEditCSPEED,% COUNTDOWNSPEED
  1387. if (Switch1[5].State=0){
  1388. GuiControl,3:Hide,% Button1[2].hwnd
  1389. GuiControl,3:Hide,% Button1[3].hwnd
  1390. GuiControl,3:Disable,EditSLIDESPEED
  1391. }
  1392. if (Switch1[3].State=0)
  1393. GuiControl,3:Hide,EditIdle
  1394. if (Switch1[4].State=0){
  1395. GuiControl,3:Hide,% Button1[4].hwnd
  1396. GuiControl,3:Disable,% Switch1[5].hwnd
  1397. GuiControl,3:Disable,% Switch1[6].hwnd
  1398. Switch1[5].Draw_Bitmap_DISABLED(),Switch1[6].Draw_Bitmap_DISABLED()
  1399. }
  1400. if(Switch1[6].state=0){
  1401. GuiControl,3:Hide,% Button1[12].hwnd
  1402. GuiControl,3:Hide,% Button1[13].hwnd
  1403. }
  1404. if(Switch1[8].state=0)
  1405. GuiControl,3:Hide,% Button1[9].hwnd
  1406. if(Switch1[10].state=0)
  1407. GuiControl,3:Hide,% Button1[14].hwnd
  1408. Gui,3:Show,x20 y20 w300 h%SHH%, SETTINGS
  1409. }else{
  1410. Gui,2:Hide
  1411. Gui,3:Show
  1412. CloseLogin:=False
  1413. }
  1414. }else{
  1415. MsgBox, 262160, Error, Invalid Username or Password., 5
  1416. return
  1417. }
  1418. }else{
  1419. if(POINTSYSTEM=1)
  1420. {
  1421. IfWinActive,LOGIN
  1422. {
  1423. IfExist,%SERVERPATHFULL%\%Edit1%
  1424. {
  1425. IniRead,passuser,%SERVERPATHFULL%\%Edit1%\data.ini:VAN:$data,account,passuser
  1426. if(Edit2==passuser)
  1427. {
  1428. UserN:=Edit1
  1429. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1430. Iniread,TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,account,TotalPoints
  1431. IfWinNotExist,Member Point System
  1432. {
  1433. Gui,2:hide
  1434. Member:=True
  1435. Gui,Member:+AlwaysOntop +Owner1
  1436. Gui,Member:Color,333333
  1437. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vProfilepic gProfilepic,%A_Temp%\Profilepic.png
  1438. Gui,Member:Add,Progress,x20 y20 w160 h160 c666666 Background888888,100
  1439. IfExist,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1440. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1441. else
  1442. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%A_Temp%\Profilepic.png
  1443. Gui,Member:Font,cLime s14 Bold,
  1444. Gui,Member:Add,Text,x20 y+5 w160 center Border vProfilename,% UserN
  1445. Gui,Member:Font,
  1446. Gui,Member:Font,s10 cwhite, Multicolore Pro
  1447. Gui,Member:Add, Text, x20 y+20 w150 Center vTotPoints, POINTS : %TotalPoints%
  1448. Gui,Member:Add,Button, x380 w150 y260 Border gLogoutMember, LOGOUT
  1449. Gui,Member:Add,Button, x20 y260 w158 Border gUSEPOINTS vUSEPOINTS, USE MY POINTS
  1450. if(REWARD=1)
  1451. Gui,Member:Add,Button, x200 y260 w158 Border gREWARD vREWARD,Rewards
  1452. ;~ 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") )
  1453. 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")
  1454. SetTimer,HB_Button_Hover1,50
  1455. Gui,Member:Show,w550 h300, Member Point System
  1456. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1457. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1458. }else{
  1459. Gui,Member:Show
  1460. Gui,2:hide
  1461. GuiControl,Member:,Profilename,% UserN
  1462. IfExist,%SERVERPATHFULL%\%Edit1%\Profilepic.png
  1463. {
  1464. GuiControl,Member:,Profilepic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1465. GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1466. }else{
  1467. GuiControl,Member:,Profilepic,%A_Temp%\Profilepic.png
  1468. GuiControl,Member:,Pfpic,%A_Temp%\Profilepic.png
  1469. }
  1470. GuiControl,Member:,TotPoints,POINTS : %TotalPoints%
  1471. Member:=True
  1472. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1473. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1474. }
  1475. }
  1476. else{
  1477. MsgBox, 262160, Error, Invalid Username or Password., 20
  1478. GuiControl,2:Focus,Edit1
  1479. return
  1480. }
  1481. }
  1482. else{
  1483. MsgBox, 262160, Error, Invalid Username or Password., 20
  1484. GuiControl,2:Focus,Edit1
  1485. }
  1486. }
  1487. else IfWinActive,LOGIN2
  1488. {
  1489. IfExist,%SERVERPATHFULL%\%Edit3%
  1490. {
  1491. IniRead,passuser,%SERVERPATHFULL%\%Edit3%\data.ini:VAN:$data,account,passuser
  1492. if(Edit4==passuser)
  1493. {
  1494. UserN:=Edit3
  1495. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1496. Iniread,TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  1497. IfWinNotExist,Member Point System
  1498. {
  1499. Gui,11:hide
  1500. Member:=True
  1501. Gui,Member:+AlwaysOntop +Owner1
  1502. Gui,Member:Color,333333
  1503. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vProfilepic gProfilepic,%A_Temp%\Profilepic.png
  1504. Gui,Member:Add,Progress,x20 y20 w160 h160 c666666 Background888888,100
  1505. IfExist,%SERVERPATHFULL%\%Edit3%\Profilepic.png
  1506. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1507. else
  1508. Gui,Member:Add,Picture,x21 y21 w158 h158 BackgroundTrans vPfpic,%A_Temp%\Profilepic.png
  1509. Gui,Member:Font,cLime s14 Bold,
  1510. Gui,Member:Add,Text,x20 y+5 w160 center Border vProfilename,% UserN
  1511. Gui,Member:Font,
  1512. Gui,Member:Font,s10 cwhite, Multicolore Pro
  1513. Gui,Member:Add, Text, x20 y+20 w150 Center vTotPoints, POINTS : %TotalPoints%
  1514. Gui,Member:Add,Button, x400 y260 Border gLogoutMember, LOGOUT
  1515. Gui,Member:Add,Button, x20 y260 w158 Border gUSEPOINTS vUSEPOINTS, USE MY POINTS
  1516. if(REWARD=1)
  1517. Gui,Member:Add,Button, x200 y260 w158 Border gREWARD vREWARD,Rewards
  1518. ;~ 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") )
  1519. 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")
  1520. SetTimer,HB_Button_Hover1,50
  1521. Gui,Member:Show,w550 h300, Member Point System
  1522. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1523. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1524. }else{
  1525. Gui,Member:Show
  1526. Gui,11:hide
  1527. GuiControl,Member:,Profilename,% UserN
  1528. IfExist,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1529. {
  1530. GuiControl,Member:,Profilepic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1531. GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%UserN%\Profilepic.png
  1532. }else{
  1533. GuiControl,Member:,Profilepic,%A_Temp%\Profilepic.png
  1534. GuiControl,Member:,Pfpic,%A_Temp%\Profilepic.png
  1535. }
  1536. GuiControl,Member:,TotPoints,POINTS : %TotalPoints%
  1537. Member:=True
  1538. IniWrite,%A_Now%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,Lastlog
  1539. IniWrite,%A_ComputerName%,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,PCLOGIN
  1540. }
  1541. }
  1542. else
  1543. {
  1544. MsgBox, 262160, Error, Invalid Username or Password., 20
  1545. GuiControl,2:Focus,Edit1
  1546. return
  1547. }
  1548. }
  1549. else
  1550. {
  1551. MsgBox, 262160, Error, Invalid Username or Password., 5
  1552. GuiControl,2:Focus,Edit1
  1553. return
  1554. }
  1555. }
  1556. }
  1557. else
  1558. MsgBox, 262160, Error, Invalid Username or Password., 5
  1559. GuiControl,2:Focus,Edit1
  1560. }
  1561. return
  1562. Inbox:
  1563. GuiControl , % HB_Button1[ A_GuiControl ].Window ": Focus" , % HB_Button1[ A_GuiControl ].Hwnd
  1564. if( ! HB_Button1[ A_GuiControl ].Draw_Pressed() )
  1565. return
  1566.  
  1567. SoundBeep, 5000
  1568. Inbx:
  1569. IfExist,%A_Temp%\Inbx.dat
  1570. FileDelete,%A_Temp%\Inbx.dat
  1571. IfExist,%SERVERPATHFULL%\%UserN%\Inbx.dat
  1572. {
  1573. Loop,read,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
  1574. {
  1575. Loop,parse,A_LoopReadLine,`n
  1576. {
  1577. FileAppend,%A_LoopField%|,%A_Temp%\Inbx.dat:VAN:$data
  1578. }
  1579. }
  1580. }
  1581. FileRead,InboxM,%A_Temp%\Inbx.dat:VAN:$data
  1582. IfWinNotExist,My Inbox
  1583. {
  1584. Gui,Inbox:+AlwaysOntop -DPIScale +Owner1
  1585. Gui,Inbox:Color,333300,888888
  1586. Gui,Inbox:Font,s16 ,Antapani ExtBd
  1587. Gui,Inbox:Add,Listbox,x10 y10 Border +HScroll w230 h380 vList3 gList3,% InboxM
  1588. 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")
  1589. Gui,Inbox:Show,% "x" 10 " y" A_screenHeight-500 " w" 250 " h" 450, My Inbox
  1590. }
  1591. else
  1592. {
  1593. Gui,Inbox:Show,% "x" 10 " y" A_screenHeight-500 " w" 250 " h" 450, My Inbox
  1594. GuiControl,Inbox:,List3,% "|" InboxM
  1595. }
  1596. return
  1597. List3:
  1598. gui,Inbox:Submit,Nohide
  1599. return
  1600. DeleteMessage:
  1601. GuiControl , % HB_Button1[ A_GuiControl ].Window ": Focus" , % HB_Button1[ A_GuiControl ].Hwnd
  1602. if( ! HB_Button1[ A_GuiControl ].Draw_Pressed() )
  1603. return
  1604. SoundBeep, 5000
  1605. FileDelete,%SERVERPATHFULL%\%UserN%\Inbx.dat
  1606. goto,Inbox
  1607. return
  1608. REWARD:
  1609. Gui,Member:Hide
  1610. IfWinNotExist,Reward Section
  1611. {
  1612. Gui,Reward:+AlwaysOntop +owner1 -DPIScale
  1613. Gui,Reward:Color,999999
  1614. Gui,Reward:Font,s14 bold
  1615. Gui,Reward:Add,Tab2,x5 y5 w740 h490 vTab1,Section 1 ;| Section 2| Section 3| Section 4|Section 5|
  1616. ADDTAB:=1
  1617. Loop
  1618. {
  1619. RRR++
  1620. Iniread,RNumber,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%RRR%
  1621. if(RNumber="" || RNumber="ERROR"){
  1622. RewardS++
  1623. if(RewardS=50){
  1624. RRR:=0
  1625. Break
  1626. }
  1627. }
  1628. else
  1629. {
  1630. if(ADDTAB>1){
  1631. Gui,Reward:Tab, %ADDTAB%
  1632. }
  1633. if(NumX=0 || NumX="" || NumX="ERROR")
  1634. XX:=20
  1635. if(NumY=0 || NumY="" || NumY="ERROR")
  1636. YY:=80
  1637. IfExist,VANHEARTNET\PNG\Rewards\Reward%RRR%.png
  1638. Gui,Reward:Add,Picture,x%XX% y%YY% w200 h150,VANHEARTNET\PNG\Rewards\Reward%RRR%.png
  1639. else
  1640. Gui,Reward:Add,Picture,x%XX% y%YY% w200 h150,VANHEARTNET\PNG\Rewards\RewardDefault.png
  1641. Gui,Reward:Add,Button,% "x" XX " y" YY+150 " w200 h30 Border gButtonR vButt" RRR,% RNumber
  1642. XX+=250
  1643. NumX++
  1644. if(NumX=3)
  1645. {
  1646. NumX:=0
  1647. NumY++
  1648. YY+=200
  1649. }
  1650. if(NumY=2)
  1651. {
  1652. NumY:=0
  1653. YY:=80
  1654. ADDTAB++
  1655. }
  1656. }
  1657. }
  1658. Loop %ADDTAB%
  1659. Section.="| Page " . A_Index
  1660. GuiControl,Reward:,Tab1,% Section
  1661. Gui,Reward:Show,w760 h500,Reward Section
  1662. }
  1663. else
  1664. gui,Reward:Show
  1665. return
  1666. ButtonR:
  1667. LS:=0
  1668. L1:=""
  1669. L2:=""
  1670. MouseGetPos,,,,CTR
  1671. StringReplace,aaaa,CTR,Button,,all
  1672. IniRead,jk,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,Reward%aaaa%
  1673. if(jk="" || jk="ERROR")
  1674. return
  1675. if(TotalPoints>=jk){
  1676. MsgBox, 262180, Claim Rewards, Do you really want to use your points?, 20
  1677. IfMsgBox,Yes
  1678. {
  1679. FileDelete,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat
  1680. IfExist,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1681. {
  1682. FileReadLine,L1,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data,1
  1683. FileReadLine,L2,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data,2
  1684. }else
  1685. return
  1686. if(L1="" || L1="ERROR" || L1="0x99999999")
  1687. return
  1688. if(L2="" || L2="ERROR" || L2="0x99999999")
  1689. {
  1690. IfExist,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1691. FileDelete,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1692. FileAppend,,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
  1693. FileAppend,%L1%`n,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
  1694. }else{
  1695. Loop,read,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
  1696. {
  1697. LS++
  1698. Loop,parse,A_LoopReadLine,`n
  1699. {
  1700. if(LS=1)
  1701. continue
  1702. else
  1703. FileAppend,%A_LoopField%`n,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat:VAN:$data
  1704. }
  1705. }
  1706. FileRead,TempR,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat:VAN:$data
  1707. FileDelete,%SERVERPATHFULL2%\Reward%aaaa%.dat
  1708. FileAppend,%TempR%,%SERVERPATHFULL2%\Reward%aaaa%.dat:VAN:$data
  1709. FileDelete,%SERVERPATHFULL2%\RewardTemp%aaaa%.dat
  1710. FileAppend,%L1%`n,%SERVERPATHFULL%\%UserN%\Inbx.dat:VAN:$data
  1711. }
  1712. TotalPoints:=(TotalPoints-jk)
  1713. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  1714. if(USEPOINTS=True)
  1715. GuiControl,10:,MemTimer, % TotalPoints
  1716. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,account,TotalPoints
  1717. Gosub,Inbx
  1718. }
  1719. }else
  1720. MsgBox, 262160, Error, You don't have enough Points...`n`nRequired Points : %jk%, 10
  1721. return
  1722. Profilepic:
  1723. Gui,Member:+OWndialogs
  1724. FileSelectFile,PPicture,,,SELECT PROFILE PICTURE,All Files (*.*)
  1725. If(Errorlevel=0){
  1726. FileCopy,%PPicture%,%SERVERPATHFULL%\%Edit1%\Profilepic.png,1
  1727. GuiControl,Member:,Pfpic,%SERVERPATHFULL%\%Edit1%\Profilepic.png
  1728. }
  1729. return
  1730. USEPOINTS:
  1731. Gui,Member:Submit,Nohide
  1732. if(Countdown!=True){
  1733. MsgBox, 262160, Message, Not Allowed to use POINTS while you still have time, 10
  1734. return
  1735. }
  1736. MsgBox, 262180, My Points, You will be charged 1 Point for using Point System.`nDo you want to continue?, 15
  1737. IfMsgBox, Yes
  1738. {
  1739. IF(TotalPoints>=REQUSEPOINTS){
  1740. USEPOINTS:=True
  1741. GUi,Member:Hide
  1742. Gui,1:hide
  1743. Gui,4:Hide
  1744. Gui,2:Hide
  1745. Gui,6:Hide
  1746. Gui,8:Hide
  1747. GuiControl,Member:Disable,USEPOINTS
  1748. Menu, Tray, Add,Points
  1749. Menu, tray,Rename,Login,My Account
  1750. TotalPoints:=(TotalPoints-1)
  1751. SecTimer:=60
  1752. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  1753. Guicontrol,Member:,TotPoints,% TotalPoints
  1754. IfwinNotExist, Member Timer
  1755. {
  1756. 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)
  1757. Window1[10].Draw_Logo()
  1758. Gui,10:Color,222222,333333
  1759. Gui,10:Add,Groupbox,x3 y0 w194 h40,
  1760. Gui,10:Font,
  1761. Gui,10:Font,s28 cLime, Pixel LCD7
  1762. Gui,10:Add,Text,x3 y6 w200 Center BackgroundTrans vMemTimer, % TotalPoints
  1763. Gui,10:Show,% "x" A_Screenwidth-200 " y" A_Screenheight-125 " w" 200 " h" 80,Member Timer
  1764. }
  1765. else
  1766. {
  1767. Gui,4:Show,% "x" A_ScreenWidth-210 " y" A_ScreenHeight-150 " w" 200 " h" 135 ,TIMER CODE
  1768. }
  1769. }else
  1770. MsgBox, 262160, My Points, Sorry! You dont have enought Points? `n`nRequired Points : %REQUSEPOINTS%, 10
  1771. }
  1772. return
  1773. Points:
  1774. IfWinExist, Member Timer
  1775. Gui,10:Show
  1776. return
  1777. RewardGuiclose:
  1778. Gui,Reward:Hide
  1779. Gui,Member:Show
  1780. return
  1781. 10GuiContextMenu:
  1782. 10Guiclose:
  1783. Gui,10:hide
  1784. return
  1785. LogoutMember:
  1786. Member:=False
  1787. Gui,Member:Hide
  1788. IfWinExist, LOGIN
  1789. {
  1790. GuiControl,2:,Edit1,
  1791. GuiControl,2:,Edit2,
  1792. }
  1793. IfWinExist, LOGIN2
  1794. {
  1795. GuiControl,11:,Edit3,
  1796. GuiControl,11:,Edit4,
  1797. }
  1798. IfWinExist,My Inbox
  1799. gui,Inbox:hide
  1800. IfWinExist,Member Timer
  1801. Reload
  1802. else
  1803. {
  1804. if(S_DSR!=0)
  1805. Gui,11:Show
  1806. else
  1807. Gui,2:Show
  1808. }
  1809. return
  1810. FORCE_SHUTDOWN:
  1811. GuiControl , % HB_Button[1].Window ": Focus" , % HB_Button[1].Hwnd
  1812. if( ! HB_Button[1].Draw_Pressed() )
  1813. return
  1814. SoundBeep, 5000
  1815. Shutdown, 5
  1816. gosub, Exit1
  1817. return
  1818. Advance:
  1819. GuiControl , % Button1[10].Window ": Focus" , % Button1[10].Hwnd
  1820. if( ! Button1[10].Draw_Button_Pressed() )
  1821. return
  1822. SetTimer, Slide, off
  1823. SoundBeep, 5000
  1824. gosub, LoopUSER
  1825. Gui,3:+Owndialogs
  1826. Gui,3:Hide
  1827. IfWinNotExist, Advance Settings
  1828. {
  1829. if(Num=22)
  1830. Button1.Length:=16
  1831. Gui,9:Destroy
  1832. 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)
  1833. Window1[9].Draw_Window3()
  1834. Gui,9:Color,222222,FFFFFF
  1835. Gui,9:FOnt, cWhite Bold
  1836. Gui,9:Add,Text, x15 y80 BackgroundTrans,USER'S WALLPAPER OPTION
  1837. Gui,9:Add,Text, x15 y250 BackgroundTrans,ENABLE ANTI-KILL PROCESS
  1838. Gui,9:Add,Text, x15 y275 BackgroundTrans,DISABLE WIN KEY
  1839. Gui,9:Font,
  1840. Gui,9:Font,cwhite s8,
  1841. Gui,9:Add,Text,x10 y45 BackgroundTrans, Registered to : %User1%
  1842. Gui,9:FOnt,
  1843. Gui,9:FOnt, cred Bold s10
  1844. User:=""
  1845. Code:=""
  1846. Gui,9:Add,DDL,% "x" 20 " y" 100 " w" 190 " Choose1 vDDLW gDDLW",% FN
  1847. Gui,9:Add,DDL,% "x" 20 " y" 130 " w" 190 " Choose1 vDDLW2 gDDLW2",
  1848. Gui,9:Add,Edit,% "x" 20 " y" 160 " w" 190 " r1 Border vAddUserWall",Input new user here!
  1849. 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")
  1850. 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")
  1851. 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")
  1852. 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")
  1853. 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")
  1854. 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")
  1855. 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")
  1856. Gui,9:Show,% "x" 20 " y" 20 " w" 300 " h" SHH , Advance Settings
  1857. }else{
  1858. Gui,9:Show
  1859. }
  1860. return
  1861. MemberGuiClose:
  1862. Gui,Member:hide
  1863. return
  1864. InboxGuiClose:
  1865. Gui,Inbox:hide
  1866. return
  1867. DeleteWALLUSER:
  1868. GuiControl , % Button1[20].Window ": Focus" , % Button1[20].Hwnd
  1869. if( ! Button1[20].Draw_Button_Pressed() )
  1870. return
  1871. Gui,9:Submit,Nohide
  1872. FileDelete,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
  1873. FileDelete,%A_Temp%\data.file
  1874. Loop,VANHEARTNET\PNG\USERS\%DDLW%\*.png,1
  1875. {
  1876. NumL1++
  1877. USRNME1:=A_LoopFileName
  1878. if (NumL1=1)
  1879. FileAppend,% USRNME1 "|",%A_Temp%\data.file:VAN:$data
  1880. else
  1881. FileAppend,% "|" USRNME1,%A_Temp%\data.file:VAN:$data
  1882. }
  1883. FileRead,FN1,%A_Temp%\data.file:VAN:$data
  1884. GuiControl,9:,DDLW2,|%FN1%
  1885. return
  1886. DDLW2:
  1887. Gui,9:Submit,NoHide
  1888. GuiControl,1:move,Pic,% "x" 15 " y" 15 " w" SW-30 " h" SH-28
  1889. GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
  1890. return
  1891. DDLW:
  1892. Gui,9:Submit,Nohide
  1893. FileDelete,%A_Temp%\data.file
  1894. Loop,VANHEARTNET\PNG\USERS\%DDLW%\*.png,1
  1895. {
  1896. NumL1++
  1897. USRNME1:=A_LoopFileName
  1898. if (NumL1=1)
  1899. FileAppend,% USRNME1 "|",%A_Temp%\data.file:VAN:$data
  1900. else
  1901. FileAppend,% "|" USRNME1,%A_Temp%\data.file:VAN:$data
  1902. }
  1903. FileRead,FN1,%A_Temp%\data.file:VAN:$data
  1904. GuiControl,9:,DDLW2,|%FN1%
  1905. GuiControl,1:move,Pic,% "x" 15 " y" 15 " w" SW-30 " h" SH-28
  1906. GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%DDLW%\%DDLW2%
  1907. return
  1908. CloseAdvance:
  1909. GuiControl , % Button1[19].Window ": Focus" , % Button1[19].Hwnd
  1910. if( ! Button1[19].Draw_Button_Pressed() )
  1911. return
  1912. SetTimer, Slide , On
  1913. SoundBeep, 5000
  1914. Gui,9:hide
  1915. Gui,3:Show
  1916. return
  1917. LoopUSER:
  1918. NumL:=0
  1919. IfExist, %A_Temp%\data2.dat
  1920. FileDelete,%A_Temp%\data2.dat
  1921. Loop,VANHEARTNET\PNG\USERS\*.*,2
  1922. {
  1923. NumL++
  1924. USRNME:=A_LoopFileName
  1925. if (NumL=1)
  1926. FileAppend,% USRNME "|",%A_Temp%\data2.dat:VAN:$data
  1927. else
  1928. FileAppend,% "|" USRNME,%A_Temp%\data2.dat:VAN:$data
  1929. }
  1930. FileRead,FN,%A_Temp%\data2.dat:VAN:$data
  1931. return
  1932. ADDUSERWALLPNG:
  1933. GuiControl , % Button1[18].Window ": Focus" , % Button1[18].Hwnd
  1934. if( ! Button1[18].Draw_Button_Pressed() )
  1935. return
  1936. NN:=0
  1937. SoundBeep, 5000
  1938. Gui,9:+Owndialogs
  1939. FileSelectFile,USERWALLPAPER,,,SELECT WALLPAPER,All Files (*.*)
  1940. if(errorlevel=0){
  1941. Loop
  1942. {
  1943. NN++
  1944. IfExist,VANHEARTNET\PNG\USERS\%DDLW%\Wallpaper%NN%.png
  1945. continue
  1946. else{
  1947. FileCopy,%USERWALLPAPER%,VANHEARTNET\PNG\USERS\%DDLW%\Wallpaper%NN%.png
  1948. Break
  1949. }
  1950. }
  1951. }
  1952. Button1[18].Draw_Button_Pressed()
  1953. return
  1954. ADDUSERWALL:
  1955. GuiControl , % Button1[17].Window ": Focus" , % Button1[17].Hwnd
  1956. if( ! Button1[17].Draw_Button_Pressed() )
  1957. return
  1958. SoundBeep, 5000
  1959. Gui,9:Submit,Nohide
  1960. FileCreateDir,VANHEARTNET\PNG\USERS\%AddUserWall%
  1961. GuiControl,9:,AddUserWall,
  1962. gosub, LoopUSER
  1963. GuiControl,9:,DDLW,|%FN%
  1964. return
  1965. DELUSERWALL:
  1966. GuiControl , % Button1[16].Window ": Focus" , % Button1[16].Hwnd
  1967. if( ! Button1[16].Draw_Button_Pressed() )
  1968. return
  1969. Gui,9:Submit,Nohide
  1970. SoundBeep, 5000
  1971. FileRemoveDir,VANHEARTNET\PNG\USERS\%DDLW%,1
  1972. gosub, LoopUSER
  1973. GuiControl,9:,DDLW,|%FN%
  1974. return
  1975. EditSLIDESPEED:
  1976. Gui,3:Submit,Nohide
  1977. if(EditSLIDESPEED<=5000)
  1978. EditSLIDESPEED:=5000
  1979. IniWrite,% EditSLIDESPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WPSLIDESPEED
  1980. return
  1981.  
  1982. DELPC:
  1983. GuiControl , % Button1[13].Window ": Focus" , % Button1[13].Hwnd
  1984. if( ! Button1[13].Draw_Button_Pressed() )
  1985. return
  1986. SoundBeep, 5000
  1987. Gui,3:+Owndialogs
  1988. MsgBox, 262180, WALL PAPER PER PC, Do you want to delete All User's Wallpaper?
  1989. IfMsgBox, Yes
  1990. {
  1991. Loop,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png,1
  1992. FileDelete,VANHEARTNET\PNG\USERS\%A_ComputerName%\*.png
  1993. }
  1994. return
  1995. ADDPC:
  1996. GuiControl , % Button1[12].Window ": Focus" , % Button1[12].Hwnd
  1997. if( ! Button1[12].Draw_Button_Pressed() )
  1998. return
  1999. Gui,3:+Owndialogs
  2000. SoundBeep, 5000
  2001. FileSelectFile,AddPngPC,,,SELECT WALLPAPER, All Files (*.*)
  2002. if(Errorlevel=0){
  2003. Loop
  2004. {
  2005. NN++
  2006. IfExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%NN%.png
  2007. continue
  2008. else{
  2009. FileCopy,% AddPngPC,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%NN%.png
  2010. Break
  2011. }
  2012. }
  2013. }
  2014. else
  2015. return
  2016. return
  2017.  
  2018. BANNERTEXT1:
  2019. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2020. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2021. return
  2022. SoundBeep, 5000
  2023. FileRead,BANNERDATA,VANHEARTNET\data1.dat:VAN:$data
  2024. GuiControl,6:,EditBanner,% BANNERDATA
  2025. Gui,6:+Owndialogs
  2026. Gui,6:Submit,Nohide
  2027. Gui,6:Show
  2028. GuiControl,6:hide,var
  2029. GuiControl,6:Show,EditBanner
  2030. STOPBANNER:=True
  2031. if(HHH!=True){
  2032. Window1[6].Draw_BANNER1()
  2033. 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")
  2034. HHH:=True
  2035. }
  2036. else
  2037. GuiControl,6:Show,% Button1[11].hwnd
  2038. return
  2039. WriteBanner:
  2040. GuiControl , % Button1[11].Window ": Focus" , % Button1[11].Hwnd
  2041. if( ! Button1[11].Draw_Button_Pressed() )
  2042. return
  2043. SoundBeep, 5000
  2044. Gui,6:Submit,Nohide
  2045. Gui,6:+Owndialogs
  2046. FileDelete,VANHEARTNET\data1.dat
  2047. FileAppend,% EditBanner,VANHEARTNET\data1.dat:VAN:$data
  2048. GuiControl,6:Hide,EditBanner
  2049. GuiControl,6:Hide,% Button1[11].hwnd
  2050. GuiControl,6:Show,var
  2051. HHH:=True
  2052. return
  2053. BANNERPIC:
  2054. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2055. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2056. return
  2057. SoundBeep, 5000
  2058. Gui,2:+Owndialogs
  2059. Gui,2:Submit,Nohide
  2060. return
  2061. EditCSPEED:
  2062. Gui,3:Submit,Nohide
  2063. if(COUNTDOWNSPEED<=200)
  2064. COUNTDOWNSPEED:=200
  2065. IniWrite,% EditCSPEED,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,COUNTDOWNSPEED
  2066. return
  2067. CHANGE_ADMIN:
  2068. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2069. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2070. return
  2071. SoundBeep, 5000
  2072. Gui,3:Hide
  2073. IfWinExist,CHANGE ADMIN
  2074. Gui,5:Show
  2075. else
  2076. {
  2077. 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)
  2078. Window1[5].Draw_Admin()
  2079. Gui,5:Color,222222,333333
  2080. Gui,5:Font,s12 cred Bold
  2081. Gui,5:Add,Edit,x150 y20 w200 h25 Border center limit16 vEditOldUser gEditOldUser,% user
  2082. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 vEditNewUser gEditNewUser,% user
  2083. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditOldPass gEditOldPass,
  2084. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditNewPass gEditNewPass,
  2085. Gui,5:Add,Edit,x150 y+6 w200 h25 Border center limit16 Password vEditConfirmPass gEditConfirmPass,
  2086. 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")
  2087. 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")
  2088. Gui,5:Show,w400 h220,CHANGE ADMIN
  2089. }
  2090. return
  2091. SANDR:
  2092. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2093. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2094. return
  2095. SoundBeep, 5000
  2096. Reload
  2097. return
  2098. Clean:
  2099. GuiControl,5:,EditOldUser,
  2100. GuiControl,5:,EditNewUser,
  2101. GuiControl,5:,EditOldPass,
  2102. GuiControl,5:,EditNewPass,
  2103. GuiControl,5:,EditConfirmPass,
  2104. return
  2105. BACK:
  2106. GuiControl , % Button1[22].Window ": Focus" , % Button1[22].Hwnd
  2107. if( ! Button1[22].Draw_Button_Pressed() )
  2108. return
  2109. SoundBeep, 5000
  2110. Gui,5:+Owndialogs
  2111. Gui,5:Submit,Nohide
  2112. Gui,5:Hide
  2113. GuiControl,5:,EditOldUser,
  2114. GuiControl,5:,EditNewUser,
  2115. GuiControl,5:,EditOldPass,
  2116. GuiControl,5:,EditNewPass,
  2117. GuiControl,5:,EditConfirmPass,
  2118. Gui,3:Show
  2119. return
  2120. SUBMIT:
  2121. GuiControl , % Button1[21].Window ": Focus" , % Button1[21].Hwnd
  2122. if( ! Button1[21].Draw_Button_Pressed() )
  2123. return
  2124. SoundBeep, 5000
  2125. Gui,5:+Owndialogs
  2126. Gui,5:Submit,Nohide
  2127. ;~ -------------------------------------------------------
  2128. StringLen,User1Lenght, EditOldUser
  2129. StringLen,User2Lenght, EditNewUser
  2130. StringLen,User3Lenght, EditOldPass
  2131. StringLen,User4Lenght, EditNewPass
  2132. StringLen,User5Lenght, EditConfirmPass
  2133. if (User1Lenght<= 2){
  2134. MsgBox, 262160, Old Username, Username should consist atleast 3 characters.,5
  2135. gosub, Clean
  2136. return
  2137. }else if (User2Lenght<= 2){
  2138. MsgBox, 262160, New Username, Username should consist atleast 3 characters.,5
  2139. gosub, Clean
  2140. return
  2141. }else if (User3Lenght<= 2){
  2142. MsgBox, 262160, Old Password, Password should consist atleast 3 characters.,5
  2143. gosub, Clean
  2144. return
  2145. }else if (User4Lenght<= 2){
  2146. MsgBox, 262160, New Password, Username should consist atleast 3 characters.,5
  2147. gosub, Clean
  2148. return
  2149. }else if (User5Lenght<= 2){
  2150. MsgBox, 262160, Confirm Password, Username should consist atleast 3 characters.,5
  2151. gosub, Clean
  2152. return
  2153. }
  2154. ;~ -----------------------------------------------------------------
  2155. IniRead,Oldusername,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
  2156. IniRead,Oldpassword,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
  2157. if (Oldusername not ==EditOldUser){
  2158. MsgBox,262160,Old Username, Invalid Old Username.
  2159. gosub, Clean
  2160. return
  2161. }else if(EditNewUser=""){
  2162. MsgBox,262160,New Username, Please Input your Old Username.,5
  2163. gosub, Clean
  2164. return
  2165. }else if(EditNewUser=""){
  2166. MsgBox,262160,New Username, Please Input your New Username.,5
  2167. gosub, Clean
  2168. return
  2169. }else{
  2170. if(EditOldPass not ==Oldpassword){
  2171. MsgBox,262160,Old Password, Invalid Old Password.
  2172. gosub, Clean
  2173. return
  2174. }else if(EditOldPass=""){
  2175. MsgBox,262160,Old Password, Please Input your Old Password.,5
  2176. gosub, Clean
  2177. return
  2178. }else{
  2179. if(EditNewPass=""){
  2180. MsgBox,262160,New Password, Please Input your New Password.,5
  2181. gosub, Clean
  2182. return
  2183. }else {
  2184. if (EditConfirmPass=""){
  2185. MsgBox,262160,Confirm Password, Please Input your New Password.,5
  2186. gosub, Clean
  2187. return
  2188. }else if(EditConfirmPass not ==EditNewPass){
  2189. MsgBox,262160,Confirm Password, Your New Password doesn't match, please check again.,5
  2190. gosub, Clean
  2191. return
  2192. }else{
  2193. IniWrite,% EditNewPass,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,PASSWORD
  2194. IniWrite,% EditNewUser,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,USERNAME
  2195. gosub, Clean
  2196. user:=EditNewUser
  2197. Gui,5:Hide
  2198. }
  2199. }
  2200. }
  2201. }
  2202. return
  2203. EditOldUser:
  2204. Gui,5:Submit,Nohide
  2205. if EditOldUser contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2206. {
  2207. MsgBox, 262160, Error, Illegal characters,5
  2208. GuiControl,5:,EditOldUser,
  2209. }
  2210. return
  2211. EditNewUser:
  2212. Gui,5:Submit,Nohide
  2213. if EditNewUser contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2214. {
  2215. MsgBox, 262160, Error, Illegal characters,5
  2216. GuiControl,5:,EditNewUser,
  2217. }
  2218. return
  2219. EditOldPass:
  2220. Gui,5:Submit,Nohide
  2221. if EditOldPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2222. {
  2223. MsgBox, 262160, Error, Illegal characters,5
  2224. GuiControl,5:,EditOldPass,
  2225. }
  2226. return
  2227. EditNewPass:
  2228. Gui,5:Submit,Nohide
  2229. if EditOldNewPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2230. {
  2231. MsgBox, 262160, Error, Illegal characters,5
  2232. GuiControl,5:,EditNewPass,
  2233. }
  2234. return
  2235. EditConfirmPass:
  2236. Gui,5:Submit,Nohide
  2237. if EditConfirmPass contains %A_Space%,?,/,^,@,-,_,+,=,;,.,*,#,!,~,<,>,`,,`%,&,$,`(,`),`{,`},`[,`],|,:,`",``
  2238. {
  2239. MsgBox, 262160, Error, Illegal characters,5
  2240. GuiControl,5:,EditConfirmPass,
  2241. }
  2242. return
  2243. DDL:
  2244. Gui,3:Submit,Nohide
  2245. IniWrite,% DDL,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,CN
  2246. return
  2247. ADDSLIDE:
  2248. Gui,3:+Owndialogs
  2249. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2250. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2251. return
  2252. SoundBeep, 5000
  2253. FileSelectFile,AddPng,,,SELECT WALLPAPER, All Files (*.*)
  2254. if(Errorlevel=0){
  2255. Loop
  2256. {
  2257. NN++
  2258. IfExist,VANHEARTNET\PNG\Wallpaper%NN%.png
  2259. continue
  2260. else{
  2261. FileCopy,% AddPng,VANHEARTNET\PNG\Wallpaper%NN%.png
  2262. Break
  2263. }
  2264. }
  2265. }
  2266. else
  2267. return
  2268. return
  2269. DELSLIDE:
  2270. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2271. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2272. return
  2273. Gui,3:+Owndialogs
  2274. SoundBeep, 5000
  2275. MsgBox, 262180, WALLPAPER, Do you want to delete All Wallpaper?, 10
  2276. IfMsgBox, Yes
  2277. {
  2278. Loop,VANHEARTNET\PNG\*.png,1
  2279. FileDelete,VANHEARTNET\PNG\*.png
  2280. }
  2281. return
  2282. ADDWP:
  2283. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2284. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2285. return
  2286. Gui,3:+Owndialogs
  2287. SoundBeep, 5000
  2288. FileSelectFile,WPNG,,,SELECT WALLPAPER, All Files (*.*)
  2289. if(Errorlevel=0){
  2290. FileCopy,% WPNG,VANHEARTNET\PNG\Wallpaper1.png,1
  2291. GuiControl,1:,Pic,VANHEARTNET\PNG\Wallpaper1.png
  2292. }
  2293. else
  2294. return
  2295. return
  2296.  
  2297. Exit3:
  2298. GuiControl , % Button1[ A_GuiControl ].Window ": Focus" , % Button1[ A_GuiControl ].Hwnd
  2299. if( ! Button1[ A_GuiControl ].Draw_Button_Pressed() )
  2300. return
  2301. SoundBeep, 5000
  2302. Gui,3:Hide
  2303. CloseLogin:=True
  2304. Settings:=True
  2305. return
  2306. Switch1:
  2307. Gui,3:+Owndialogs
  2308. SoundBeep, 2000
  2309. if(Switch1[1].state=0){
  2310. Switch1[1].Draw_Bitmap_ON()
  2311. Switch1[1].state:=1
  2312. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
  2313. }else{
  2314. Switch1[1].Draw_Bitmap_OFF()
  2315. Switch1[1].state:=0
  2316. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,SOUND
  2317. }
  2318. return
  2319. Switch5:
  2320. SoundBeep, 2000
  2321. if(Switch1[5].state=0){
  2322. Switch1[5].Draw_Bitmap_ON()
  2323. Switch1[5].state:=1
  2324. GuiControl,3:Show,% Button1[2].hwnd
  2325. GuiControl,3:Show,% Button1[3].hwnd
  2326. GuiControl,3:Enable,EditSLIDESPEED
  2327. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  2328. }else{
  2329. Switch1[5].Draw_Bitmap_OFF()
  2330. Switch1[5].state:=0
  2331. GuiControl,3:Hide,% Button1[2].hwnd
  2332. GuiControl,3:Hide,% Button1[3].hwnd
  2333. GuiControl,3:Disable,EditSLIDESPEED
  2334. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  2335. }
  2336. return
  2337. Switch2:
  2338. SoundBeep, 2000
  2339. if(Switch1[2].state=0){
  2340. Switch1[2].Draw_Bitmap_ON()
  2341. Switch1[2].state:=1
  2342. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  2343. FORCELOCK:=1
  2344. }else{
  2345. Switch1[2].Draw_Bitmap_OFF()
  2346. Switch1[2].state:=0
  2347. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,FORCELOCK
  2348. FORCELOCK:=0
  2349. }
  2350. return
  2351. Switch3:
  2352. SoundBeep, 2000
  2353. if(Switch1[3].state=0){
  2354. Switch1[3].Draw_Bitmap_ON()
  2355. Switch1[3].state:=1
  2356. GuiControl,3:Show,EditIdle
  2357. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  2358. }else{
  2359. Switch1[3].Draw_Bitmap_OFF()
  2360. Switch1[3].state:=0
  2361. GuiControl,3:Hide,EditIdle
  2362. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,IDLE
  2363. }
  2364. return
  2365. Switch4:
  2366. SoundBeep, 2000
  2367. if(Switch1[4].state=0){
  2368. Switch1[4].Draw_Bitmap_ON()
  2369. Switch1[4].state:=1
  2370. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
  2371. GuiControl,3:Show,% Button1[4].hwnd
  2372. GuiControl,3:Enable,% Switch1[5].hwnd
  2373. GuiControl,3:Enable,% Switch1[6].hwnd
  2374.  
  2375. Switch1[5].Draw_Bitmap_OFF()
  2376. Switch1[6].Draw_Bitmap_OFF()
  2377. }else{
  2378. Switch1[4].Draw_Bitmap_OFF()
  2379. Switch1[4].state:=0
  2380. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPER
  2381. GuiControl,3:Hide,% Button1[4].hwnd
  2382. GuiControl,3:Disable,% Switch1[5].hwnd
  2383. GuiControl,3:Disable,% Switch1[6].hwnd
  2384. Switch1[5].Draw_Bitmap_DISABLED()
  2385. Switch1[6].Draw_Bitmap_DISABLED()
  2386. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERSLIDE
  2387. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  2388. Switch1[5].state:=0
  2389. Switch1[6].state:=0
  2390. GuiControl,3:Hide,% Button1[2].hwnd
  2391. GuiControl,3:Hide,% Button1[3].hwnd
  2392. }
  2393. return
  2394. Switch6:
  2395. SoundBeep, 2000
  2396. if(Switch1[6].state=0){
  2397. Switch1[6].Draw_Bitmap_ON()
  2398. Switch1[6].state:=1
  2399. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  2400. GuiControl,3:Show,% Button1[12].hwnd
  2401. GuiControl,3:Show,% Button1[13].hwnd
  2402. }else{
  2403. Switch1[6].Draw_Bitmap_OFF()
  2404. Switch1[6].state:=0
  2405. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,WALLPAPERPC
  2406. GuiControl,3:Hide,% Button1[12].hwnd
  2407. GuiControl,3:Hide,% Button1[13].hwnd
  2408. }
  2409. return
  2410. Switch7:
  2411. SoundBeep, 2000
  2412. if(Switch1[7].state=0){
  2413. Switch1[7].Draw_Bitmap_ON()
  2414. Switch1[7].state:=1
  2415. ANTIEND:=1
  2416. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
  2417. SetRegView, 64
  2418. RegWrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,1
  2419. }else{
  2420. Switch1[7].Draw_Bitmap_OFF()
  2421. Switch1[7].state:=0
  2422. ANTIEND:=0
  2423. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIENDTASK
  2424. RegWrite,REG_DWORD,HKCU,Software\Microsoft\Windows\CurrentVersion\Policies\System,DisableTaskMgr,0
  2425. }
  2426. return
  2427. Switch8:
  2428. SoundBeep, 2000
  2429. if(Switch1[8].state=0){
  2430. Switch1[8].Draw_Bitmap_ON()
  2431. Switch1[8].state:=1
  2432. ANNOUNCEMENT:=1
  2433. GuiControl,3:Show,% Button1[9].hwnd
  2434. IfWinExist,ANNOUNCEMENT
  2435. GuiControl,6:Show,% Button1[11].hwnd
  2436. Gui,6:Show
  2437. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
  2438. }else{
  2439. Switch1[8].Draw_Bitmap_OFF()
  2440. Switch1[8].state:=0
  2441. ANNOUNCEMENT:=0
  2442. GuiControl,3:Hide,% Button1[9].hwnd
  2443. GuiControl,6:Hide,% Button1[11].hwnd
  2444. Gui,6:Hide
  2445. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANNOUNCEMENT
  2446. }
  2447. return
  2448. Switch9:
  2449. SoundBeep, 2000
  2450. if(Switch1[9].state=0){
  2451. Switch1[9].Draw_Bitmap_ON()
  2452. Switch1[9].state:=1
  2453. BANNER:=1
  2454. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
  2455. }else{
  2456. Switch1[9].Draw_Bitmap_OFF()
  2457. Switch1[9].state:=0
  2458. BANNER:=0
  2459. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BANNER
  2460. }
  2461. return
  2462. Switch10:
  2463. SoundBeep, 2000
  2464. if(Switch1[10].state=0){
  2465. Switch1[10].Draw_Bitmap_ON()
  2466. Switch1[10].state:=1
  2467. BLKAPP:=1
  2468. GuiControl,3:Show,% Button1[14].hwnd
  2469. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
  2470. }else{
  2471. Switch1[10].Draw_Bitmap_OFF()
  2472. Switch1[10].state:=0
  2473. BLKAPP:=0
  2474. GuiControl,3:Hide,% Button1[14].hwnd
  2475. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,BLKAPP
  2476. }
  2477. return
  2478. Switch11:
  2479. SoundBeep, 2000
  2480. if(Switch1[11].state=0){
  2481. Switch1[11].Draw_Bitmap_ON()
  2482. Switch1[11].state:=1
  2483. ANTIKILL:=1
  2484. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
  2485. }else{
  2486. Switch1[11].Draw_Bitmap_OFF()
  2487. Switch1[11].state:=0
  2488. ANTIKILL:=0
  2489. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,ANTIKILL
  2490. Process,close,vnhost.exe
  2491. FileRemoveDir,%A_Appdata%\host
  2492. }
  2493. return
  2494. Switch12:
  2495. SoundBeep, 2000
  2496. if(Switch1[12].state=0){
  2497. Switch1[12].Draw_Bitmap_ON()
  2498. Switch1[12].state:=1
  2499. NOWINKEY:=1
  2500. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
  2501. Gui,9:+OWndialogs
  2502. RegWrite,REG_BINARY,HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map,00000000000000000300000000005BE000005CE000000000
  2503. MsgBox, 262176, WINKEY WARNING, You need to restart your computer..., 5
  2504. }else{
  2505. Switch1[12].Draw_Bitmap_OFF()
  2506. Switch1[12].state:=0
  2507. NOWINKEY:=0
  2508. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,NOWINKEY
  2509. RegDelete,HKLM,SYSTEM\CurrentControlSet\Control\Keyboard Layout,Scancode Map
  2510. MsgBox, 262176, WINKEY WARNING, You need to restart your computer..., 5
  2511. }
  2512. return
  2513. Switch10_1:
  2514. SoundBeep, 2000
  2515. if(Switch1[10_1].state=0){
  2516. Switch1[10_1].Draw_Bitmap_ON()
  2517. Switch1[10_1].state:=1
  2518. STARTUP:=1
  2519. IniWrite,1,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,STARTUP
  2520. IfNotExist,Launcher.exe
  2521. FileInstall,Launcher.exe,Launcher.exe,1
  2522. FileCreateShortcut,%A_ScriptDir%\Launcher.exe,C:\Users\%A_UserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\AdvAShtdwn.lnk,,
  2523.  
  2524. }else {
  2525. Switch1[10_1].Draw_Bitmap_OFF()
  2526. Switch1[10_1].state:=0
  2527. STARTUP:=0
  2528. IniWrite,0,VANHEARTNET\Config.ini:VAN:$data,SETTINGS,STARTUP
  2529. FileDelete,C:\Users\%A_UserName%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup\AdvAShtdwn.lnk
  2530. }
  2531. return
  2532. Move:
  2533. PostMessage,0xA1,2
  2534. While(GetKeystate("LButton")) {
  2535. sleep 10
  2536. WinGetPos,X,Y,,,A
  2537. WinMove,,,%X%,%Y%,
  2538. Gui,7:Show,x%X% y%Y%, Blocklist
  2539. }
  2540.  
  2541. Blocklist:
  2542. GuiControl , % Button1[14].Window ": Focus" , % Button1[14].Hwnd
  2543. if( ! Button1[14].Draw_Button_Pressed() )
  2544. return
  2545. FileRead,Blockl,VANHEARTNET\data.dat:VAN:$data
  2546. Gui,7:Destroy
  2547. Gui,7:+AlwaysOntop -Caption +ToolWindow +owner1 -DPIScale
  2548. Gui,7:Color,006666
  2549. Gui,7:Font,cred bold s8
  2550. Gui,7:Add,Text,x20 y5 w260 h35 BackgroundTrans gMove,
  2551. Gui,7:Add,Edit,x20 y50 w260 h400 vEditB,% Blockl
  2552. Gui,7:Font,cwhite bold s16
  2553. Gui,7:Add,Progress,x20 y5 w260 h35 BackgroundTrans,100
  2554. Gui,7:Add,Text,x33 y10 w260 BackgroundTrans, BLOCK APPLICATION
  2555. 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")
  2556. Gui,7:Show, w300 h500,Blocklist
  2557. return
  2558.  
  2559. SaveBlock:
  2560. Gui,7:Submit,Nohide
  2561. GuiControl , % Button1[15].Window " : Focus" , % Button1[15].Hwnd
  2562. if( ! Button1[15].Draw_Button_Pressed() )
  2563. return
  2564. SoundBeep, 5000
  2565. FileDelete,VANHEARTNET\data.dat
  2566. FileAppend,% EditB,VANHEARTNET\data.dat:VAN:$data
  2567. Gui,7:Destroy
  2568. return
  2569. ;~ ####################################################################################################################################################################################################################################
  2570. Timer:
  2571. IfExist,%SERVERPATHFULL3%\%A_ComputerName%Shutdown.file
  2572. {
  2573. FileDelete,%SERVERPATHFULL3%\%A_ComputerName%Shutdown.file
  2574. if(ErrorLevel=0){
  2575. Shutdown, 5
  2576. gosub, Exit1
  2577. }
  2578. }
  2579. else IfExist,%SERVERPATHFULL3%\%A_ComputerName%Restart.file
  2580. {
  2581. FileDelete,%SERVERPATHFULL3%\%A_ComputerName%Restart.file
  2582. if(ErrorLevel=0){
  2583. Shutdown, 6
  2584. gosub, Exit1
  2585. }
  2586. }
  2587. ;~ ####################################################################################
  2588. Port_DSR(nCid)
  2589. Port_DTR(nCid, 5)
  2590.  
  2591. If(S_DSR!=0){
  2592. if(USEPOINTS=True)
  2593. Reload
  2594. Gui,1:Hide
  2595. Gui,2:Hide
  2596. Gui,3:Hide
  2597. Gui,4:Hide
  2598. Gui,5:Hide
  2599. Gui,6:Hide
  2600. Gui,8:Hide
  2601. Gui,9:Hide
  2602.  
  2603. Countdown:=False
  2604. Timer:=iTimer
  2605. if(sound=1){
  2606. SoundGet,SOUNDSTAT,,Volume,
  2607. if(SOUNDSTAT<90)
  2608. SoundSet,100,,Volume
  2609. }
  2610. if(Member=True){
  2611. if(POINTSYSTEM=1){
  2612. Points++
  2613. if(Points>=SECPERPOINTS){
  2614. TotalPoints:=(TotalPoints+ADDPOINTS)
  2615. Points:=0
  2616. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2617. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  2618. }
  2619. BPoints++
  2620. if(BPoints>=BONUSTIME){
  2621. TotalPoints:=(TotalPoints+BONUSPOINTS)
  2622. BPoints:=0
  2623. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2624. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  2625. }
  2626.  
  2627. }
  2628. }
  2629. }
  2630. Else
  2631. {
  2632. if(USEPOINTS!=True)
  2633. {
  2634. if (sound=1){
  2635. SoundGet,SOUNDSTAT,,Volume,
  2636. if(SOUNDSTAT>10)
  2637. SoundSet,1,,Volume
  2638. }
  2639. Gui,+Owndialogs
  2640. Countdown:=True
  2641. if(FORCELOCK=1){
  2642. WinGetActiveTitle,ACTWINDOW
  2643. if(ACTWINDOW!="Coin Detector")
  2644. if(ACTWINDOW!="LOGIN")
  2645. if(ACTWINDOW!="BANNER1")
  2646. if(ACTWINDOW!="TIMER CODE")
  2647. if(ACTWINDOW!="SETTINGS")
  2648. if(ACTWINDOW!="Blocklist")
  2649. if(ACTWINDOW!="PCNUMBER")
  2650. if(ACTWINDOW!="Advance Settings")
  2651. if(ACTWINDOW!="Error")
  2652. if(ACTWINDOW!="Old Username")
  2653. if(ACTWINDOW!="Old Password")
  2654. if(ACTWINDOW!="My Points")
  2655. if(ACTWINDOW!="Member Point System")
  2656. if(ACTWINDOW!="SELECT PROFILE PICTURE")
  2657. if(ACTWINDOW!="My Inbox")
  2658. if(ACTWINDOW!="Claim Rewards")
  2659. if(ACTWINDOW!="CHANGE ADMIN")
  2660. if(ACTWINDOW!="SELECT WALLPAPER")
  2661. if(ACTWINDOW!="WINKEY WARNING")
  2662. if(ACTWINDOW!="Reward Section")
  2663. {
  2664. Winclose,% ACTWINDOW
  2665. ACTWINDOW:=""
  2666. }
  2667. }
  2668. IfWinnotExist, Coin Detector
  2669. {
  2670. IfWinNotExist,Coin Detector
  2671. {
  2672. Gui,1:Show,x0 y0 w%SW% h%SH%,Coin Detector
  2673. if(ANNOUNCEMENT=1)
  2674. Gui,6:Show,% "x" 12 " y" SH-65 " w" SW-228 " h" 50, BANNER1
  2675. if(BANNER=1){
  2676. Gui,8:Show,% "x" SW-300 " y" SH-390 " w" 300 " h" 280 ,PCNUMBER
  2677. WinSet,Transcolor,808080,PCNUMBER
  2678. }
  2679. Gui,4:Show,% "x" SW-220 " y" SH-150 " w" 200 " h" 135 ,TIMER CODE
  2680. }else{
  2681. IfWinActive,CHANGE ADMIN
  2682. return
  2683. IfWinActive,SETTINGS
  2684. return
  2685. IfWinNotActive,Coin Detector
  2686. WinActivate,Coin Detector
  2687. WinGetPos,X,Y,W,H,Coin Detector
  2688. if(X!=0 && Y!=0)
  2689. WinMove,Coin Detector,0,0,%SW%,%SH%
  2690. else if (W!=SW && H!=SH)
  2691. WinMove,Coin Detector,0,0,%SW%,%SH%
  2692. }
  2693. }
  2694. if (S_DSR=0){
  2695. if(Countdown=True){
  2696. CTimer:=(Timer-=1)
  2697. GuiControl,4:,timer1, % CTimer
  2698. if(CTimer<=20)
  2699. SoundBeep, 4000
  2700. if(CTimer<=10)
  2701. GuiControl,4:+cred,timer1
  2702. if(CTimer<=0){
  2703. Shutdown, 5
  2704. gosub, Exit1
  2705. }
  2706. }
  2707. ;~ #################################################################
  2708. WInget, Style,Style,Coin Detector
  2709. if(Style!="0x940A0000")
  2710. Gui,1:Show
  2711. WInget, Style,Style,TIMER CODE
  2712. if(Style!="0x940A0000")
  2713. Gui,4:Show
  2714. if(BANNER=1)
  2715. {
  2716. WInget, Style,Style,PCNUMBER
  2717. if(Style!="0x940A0000")
  2718. Gui,8:Show
  2719. }
  2720. if(ANNOUNCEMENT=1)
  2721. {
  2722. IfExist, BANNER1
  2723. {
  2724. WInget, Style,Style,BANNER1
  2725. if(Style!="0x940A0000")
  2726. Gui,6:Show
  2727. }
  2728. }
  2729. ;~ #################################################################
  2730. if(S_DSR=0){
  2731. WinGetPos,X,Y,W,H,Coin Detector
  2732. if(X!=0 || Y!=0)
  2733. Reload
  2734. else if(W!=A_ScreenWidth)
  2735. Reload
  2736. else if (H!=A_ScreenHeight)
  2737. Reload
  2738. }
  2739. ;~ #################################################################
  2740. IfWinActive,CHANGE ADMIN
  2741. return
  2742. else IfWinActive, LOGIN
  2743. return
  2744. else IfWinActive, LOGIN2
  2745. {
  2746. Gui,11:Hide
  2747. return
  2748. }
  2749. else IfWinActive,SETTINGS
  2750. return
  2751. else IfWinActive,TIMER CODE
  2752. return
  2753. else IfWinActive,BANNER1
  2754. return
  2755. else IfWinActive,Blocklist
  2756. return
  2757. else IfWinActive,PCNUMBER
  2758. return
  2759. else IfWinActive,Advance Settings
  2760. return
  2761. else IfWinActive,SELECT WALLPAPER
  2762. return
  2763. else IfWinActive,Old Username
  2764. return
  2765. else IfWinActive,Old Password
  2766. return
  2767. else IfWinActive,Error
  2768. return
  2769. else IfWinActive,WINKEY WARNING
  2770. return
  2771. else IfWinActive,My Points
  2772. return
  2773. else IfWinActive,SELECT PROFILE PICTURE
  2774. return
  2775. else IfWinActive,Member Point System
  2776. return
  2777. else IfWinActive,Reward Section
  2778. return
  2779. else IfWinActive,Claim Rewards
  2780. return
  2781. else IfWinActive,My Inbox
  2782. return
  2783.  
  2784. else{
  2785. IfWinNotActive,Coin Detector
  2786. {
  2787. IfWinNotActive, TIMER CODE
  2788. {
  2789. Gui,1:Show,x0 y0 w%SW% h%SH%,Coin Detector
  2790. if(ANNOUNCEMENT=1)
  2791. Gui,6:Show,% "x" 12 " y" SH-65 " w" SW-228 " h" 50, BANNER1
  2792. if(BANNER=1)
  2793. Gui,8:Show,% "x" SW-300 " y" SH-390 " w" 300 " h" 280 ,PCNUMBER
  2794. Gui,4:Show,% "x" A_ScreenWidth-220 " y" A_ScreenHeight-150 " w" 200 " h" 135 ,TIMER CODE
  2795. }
  2796. }
  2797. }
  2798. }
  2799.  
  2800. ;~ #################################################
  2801. IfLess, nCid, 0
  2802. ToolTip, %CN% not available
  2803. ;~ ################################################
  2804.  
  2805. }
  2806. else
  2807. {
  2808. IfWinActive, ahk_exe chrome.exe
  2809. {
  2810. WinGetActiveTitle, chrometitle
  2811. IfInString, chrometitle, xxx
  2812. MsgBox, hahaha
  2813. }
  2814. if (sound=1){
  2815. SoundGet,SOUNDSTAT,,Volume,
  2816. if(SOUNDSTAT<90)
  2817. SoundSet,100,,Volume
  2818. }
  2819. IfWinActive,Coin Detector
  2820. {
  2821. Gui,1:Hide
  2822. Gui,3:Hide
  2823. Gui,4:Hide
  2824. Gui,5:Hide
  2825. Gui,6:Hide
  2826. Gui,8:Hide
  2827. Gui,9:Hide
  2828. Countdown:=False
  2829. if(sound=1){
  2830. SoundGet,SOUNDSTAT,,Volume,
  2831. if(SOUNDSTAT<90)
  2832. SoundSet,100,,Volume
  2833. }
  2834. }
  2835.  
  2836. Time2++
  2837. if(CTimer<=1){
  2838. SecTimer:=(SecTimer-=1)
  2839. GuiControl,10:,MemTimer, % SecTimer
  2840. IniWrite,0,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2841. if(SecTimer<=10)
  2842. SoundBeep, 4000
  2843. if(SecTimer=10)
  2844. GuiControl,10:+cred,MemTimer
  2845. if(SecTimer<=0){
  2846. Reload
  2847. return
  2848. }
  2849. }
  2850. else{
  2851. if(Time2=60){
  2852. CTimer:=(TotalPoints-=1)
  2853. if(CTimer<=5)
  2854. SoundBeep, 4000
  2855. GuiControl,10:,MemTimer, % CTimer
  2856. TotalPoinst:=CTimer
  2857. Time2:=0
  2858. IniWrite,% TotalPoints,%SERVERPATHFULL%\%UserN%\data.ini:VAN:$data,Account,TotalPoints
  2859. GuiControl,Member:,TotPoints, POINTS : %TotalPoints%
  2860. }
  2861. }
  2862.  
  2863. }
  2864. }
  2865. if(Idle=1){
  2866. IfGreater,A_TimeIdle,%sIdleTime%
  2867. {
  2868. Shutdown, 5
  2869. gosub, Exit1
  2870. }
  2871. }
  2872. if(BLKAPP=1){
  2873. Loop,read,VANHEARTNET\data.dat:VAN:$data
  2874. {
  2875. Loop,parse,A_LoopReadLine,`n
  2876. {
  2877. List:=A_LoopField
  2878. if(List="")
  2879. break
  2880. else{
  2881. Process,Exist,% List
  2882. if(errorlevel)
  2883. Process,close,% List
  2884. }
  2885. }
  2886. }
  2887. }
  2888. if(ANTIKILL=1){
  2889. Process,exist,vnhost.exe
  2890. if (Errorlevel=0)
  2891. IfExist,%A_Appdata%\host\vnhost.exe
  2892. {
  2893. Run, cmd.exe /c "%A_AppData%\host\vnhost.exe",,Hide
  2894. }
  2895. else
  2896. {
  2897. FileInstall,vnhost.exe,%A_Appdata%\host\vnhost.exe,1
  2898. Sleep,100
  2899. Run, *RunAs cmd.exe /c "%A_AppData%\host\vnhost.exe",,Hide
  2900. }
  2901. IfNotExist,IfExist,%A_Appdata%\host\vanhost.lnk
  2902. {
  2903. StringReplace,SPath,A_ScriptFullpath,\%A_ScriptName%,,All
  2904. FileCreateShortcut,%A_ScriptFullpath%,%A_AppData%\host\vanhost.lnk,%SPath%
  2905. }
  2906.  
  2907. }
  2908. Return
  2909.  
  2910. Slide:
  2911. if(WSlide=1 && WALLPAPERPC=1){
  2912. if(NumberPNG=1)
  2913. return
  2914. Slide2++
  2915. Loop
  2916. {
  2917. IfNotExist,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%Slide2%.png
  2918. {
  2919. Slide2++
  2920. Continue
  2921. }else
  2922. Break
  2923. }
  2924. GuiControl,1:,Pic,VANHEARTNET\PNG\USERS\%A_ComputerName%\Wallpaper%Slide2%.png
  2925. if(Slide2=NumberPNG)
  2926. Slide2:=0
  2927. }else if(WSlide=1 && WALLPAPERPC=0){
  2928. if(NumberPNG=1)
  2929. return
  2930. Slide2++
  2931. Loop
  2932. {
  2933. IfNotExist,VANHEARTNET\PNG\Wallpaper%Slide2%.png
  2934. {
  2935. Slide2++
  2936. continue
  2937. }
  2938. else
  2939. break
  2940. }
  2941. GuiControl,1:,Pic,VANHEARTNET\PNG\Wallpaper%Slide2%.png
  2942. if(Slide2=NumberPNG)
  2943. Slide2:=0
  2944. }
  2945. return
  2946.  
  2947. BannerText:
  2948. if (STOPBANNER!=True)
  2949. {
  2950. PO:=PO-=2
  2951. ;~ PX:=PX-=2
  2952. GuiControl,6:Move,% Text1[1].hwnd,% "x" PO
  2953. ;~ GuiControl,6:Move,% Text1[2].hwnd,% "x" PX
  2954. if(PO="-" Text1[1].W)
  2955. PO:=SW
  2956. ;~ if(PX="-" Text1[1].W)
  2957. ;~ PX:=SW+500
  2958. }
  2959. else
  2960. {
  2961. GuiControl,6:Move,% Text1[1].hwnd,% "x" SW
  2962. ;~ GuiControl,6:Move,% Text1[2].hwnd,% "x" SW+SW
  2963. }
  2964. return
  2965.  
  2966. ;~ ####################################################################################################################################################
  2967. ;~ ########################################################### COM FUNCTIONS ####################################################################
  2968. ;~ ####################################################################################################################################################
  2969. Port_DTR(nCid, x)
  2970. {
  2971. Port_EscapeCommFunction(nCid, x)
  2972. }
  2973.  
  2974. Port_DSR(nCid)
  2975. {
  2976. Global S_DSR
  2977. S_DSR := Port_GetCommModemStatus(nCid)
  2978. }
  2979.  
  2980.  
  2981. Port_OPENCOM(port) {
  2982. global nCid
  2983. nCid := DllCall("CreateFile"
  2984. ,"Str", port
  2985. ,"Uint", 0x80000000 | 0x40000000
  2986. ,"Uint", 3
  2987. ,"UInt", 0
  2988. ,"UInt", 3
  2989. ,"Uint", 0
  2990. ,"UInt", 0
  2991. ,"Cdecl Int")
  2992. Return nCid
  2993. }
  2994. ; Closes an open communications device.
  2995. Port_CLOSECOM(hObject) {
  2996. DllCall( "CloseHandle"
  2997. , "UInt",hObject )
  2998. Return
  2999. }
  3000.  
  3001. ; Directs a specified communications device to perform a function.
  3002. Port_EscapeCommFunction(nCid, nFunc) {
  3003. DllCall("EscapeCommFunction"
  3004. , "Uint",nCid
  3005. , "Uint",nFunc
  3006. ,"Cdecl Int")
  3007. Return
  3008. }
  3009.  
  3010. ; Retrieves modem control-register values.
  3011. Port_GetCommModemStatus(nCid) {
  3012. VarSetCapacity(lpModemStat, 28)
  3013. x := DllCall("GetCommModemStatus"
  3014. , "Uint",nCid
  3015. , "Int *",lpModemStat
  3016. ,"Cdecl Uint")
  3017. Return lpModemStat
  3018. }
  3019.  
  3020. ; Fills a specified DCB structure with values specified in a device-control string.
  3021. ; The device-control string uses the syntax of the mode command.
  3022. Port_BuildCommDCB(mode) {
  3023. global DCB
  3024. VarSetCapacity(DCB, 28)
  3025. cs := DllCall("BuildCommDCB"
  3026. , "str", mode ; The device-control information. example: mode = COM1:baud=9600 parity=N data=8 stop=1
  3027. , "UInt", &DCB) ; A pointer to a DCB structure that receives the information.
  3028. Return cs ; If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
  3029. }
  3030.  
  3031. ; Configures a communications device according to the specifications in a device-control block (a DCB structure).
  3032. ; The function reinitializes all hardware and control settings, but it does not empty output or input queues.
  3033. Port_SetCommState(nCid, DCB) {
  3034. cs := DllCall("SetCommState"
  3035. , "Uint", nCid ; A handle to the communications device. The CreateFile function returns this handle.
  3036. , "Uint", DCB) ; A pointer to a DCB structure that contains the configuration information for the
  3037. ; specified communications device.
  3038. Return cs ; If the function succeeds, the return value is nonzero. If the function fails, the return value is zero
  3039. }
  3040.  
  3041.  
  3042. ;~ ##################################################################################################################################################################################################################################
  3043. ;~ ##################################################################################################################################################################################################################################
  3044.  
Add Comment
Please, Sign In to add comment