I'm struggling to understand "notreuse" on resources
-
Okay, so I have an email list with passwords, I want to ensure each thread gets a unique email to use.
How can I do that?
Currently what I'm trying, which isn't working:
I have my list set up as a resource, and i do a "Resource to List", then parse the line. I've tried using the "|notreuse" toggle, but when i do that, it doesn't even parse the resource to list.
Also, second question: If I create the resource to "delete line" after each use, does it actually delete it? or just remove it from resources available?
-
"notreuse" should be understood in context of THREAD life.
So if you use "notreuse", it will always use new value from
resource during 1 THREAD execution. And if it is not used
same thread will use same resource value during 1 thread
life cycle.You just have to understand how to use BAS for your user case.
BAS is already preconfigured to handle certain types of problems.So propper way to handle your problem in BAS would be as follows:
-
Define resource list with your user:pass data in txt or csv format.
Resource should be "Lines from file" and setting "Use each line
one time" should be checked, along with "Only read" setting. -
You dont need to convert resource to list, since you want to use
each line of resource in one thread. Simply parse resource line and
use user and pass as you need in thread.
That is how BAS handles such user problems.
When you convert "Resource to List" it becomes a list suitable to be
proccessed WIHIN ! THREAD. So in some cases this is desirable behavior.
For example when you need to cycle through a list in ONE browser instance -
aka in a single THREAD.But your user case means that you need new browser instance - new THREAD
for each application of your user:pass combination. So you wouuld need to handle
such behavior with LOOP and to use NOTREUSE, so in each iteration you get
new line from list. In a word, you can achieve the same behavior if you follow
default BAS behavior described under 1 and 2.So hope that you understood that you simply need to solve given user
problems according to default BAS behavior.@ev0 said in I'm struggling to understand "notreuse" on resources:
Also, second question: If I create the resource to "delete line" after each use, does it actually delete it? or just remove it from resources available?
If you use "Delete line after use" resource parameter, the line will be deleted
only after script is finished or restarted. During script execution lines in resource
will remain undeleted, but BAS will "know" that those lines are already used and
ready for deletion (scheduled for deletion), so BAS will delete ALL resource lines
at once - at the end of script execution or when you forcibly stop the script.
The developer said that such behavior is intended in order to reduce write-delete
to local or remote HDD. So such functionality saves your local disk usage and speeds up script execution by not interupting its execution every time line from
resource needs to be deleted.
-