Sign in to follow this  
Followers 0
smsm20062009

Error with memory usage

7 posts in this topic

first sorry for my english

the question is

my program must read more than 20 line every sec from txt file & The memory increase 1,500 every sec

i use dll call to reduce mem but it will not reduce until by 10,000 and recv error after 2 or 3 tries

plz fast

Share this post


Link to post
Share on other sites



Can you please post the code you have written so far?

And BTW this is no 24 hour support forum. So the speed of the replies is up to the users trying to help you!


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

i can post it only i have other but i cant post more beacuse the program is already using & thanks

If $autorelogins = "1" And FileExists(@ScriptDir & "log*.txt") Then
  $File = _FindLatest(@ScriptDir & "log")
  If StringLeft($File, StringLen(@ScriptDir)) <> @ScriptDir Then
   $log = @ScriptDir & $File
  Else
   $log = $File
  EndIf
  FileOpen($log)
  ; Relogin State 1
  $con = FileReadLine($log, -1)
   If @MIN - 2 >= StringMid($con, 4, 2) And @SEC = StringMid($con, 7, 2) Then
    $autorelogins = "2"
   EndIf
    If @MIN / 3 = Int(@MIN / 3) And @SEC <> $Now Then
    $Now = @SEC
   ; Relogin State 2
   $lastline = _FileCountLines($log)
   $conl1 = StringTrimRight(FileReadLine($log, $lastline), 10)
   $conl2 = StringTrimRight(FileReadLine($log, $lastline - 1), 10)
   $conl3 = StringTrimRight(FileReadLine($log, $lastline - 2), 10)
   $conl4 = StringTrimRight(FileReadLine($log, $lastline - 3), 10)
   $conl5 = StringTrimRight(FileReadLine($log, $lastline - 4), 10)
   $conl6 = StringTrimRight(FileReadLine($log, $lastline - 5), 10)
   $conl7 = StringTrimRight(FileReadLine($log, $lastline - 6), 10)
   $conl8 = StringTrimRight(FileReadLine($log, $lastline - 7), 10)
   $conl9 = StringTrimRight(FileReadLine($log, $lastline - 8), 10)
   $conl10 = StringTrimRight(FileReadLine($log, $lastline - 9), 10)
   If $conl1 = $conl2 = $conl3 = $conl4 = $conl5 = $conl6 = $conl7 = $conl8 = $conl9 = $conl10 Then
    $autorelogins = "2"
   EndIf
   FileClose(FileFindFirstFile($log))
  EndIf

Share this post


Link to post
Share on other sites

1. FileFindFirstFile is not even a file handle in the code you provide

you should have

$_FileOpen = FileOpen($log)

;...

$conl1 = StringTrimRight(FileReadLine($_FileOpen, $lastline), 10)

;...

FileClose($_FileOpen)

2. "plz fast", this will usually get you slower replies, It's rude.


AutoIt Absolute Beginners    Require a serial    Pause Script    Video Tutorials by Morthawt   ipify 

Monkey's are, like, natures humans.

Share this post


Link to post
Share on other sites

This statement

If $conl1 = $conl2 = $conl3 = $conl4 = $conl5 = $conl6 = $conl7 = $conl8 = $conl9 = $conl10 Then
should read
If $conl1 = $conl2 And $conl1 = $conl3 And $conl1 = $conl4 And $conl1 = $conl5 And $conl1 = $conl6 And $conl1 = $conl7 And $conl1 = $conl8 And $conl1 = $conl9 And $conl1 = $conl10 Then


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

thxx

and i have other request ( sry for it ) there is vb6 program maked connect by his winsock i need send a data by this or send to his server without proplem

and thxx again

Share this post


Link to post
Share on other sites

Which protocol do you want/need to use (FTP, HTTP ...)?


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0