Script in brainstorm

I introduced recently to scripting in BST,
I now that from run process I can generate a script, it is good but if I am reading a script and I found somthing like that:

ProtocolInfo = bst_get('ProtocolInfo');
dip_bst.Comment= ['dip_',num2str(d)];
db_add(ProtocolInfo.iStudy, dip_bst, []); %add the dipole to brainstorm to have the plot of the dipole orientation

how can I understand those lines for example?

how can I understand those lines for example?

First, you need to learn how to program with Matlab.

Then, by reading entirely the tutorial Scripting:
https://neuroimage.usc.edu/brainstorm/Tutorials/Scripting

And finally by reading the code of the functions that are called.