AutoHotkey Community

It is currently May 26th, 2012, 7:16 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: StringReplace a line
PostPosted: May 23rd, 2008, 1:26 am 
Offline

Joined: May 14th, 2008, 9:48 pm
Posts: 110
Hey i was appending a text file and when I hit a certain function I wanted it to delete some text in the text file.
WHen it deletes it (stringreplace, with blank replace)
it leaves an empty line, I wanted to know if I could delete the whole line entirly, this way if the list gets big i dont have a lot of empty lines that fill it up.

[ Moderator!: Subject modified ]
________
Willys-knight


Last edited by jmanx on February 10th, 2011, 9:32 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2008, 2:54 am 
Offline

Joined: May 14th, 2008, 9:48 pm
Posts: 110
bump
________
Vaporizers


Last edited by jmanx on February 10th, 2011, 9:32 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2008, 5:59 am 
Offline
User avatar

Joined: October 7th, 2006, 8:45 am
Posts: 3328
Location: Simi Valley, CA
Code:
text =
(
line one
line two
line three
)

remove = line two

stringreplace, text, text, %remove%`r`n
If (ErrorLevel)
   stringreplace, text, text, %remove%`n

msgbox % text

_________________
Ternary (a ? b : c) guide     TSV Table Manipulation Library
Post code inside [code][/code] tags!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: May 23rd, 2008, 9:38 am 
Quote:
silly question
There are no silly questions, only silly subject lines like: "silly question" :?


Report this post
Top
  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: bobbysoon, kkkddd1, Yahoo [Bot] and 67 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group