vanheartnet

Cyber Hunter Updater

Aug 7th, 2020 (edited)
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.75 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Cyber Hunter Game Updater
  4. ;@Ahk2Exe-Set FileVersion, 2.8.1.0
  5. ;@Ahk2Exe-SetInternalName Cyber Hunter Updater
  6. ;@Ahk2Exe-SetName Game Updater
  7. ;@Ahk2Exe-SetOrigFileName Cyber Hunter Game Updater
  8. ;@Ahk2Exe-Set ProductName, Game Updater
  9. ;@Ahk2Exe-Set ProductVersion, 2.8.1.0
  10. ;@Ahk2Exe-Set Description, Cyber Hunter Game Updater
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12.  
  13. #SingleInstance,Force
  14. #NoEnv
  15. #Persistent
  16. Menu,Tray,NoStandard
  17. SetWorkingDir %A_ScriptDir%
  18. SetTitleMatchMode,2
  19. CoordMode,Pixel,Client
  20.  
  21.  
  22. Process,close,client.exe
  23. Process,Exist,CCMini.exe
  24. IfExist, launcher.exe
  25. Run, launcher.exe
  26. else
  27. {
  28. MsgBox,16,Error, Some Files are missing or moved.
  29. ExitApp
  30. }
  31.  
  32. WinWait,ahk_class Win32Window ahk_exe client.exe
  33. Loop
  34. {
  35. IfWinExist,ahk_class MPAY_LOGIN
  36. {
  37. WinActivate
  38. Process,close,client.exe
  39. Process,close,CCMini.exe
  40. gosub,Check_Updates
  41. FileDelete,%A_Temp%\Cyber Hunter Updater version.dat
  42. TrayTip,Cyber Hunter ,Updated... `t `t,,1
  43. sleep,5000
  44. ExitApp
  45. }
  46. else
  47. {
  48. WinActivate,ahk_class Win32Window
  49. sleep, 2000
  50. WinActivate,ahk_class Win32Window
  51. }
  52. }
  53. return
  54.  
  55. Delete::
  56. Process,close,client.exe
  57. Process,close,CCMini.exe
  58. ExitApp
  59. End::
  60. ExitApp
  61.  
  62. Check_Updates:
  63. ;~ =======================================CHECK VERSION=====================================================
  64. V=2.8.1.0
  65. MFlink=https://www.mediafire.com/file/uqxk26y7ngvur7u/Cyber+Hunter+Updater.rar/file
  66. pastebin=https://pastebin.com/9NmfHXAj
  67. ;~ ============================================================================================
  68. message=Cyber Hunter Updater
  69. message1=`n`nThank You`n`n-VANHEARTNET
  70. message2=Cyber Hunter Updater`n`nLatest version is now available and ready to download`nYou will redirect to a download link.`n`nThank You`n`n-VANHEARTNET
  71. ;~ ============================================================================================
  72.  
  73. URLDownloadToFile,%pastebin%,%A_Temp%\%message% version.dat
  74. if errorlevel=0
  75. {
  76. fileread,version,%A_Temp%\%message% version.dat
  77. IfNotInString,version,%V%
  78. {
  79. Loop,read,%A_Temp%\%message% version.dat
  80. {
  81. str := A_LoopReadLine
  82. s:=StrSplit(str,"version=")
  83. Loop,parse,A_LoopReadLine,`n
  84. {
  85. IfNotInString,str,version=
  86. continue
  87. else
  88. {
  89. rar:=StrSplit(s.2,"</div>")
  90. url1:=rar.1
  91. V2:=url1
  92. break 2
  93. }
  94. }
  95. }
  96.  
  97. MsgBox, 36, %message%, A new version is Available!`n`nDo you want to download?`nversion : %V2%
  98. IfMsgBox,Yes
  99. Run,%MFlink%
  100. }
  101. }
  102.  
  103. ;~ ==================================================================================================================
  104.  
  105. return
Add Comment
Please, Sign In to add comment