THE FORUM IS IN READ-ONLY MODE
Jump in LoliScript
-
What code must be put in LoliScript so that it jumps from one place to another and ends the config path in the debugger correctly.
-
@KM11 Here is an example (if variable/capture has googleg it will jump to second request other wise it will terminate the loop whit status fail)
REQUEST GET "https://google.com" HEADER "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" HEADER "Pragma: no-cache" HEADER "Accept: */*"
PARSE "<SOURCE>" LR "content=\"/images/branding/" "/1x/googleg" -> VAR "MyCapture"
IF "<MyCapture>" Contains "googleg" JUMP#REQUEST_Newrequest ELSE SET STATUS FAIL ENDIF
#REQUEST_Newrequest REQUEST GET "https://google.com" HEADER "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36" HEADER "Pragma: no-cache" HEADER "Accept: */*"
I just separated it into four piece for better understanding
if need something more specific PM me.
-
Thank you very much for the example. I executed the four parts and I have some questions that I want to ask you.
Firstly, how to copy and paste in LoliScript because I have tried Ctrl + C (Copy) and Ctrl + V (Paste) and it is not allowed.
Second, the third and fourth part, I tried to separate them but they are only forming a block in LS.
According to this code, as the capture always contains "googleg", it jumps to the line that contains ENDIF and ends the debugger with the status NONE, but if the capture was not "googleg" and I would like to jump to another request as it would be done. I guess SET STATUS FAIL would change.
-
@KM11
First --> Ctrl+C and Ctrl+V is allow in OB make sure this isunchecked (Disable Ctrl+C/V on Blocks), then just select the area you want.,
Second --> Every LoliScript Command will create a block
IF "<MyVariable>" Contains "Target" JUMP#BlockName ELSE //more code, could be another request or whatever command allow in OB ENDIF
-
Thanks again. Solved these two issues.
I wanted to ask one last question. With what you have told me I could solve it myself but I'm not sure I can do it. The problem is that I have two different hits that have their respective captures, each one belongs to a different request and both cannot exist at the same time. When one capture appears, the other cannot exist and vice versa. Would you be very grateful if you could advise me how to solve this problem?
Regards.
-
Regarding the last question, I have already solved the problem with the data you have provided me. Thank you very much.