@givirus its because of your script logic, maybe you dont call the function? OR you dont have proper error handling which results into certain parts of your script being skipped since they are inside an if statement. I encountered this problem many times in the past, you will need to handle errors and it'll will be most likely fixed, for the purpose of debugging you can use the "Log" function at several points to see where it will print it.
Is there any way to let thread automatically edit resource while running?
-
I have 2 questions:
- Is there any way to let thread automatically edit resource while running? I see that only human can change resource. For example, I set resource changeSocks value =0. When bad socks happened changeSocks will be set to 1 and the next round proxy will be applied.
- Can you add feature that delete lines from file on command not through resource. For example, sometimes thread fails when time out and thread delete lines already. So can I delete that line only when thread succeed or in some particular cases.
Thanks.
-
@ryantuan said:
I have 2 questions:
- Is there any way to let thread automatically edit resource while running? I see that only human can change resource. For example, I set resource changeSocks value =0. When bad socks happened changeSocks will be set to 1 and the next round proxy will be applied.
No, but there is global variables and local variables. Local variables are widely used and available during thread lifetime. They are framed with double square brackets.
Global variables are available during all script lifetime. You can create global variable changeSocks and change it whenever you like. You can also use OnApplicationStart function to initialize it, copy from resource for example.
- Can you add feature that delete lines from file on command not through resource. For example, sometimes thread fails when time out and thread delete lines already. So can I delete that line only when thread succeed or in some particular cases.
Change resource fail number from 1 to greater value if you don't want to delete on fail. If you want to delete lines on cutom condition, set fail number and success number to something like 10000 and execute custom code when you want to delete line:
R("file")!
_result().die()Where "file" is resource name.
-
Re: Is there any way to let thread automatically edit resource while running?
For example:
My file
IloveYou
IhateyouDuring execution Iloveyou return fail.
So I want my file will be
Ihateyou
IloveyouAnd then repeat until success.
