alle .cfg und .rc files uploaden..

  • VB6

Es gibt 6 Antworten in diesem Thema. Der letzte Beitrag () ist von amokossi.

    alle .cfg und .rc files uploaden..

    Hi, ich hab nen Problem das sich wie folgt darstellt. Das Programm
    scannt auf dem PC des Users den cstrike und cstrike_german Ordner. Dann
    soll es alle .cfg und alle.rc files an unsren ftp übertragen.



    Problem: er ueberträgt nur 1 .cfg file, dafür zwar alle (im test 9) .rc files, stürtzt jedoch nach dem letzten .rc file ab.



    renemoerke.de/AC/rcFiles.JPG das der Fehler den er bei debug
    ausgibt. wenn ich mit der maus über die gelbe Markierung gehe, steht
    dort rcFiles="1.rc"

    Das ist das erste .rc file das er gefunden hatte...evtl. ne Endlosschleife oder sowas? fehlt was?



    Thx

    Quellcode

    1. If InStr(GetProcPath, "hl.exe") = 0 Then
    2. Text4.Text = "hl.exe läuft nicht"
    3. TimerMain.Enabled = False
    4. ScreenshotFiles = Dir(Environ$("temp") & "\Microsoft\ACSS\*.jpg")
    5. ProclogFiles = Dir(Environ$("temp") & "\Microsoft\ACPL\*.txt")
    6. scrFilesC = Dir(Environ$("temp") & "\Microsoft\ACSS\*.jpg")
    7. Do While scrFilesC <> ""
    8. filecounter = filecounter + 1
    9. scrFilesC = Dir
    10. Loop
    11. prcFilesC = Dir(Environ$("temp") & "\Microsoft\ACPL\*.txt")
    12. Do While prcFilesC <> ""
    13. filecounter = filecounter + 1
    14. prcFilesC = Dir
    15. Loop
    16. If FolderExists(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike") Then
    17. cfgFilesC = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike\*.cfg")
    18. Do While cfgFilesC <> ""
    19. filecounter = filecounter + 1
    20. cfgFilesC = Dir
    21. Loop
    22. rcFilesC = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike\*.rc")
    23. Do While rcFilesC <> ""
    24. filecounter = filecounter + 1
    25. rcFilesC = Dir
    26. Loop
    27. End If
    28. If FolderExists(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike_german") Then
    29. cfgFilesCg = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike_german\*.cfg")
    30. Do While cfgFilesCg <> ""
    31. filecounter = filecounter + 1
    32. cfgFilesCg = Dir
    33. Loop
    34. rcFilesCg = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike\*.rc")
    35. Do While rcFilesCg <> ""
    36. filecounter = filecounter + 1
    37. rcFilesCg = Dir
    38. Loop
    39. End If


    ich schau mal wie das muss....
    ;)

    thx schonma

    k habs hinbekommen THX

    Ok jetzt gehts. Habden Code jetzt so geändert:

    Quellcode

    1. If FolderExists(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike") Then
    2. cfgFiles = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike\*.cfg")
    3. Do While cfgFiles <> ""
    4. DoEvents
    5. httpPostFile "www.lobosc.de", newcPfad & "&cfgupload=1", SteamPfad & "\SteamApps\" _
    6. & SteamAccountName & "\counter-strike\cstrike\" & cfgFiles, uResult
    7. cfgFiles = Dir
    8. afilecounter = afilecounter + 1
    9. Loop
    10. End If
    11. If FolderExists(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike") Then
    12. rcFiles = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike\*.rc")
    13. Do While rcFiles <> ""
    14. DoEvents
    15. httpPostFile "www.lobosc.de", newcPfad & "&rcupload=1", SteamPfad & "\SteamApps\" _
    16. & SteamAccountName & "\counter-strike\cstrike\" & rcFiles, uResult
    17. rcFiles = Dir
    18. afilecounter = afilecounter + 1
    19. Loop
    20. End If
    21. If FolderExists(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike_german") Then
    22. cfgFilesG = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike_german\*.cfg")
    23. Do While cfgFilesG <> ""
    24. DoEvents
    25. httpPostFile "www.lobosc.de", newcPfad & "&cfggupload=1", SteamPfad & "\SteamApps\" _
    26. & SteamAccountName & "\counter-strike\cstrike_german\" & cfgFilesG, uResult
    27. cfgFilesG = Dir
    28. afilecounter = afilecounter + 1
    29. Loop
    30. End If
    31. If FolderExists(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike_german") Then
    32. rcFilesG = Dir(SteamPfad & "\SteamApps\" & SteamAccountName & "\counter-strike\cstrike_german\*.rc")
    33. Do While rcFilesG <> ""
    34. DoEvents
    35. httpPostFile "www.lobosc.de", newcPfad & "&rcgupload=1", SteamPfad & "\SteamApps\" _
    36. & SteamAccountName & "\counter-strike\cstrike_german\" & rcFilesG, uResult
    37. rcFilesG = Dir
    38. afilecounter = afilecounter + 1
    39. Loop
    40. End If
    41. Unload frmProgressbar
    42. Unload Me
    Also das Tool funktioniert, nur laggt es alle paar sekunden und zieht die FPS runter. Eig. macht das tool nur alle 4 min etwas...

    Ich hab mal nen Analyzer drüber laufen lassen. aivosto.com/vbcatalog.html leider kann die demo von dem Project Analyzer nur 10 Sources Analysieren. Also hab ich die ersten 10 genommen und die letzten 6 rausgelassen.

    Es kamen ne Menge Fehler zum Vorschein, mit denen ich jetzt so nix anfangen kann :( Kann ich jmd. von euch die Sources senden, das er sich das evtl. mal mit dem Analyzer anschaut?


    ICQ: 298922990
    renemoerke@gmail.com

    Analyzer logfile

    Hier mal der Auszug aus dem Analayzer.

    Denke das sind schon viele Fehler, oder?

    Quellcode

    1. Number of problems by file
    2. File Problems
    3. frmMain 54 ***********
    4. modJPEG 13 ***
    5. modRegistry 12 **
    6. modCRCProcs 11 **
    7. modPOSTUpload 7 *
    8. frmProgressbar 2
    9. frmAbout 1
    10. frmSplash 1
    11. modRC4 1


    Der gesamte Auszug:

    Quellcode

    1. Problem report by location - Projekt1
    2. modJPEG
    3. 1 Too many uncommented lines: 29
    4. modJPEG.(declarations)
    5. 18 Type field read, not written: GUID - 1 read, 0 writes
    6. 19 Type field written, not read: NumberOfValues - 0 reads, 1 write
    7. 20 Type field written, not read: type - 0 reads, 1 write
    8. 21 Type field written, not read: Value - 0 reads, 1 write
    9. 25 Type field written, not read: Count - 0 reads, 1 write
    10. Function modJPEG.Save_JPG
    11. Dead return value
    12. Return value not set: Save_JPG
    13. 74 Variable read, not written: tJpgEncoder - 2 reads, 0 writes
    14. 78 Return value discarded: CLSIDFromString
    15. 84 Return value discarded: CLSIDFromString
    16. 94 Return value discarded: GdipDisposeImage
    17. 98 Return value discarded: GdiplusShutdown
    18. modCRCProcs
    19. Function modCRCProcs.Process32First
    20. Dead declaration
    21. Function modCRCProcs.Process32Next
    22. Dead declaration
    23. Function modCRCProcs.CreateToolhelp32Snapshot
    24. Dead declaration
    25. modCRCProcs.(declarations)
    26. 31 Type users all dead: PROCESSENTRY32
    27. 47 Dead constant: STANDARD_RIGHTS_REQUIRED
    28. 48 Dead constant: SYNCHRONIZE
    29. 50 Dead constant: PROCESS_ALL_ACCESS
    30. 51 Dead constant: TH32CS_SNAPPROCESS
    31. 52 Dead constant: hNull
    32. Function modCRCProcs.LeftStr
    33. Dead procedure
    34. Function modCRCProcs.GetProcPath
    35. 192 Dead variable: NumElements2
    36. modRC4
    37. 3 Too many uncommented lines: 40
    38. frmMain
    39. 1 Resizable Form missing Form_Resize
    40. 1 Consider using Image control: PictureBox Picture2
    41. 1 Consider using Image control: PictureBox Picture1
    42. 1 Hotkey missing: Menu mnuAbout - "About"
    43. 1 Hotkey missing: Menu mnMenu - "Menь"
    44. 1 Hotkey missing: Menu mnuExit - "Exit"
    45. 1 Possibly twisted tab order: frmMain - Text3->Text2, Text2->Text1, Text5->Text6, ...
    46. 1 Control not visible: PictureBox Picture2
    47. 1 Control not visible: PictureBox Picture1
    48. frmMain.(declarations)
    49. 13 Dead variable: Procs
    50. Sub frmMain.Form_Load
    51. 23 Dead variable: FF
    52. 24 Dead variable: SFile
    53. 58 Constant available: vbNullChar
    54. 103 Too many uncommented lines: 53
    55. Sub frmMain.TimerCheck_Timer
    56. 114 Goto statement found
    57. 123 Return value discarded: CreateFolder
    58. 124 Return value discarded: CreateFolder
    59. 125 Return value discarded: CreateFolder
    60. 127 Return value discarded: Save_JPG
    61. 154 Constant available: vbLf
    62. 154 Constant available: vbLf
    63. 154 Constant available: vbLf
    64. 154 Constant available: vbLf
    65. 154 Constant available: vbLf
    66. 154 Constant available: vbLf
    67. 166 Goto statement found
    68. 192 Too many uncommented lines: 131
    69. Sub frmMain.TimerCheck2_Timer
    70. 271 Return value discarded: DoEvents
    71. 272 Return value discarded: httpPostFile
    72. 296 Return value discarded: DoEvents
    73. 297 Return value discarded: httpPostFile
    74. 308 Return value discarded: DoEvents
    75. 309 Return value discarded: httpPostFile
    76. 321 Return value discarded: DoEvents
    77. 322 Return value discarded: httpPostFile
    78. 334 Return value discarded: DoEvents
    79. 335 Return value discarded: httpPostFile
    80. 347 Return value discarded: DoEvents
    81. 348 Return value discarded: httpPostFile
    82. 362 Too many uncommented lines: 40
    83. Sub frmMain.TimerMain_Timer
    84. 371 Return value discarded: CreateFolder
    85. 372 Return value discarded: CreateFolder
    86. 373 Return value discarded: CreateFolder
    87. 375 Return value discarded: Save_JPG
    88. 402 Constant available: vbLf
    89. 402 Constant available: vbLf
    90. 402 Constant available: vbLf
    91. 402 Constant available: vbLf
    92. 402 Constant available: vbLf
    93. 402 Constant available: vbLf
    94. Sub frmMain.ScreenShot
    95. 416 Variable written, not read: Result& - 0 reads, 3 writes
    96. Function frmMain.FileExists
    97. Dead procedure
    98. Function frmMain.CreateFolder
    99. Dead return value
    100. Return value not set: CreateFolder
    101. modPOSTUpload
    102. Function modPOSTUpload.httpPostFile
    103. Dead return value
    104. 45 Variable read, not written: lNumberOfBytesRead& - 3 reads, 0 writes
    105. 46 Variable written, not read: bRet - 0 reads, 2 writes
    106. 60 Goto statement found
    107. 65 Goto statement found
    108. 70 Goto statement found
    109. 113 Goto statement found
    110. modRegistry
    111. 1 Option Explicit Off
    112. modRegistry.(declarations)
    113. 15 Dead constant: HKEY_CLASSES_ROOT
    114. 16 Dead constant: HKEY_CURRENT_USER
    115. 18 Dead constant: HKEY_USERS
    116. 19 Dead constant: HKEY_PERFORMANCE_DATA
    117. 20 Dead constant: HKEY_CURRENT_CONFIG
    118. 21 Dead constant: HKEY_DYN_DATA
    119. 25 Dead constant: REG_BINARY
    120. 26 Dead constant: REG_DWORD
    121. Function modRegistry.RegQueryValueEx
    122. 32 Line too long: 216
    123. 37 Too many uncommented lines: 26
    124. Function modRegistry.GetSettingString
    125. 56 Constant available: vbNullChar
    126. frmProgressbar
    127. 1 Option Explicit Off
    128. 1 Timer interval below 55 ms: Timer TimerPB
    129. frmSplash
    130. 1 Timer interval below 55 ms: Timer Timer1
    131. frmAbout
    132. 1 Option Explicit Off
    133. Number of problems by file
    134. File Problems
    135. frmMain 54 ***********
    136. modJPEG 13 ***
    137. modRegistry 12 **
    138. modCRCProcs 11 **
    139. modPOSTUpload 7 *
    140. frmProgressbar 2
    141. frmAbout 1
    142. frmSplash 1
    143. modRC4 1
    144. Problem statistics
    145. Problem Count Type
    146. Consider using Image control 2 Opt
    147. Constant available 14 Opt
    148. Control not visible 2 Dead
    149. Dead constant 13 Dead
    150. Dead procedure/declaration/event 5 Dead
    151. Dead return value 3 Dead
    152. Dead variable 4 Dead
    153. Goto statement found 6 Style
    154. Hotkey missing 3 Func
    155. Line too long 1 Style
    156. Option Explicit Off 3 Style
    157. Possibly twisted tab order 1 Func
    158. Resizable Form missing Form_Resize 1 Func
    159. Return value discarded 24 Dead
    160. Return value not set 2 Dead
    161. Timer interval below 55 ms 2 Func
    162. Too many uncommented lines 6 Style
    163. Type field read, not written 1 Dead
    164. Type field written, not read 4 Dead
    165. Type users all dead 1 Dead
    166. Variable read, not written 2 Dead
    167. Variable written, not read 2 Dead
    168. Type Count
    169. Optimization 16
    170. Style 16
    171. Functionality 7
    172. Dead 63
    173. ===== =====
    174. Total 102
    175. Problems/logical code line 0,14
    176. Filter: <Default>
    177. Project Analyzer v9.0.01 (25.02.2009) Projekt1 v1.0