vanheartnet

SFPH2 Updater

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