Bit Che > Scripts & Development
Bit Che - Script Documentation v.01a (READ)
deckkeeper:
Ah, wonderful. I had been practicing writing a few scripts, but it was slow work. This should help a lot. Thanks! :)
Edit:
I've got a question about function x. I was reading through scripts and found one where the function had an extra parameter. I think it takes what's in it and puts it in front of the extracted data. Am I right?
Edit2:
'nother question. In the scripts I checked, they didn't use the save(var) function, just #=var. Is there any difference?
chip!:
Question 1:
function x (aka super extract)..
yes, i forgot to document those extra optional parameters..
you can add a string on to either the front or the end of the extracted text by adding optional parameters:
vRes = x ( vData, vStart, vEnd, sAddFRONT, sAddEND)
2=x(t,z,<bc>,[-bc-],http://www.google.com,&name=test)
note, you CAN add only the FRONT or only the END or neither.
Only the END:
2=x(t,z,<bc>,[-bc-],,&ADDSTHISTOTHEEND) <-- note the extra ',' place holder for text at the front is blank. this is fine.
Question 2:
which script did you see do #=var? I will look at it because that technically shouldnt do anything, as there is no 'function' defined, which would mean the script parser should skip over the line.. the only 2 functions that store into the special Torrent Info # variables are 'save' and 'x'.. at least thats how it should be, and i'll be confused if its working otherwise (but maybe i forgot something from the earliest versions of the script engine)
chip!:
would scripting be easier if all of the functions had more descriptive names rather than short 1 letter names?
like instead of function i and h, we could use something like 'find' and 'findH' (respectively)..
any thoughts?
deckkeeper:
Hmm, I guess they all used the x function.
Yes, it would probably be helpful to give them descriptive names, but there aren't too many to remember.
chip!:
okay ;)
hey.. feel free to post any scripts you're working on if you need any help with figuring out how to code for the site, or whatever.. i'm glad to help and get a few more people up to speed on script development.. some sites are trickier than others because you'll find out that you have to use some manipulation tricks to for the HTML into a fashion that can be spliced up into arrays.. or generate the proper URL's for the torrent, page, etc..
so if anyone gets stuck on anything, post here and i'll attend to it and try to provide an answer/support asap!
cheers!
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version