- Total Members: 220,040
- Threads: 525,393
- Posts: 977,012
-
December 4th, 2012, 05:20 AM
#1
Form that will edit words within a given line of a .text file?
Hi,
I'm looking for some code that will allow me to edit a word/words from within a given line/lines of a scripted .text file that is in the format shown below. I stress that the script file is in .text format NOT .txt.
loc_eng()
{
txt_cm_camp_stu_1() { Text to be edited; }
txt_mc_sbmis_1() { More text to be edited!; }
txt_hist_sb_1() { Even more text to be edited.; }
}
}
All of the text in bold would potentially need to be edited at some time but not necessarily always at the same time. Also i need to be able to insert a new line in the type of style/format shown but inside the main upper and lower parentheses (otherwise the parent program won't read the script.)
I'd like to use a Windows Form with text box/boxes to enter the required new text into and a corresponding button/s to save the changes to the line in the script file.
In the case of the new line requirement a button that would generate a new line in the text file (inside the main parentheses) beginning with the "txt_cm_camp_" prefix but appended with the content of a text box on the form i.e. ending up as txt_cm_camp_stu_2 for instance? A second text box on the form would add the second block of text to within the parentheses on the line i.e Text to be edited. Resulting in:
txt_cm_camp_stu_2() { New text from the 2nd text box; }
Can anyone help with this? I am a VB beginner and am doing this as a learning project. Hope i have explained it well enough? :-)
Very many thanks.
Similar Threads
-
By Cozilla in forum ASP Development
Replies: 9
Last Post: June 22nd, 2009, 09:22 AM
-
By asifbhura in forum .NET Development
Replies: 1
Last Post: July 24th, 2006, 02:07 AM
-
By warrenh in forum Visual Basic Programming
Replies: 1
Last Post: October 25th, 2005, 04:53 AM
-
By dima1236 in forum ASP Development
Replies: 1
Last Post: January 25th, 2005, 12:06 PM
-
By Buggs in forum ASP Development
Replies: 1
Last Post: November 20th, 2004, 02:37 PM