vanheartnet

Roblox Quick Login

Mar 22nd, 2021 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.41 KB | None | 0 0
  1.  
  2. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  3. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  4. ;@Ahk2Exe-Set FileDescription, Roblox Quick Login © VANHEARTNET
  5. ;@Ahk2Exe-Set FileVersion, 1.0.0.0
  6. ;@Ahk2Exe-SetInternalName Roblox Quick Login
  7. ;@Ahk2Exe-SetName Valorant
  8. ;@Ahk2Exe-SetOrigFileName Roblox Quick Login
  9. ;@Ahk2Exe-Set ProductName, Roblox Quick Login
  10. ;@Ahk2Exe-Set ProductVersion, 1.0.0.0
  11. ;@Ahk2Exe-Set Description, Roblox Quick Login
  12. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  13. ;@Ahk2Exe-Obey U_au, = "%A_IsUnicode%" ? 2 : 1 ; Script ANSI or Unicode?
  14. ;@Ahk2Exe-PostExec "BinMod.exe" "%A_WorkFileName%"
  15. ;@Ahk2Exe-Cont "%U_au%2.>AUTOHOTKEY SCRIPT<.01VANHEARTNET "
  16. ;@Ahk2Exe-SetMainIcon icon1.ico
  17. ;@Ahk2Exe-AddResource Icon1.ico, 160 ; Replaces 'H on blue'
  18. ;@Ahk2Exe-AddResource Icon1.ico, 206 ; Replaces 'S on green'
  19. ;@Ahk2Exe-AddResource Icon1.ico, 207 ; Replaces 'H on red'
  20. ;@Ahk2Exe-AddResource Icon1.ico, 208 ; Replaces 'S on red'
  21.  
  22.  
  23. #SingleInstance,Ignore
  24. ;#SingleInstance,Force
  25. #Persistent
  26. #NoEnv
  27. Menu,tray, NoStandard
  28. Menu, Tray, Tip, Roblox VANHEARTNET
  29. Menu, Tray, Add, Exit,Exit1
  30. SetWorkingDir, %A_ScriptDir%
  31. SetBatchLines, 20ms
  32. #MaxHotkeysPerInterval 99000000
  33. #HotkeyInterval 99000000
  34. #KeyHistory 0
  35. ListLines Off
  36. Process, Priority, , A
  37. SetKeyDelay, -1, -1
  38. SetMouseDelay, -1
  39. SetDefaultMouseSpeed, 0
  40. SetWinDelay, -1
  41. SetControlDelay, -1
  42. DetectHiddenWindows, On
  43. SetTitleMatchMode, 3
  44. SendMode Input
  45. #Include <Gdip_All>
  46. #Include <GdipHelper>
  47. pToken:=Gdip_Startup()
  48.  
  49.  
  50. if not A_IsAdmin
  51. {
  52. Run, *RunAs "%A_ScriptFullpath%"
  53. ExitApp
  54. }
  55.  
  56. IfNotExist,%A_Temp%\reg
  57. {
  58. FileCreateDir,%A_Temp%\reg
  59. FileInstall,logo.png,%A_Temp%\reg\logo.png
  60. }
  61. IfNotExist,\\%A_ComputerName%\Users\%A_UserName%\Documents\RobloxEasyLogin
  62. {
  63. FileCreateDir,\\%A_ComputerName%\Users\%A_UserName%\Documents\RobloxEasyLogin
  64. FileCreateDir,\\%A_ComputerName%\Users\%A_UserName%\Documents\RobloxEasyLogin\Player
  65. IniWrite,\\%A_ComputerName%\Users\%A_UserName%\Documents\RobloxEasyLogin\Player,cfg.ini,Network,PATH
  66.  
  67. }
  68. IfNotExist,cfg.ini
  69. IniWrite,\\%A_ComputerName%\Users\%A_UserName%\Documents\RobloxEasyLogin\Player,cfg.ini,Network,PATH
  70. else
  71. {
  72. IniRead,NPATH,cfg.ini,Network,PATH
  73. if(NPATH="0" || NPATH="" || NPATH="ERROR")
  74. {
  75. NPATH:="Player"
  76. IfNotExist,% NPATH
  77. FileCreateDir,% NPATH
  78. }
  79. }
  80. Gosub,Check_Updates
  81.  
  82. Global HB_Button:=[]
  83.  
  84. BG:="238BCF"
  85. Gui,1:Color,% BG
  86. Gui,1:Font,s16 Bold, Arial Black
  87. Gui,1:Add,Edit,x20 y20 w200 r1 Border Center vEdit1 gEdit1
  88. Gui,1:Add,Edit,x20 y+5 w200 r1 Border Center vEdit2 gEdit2 Password
  89.  
  90. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 21 , y := 105 , w := 198 , h := 50 , Button_Color := "135DC2" , Button_Background_Color := BG , Text := "Login" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := BG , Font_Color_Bottom := "111111" , Window := "1" , Label := "Login" , Default_Button := 0 , Roundness:=5 ) )
  91. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 21 , y+=h+5 , w := 198 , h := 50 , Button_Color := "074128" , Button_Background_Color := BG , Text := "Register" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := BG , Font_Color_Bottom := "111111" , Window := "1" , Label := "Register" , Default_Button := 0 , Roundness:=5 ) )
  92. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 21 , y+=h+5 , w := 198 , h := 50 , Button_Color := "751A4F" , Button_Background_Color := BG , Text := "RESET Google" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := BG , Font_Color_Bottom := "111111" , Window := "1" , Label := "Reset" , Default_Button := 0 , Roundness:=5 ) )
  93. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 21 , y:=60 , w := 198 , h := 80 , Button_Color := "389434" , Button_Background_Color := BG , Text := "SAVE" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := BG , Font_Color_Bottom := "111111" , Window := "1" , Label := "SAVE" , Default_Button := 0 , Roundness:=8 ) )
  94. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 21 , y+=h+5 , w := 198 , h := 80 , Button_Color := "CD036E" , Button_Background_Color := BG , Text := "LOAD" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := BG , Font_Color_Bottom := "111111" , Window := "1" , Label := "LOAD" , Default_Button := 0 , Roundness:=8 ) )
  95. GuiControl,1:Hide,% HB_Button[4].hwnd
  96. GuiControl,1:Hide,% HB_Button[5].hwnd
  97.  
  98.  
  99. Gui,1:Add,Picture,x8 y280 w220 h50 BackgroundTrans vlogo ,%A_Temp%\reg\logo.png
  100.  
  101.  
  102.  
  103. Gui,1:Show,w240 h350, Roblox
  104. SetTimer, HB_Button_Hover , 50
  105. SetTimer, logomove, 50
  106. return
  107. logomove:
  108. xx--
  109. GuiControl,1:move,logo,x%xx%
  110. if(xx="-240")
  111. xx:=241
  112. return
  113.  
  114. SAVE:
  115. ;-----------------------------------------------------
  116. ; In the button label, add the focus grab line
  117. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  118. ; Add the button press function call and test
  119. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  120. return
  121. ;----------------------------------------------
  122. SoundBeep, 5000
  123. Gui,1:+Owndialogs
  124. IfNotExist,C:\Users\%A_UserName%\AppData\Local\Google
  125. {
  126. MsgBox, 262176, Error, Please Login your Roblox account in Googlechrome.
  127. return
  128. }
  129.  
  130. MsgBox, 262180, Warning, Are you sure you want to save this information?`n`nNote:`nYour existing data and Information will be overwritten.
  131. IfMsgBox,Yes
  132. {
  133. FileDelete,%NPATH%\%Edit1%\data
  134. FileDelete,%NPATH%\%Edit1%\data2
  135. Sleep, 10
  136. FileCopy,C:\Users\%A_UserName%\AppData\Local\Google\Chrome\User Data\Default\Cookies,%NPATH%\%Edit1%\data,1
  137. FileCopy,C:\Users\%A_UserName%\AppData\Local\Google\Chrome\User Data\Default\Cookies-journal,%NPATH%\%Edit1%\data2,1
  138. MsgBox, 262208, Message, Success!!!`n`n-Thank You
  139. }
  140. return
  141. LOAD:
  142. ;-----------------------------------------------------
  143. ; In the button label, add the focus grab line
  144. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  145. ; Add the button press function call and test
  146. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  147. return
  148. ;----------------------------------------------
  149. SoundBeep, 5000
  150. Gui,1:+Owndialogs
  151. IfNotExist,C:\Users\%A_UserName%\AppData\Local\Google
  152. {
  153. MsgBox, 262176, Error, Please run Googlechrome First.
  154. return
  155. }
  156. FileDelete,C:\Users\%A_UserName%\AppData\Local\Google\Chrome\User Data\Default\Cookies
  157. FileDelete,C:\Users\%A_UserName%\AppData\Local\Google\Chrome\User Data\Default\Cookies-journal
  158. Loop 5
  159. Process,close,chrome.exe
  160. Sleep 20
  161. FileCopy,%NPATH%\%Edit1%\data,C:\Users\%A_UserName%\AppData\Local\Google\Chrome\User Data\Default\Cookies,1
  162. FileCopy,%NPATH%\%Edit1%\data2,C:\Users\%A_UserName%\AppData\Local\Google\Chrome\User Data\Default\Cookies-journal,1
  163. MsgBox, 262208, Message, Success!!!`n`n-Thank You
  164. return
  165. Login:
  166. ;-----------------------------------------------------
  167. ; In the button label, add the focus grab line
  168. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  169. ; Add the button press function call and test
  170. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  171. return
  172. ;----------------------------------------------
  173. SoundBeep, 5000
  174. Gui,1:+Owndialogs
  175. Gui,1:Submit,Nohide
  176. if (Edit1="") or (Edit2="")
  177. return
  178. IfNotExist,%NPATH%\%Edit1%
  179. {
  180. MsgBox, 262160, Error, Invalid Username or Password!
  181. GuiControl,1:,Edit1,
  182. GuiControl,1:,Edit2,
  183. return
  184.  
  185. }
  186. else
  187. {
  188. IniRead,Pass,%NPATH%\%Edit1%\info.ini,Acc,Pass
  189. if(Edit2 not==Pass)
  190. {
  191. MsgBox, 262160, Error, Invalid Username or Password!
  192. GuiControl,1:,Edit1,
  193. GuiControl,1:,Edit2,
  194. return
  195. }
  196. }
  197. User:=True
  198. loop 3
  199. GuiControl,1:Hide,% HB_Button[A_Index].hwnd
  200. GuiControl,1:Hide,Edit1
  201. GuiControl,1:Hide,Edit2
  202. GuiControl,1:Show,% HB_Button[4].hwnd
  203. GuiControl,1:Show,% HB_Button[5].hwnd
  204. return
  205. Edit1:
  206. Gui,1:Submit,Nohide
  207. Gui,1:+OWndialogs
  208. if Edit1 contains \,`",/,`{,`},`%,`(,`),+,>,<,?,!,@,#,$,^,&,*,',|,:,;``
  209. {
  210. MsgBox, 262160, Error, Illegal Characters
  211. return
  212. }
  213.  
  214. return
  215. Edit2:
  216. Gui,1:Submit,Nohide
  217. Gui,1:+OWndialogs
  218. if Edit2 contains \,`",/,`{,`},`%,`(,`),+,>,<,?,!,@,#,$,^,&,*,',|,:,;``
  219. {
  220. MsgBox, 262160, Error, Illegal Characters
  221. return
  222. }
  223. return
  224. Reset:
  225. ;-----------------------------------------------------
  226. ; In the button label, add the focus grab line
  227. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  228. ; Add the button press function call and test
  229. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  230. return
  231. ;----------------------------------------------
  232. SoundBeep, 5000
  233. loop 5
  234. Process,close,chrome.exe
  235. Sleep 1000
  236. IfExist,C:\Users\%A_UserName%\AppData\Local\Google
  237. FileRemoveDir,C:\Users\%A_UserName%\AppData\Local\Google,1
  238. ;~ Run, *RunAs cmd.exe /c ipconfig/Flushdns,,Hide
  239. ;~ MsgBox, % ComObjCreate("WScript.Shell").Exec("cmd.exe /c ipconfig/Flushdns").StdOut.ReadAll()
  240. Gui,1:+Owndialogs
  241. MsgBox, 262208, Message, Remove google cache Success!!!
  242.  
  243. return
  244. Register:
  245. Gui,1:Hide
  246. Gui,2:Color,% BG
  247. Gui,2:Font,s16 Bold, Arial Black
  248. Gui,2:Add,Edit,x20 y20 w200 r1 Border Center vEdit3
  249. Gui,2:Add,Edit,x20 y+5 w200 r1 Border Center vEdit4 Password
  250. HB_Button.Push( New HB_Flat_Rounded_Button_Type_1( x:= 21 , y:= 120 , w := 198 , h := 50 , Button_Color := "022A06" , Button_Background_Color := BG , Text := "CONFIRM" , Font := "Arial" , Font_Size := 14 " Bold" , Font_Color_Top := BG , Font_Color_Bottom := "111111" , Window := "2" , Label := "CONFIRM" , Default_Button := 0 , Roundness:=5 ) )
  251. Gui,2:Show, w240 h180, Register
  252. return
  253. CONFIRM:
  254. ;-----------------------------------------------------
  255. ; In the button label, add the focus grab line
  256. GuiControl , % HB_Button[ A_GuiControl ].Window ": Focus" , % HB_Button[ A_GuiControl ].Hwnd
  257. ; Add the button press function call and test
  258. if( ! HB_Button[ A_GuiControl ].Draw_Pressed() )
  259. return
  260. ;----------------------------------------------
  261. SoundBeep, 5000
  262. Gui,2:Submit,Nohide
  263. Gui,2:+OWndialogs
  264. if Edit3 contains \,`",/,`{,`},`%,`(,`),+,>,<,?,!,@,#,$,^,&,*,',|,:,;``
  265. {
  266. MsgBox, 262160, Error, Illegal Characters
  267. GuiControl,2:,Edit3,
  268. GuiControl,2:,Edit4,
  269. return
  270. }
  271. Else if Edit4 contains \,`",/,`{,`},`%,`(,`),+,>,<,?,!,@,#,$,^,&,*,',|,:,;``
  272. {
  273. MsgBox, 262160, Error, Illegal Characters
  274. GuiControl,2:,Edit3,
  275. GuiControl,2:,Edit4,
  276. return
  277. }
  278. else if (Edit3="") or (Edit4="")
  279. return
  280. IfExist,%NPATH%\%Edit3%
  281. {
  282. MsgBox, 262160, Error, Username already Exist`, please select different one.
  283. return
  284. }
  285. FileCreateDir,%NPATH%\%Edit3%
  286. IniWrite,%Edit4%,%NPATH%\%Edit3%\info.ini,Acc,Pass
  287. GuiControl,2:,Edit3,
  288. GuiControl,2:,Edit4,
  289. Reload
  290. return
  291.  
  292.  
  293. Esc::
  294. Exit1:
  295. Guiclose:
  296. if(User=True)
  297. reload
  298. FileRemoveDir,%A_Temp%\reg,1
  299. GuiContextMenu:
  300. Gdip_Shutdown(pToken)
  301. ExitApp
  302.  
  303. 2Guiclose:
  304. Reload
  305. return
  306.  
  307.  
  308. Check_Updates:
  309. ;~ =======================================CHECK VERSION=====================================================
  310. V=1.0.0.0
  311. MFlink=http://www.mediafire.com/file/88pnlnlyzio575x/Roblox_Portable_by_%25C2%25A9_VANHEARTNET.rar/file
  312. pastebin=https://pastebin.com/1mfHxPB6
  313. Ytt=https://www.youtube.com/watch?v=Coodor-yxv4
  314. ;~ ============================================================================================
  315. message=Roblox QLogin
  316. message1=`n`nThank You`n`n-VANHEARTNET
  317. message2=Roblox QLogin by © VANHEARTNET`n`nLatest version is now available and ready to download`nYou will redirect to a download link.`n`nThank You`n`n-VANHEARTNET
  318. URLDownloadToFile,%Ytt%,%A_Temp%\reg\Roblox QLogin version2.dat
  319. ;~ ============================================================================================
  320. URLDownloadToFile,%pastebin%,%A_Temp%\reg\Roblox QLogin version.dat
  321. if errorlevel=0
  322. {
  323. fileread,version,%A_Temp%\reg\Roblox QLogin version.dat
  324. IfNotInString,version,%V%
  325. {
  326. Loop,read,%A_Temp%\reg\Roblox QLogin version.dat
  327. {
  328. str := A_LoopReadLine
  329. s:=StrSplit(str,"version=")
  330. Loop,parse,A_LoopReadLine,`n
  331. {
  332. IfNotInString,str,version=
  333. continue
  334. else
  335. {
  336. rar:=StrSplit(s.2,"</div>")
  337. url1:=rar.1
  338. V2:=url1
  339. break 2
  340. }
  341. }
  342. }
  343. if(V2="")
  344. return
  345. MsgBox,262180, Roblox Portable by © VANHEARTNET, A new version is Available!`n`nDo you want to download?`t`t`nversion : %V2%,10
  346. IfMsgBox,Yes
  347. Run,%MFlink%
  348. }
  349. }
  350.  
  351. return
  352. ;~ ==================================================================================================================
  353.  
  354.  
  355.  
  356.  
  357.  
  358.  
  359.  
  360.  
  361.  
  362.  
  363.  
  364.  
  365.  
  366.  
  367.  
  368.  
  369.  
  370.  
  371.  
  372.  
  373.  
  374.  
  375.  
  376.  
  377.  
  378. ;-----------------------------------------------------------------
  379. ;Add the hover fuction to the bottom of your script (or go lib route if you know how to)
  380. HB_Button_Hover(){
  381. Static Index , Hover_On
  382. MouseGetPos,,,, ctrl , 2
  383. if( ! Hover_On && ctrl ){
  384. loop , % HB_Button.Length()
  385. if( ctrl = HB_Button[ A_Index ].hwnd )
  386. HB_Button[ A_Index ].Draw_Hover() , Index := A_Index , Hover_On := 1 , break
  387. }else if( Hover_On = 1 )
  388. if( ctrl != HB_Button[ Index ].Hwnd )
  389. HB_Button[ Index ].Draw_Default() , Hover_On := 0
  390. }
  391. ;-----------------------------------------------------------------
  392.  
  393. ;-----------------------------------------------------------------
  394. ;Add the button class to the bottom of your script (or go lib route if you know how to)
  395.  
  396. class HB_Flat_Rounded_Button_Type_1 {
  397. __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 ){
  398. This.Roundness:=Roundness
  399. This.Text_Color_Top := "0xFF" Font_Color_Top
  400. This.Text_Color_Bottom := "0xFF" Font_Color_Bottom
  401. This.Font := Font
  402. This.Font_Size := Font_Size
  403. This.Text := Text
  404. This.X := x
  405. This.Y := y
  406. This.W := w
  407. This.H := h
  408. This.Button_Background_Color := "0xFF" Button_Background_Color
  409. This.Button_Color := "0xFF" Button_Color
  410. This.Window := Window
  411. This.Label := Label
  412. This.Default_Button := Default_Button
  413. This.Create_Default_Bitmap()
  414. This.Create_Hover_Bitmap()
  415. This.Create_Pressed_Bitmap()
  416. This.Create_Trigger()
  417. sleep, 20
  418. This.Draw_Default()
  419. }
  420. Create_Trigger(){
  421. global
  422. num := HB_Button.Length()+1
  423. Gui , % This.Window ": Add" , Picture , % "x" This.X " y" This.Y " w" This.W " h" This.H " hwndHwnd v" Num " g" This.Label " 0xE"
  424. This.Number := Num , This.Hwnd := Hwnd
  425. }
  426. Create_Default_Bitmap(){
  427. ;Bitmap Created Using: HB Bitmap Maker
  428. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  429. G := Gdip_GraphicsFromImage( pBitmap )
  430. Gdip_SetSmoothingMode( G , 2 )
  431. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  432. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  433. Gdip_DeleteBrush( Brush )
  434. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  435. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  436. Gdip_DeleteBrush( Brush )
  437.  
  438. ;---------------------------------------------------
  439. if(This.Default_Button)
  440. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF4C4F54" , "0xFF35373B" , 1 , 1 )
  441. else
  442. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , This.Button_Color , "0xFF35373B" , 1 , 1 )
  443. ;-------------------------------------------
  444.  
  445. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  446. Gdip_DeleteBrush( Brush )
  447. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  448. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  449. Gdip_DeletePen( Pen )
  450. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  451. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2 " , This.Font , This.W , This.H-1 )
  452. Gdip_DeleteBrush( Brush )
  453. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  454. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1 " , This.Font , This.W , This.H-1 )
  455. Gdip_DeleteBrush( Brush )
  456. Gdip_DeleteGraphics( G )
  457. This.Default_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  458. Gdip_DisposeImage(pBitmap)
  459. }
  460. Create_Hover_Bitmap(){
  461. ;Bitmap Created Using: HB Bitmap Maker
  462. pBitmap:=Gdip_CreateBitmap( This.W , This.H ) ;96x29
  463. G := Gdip_GraphicsFromImage( pBitmap )
  464. Gdip_SetSmoothingMode( G , 2 )
  465. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  466. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  467. Gdip_DeleteBrush( Brush )
  468.  
  469. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF61646A" , "0xFF2E2124" , 1 , 1 )
  470. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  471. Gdip_DeleteBrush( Brush )
  472. ;---------------------------------------------------------------------------
  473. if(This.Default_Button)
  474. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF55585D" , "0xFF3B3E41" , 1 , 1 )
  475.  
  476. else
  477. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0x44A826A2" , "0xFF3B3E41" , 1 , 1 )
  478. ;----------------------------------------------------------------
  479. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-2 , This.H-5 , This.Roundness )
  480. Gdip_DeleteBrush( Brush )
  481. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  482. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  483. Gdip_DeletePen( Pen )
  484. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  485. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y2" , This.Font , This.W , This.H-1 )
  486. Gdip_DeleteBrush( Brush )
  487. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  488. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y1" , This.Font , This.W , This.H-1 )
  489. Gdip_DeleteBrush( Brush )
  490. Gdip_DeleteGraphics( G )
  491. This.Hover_Bitmap := Gdip_CreateHBITMAPFromBitmap(pBitmap)
  492. Gdip_DisposeImage(pBitmap)
  493. }
  494. Create_Pressed_Bitmap(){
  495. pBitmap:=Gdip_CreateBitmap( This.W , This.H )
  496. G := Gdip_GraphicsFromImage( pBitmap )
  497. Gdip_SetSmoothingMode( G , 2 )
  498. Brush := Gdip_BrushCreateSolid( This.Button_Background_Color )
  499. Gdip_FillRectangle( G , Brush , -1 , -1 , This.W+2 , This.H+2 )
  500. Gdip_DeleteBrush( Brush )
  501. Brush := Gdip_CreateLineBrushFromRect( 0 , 0 , This.W , This.H , "0xFF2A2C2E" , "0xFF45474E" , 1 , 1 )
  502. Gdip_FillRoundedRectangle( G , Brush , 0 , 1 , This.W , This.H-3 , This.Roundness )
  503. Gdip_DeleteBrush( Brush )
  504. Brush := Gdip_BrushCreateSolid( "0xFF2A2C2E" )
  505. Gdip_FillRoundedRectangle( G , Brush , 0 , 0 , This.W , This.H-8 , This.Roundness )
  506. Gdip_DeleteBrush( Brush )
  507. Brush := Gdip_BrushCreateSolid( "0xFF46474D" )
  508. Gdip_FillRoundedRectangle( G , Brush , 0 , 7 , This.W , This.H-8 , This.Roundness )
  509. Gdip_DeleteBrush( Brush )
  510. ;------------------------------------------------------------------
  511. if(This.Default_Button)
  512. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF43474B" , 1 , 1 )
  513. else
  514. Brush := Gdip_CreateLineBrushFromRect( 5 , 3 , This.W ,This.H-7 , "0xFF333639" , "0xFF0066aa" , 1 , 1 )
  515. ;-----------------------------------------------------------------------
  516. Gdip_FillRoundedRectangle( G , Brush , 1 , 2 , This.W-3 , This.H-6 , This.Roundness )
  517. Gdip_DeleteBrush( Brush )
  518. Pen := Gdip_CreatePen( "0xFF1A1C1F" , 1 )
  519. Gdip_DrawRoundedRectangle( G , Pen , 0 , 0 , This.W-1 , This.H-3 , This.Roundness )
  520. Gdip_DeletePen( Pen )
  521. Brush := Gdip_BrushCreateSolid( This.Text_Color_Bottom )
  522. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x1 y3" , This.Font , This.W , This.H-1 )
  523. Gdip_DeleteBrush( Brush )
  524. Brush := Gdip_BrushCreateSolid( This.Text_Color_Top )
  525. Gdip_TextToGraphics( G , This.Text , "s" This.Font_Size " Center vCenter c" Brush " x0 y2" , This.Font , This.W , This.H-1 )
  526. Gdip_DeleteBrush( Brush )
  527. Gdip_DeleteGraphics( G )
  528. This.Pressed_Bitmap := Gdip_CreateHBITMAPFromBitmap( pBitmap )
  529. Gdip_DisposeImage( pBitmap )
  530. }
  531. Draw_Default(){
  532. SetImage( This.Hwnd , This.Default_Bitmap )
  533. }
  534. Draw_Hover(){
  535. SetImage( This.Hwnd , This.Hover_Bitmap )
  536. }
  537. Draw_Pressed(){
  538. SetImage( This.Hwnd , This.Pressed_Bitmap )
  539. SetTimer , HB_Button_Hover , Off
  540. While( GetKeyState( "LButton" ) )
  541. sleep , 10
  542. SetTimer , HB_Button_Hover , On
  543. MouseGetPos,,,, ctrl , 2
  544. if( This.Hwnd != ctrl ){
  545. This.Draw_Default()
  546. return False
  547. }else {
  548. This.Draw_Hover()
  549. return true
  550. }
  551. }
  552. }
  553.  
Add Comment
Please, Sign In to add comment