AW: Autoit V3 to slow? autoit2 was faster!?!

"Lüth, Carsten" <[email protected]>
Newsgroups gmane.comp.windows.autoit.user
Message-ID <[email protected]>
Hello,
 
thx for all replys!
 
execution time for the same search:
autoit version 2 = ~2 seconds! 
autoit version 3 = ~11 seconds!
 
How to make Autoit 3 faster???
 
;NEW Autoit-3-Script ~~~~~~~~~~~
#include <file.au3>
$search = InputBox("Search in TNSNAMES.ORA", "Please enter Number - 3 digits
- you want to search:")
$begin = TimerInit()
$CountLines = _FileCountLines( "TNSNAMES.ORA" )
$search = "NDL0" & $search & ".world"
$line=0
while $line < $CountLines
    $line = $line + 1
    $text = FileReadLine ( "TNSNAMES.ORA" , $line )
    $result = StringInStr ( $text, $search )
    if $result > 0 then exitloop
wend
$dif = TimerDiff($begin)
MsgBox(0,"Time Difference",$dif)
if $result = 0 then 
 MsgBox ( 0, "Search", "Nothing found!" )
Else 
 MsgBox ( 0 , "Search", "NDL0xxx.world found in line " & $line )
Endif
;~~~~~~~~~~~~~~~~~~~~~~


Mit freundlichem Gruß / With kind regards 

Fielmann AG 

Carsten Lüth
IT - Desktop Services
Weidestraße 118a
22083 Hamburg
Telefon: +49 - (0) 40 - 2 70 76 - 199
mailto:[email protected] <mailto:[email protected]>  

-----Ursprüngliche Nachricht-----
Von: larrydalooza [mailto:[email protected]] 
Gesendet: Mittwoch, 21. Februar 2007 18:12
An: [email protected]
Betreff: Re: [AutoIt] Autoit V3 to slow? autoit2 was faster!?!



--- In AutoItList@yahoogro <mailto:AutoItList%40yahoogroups.com> ups.com,
"Lüth, Carsten" <c.lueth@...> wrote:
>
> ;OLD Autoit-2-Script:
> InputBox,NDLNummer,Search in TNSNAMES.ORA\nPlease enter Number you
want to
> search:
> SetBatchLines, 1000
> setenv,zeilennummer,0
> zeilepluseins:
> EnvAdd,zeilennummer,1
> FileReadline,zeile,C:\\tnsnames.ora,%zeilennummer%
> IfNOTEqual,errorlevel,0,Goto,notfound
> StringGetPos,Position1,zeile,NDL0%NDLNummer%.world
> IfNOTEqual,errorlevel,0,Goto,zeilepluseins
> SetBatchLines, 1
> MsgBox, 0, AutoIt, NDL0xxx.world found in line %zeilennummer% at
position
> %Position1%
> 

ugghhh... and would you mind posting your translation?

Lar.



 



[Non-text portions of this message have been removed]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.