Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > AutoIt
You last visited: Today at 04:02

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Update Bot

Discussion on Update Bot within the AutoIt forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Feb 2010
Posts: 40
Received Thanks: 1
Update Bot

Hallo ich hab ein Update Bot der nicht funktioniert:
Code:
#notrayicon
sleep(1500)
InetGet("ftp://deuterianer.de.ohost.de/update.txt",@TempDir & "\update.txt", 1, 0)
$file = FileOpen(@TempDir & "\update.txt", 0)
$ver_server = FileReadLine($file, 2)
$ver_pc = IniRead(@AutoItExe & "\Settings.ini", "Bot", "Version","")
If $ver_server = $ver_pc or $ver_server = "" Then
        FileClose($file)
        FileDelete(@TempDir & "\update.txt")
Else
        $msgbox = MsgBox(36, "Update!", "Ein Flottenschiff hat neue Aufträge möchtest du sie herunterladen?")
        If $msgbox = 6 Then
                Tooltip("Aufträge werden runtergeladen... bitte warten....")
                ProcessClose ("uhrzeit.exe")
                InetGet("ftp://deuterianer.de.ohost.de/",@scriptDir&"\" & "uhrzeit.exe", 1, 0)
                IniWrite(@AutoItExe & "\Settings.ini", "Bot", "Version", $ver_server)
                FileClose($file)
                FileDelete(@ScriptDir & "\update.txt")
                Tooltip("")
                $mb = @InetGetBytesRead
                $mb = $b / 1000000
                $mb = StringLeft ($b, 4)
                msgbox(0,"Update", "Deine Aufträge wurden aktualiesiert" & @LF & "Das Flottenschiff hat dir " & $b & " B geschickt.")
                run("uhrzeit.exe")
        EndIf
EndIf
Fehler:
Code:
C:\Users\steffi\Desktop\einmal\updater.au3(20,40) : ERROR: undefined macro.
                $mb = @InetGetBytesRead
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3(21,26) : WARNING: $b: possibly used before declaration.
                $mb = $b /
~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3(21,26) : ERROR: $b: undeclared global variable.
                $mb = $b /
~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3 - 2 error(s), 1 warning(s)

Und noch ein Problem:
Code:
#include <Misc.au3>
#include "FTP_Ex.au3"

$serv = "ftp.deuterianer.de.ohost.de"
$user = "xxxxxxxxxxxxx"
$pass = "xxxxxxxxxxxx"

$FTP = _FTPOpen("AutoIt v3")
$FTPServer = _FTPConnect($FTP,$serv,$user,$pass,1)

ProgressOn("Upload","Uploading file [Cancel with F8]")
$x = _FTP_UploadProgress($FTPServer, "C:\Users\steffi\Desktop\hacktool.ini", 'hacktool.ini', "_UpdateParts")
ProgressSet(100,"Return: " & $x & @CRLF & "Error: " & @error)
Sleep(2000)
ProgressOff()

_FTPClose($FTPServer)
_FTPClose($FTP)

Func _UpdateParts($percent)
ProgressSet($percent,$percent &"%")
If _IsPressed("77") Then Return 0
Return 1 ; bei 1 Fortsetzten
Endfunc
Fehler:

Code:
C:\Program Files\AutoIt3\Include\FTP_Ex.au3(10,40) : ERROR: $GENERIC_READ previously declared as a 'Const'
Global Const $GENERIC_READ = 0x80000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\FTP_Ex.au3(11,41) : ERROR: $GENERIC_WRITE previously declared as a 'Const'
Global Const $GENERIC_WRITE = 0x40000000
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Program Files\AutoIt3\Include\FTP_Ex.au3(22,268) : ERROR: $tagWIN32_FIND_DATA previously declared as a 'Const'
Global Const $tagWIN32_FIND_DATA = "DWORD dwFileAttributes; dword ftCreationTime[2]; dword ftLastAccessTime[2]; dword ftLastWriteTime[2]; DWORD nFileSizeHigh; DWORD nFileSizeLow; dword dwReserved0; dword dwReserved1; CHAR cFileName[260]; CHAR cAlternateFileName[14];"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\upload.au3 - 3 error(s), 0 warning(s)
marioplayer95 is offline  
Old 11/12/2010, 20:59   #2
 
elite*gold: 0
Join Date: Sep 2010
Posts: 210
Received Thanks: 45
Ehm bei der neuen Version von AutoIt gibt es kein InetGetBytes sondern es heißt InetGetSize....
und ehm guck dir es bei der Hilfe anm (f1)
und satt ein $b muss da ein $mb hin
Lighthex is offline  
Old 11/12/2010, 22:36   #3
 
elite*gold: 0
Join Date: Feb 2010
Posts: 40
Received Thanks: 1
Danke für die Antwort, bringts nur leider nicht...

Code:
C:\Users\steffi\Desktop\einmal\updater.au3(20,39) : ERROR: undefined macro.
                $mb = @InetGetSizeRead
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3(22,37) : WARNING: $b: possibly used before declaration.
                $mb = StringLeft ($b,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3(22,37) : ERROR: $b: undeclared global variable.
                $mb = StringLeft ($b,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3 - 2 error(s), 1 warning(s)
marioplayer95 is offline  
Old 11/12/2010, 22:59   #4
 
elite*gold: 0
Join Date: Sep 2010
Posts: 210
Received Thanks: 45
Ehm nicht @InetGetSizeRead sondern nur InetGetSize
und überall wo du $b hast muss $mb hin
Lighthex is offline  
Old 11/12/2010, 23:11   #5
 
elite*gold: 0
Join Date: Feb 2010
Posts: 40
Received Thanks: 1
Nochmal Danke.

So jetzt noch eins^^

Code:
C:\Users\steffi\Desktop\einmal\updater.au3(20,34) : ERROR: syntax error
                $mb = InetGetSize
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
C:\Users\steffi\Desktop\einmal\updater.au3 - 1 error(s), 0 warning(s)
marioplayer95 is offline  
Old 11/12/2010, 23:16   #6
 
elite*gold: 0
Join Date: Feb 2009
Posts: 542
Received Thanks: 112
das is nur ein syntax fehler bei (20,34) d.h du hast da entweder ne klammer anführungszeichen etc vergessen, ein sehr einfacher fehler halt

http://de.wikipedia.org/wiki/Syntaxfehler
maxi39 is offline  
Thanks
1 User
Old 11/12/2010, 23:19   #7
 
elite*gold: 0
Join Date: Feb 2010
Posts: 40
Received Thanks: 1
Vielen dank der macht jetzt keine Zicken mehr.

Ich probiers mal morgen richtig aus.
marioplayer95 is offline  
Reply


Similar Threads Similar Threads
[UPDATE, Last check = 5222] Required packet update for authorization process
03/23/2010 - CO2 Private Server - 21 Replies
It seems this has to be sended right after the connection has been made with the client. Packet(0): 19 Packet(1): CC Packet(2): CD Packet(3): 73 Packet(4): CA Packet(5): 5A
here the new update ainer GunBound International + GamerzAimPro + GamerzBot UpDate 5
01/07/2010 - General Gaming Discussion - 0 Replies
cani i play 2 gunbound in one pc? thx!



All times are GMT +1. The time now is 04:03.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.