[Question] how to choose random file

prosperer888

Client
Регистрация
15.09.2011
Сообщения
157
Благодарностей
4
Баллы
18
I have my own txt file for first name and last name for male and female. i create 1 spintax {male|female} , and how can i make ZPMP to choose male.txt if the spintax choose male and female if the spintax choose female...i can do this in ZP3 but in ZPMP i can't figure it out how to do it :(
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Do spintax and add value to variable, then use path to the file like C:\blah blah blah\{-Variable.gender-}.txt
 

prosperer888

Client
Регистрация
15.09.2011
Сообщения
157
Благодарностей
4
Баллы
18
can you explain more how to do "use path to the file" ? screenshot will be grade :-)
 

Hungry Bulldozer

Moderator
Регистрация
12.01.2011
Сообщения
3 441
Благодарностей
834
Баллы
113
Here you are:-)

1.jpg
 
  • Спасибо
Реакции: prosperer888

prosperer888

Client
Регистрация
15.09.2011
Сообщения
157
Благодарностей
4
Баллы
18
Oh thanks :-)...but how can i take random line in the file that i choose?
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63

prosperer888

Client
Регистрация
15.09.2011
Сообщения
157
Благодарностей
4
Баллы
18
i already try switch method yesterday and it works but i want to know is there any other solution...?

this macros i use on zp3

Код:
{-File.GetString-|-\Resources\{-String.Split-|-[B]{-FieldData.FieldData-|-●4●7●5●7●6●3●-|-≡6≡7≡5≡0≡9≡7≡6≡7≡3≡-}-|-:-|-0-}[/B]_first_name.txt-|-random-|-false-}

{-FieldData.FieldData-|-●4●7●5●7●6●3●-|-≡6≡7≡5≡0≡9≡7≡6≡7≡3≡-}-|-:-|-0-} is spintax male and female
i wondering if i can use something like that on ZPMP cause i can't use variable like {-Variable.gender-} to edit the list like this C:\blah blah blah\{-Variable.gender-}.txt
 

drvosjeca

Client
Регистрация
26.10.2011
Сообщения
512
Благодарностей
455
Баллы
63
I actualy dont see what is your problem here... HB gave you one solution and i gave you another...You dont need to set same variable name as he gave you, he made just example.

if you have male.txt and female.txt.... then you can use like HB told you spintax and make variable from its result. After that you use that new variable for determinating file path and name in list where you set file path you have files saved to, like: C:\......whatever is your path\{-yournew.variable-}.txt

then you just need to pull in line from list using list processing


Simple as that!


but as i said, there is always another solution, you can make folder where you have male.txt and female.txt in, and then you can get random file from folder and take line from it!
 
  • Спасибо
Реакции: prosperer888

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