Trouble with pulling lines from .txt file

eugene16

Client
Регистрация
28.03.2012
Сообщения
17
Благодарностей
0
Баллы
0
Hey so I purchased myself zennoposter and I am slowly getting the hang of it. I read that the most important thing to do when it comes to zennoposter is to organize your outputs, so this is the model I started working with.

My first template is a wordpress one. I am making three different templates, one for wordpress account sign up, one for wordpress account activation, and one to clean up the blog, adda theme and so on.

The problem I am having come into play here, after I do the account signup I output all information to a .txt file called web2.0unactive in this format:

wordpress.com;URL;subdomain(username);password;email

When I activate the account in a separate template is where I get confused. I want to pull this line from the .txt file and delete it upon successful activation. When I use the get line macro I filled in the Regex to parse text as wordpress.com;.*, but what happens now is sometimes it pulls the correct line and others it pulls a blank line. Is this a bug or am I doing it wrong.

I ended up using pull block instead which I set to pull all the data in the .txt file and then parse out the line with a Regex and then use split to get my desired inputs. After I have successful completion I use the same get block method to append this line to a new file (web2.0activated) I then delete this line with the get line (which like I said has a tendency to pull a blank) So like this my activation works but at the end the line may or may not get deleted.

Either way I still see myself running into errors if I signup for multiple wordpress account in one run, how do I get around this?

I am considering merging activation into same template as signup, but then I will have the same issues in my "make blog look pretty" template.

Any insight on this issue?
 

eugene16

Client
Регистрация
28.03.2012
Сообщения
17
Благодарностей
0
Баллы
0
This is what I have figured out to get around this but there has got to be a simpler way:

{-File.AppendString-|-\Results\web2.0unactive.txt-|-{-RegExp.Replace-|-{-File.GetBlock-|-\Results\web2.0unactive.txt-|--|-random-|-true-}-|-wordpress.com.*{-String.Enter-}-|--}-|-true-}

step 1: pull all text in the file and delete it
step 2: remove desired line from text
step 3: put all text back into the file

I am doing all this because when I try this: {-File.GetString-|-\Results\web2.0unactive.txt-|-random-|-true-|-wordpress.com.*-} it does not always work, it either pulls the correct line or pulls a blank line (which is non-existant)
 
Регистрация
26.03.2012
Сообщения
44
Благодарностей
6
Баллы
0
Here is a thought that might be slightly simpler than your current solution - though depending on the size of the list it may be less efficient. When pulling the line from the file, could you just set it to check the selected line to make sure it is not blank (if it is, pick a different one).

Is the blank line being created when it deletes the line it pulls? I haven't used that sort of template enough to notice that effect, but I'm curious to hear the answer to your questions because I do plan to use that type of setup in many of my templates. You're right that there seems like there should be a better way to stop it.
 

shinigami

Client
Регистрация
01.05.2011
Сообщения
164
Благодарностей
91
Баллы
0
I usually also separate account registration and posting on two different templates. But I'd prefer activation right away after registration to put in files only activated accounts and in case of error to not activated ones.
 

Кто просматривает тему: (Всего: 1, Пользователи: 0, Гости: 1)