How to create variable once time ?
-
Hello, when i set variable, i want that the variable create only on the first execution of script but when i launch my bot for each repetition the variable will be create. How to solve it ? Thanks !
-
@J404 said in How to create variable once time ?:
Hello, when i set variable, i want that the variable create only on the first execution of script but when i launch my bot for each repetition the variable will be create. How to solve it ? Thanks !
You can use the global variable as the main variable, or as an indicator for the condition of the first start.
-
@Fox No because it's a counter of repetitions per thread i can't use global variable
-
@J404 said in How to create variable once time ?:
@Fox No because it's a counter of repetitions per thread i can't use global variable
Local variables will be reset when the stream ends. Either loop the work, or use the object in a global variable.
In any case, this is not a good logic of work. What are you doing this for? What problem are you trying to solve?
-
@Fox I want count the number of registering per thread then sleep the thread during 24 hours
-
@J404 said in How to create variable once time ?:
@Fox I want count the number of registering per thread then sleep the thread during 24 hours
And why do you need a condition for each thread that will be executed only 1 time?
-
@Fox I want only "Set Variable" runs once time to keep the increased value.
For exemple :
My bot set variable count=0
Make account
Increment count (count+1)
REPEAT without reset count variableThread 2 same logic but count of thread 1 must be unattached of thread 2
-
@J404 You can dont close the thread, instead make a loop and after each repetition to do reset the browser.
-