Advertisement
rcmaehl

Untitled

Aug 7th, 2011
193
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 15.66 KB | None | 0 0
  1. #AutoIt3Wrapper_Au3Check_Parameters=-d -w 1 -w 2 -w 3 -w 4 -w 5 -w 6 -w 7
  2. #cs
  3.  
  4. SOURCE CODE FOR URSafe INDEV 1.2.0.0.1
  5.  
  6. Todo List
  7.  
  8. 1. Add Error Handling <- May not be needed
  9. 2. Improve Performance <- Check with guinness for optimizations
  10. 3. Add Options for almost everything <- Add at least 1 per release version
  11. 4. Enable changing of hotkeys <- Implement by 1.5.0.0
  12. 5. Enable Password Change after saving it.
  13. #ce
  14.  
  15. ;Allow Only One Instance
  16. If _Singleton("URSafe", 1) = 0 Then Exit
  17.  
  18. ;What To Include When Compiling
  19. #include <Constants.au3>
  20. #include <Date.au3>
  21. #include <GuiConstantsEx.au3>
  22. #include <Misc.au3>
  23. #include <Process.au3>
  24. #include <String.au3>
  25.  
  26. ;Declare Variables
  27. ;Message Variables
  28. Local $Msg, $TrayMsg
  29.  
  30. ;Feedback System Variables
  31. Local $FB_Pending, $Feedback, $Port
  32.  
  33. ;GUI Menu Variables
  34. Local $Menu_Block, $Menu_File, $Menu_Help, $Menu_Options, $Menu_Refresh, $Menu_Startup
  35.  
  36. ;GUI Menu Item Variables
  37. Local $Item_Block_All, $Item_Block_Shutdown, $Item_Credits, $Item_Exit, $Item_Feedback, $Item_Hide
  38. Local $Item_Math_Unlock, $Item_Reset_Five, $Item_Reset_Ten, $Item_Reset_Twenty, $Item_Start_Locked
  39. Local $Item_Start_Update, $Item_Update
  40.  
  41. ;Other GUI Control Variables
  42. Local $CreditsGUI, $CreditsOK, $GUI, $Input, $Instructions, $Toggle
  43.  
  44. ;Math Unlock Variables
  45. Local $MathUnlock, $RanA, $RanB
  46.  
  47. ;Settings Variables
  48. Local $Block_All, $Block_Shutdown
  49. Local $Start_Update, $Start_Locked, $Pass_Saved, $Password
  50.  
  51. ;Misc Variables
  52. Local $Locked, $Refresh, $RefreshTimer, $Update_File, $Version_File, $WinXY
  53.  
  54. ;Declare Constants
  55. Const $DevBuild = "1.2.0.0.1"
  56. Const $InDev = True
  57. Const $Log = @ScriptDir & "\URSafe.log"
  58. Const $Settings = @ScriptDir & "\settings.ini"
  59. Const $User32 = DllOpen("user32.dll")
  60. Const $Version = "1.2.0.0"
  61.  
  62. ;Action on Tray Icon Click
  63. TraySetClick(0)
  64.  
  65. ;Set Tray Icon
  66. TraySetIcon("Shell32.dll", -48)
  67.  
  68. ;Don't Close On ESC
  69. Opt('GUICloseOnESC', 0)
  70.  
  71. ;Ensure All Variables Are Included
  72. Opt('MustDeclareVars', 1)
  73.  
  74. ;Don't Pause Script When In Tray
  75. Opt('TrayAutoPause', 0)
  76.  
  77. ;Set Settings Variables
  78. $Block_All = False
  79. $Block_Shutdown = False
  80. $FB_Pending = False
  81. $MathUnlock = False
  82. $Start_Locked = False
  83. $Start_Update = False
  84. $Refresh = 10000
  85.  
  86. ;Set Password Status
  87. $Pass_Saved = False
  88.  
  89. ;Set URSafe Status
  90. $Locked = False
  91.  
  92. ;Log URSafe Execution
  93. FileWriteLine($Log, _Now() & " : " & "URSafe Opened")
  94.  
  95. ;Call The GUI
  96. GUI()
  97.  
  98. ;Display GUI
  99. Func GUI()
  100. ;   Create GUI And Ctrls
  101.     $GUI = GUICreate("URSafe - Version " & $Version, @DesktopWidth, @DesktopHeight, 0, 0, 0x10000288)
  102.         $Menu_File = GUICtrlCreateMenu("File")
  103.             $Item_Hide = GUICtrlCreateMenuItem("Hide", $Menu_File, 1)
  104.                 GUICtrlCreateMenuItem("", $Menu_File, 2)
  105.             $Item_Exit = GUICtrlCreateMenuItem("Exit", $Menu_File, 3)
  106.         $Menu_Options = GUICtrlCreateMenu("Options")
  107.             $Menu_Block = GUICtrlCreateMenu("Don't Allow ...", $Menu_Options, 1)
  108.                 $Item_Block_All = GUICtrlCreateMenuItem("All", $Menu_Block, 1)
  109.                     GUICtrlCreateMenuItem("", $Menu_Block, 2)
  110.                 $Item_Block_Shutdown = GUICtrlCreateMenuItem("Shutdown", $Menu_Block, 3)
  111.             $Menu_Startup = GUICtrlCreateMenu("On Startup ...", $Menu_Options, 2)
  112.                 $Item_Start_Locked = GUICtrlCreateMenuItem("Lock URSafe", $Menu_Startup, 1)
  113.                 $Item_Start_Update = GUICtrlCreateMenuItem("Update URSafe", $Menu_Startup, 2)
  114.             $Menu_Refresh = GUICtrlCreateMenu("Refresh at ...", $Menu_Options, 3)
  115.                 $Item_Reset_Five = GUICtrlCreateMenuItem("5 seconds", $Menu_Refresh, 1, 1)
  116.                 $Item_Reset_Ten = GUICtrlCreateMenuItem("10 seconds", $Menu_Refresh, 2, 1)
  117.                 $Item_Reset_Twenty = GUICtrlCreateMenuItem("20 seconds", $Menu_Refresh, 3, 1)
  118.         $Menu_Help = GUICtrlCreateMenu("Help")
  119.             $Item_Credits = GUICtrlCreateMenuItem("Credits", $Menu_Help, 1)
  120.             $Item_Feedback = GUICtrlCreateMenuItem("Feedback", $Menu_Help, 2)
  121.                 GUICtrlCreateMenuItem("", $Menu_Help, 3)
  122.             $Item_Math_Unlock = GUICtrlCreateMenuItem("Math Unlock", $Menu_Help, 5)
  123.                 GUICtrlCreateMenuItem("", $Menu_Help, 5)
  124.             $Item_Update = GUICtrlCreateMenuItem("Update", $Menu_Help, 6)
  125.         GUICtrlCreatePic("./pic.jpg", 0, 0, @DesktopWidth, @DesktopHeight, 0x1000)
  126.         $Instructions = GUICtrlCreateLabel("Enter Password to Lock", 50, 30, 230, 20, 0x1001)
  127.         $Input = GUICtrlCreateInput("", 50, 50, 230, 20, 0x00A0)
  128.         $Toggle = GUICtrlCreateButton("Lock", 280, 50, 50, 20)
  129.         $Feedback = GUICtrlCreateInput("", 280, 30, 50, 20, 0x44)
  130.         GUICtrlSetState($Feedback, $GUI_DISABLE)
  131.  
  132. ;   Call Startup
  133.     Startup()
  134.  
  135. ;   Loop
  136.     While 1
  137. ;       Get GUI Messages
  138.         $Msg = GUIGetMsg()
  139.  
  140. ;       Get Tray Messages
  141.         $TrayMsg = TrayGetMsg()
  142.  
  143. ;       Run Action decided by Message
  144.         Select
  145.  
  146. ;           Close URSafe
  147.             Case $Msg = $Item_Exit
  148.                 FileWriteLine($Log, _Now() & " : " & "URSafe Closed")
  149.                 DllClose($User32)
  150.                 ExitLoop
  151.  
  152.             Case $Msg = $Toggle Or _IsPressed("91", $User32)
  153.                 Status()
  154.  
  155.             Case $Msg = $Item_Math_Unlock
  156.                 MathUnlock()
  157.  
  158. ;           IMPORTANT! DO NOT CHANGE!
  159. ;           Activate Protection When Locked
  160.             Case $Locked
  161.                 Protection()
  162.  
  163. ;           MouseTrap Refresh Control
  164.             Case $Msg = $Item_Reset_Five
  165.                 $Refresh = 5000
  166.  
  167.             Case $Msg = $Item_Reset_Ten
  168.                 $Refresh = 10000
  169.  
  170.             Case $Msg = $Item_Reset_Twenty
  171.                 $Refresh = 20000
  172.  
  173.             Case $Msg = $Item_Feedback
  174.                 Feedback()
  175.  
  176. ;           Update Startup Update Status
  177.             Case $Msg = $Item_Start_Update
  178.                 FileSetAttrib($Settings, "-RSH")
  179.                 If Not $Start_Update Then
  180.                     GUICtrlSetState($Item_Start_Update, $GUI_CHECKED)
  181.                     INIWrite($Settings, "Main", "Update on Start", "True")
  182.                     $Start_Update = True
  183.                 Else
  184.                     GUICtrlSetState($Item_Start_Update, $GUI_UNCHECKED)
  185.                     INIWrite($Settings, "Main", "Update on Start", "False")
  186.                     $Start_Update = False
  187.                 EndIf
  188.                 FileSetAttrib($Settings, "+RSH")
  189.  
  190. ;           Update Startup Locked Status
  191.             Case $Msg = $Item_Start_Locked
  192.                 FileSetAttrib($Settings, "-RSH")
  193.                 If Not $Start_Locked Then
  194.                     GUICtrlSetState($Item_Start_Locked, $GUI_CHECKED)
  195.                     INIWrite($Settings, "Main", "Lock on Start", "True")
  196.                     $Start_Locked = True
  197.                 Else
  198.                     GUICtrlSetState($Item_Start_Locked, $GUI_UNCHECKED)
  199.                     INIWrite($Settings, "Main", "Lock on Start", "False")
  200.                     $Start_Locked = False
  201.                 EndIf
  202.                 FileSetAttrib($Settings, "+RSH")
  203.  
  204. ;           Update All Blocking Statuses
  205.             Case $Msg = $Item_Block_All
  206.                 $Block_All = True
  207.                 ContinueCase
  208.  
  209. ;           Update Shutdown Blocking Status
  210.             Case $Msg = $Item_Block_Shutdown
  211.                 If Not $Block_Shutdown Then
  212.                     GUICtrlSetState($Item_Block_Shutdown, $GUI_CHECKED)
  213.                     FileSetAttrib($Settings, "-RSH")
  214.                     INIWrite($Settings, "Blocking", "Shutdown", "True")
  215.                     FileSetAttrib($Settings, "+RSH")
  216.                     $Block_Shutdown = True
  217.                 ElseIf $Block_All Then
  218.                     $Block_All = False
  219.                 Else
  220.                     GUICtrlSetState($Item_Block_Shutdown, $GUI_UNCHECKED)
  221.                     FileSetAttrib($Settings, "-RSH")
  222.                     INIWrite($Settings, "Blocking", "Shutdown", "False")
  223.                     FileSetAttrib($Settings, "+RSH")
  224.                     $Block_Shutdown = False
  225.                 EndIf
  226.  
  227. ;           Update URSafe
  228.             Case $Msg = $Item_Update
  229.                 Update()
  230.  
  231. ;           Restore URSafe From Tray
  232.             Case $TrayMsg = $Tray_Event_PrimaryDouble
  233.                 WinSetState($GUI, "", @SW_SHOW)
  234.                 WinMove($GUI, "", 0, 0)
  235.  
  236. ;           Hide URSafe to Tray
  237.             Case $Msg = $Item_Hide
  238.                 WinSetState($GUI, "", @SW_HIDE)
  239.  
  240. ;           Display Credits
  241.             Case $Msg = $Item_Credits
  242.                 Credits()
  243.  
  244.             Case $Msg = $CreditsOK And WinExists("Credits", "")
  245.                 GUIDelete($CreditsGUI)
  246.  
  247. ;           Anything Not Listed Above
  248.             Case Else
  249.                 ;;;
  250.  
  251.         EndSelect
  252.     WEnd
  253.     Exit(0)
  254. EndFunc
  255.  
  256.  
  257. ; Display Credits
  258. Func Credits()
  259.     $CreditsGUI = GUICreate("Credits", 220, 200, -1, -1, 0x10C00000)
  260.         GUICtrlCreateLabel("Autoit Help:", 10, 10, 90, 20)
  261.         GUICtrlCreateLabel("Guinness", 120, 10, 90, 20)
  262.         GUICtrlCreateLabel("Original Idea:", 10, 30, 90, 20)
  263.         GUICtrlCreateLabel("Computerfreaker", 120, 30, 90, 20)
  264.         GUICtrlCreateLabel("URSafe Coding:", 10, 50, 90, 20)
  265.         GUICtrlCreateLabel("Robert C. Maehl", 120, 50, 90, 20)
  266.         GUICtrlCreateLabel("URSafe Testing:", 10, 70, 90, 20)
  267.         GUICtrlCreateLabel("TheCyberShocker", 120, 70, 90, 20)
  268.         GUICtrlCreateLabel("Web Hosting:", 10, 90, 90, 20)
  269.         GUICtrlCreateLabel("E10Host", 120, 90, 90, 20)
  270.         GUICtrlCreateLabel("Google Code", 120, 110, 90, 20)
  271.         $CreditsOK = GUICtrlCreateButton("Ok", 180, 170, 30, 20)
  272. EndFunc
  273.  
  274. Func Feedback()
  275.     If Not $FB_Pending Then
  276.         $FB_Pending = True
  277.         GUICtrlSetData($Instructions, "Enter Your Feedback Below")
  278.         GUICtrlSetData($Toggle, "Submit")
  279.         GUICtrlSetPos($Feedback, 50, 50, 230, 100)
  280.         GUICtrlSetPos($Input, 280, 30, 50, 20)
  281.         GUICtrlSetState($Feedback, $GUI_ENABLE+$GUI_FOCUS)
  282.         If Not $Pass_Saved Then GUICtrlSetState($Input, $GUI_DISABLE)
  283.         TCPStartup()
  284. ;           $Port = TCPConnect(TCPNameToIP("fcofix.dyndns.org"), 5309)
  285.             $Port = TCPConnect("127.0.0.1", 5309)
  286.             If @error Then
  287.                 MsgBox(4112, "Error", "Failed at capturing port")
  288.             Else
  289.                 TCPSend($Port, GUICtrlRead($Feedback))
  290.                 If @error Then
  291.                     MsgBox(4112, "Error", "Failed at sending data." & @CRLF & "Try again later.")
  292.                 Else
  293.                     MsgBox(0x0, "Thanks", "Thank you for your feedback!")
  294.                 EndIf
  295.             EndIf
  296.     Else
  297.         $FB_Pending = False
  298.         GUICtrlSetData($Instructions, "Enter Password to Lock")
  299.         GUICtrlSetData($Feedback, "")
  300.         GUICtrlSetData($Toggle, "Lock")
  301.         GUICtrlSetPos($Input, 50, 50, 230, 20)
  302.         GUICtrlSetPos($Feedback, 280, 30, 50, 20)
  303.         GUICtrlSetState($Feedback, $GUI_DISABLE)
  304.         If Not $Pass_Saved Then GUICtrlSetState($Input, $GUI_ENABLE+$GUI_FOCUS)
  305.         TCPShutdown()
  306.     EndIf
  307. EndFunc
  308.  
  309. ; Execute Math Unlock
  310. Func MathUnlock()
  311.     If $MathUnlock = False Then
  312.         $MathUnlock = True
  313.         $RanA = Random(20, 50, 1)
  314.         $RanB = Random(1000, 8000, 1)
  315.         GUICtrlSetData($Instructions, "What is " & $RanA & " cubed minus " & $RanB  & "?")
  316.     Else
  317.         GUICtrlSetData($Instructions, "Enter Password to Unlock")
  318.         $MathUnlock = False
  319.     EndIf
  320. EndFunc
  321.  
  322.  
  323. ; Execute Protections
  324. Func Protection()
  325.     If TimerDIff($RefreshTimer) >= $Refresh Then
  326.         $RefreshTimer = TimerInit()
  327.         _MouseTrap()
  328.         _MouseTrap(0, 0, @DesktopWidth, 180)
  329.     EndIf
  330.     $WinXY = WinGetPos($GUI)
  331.     If $WinXY[0] <> 0 Or $WinXY[1] <> 0 Or Not BitAND(WinGetState($GUI), 8) Then
  332.         WinMove($GUI, "", 0, 0)
  333.         WinSetOnTop($GUI, "", 1)
  334.         WinActivate($GUI)
  335.     EndIf
  336.     If _IsPressed("5B", $User32) Or _IsPressed("5C", $User32) Then
  337.         _MouseTrap()
  338.         Sleep(100)
  339.         _MouseTrap(0, 0, @DesktopWidth, 180)
  340.     EndIf
  341.     If ProcessExists("shutdown.exe") and $Block_Shutdown Then _RunDOS("shutdown /a")
  342. EndFunc
  343.  
  344.  
  345. ; Execute Startup
  346. Func Startup()
  347.     If Not FileExists($Settings) Then
  348.         INIWrite($Settings, "#URSafe Settings#", "", "")
  349.         IniWrite($Settings, "Main", "Lock on Start", "False")
  350.         INIWrite($Settings, "Main", "Update on Start", "False")
  351.         INIWrite($Settings, "Blocking", "Shutdown", "False")
  352.         INIWrite($Settings, "Encrypted", "Password", "4E554C")
  353.         FileSetAttrib($Settings, "+R")
  354.     Else
  355.         FileSetAttrib($Settings, "-SH")
  356.     EndIf
  357.     If INIRead($Settings, "Main", "Lock on Start", "False") = "True" Then
  358.         GUICtrlSetState($Item_Start_Locked, $GUI_CHECKED)
  359.         $Start_Locked = True
  360.     EndIf
  361.     If INIRead($Settings, "Main", "Update on Start", "False") = "True" Then
  362.         GUICtrlSetState($Item_Start_Update, $GUI_CHECKED)
  363.         $Start_Update = True
  364.         Update()
  365.     EndIf
  366.     If INIRead($Settings, "Blocking", "Shutdown", "False") = "True" Then
  367.         GUICtrlSetState($Item_Block_Shutdown, $GUI_CHECKED)
  368.         $Block_Shutdown = True
  369.     EndIf
  370.     GUICtrlSetData($Input, _HexToString(INIRead($Settings, "Encrypted", "Password", "4E554C")))
  371.     If GUICtrlRead($Input) = "NUL" Then
  372.         GUICtrlSetData($Input, "")
  373.     Else
  374.         $Pass_Saved = True
  375.         GUICtrlSetState($Input, $GUI_DISABLE)
  376.         If INIRead($Settings, "Main", "Lock on Start", "False") = "True" Then Status()
  377.     EndIf
  378.     FileSetAttrib($Settings, "+SH")
  379.     GUICtrlSetState($Item_Reset_Ten, $GUI_CHECKED)
  380.     GUICtrlSetState($Item_Math_Unlock, $GUI_DISABLE)
  381. EndFunc
  382.  
  383.  
  384. ; Change URSafe Status
  385. Func Status()
  386.     WinSetState($GUI, "", @SW_SHOW)
  387.     If $FB_Pending Then
  388.         Feedback()
  389.     ElseIf $Locked = True Then
  390.         If GUICtrlRead($Input) = "" Then
  391.             FileWriteLine($Log, _Now() & " : " & "No Unlock Password Specified, Not unlocking.")
  392.         ElseIf $MathUnlock = True Then
  393.             If GUICtrlRead($Input) = $RanA^3-$RanB Then
  394.                 FileWriteLine($Log, _Now() & " : " & "Math Unlock Succeeded, Answer: " & $RanA^3-$RanB)
  395.                 $MathUnlock = False
  396.                 GUICtrlSetData($Input, $Password)
  397.                 Status()
  398.             Else
  399.                 FileWriteLine($Log, _Now() & " : " & "Math Unlock Failed. Input: " & GUICtrlRead($Input) & " Answer: " & $RanA^3-$RanB)
  400.                 GUICtrlSetData($Input, "")
  401.             EndIf
  402.         ElseIf GUICtrlRead($Input) = $Password Then
  403.             FileWriteLine($Log, _Now() & " : " & "URSafe Unlocked")
  404.             _MouseTrap()
  405.             $Locked = False
  406.             GUICtrlSetData($Input, "")
  407.             If $Pass_Saved Then
  408.                 GUICtrlSetState($Input, $GUI_DISABLE)
  409.                 GUICtrlSetData($Input, $Password)
  410.             EndIf
  411.             GUICtrlSetData($Instructions, "Enter Password to Lock")
  412.             GUICtrlSetData($Toggle, "Lock")
  413.             GUICtrlSetState($Menu_File, $GUI_ENABLE)
  414.             GUICtrlSetState($Menu_Options, $GUI_ENABLE)
  415.             GUICtrlSetState($Item_Update, $GUI_ENABLE)
  416.             GUICtrlSetState($Item_Credits, $GUI_ENABLE)
  417.             GUICtrlSetState($Item_Math_Unlock, $GUI_DISABLE)
  418.             GUICtrlSetState($Item_Feedback, $GUI_ENABLE)
  419.         Else
  420.             GUICtrlSetData($Input, "")
  421.             FileWriteLine($Log, _Now() & " : " & "Incorrect Password")
  422.         EndIf
  423.     ElseIf GUICtrlRead($Input) = "" Then
  424.         FileWriteLine($Log, _Now() & " : " & "No Lock Password Specified, Not Locking.")
  425.     Else
  426.         FileWriteLine($Log, _Now() & " : " & "URSafe Locked")
  427.         $RefreshTimer = TimerInit()
  428.         If _HexToString(INIRead($Settings, "Encrypted", "Password", "4E554C")) = "NUL" Then
  429.             If MsgBox(0x40024, "Set as Default?", "Use this password from now on?") = "6" Then
  430.                 FileSetAttrib($Settings, "-RSH")
  431.                 INIWrite($Settings, "Encrypted", "Password", _StringToHex(GUICtrlRead($Input)))
  432.                 FileSetAttrib($Settings, "+RSH")
  433.                 $Pass_Saved = True
  434.             EndIf
  435.         EndIf
  436.         _MouseTrap(0, 0, @DesktopWidth, 180)
  437.         GUICtrlSetData($Instructions, "Enter Password to Unlock")
  438.         GUICtrlSetData($Toggle, "Unlock")
  439.         GUICtrlSetState($Menu_File, $GUI_DISABLE)
  440.         GUICtrlSetState($Menu_Options, $GUI_DISABLE)
  441.         GUICtrlSetState($Item_Update, $GUI_DISABLE)
  442.         GUICtrlSetState($Item_Credits, $GUI_DISABLE)
  443.         GUICtrlSetState($Item_Math_Unlock, $GUI_ENABLE)
  444.         GUICtrlSetState($Item_Feedback, $GUI_DISABLE)
  445.         $Password = GUICtrlRead($Input)
  446.         GUICtrlSetData($Input, "")
  447.         If $Pass_Saved Then GUICtrlSetState($Input, $GUI_ENABLE)
  448.         $Locked = True
  449.     EndIf
  450. EndFunc
  451.  
  452.  
  453. ; Execute Updater
  454. Func Update()
  455.     FileWriteLine($Log, _Now() & " : " & "URSafe Updater Executed")
  456.     ProgressOn("URSafe Updater", "Please Wait", "Getting Latest Version Number.")
  457.     $Version_File = InetGet("http://www.fcofix.org/mirror/ursupdate.txt", @ScriptDir & "\update.txt", 1, 0)
  458.     InetClose($Version_File)
  459.     ProgressSet(33, "Comparing Latest Version to Local Version", "Checking")
  460.     If $InDev Then
  461.         If FileReadLine(@ScriptDir & "\update.txt", 2) > StringReplace($DevBuild, ".", "") Then
  462.             ProgressSet(66, "Downloading Update to InDev Version " & FileReadLine(@ScriptDir & "\update.txt", 2), "Downloading")
  463.             ShellExecute("http://code.google.com/p/kidsafe/source/browse/")
  464.         Else
  465.             ProgressSet(66, "No Developer Build Available.", "Up to date")
  466.             Sleep(500)
  467.         EndIf
  468.     Else
  469.         If FileReadLine(@ScriptDir & "\update.txt", 1) > StringReplace($Version, ".", "") Then
  470.             ProgressSet(66, "Downloading Update to Version " & FileReadLine(@ScriptDir & "\update.txt", 1), "Downloading")
  471.             $Update_File = InetGet("http://www.fcofix.org/mirror/ursafe.exe", @ScriptDir & "\URSafe_Setup.exe", 1, 0)
  472.             InetClose($Update_File)
  473.         Else
  474.             ProgressSet(66, "No Update Needed.", "Up to date")
  475.             Sleep(500)
  476.         EndIf
  477.     EndIf
  478.     ProgressSet(83, "Cleaning Up", "Done")
  479.     FileDelete(@ScriptDir & "\update.txt")
  480.     ProgressSet(100, "Done", "Closing")
  481.     Sleep(1000)
  482.     ProgressOff()
  483.     FileWriteLine($Log, _Now() & " : " & "URSafe Updater Finished Executing")
  484. EndFunc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement