Sign in to follow this  
Followers 0
lrstndm

Delete last line from log file

4 posts in this topic

#1 ·  Posted (edited)

Hai all,

I have an script with an log file

In the log file are variables

If i click on the delete button i want that the last line of the log file will delete

can someone help me plz ;)

Thanks in advance

#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>

;The GUI
$Form1 = GUICreate("Form1", 249, 91, 192, 124)
$delete = GUICtrlCreateButton("Delete", 121, 40, 81, 25)
GUISetState(@SW_SHOW)

While 1
    Local $msg
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
        Case $msg = $undo
            ;Here needs to come the command

    EndSelect
WEnd
Edited by lrstndm

Share this post


Link to post
Share on other sites



Why do you want to delete lines from a log file?

In my opinion a log file should permanently store information about what happened. And therefore should not be changed.

If you want to store some information temporarely then use another file.

Just my 2 cents.


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

Thanks all

and water i know what you mean but it is too difficult to explain ;)

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