1 | #region ;**** Directives created by AutoIt3Wrapper_GUI **** |
---|
2 | #AutoIt3Wrapper_icon=Icons\updater.ico |
---|
3 | #endregion ;**** Directives created by AutoIt3Wrapper_GUI **** |
---|
4 | |
---|
5 | HttpSetUserAgent("Monkey") |
---|
6 | If $CmdLine[0] = "" Then Exit |
---|
7 | |
---|
8 | Switch $CmdLine[3] |
---|
9 | Case 0;Github |
---|
10 | If Ping("www.github.com", 250) = 0 Then |
---|
11 | If $CmdLine[2] <> "False" Then _Debug("Failed to ping to www.github.com") |
---|
12 | Exit Run($CmdLine[1]) |
---|
13 | EndIf |
---|
14 | |
---|
15 | $iInetGet = InetGet("https://github.com/downloads/monkey666/CoD4-Connect/CoD4%20Connect.exe", $CmdLine[1], 1) |
---|
16 | If $CmdLine[2] <> "False" Then _Debug("Return from InetGet: " & $iInetGet) |
---|
17 | Exit Run($CmdLine[1]) |
---|
18 | Case 1;FTP Server |
---|
19 | If Ping("www.monk3y666.bplaced.net", 250) = 0 Then |
---|
20 | If $CmdLine[2] <> "False" Then _Debug("Failed to ping to www.monk3y666.bplaced.net") |
---|
21 | Exit Run($CmdLine[1]) |
---|
22 | EndIf |
---|
23 | |
---|
24 | $iInetGet = InetGet("http://monk3y666.bplaced.net/filemanager/Autoit/Fertige%20Scripte/COD4/CoD4%20Connect.exe", $CmdLine[1], 1) |
---|
25 | If $CmdLine[2] <> "False" Then _Debug("Return from InetGet: " & $iInetGet) |
---|
26 | Exit Run($CmdLine[1]) |
---|
27 | EndSwitch |
---|
28 | |
---|
29 | |
---|
30 | Func _Debug($sText) |
---|
31 | FileWrite(@ScriptDir & "\Debug.txt", @HOUR & ":" & @MIN & ":" & @SEC & " " & @ScriptName & " | " & $sText & @CRLF) |
---|
32 | EndFunc ;==>_Debug |
---|