Guest User

Untitled

a guest
Aug 24th, 2011
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 1.65 KB | None | 0 0
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_icon=Applic-Miranda.ico
  3. #AutoIt3Wrapper_UseUpx=n
  4. #AutoIt3Wrapper_UseX64=n
  5. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  6. #include <INet.au3>
  7. #include <String.au3>
  8.  
  9. $src = _INetGetSource("http://www.miranda-im.org/download/")
  10. $newv = _StringBetween($src,"title=""Download v",'" class="active"')
  11. $newv = $newv[0]
  12. $atmv = FileGetVersion("miranda32.exe","ProductVersion")
  13.  
  14. If $atmv <> $newv Then
  15.     TrayTip("Miranda Auto-Update","Update from " & $atmv & " to " & $newv & " running",2000)
  16.     ProcessClose("miranda32.exe")
  17.     InetGet("http://miranda.googlecode.com/files/miranda-im-v" & $newv & "-unicode.exe",@TempDir & "\update.exe")
  18.     ShellExecute(@TempDir & "\update.exe","","","open",@SW_HIDE)
  19.  
  20.     WinWait("Miranda IM " & $newv & " Setup","License Agreement")
  21.     ControlClick("Miranda IM " & $newv & " Setup","","[CLASS:Button; INSTANCE:2]")
  22.  
  23.     WinWait("Miranda IM " & $newv & " Setup","Installation Mode")
  24.     ControlClick("Miranda IM " & $newv & " Setup","","[CLASS:Button; INSTANCE:2]")
  25.  
  26.     WinWait("Miranda IM " & $newv & " Setup","Choose Install Location")
  27.     ControlSetText("Miranda IM " & $newv & " Setup","","[CLASS:Edit]",@ScriptDir)
  28.     ControlClick("Miranda IM " & $newv & " Setup","","[CLASS:Button; INSTANCE:2]")
  29.  
  30.  
  31.     WinWait("Miranda IM " & $newv & " Setup","Choose Components")
  32.     ControlClick("Miranda IM " & $newv & " Setup","","[CLASS:Button; INSTANCE:2]")
  33.  
  34.     WinWait("Miranda IM " & $newv & " Setup"," has been installed on your computer.")
  35.     ControlClick("Miranda IM " & $newv & " Setup","","[CLASS:Button; INSTANCE:2]")
  36.     Exit
  37. EndIf
  38.  
  39. ShellExecute("miranda32.exe")
  40. Exit
Advertisement
Add Comment
Please, Sign In to add comment