vanheartnet

Cabal Updater

Aug 5th, 2020 (edited)
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.85 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Cabal Updater
  4. ;@Ahk2Exe-Set FileVersion, 2.5.1.0
  5. ;@Ahk2Exe-SetInternalName Cabal Updater
  6. ;@Ahk2Exe-SetName Cabal Updater
  7. ;@Ahk2Exe-SetOrigFileName Cabal Updater
  8. ;@Ahk2Exe-Set ProductName, Game Updater
  9. ;@Ahk2Exe-Set ProductVersion, 2.5.1.0
  10. ;@Ahk2Exe-Set Description, Cabal 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.  
  20.  
  21.  
  22. Process,close,launcher.exe
  23. IfNotExist,%A_Temp%\3.0
  24. {
  25. FileCreateDir,%A_Temp%\3.0
  26. Gosub,InstallPNG
  27. }
  28. else
  29. {
  30. FileReMoveDir,%A_Temp%\3.0,1
  31. FileCreateDir,%A_Temp%\3.0
  32. Gosub, InstallPNG
  33. }
  34. FileSetAttrib,+H,%A_Temp%\3.0
  35.  
  36. temp=%A_Temp%\3.0\
  37.  
  38. IfNotExist,vPNG
  39. FileCreateDir,vPNG
  40. gosub,Check_Updates
  41.  
  42. IfExist,cabal.exe
  43. Run,cabal.exe
  44. Else IfExist, cabalmain.exe
  45. Run,cabalmain.exe
  46. Else IfExist,update.exe
  47. Run,update.exe
  48. else
  49. {
  50. MsgBox,16,Error, Some Files are missing or moved.`nPlease Put the File in Cabal Folder...`n `n- В© VANHEARTNET
  51. ExitApp
  52. }
  53. WinWait,Cabal Launcher
  54. WinGetPos,X,Y,W,H,Cabal Launcher
  55. PP=vPNG\
  56. CC:=true
  57. CC2:=true
  58. Loop
  59. {
  60. Loop,%A_Temp%\3.0\*.png,1
  61. {
  62. P:=A_LoopFileName
  63. WinActivate
  64. Imagesearch,locx,locy,0,0, %W%, %H%,*50 %temp%%P%
  65. {
  66. if (errorlevel=0)
  67. {
  68. Process,close,launcher.exe
  69. FileRemoveDir,%A_Temp%\3.0,1
  70. Traytip,CabalPH Online`t,Updated...,,1
  71. Sleep, 3000
  72. ExitApp
  73. }
  74. }
  75. }
  76. Loop,vPNG\*.png,1
  77. {
  78. P:=A_LoopFileName
  79. ifexist,%PP%%P%
  80. {
  81. WinActivate
  82. Imagesearch,locx,locy,0,0, %W%, %H%,*50 %PP%%P%
  83. if (errorlevel = 0)
  84. {
  85. Process,close,launcher.exe
  86. FileRemoveDir,%A_Temp%\3.0,1
  87. Traytip,CabalPH Online`t,Updated...,,1
  88. sleep,3000
  89. ExitApp
  90. }
  91. }
  92. }
  93. sleep,2000
  94. Traytip,CabalPH Online`t,Patching Updates...,,1
  95. }
  96.  
  97. return
  98.  
  99. Esc::
  100. Delete::
  101. Process,close,launcher.exe
  102. ExitApp
  103.  
  104. End::
  105. ExitApp
  106.  
  107. Check_Updates:
  108. ;~ =======================================CHECK VERSION=====================================================
  109. V=2.5.1.0
  110. MFlink=http://www.mediafire.com/file/s3cd9r5prlzlesx/CabalPH_Updater.rar/file
  111. pastebin=https://pastebin.com/Gi1gWyFk
  112. ;~ ============================================================================================
  113. message=CabalPH Updater
  114. message1=`n`nThank You`n`n-VANHEARTNET
  115. message2=CabalPH Updater`n`nLatest version is now available and ready to download`nYou will redirect to a download link.`n`nThank You`n`n-VANHEARTNET
  116. ;~ ============================================================================================
  117.  
  118. URLDownloadToFile,%pastebin%,%A_Temp%\3.0\%message% version.dat
  119. if errorlevel=0
  120. {
  121. fileread,version,%A_Temp%\3.0\%message% version.dat
  122. IfNotInString,version,%V%
  123. {
  124. Loop,read,%A_Temp%\3.0\%message% version.dat
  125. {
  126. str := A_LoopReadLine
  127. s:=StrSplit(str,"version=")
  128. Loop,parse,A_LoopReadLine,`n
  129. {
  130. IfNotInString,str,version=
  131. continue
  132. else
  133. {
  134. rar:=StrSplit(s.2,"</div>")
  135. url1:=rar.1
  136. V2:=url1
  137. break 2
  138. }
  139. }
  140. }
  141.  
  142. MsgBox, 262180, %message%, A new version is Available!`n`nDo you want to download?`nversion : %V2%,10
  143. IfMsgBox,Yes
  144. Run,%MFlink%
  145. }
  146. }
  147.  
  148. ;~ ==================================================================================================================
  149.  
  150. return
  151.  
  152.  
  153. InstallPNG:
  154. FileInstall,cabalph.png,%A_Temp%\3.0\cabalph.png
  155. FileInstall,vPNG\1.png,%A_Temp%\3.0\1.png
  156. FileInstall,vPNG\2.png,%A_Temp%\3.0\2.png
  157. FileInstall,vPNG\3.png,%A_Temp%\3.0\3.png
  158. FileInstall,vPNG\4.png,%A_Temp%\3.0\4.png
  159. FileInstall,vPNG\5.png,%A_Temp%\3.0\5.png
  160. FileInstall,vPNG\6.png,%A_Temp%\3.0\6.png
  161. FileInstall,vPNG\7.png,%A_Temp%\3.0\7.png
  162. return
Add Comment
Please, Sign In to add comment