vanheartnet

Ros Updater

Feb 29th, 2020 (edited)
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. ;@Ahk2Exe-SetCompanyName VANHEARTNET LTD. INC.
  2. ;@Ahk2Exe-SetCopyright All rights reserved © VANHEARTNET
  3. ;@Ahk2Exe-Set FileDescription, Rules Of Survival
  4. ;@Ahk2Exe-Set FileVersion, 3.5.5.0
  5. ;@Ahk2Exe-SetInternalName Rules Of Survival Updater
  6. ;@Ahk2Exe-SetName GPoints ROS Updater
  7. ;@Ahk2Exe-SetOrigFileName Rules Of Survival
  8. ;@Ahk2Exe-Set ProductName, ROS Updater
  9. ;@Ahk2Exe-Set ProductVersion, 3.5.5.0
  10. ;@Ahk2Exe-Set Description, Rules Of Survival
  11. ;@Ahk2Exe-Set Comments, Software Created by : VANHEARTNET
  12.  
  13. #SingleInstance, Force
  14. #NoEnv
  15. #Persistent
  16. Menu,Tray, NoStandard
  17. DetectHiddenText, On
  18. SetTitleMatchMode, 2
  19. SetWorkingDir %A_ScriptDir%
  20. CoordMode, Pixel,Client
  21. CoordMode,Mouse,Client
  22.  
  23.  
  24. IfNotExist,%A_Temp%\3.0
  25. FileCreateDir,%A_Temp%\3.0
  26. FileSetAttrib,+H,%A_Temp%\3.0
  27. FileInstall,OKImage.png,%A_Temp%\3.0\0.png
  28. FileInstall,1.png,%A_Temp%\3.0\1.png
  29. FileInstall,2.png,%A_Temp%\3.0\2.png
  30.  
  31. IfNotExist,vPNG
  32. FileCreateDir,vPNG
  33.  
  34. Process,Exist,ros.exe
  35. {
  36. IF !Errorlevel=0
  37. Process,close,ros.exe
  38. }
  39. gosub,Check_Updates
  40. IfExist, ros.exe
  41. {
  42. Run, ros.exe
  43. }
  44. else
  45. {
  46. MsgBox,16,Error, Some Files are missing or moved.
  47. FileDelete,%A_Temp%\ROS Updater version.dat
  48. ExitApp
  49. }
  50. WinWait,ahk_class Win32Window0 ahk_exe ros.exe
  51. loop
  52. {
  53. IfWinExist,ahk_class MPAY_LOGIN
  54. {
  55. Process,close,ros.exe
  56. TrayTip,Rules of Survival,is Updated!`t `t `t,,1
  57. sleep,2000
  58. FileRemoveDir,%A_Temp%\3.0,1
  59. FileDelete,%A_Temp%\ROS Updater version.dat
  60. ExitApp
  61. }
  62. else
  63. Sleep,2000
  64. IfWinNotActive,ahk_class Win32Window0 ahk_exe ros.exe
  65. WinActivate,ahk_class Win32Window0 ahk_exe ros.exe
  66. WinGetPos,XW,YW,WW,HW,A
  67. Loop,%A_Temp%\3.0\*.png,1
  68. {
  69. P:=A_LoopFileName
  70. IfWinNotActive,ahk_class Win32Window0 ahk_exe ros.exe
  71. WinActivate,
  72. ImageSearch, FoundDownloadedX,FoundDownloadedY,0,0,%WW%,%HW%,*50 %A_Temp%\3.0\%P%
  73. if (ErrorLevel = 0)
  74. Reload
  75. }
  76. Loop,vPNG\*.png,1
  77. {
  78. P:=A_LoopFileName
  79. IfWinNotActive,ahk_class Win32Window0 ahk_exe ros.exe
  80. WinActivate,
  81. ImageSearch, FoundDownloadedX,FoundDownloadedY,0,0,%WW%,%HW%,*50 vPNG\%P%
  82. if (ErrorLevel = 0)
  83. Reload
  84. }
  85.  
  86. IfWinExist, ahk_class Ghost ahk_exe dwm.exe
  87. {
  88. TrayTip,ROS, Game is not Responding. This might take a while.`t`t,5,2
  89. sleep,30000
  90. }
  91. }
  92. return
  93.  
  94.  
  95. Esc::
  96. Process,close,ros.exe
  97. FileRemoveDir,%A_Temp%\3.0,1
  98. ExitApp
  99.  
  100. End::
  101. ExitApp
  102.  
  103.  
  104. Check_Updates:
  105. ;~ =======================================CHECK VERSION=====================================================
  106. V=3.5.5.0
  107. MFlink=http://www.mediafire.com/file/ozgrfeg7xv494cq/Ros_Updater.rar/file
  108. pastebin=https://pastebin.com/MimZwa4G
  109. ;~ ============================================================================================
  110. message=ROS Updater
  111. message1=`n`nThank You`n`n-VANHEARTNET
  112. message2=ROS Updater`n`nLatest version is now available and ready to download`nYou will redirect to a download link.`n`nThank You`n`n-VANHEARTNET
  113. ;~ ============================================================================================
  114.  
  115. URLDownloadToFile,%pastebin%,%A_Temp%\3.0\%message% version.dat
  116. if errorlevel=0
  117. {
  118. fileread,version,%A_Temp%\3.0\%message% version.dat
  119. IfNotInString,version,%V%
  120. {
  121. Loop,read,%A_Temp%\3.0\%message% version.dat
  122. {
  123. str := A_LoopReadLine
  124. s:=StrSplit(str,"version=")
  125. Loop,parse,A_LoopReadLine,`n
  126. {
  127. IfNotInString,str,version=
  128. continue
  129. else
  130. {
  131. rar:=StrSplit(s.2,"</div>")
  132. url1:=rar.1
  133. V2:=url1
  134. break 2
  135. }
  136. }
  137. }
  138.  
  139. MsgBox,262180, %message%, A new version is Available!`n`nDo you want to download?`nversion : %V2%,10
  140. IfMsgBox,Yes
  141. Run,%MFlink%
  142. }
  143. }
  144.  
  145. ;~ ==================================================================================================================
  146.  
  147. return
  148.  
Add Comment
Please, Sign In to add comment