Jump to content
Sign in to follow this  
amakrkr

Speed up execution of my script

Recommended Posts

amakrkr

Hello,

I was wondering how could I get my script to execute faster.

What my script does is simply delete only 1st line in a text file.

Script is called from another application in a loop calling it for each line.

So if we have a text file 200 lines long script will be called 200 times to delete 1st line, as stupid as it sound i cant make it any other way.

Any ideas how to speed it up a bit?

Code is simple:

#include <File.au3>


$File = "c:\log.txt" 
$line = 1

_FileWriteToLine($file, $line, "", 1)

Share this post


Link to post
Share on other sites
trancexx

Don't use that wrapper function. Write your own to_the_point function.


♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
amakrkr

Hello,

thank you for fast replay.

I am afraid i dont know how to do that :S

Can you elaborate a bit?

PS

is there a way to disable try icon entirely?

I was playing around with Tray functions from help file but didnt find one that would disable it entirely.

Share this post


Link to post
Share on other sites
trancexx

Hello,

thank you for fast replay.

I am afraid i dont know how to do that :S

Can you elaborate a bit?

Yes, but my elaboration wouldn't solve your problem. You need something else. For example go thru help file an focus on built-in File... functions.

PS

is there a way to disable try icon entirely?

Yes if your definition of disabling actually means not showing.

I was playing around with Tray functions from help file but didnt find one that would disable it entirely.

That's because there isn't any.

Solution is keyword, not function. #NoTrayIcon

Edited by trancexx

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites
amakrkr

ahh #NoTrayIcon >.<

ok thanks mate.

Share this post


Link to post
Share on other sites
water

Or you could split the functions:

The first function (called multiple times) only records the line numbers in a file

The second function (called from your application as last statement) reads this file and deletes all lines.


My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (2018-06-01 - Version 1.4.9.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2018-09-01 - Version 1.3.4.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
PowerPoint (2017-06-06 - Version 0.0.5.0) - Download - General Help & Support
Excel - Example Scripts - Wiki
Word - Wiki
 
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  

×