• " ... I'm not sure how to generate a script? ... "

    Open the GUI, get everything set the way you want. Instead of clicking "OK", select "Script" at the top of the GUI pane.