mIRC Home    About    Download    Register    News    Help

Print Thread
#97513 13/09/04 12:02 PM
Joined: Jun 2004
Posts: 139
N
Ninko Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jun 2004
Posts: 139
Hi there,
Does anyone know if theres a Identifier to recall the line number of the last line wrote (/write)?

Thanks smile

#97514 13/09/04 12:06 PM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787
I dont believe there is, you'd probably have to track how /write was used and store it in a variable.

Eamonn.

#97515 13/09/04 12:13 PM
Joined: Jun 2004
Posts: 139
N
Ninko Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jun 2004
Posts: 139
Well if i explain what I'm trying to do, maybe you could think of a better way.

What I'm trying to do is have a timer started as a line is wrote, so that line is deleted after a set time.

Any ideas?

#97516 13/09/04 12:15 PM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787
Are you merely adding the line to the end of the file, or the start, or a random position?

Eamonn.

#97517 13/09/04 12:19 PM
Joined: Jun 2004
Posts: 139
N
Ninko Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jun 2004
Posts: 139
To the last line of the file

#97518 13/09/04 12:23 PM
Joined: Dec 2002
Posts: 787
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 787
/write -d file.txt

Will remove the last line of a file, without knowning what number it is.

You could perhaps do something like

alias addme {
var %f = "[color:red]file.txt
"
write %f $1-
timerdl. $+ $lines(%f) 1 5 write -dl %f
}
[/color]
So it runs -dl the same number of times you /write, might have some issues with it though, give it a try i suppose, /addme text.

Eamonn.

#97519 13/09/04 12:27 PM
Joined: Jun 2004
Posts: 139
N
Ninko Offline OP
Vogon poet
OP Offline
Vogon poet
N
Joined: Jun 2004
Posts: 139
Ohhh right! Ok thanks alot m8, that will do it.

Take care smile


Link Copied to Clipboard