Which function to use to change the weight of selected text or the object in scripting

I am looking for a function calls to change the weight of selected text or object in scripting.

Is this going to change the text's stroke or fill? Is there separate function for stroke or fill? 

And where can I find these information in scripting ( Macro ) dialogbox?

Thank you for any help.