I'm new in AutoPlayMedia Studio6, so if somebody would like to help me how can I remove one specific line from the text file. I now first 10 characters from specific line.
Regards.
Professional Software Development Tools
I'm new in AutoPlayMedia Studio6, so if somebody would like to help me how can I remove one specific line from the text file. I now first 10 characters from specific line.
Regards.
This should get you started... you'll probably want to add some error checking after the text file reads and writes.
Code:-- Declare the location of your text file and the sting you are looking for g_MyTextFile = "C:\\mytextfile.txt" g_SearchString = "abcdefg" -- Setup an empty table to hold the contents of your text file t_TextFile = {}; -- Read the contents of your text file to the table (See help file for more info) t_TextFile = TextFile.ReadToTable(g_MyTextFile); -- Step through each line in the table looking for your culprit and del any that match local index; local line; for index, line in t_TextFile do if String.Find(line, g_SearchString, 1, true) == 1 then Table.Remove(t_TextFile, index); end end -- Write the results back to your text file TextFile.WriteFromTable(g_MyTextFile, t_TextFile, false);
Yeah right. Who's the only one here who knows the illegal ninja moves from the government?
()))))))))o)))))))==============================================
Thank you very much. I think that I now understand how it works.
Rado