This discussion has been locked. The information referenced herein may be inaccurate due to age, software updates, or external references.
You can no longer post new replies to this discussion. If you have a similar question you can start a new discussion in this forum.

SAM Script Arguements Python

Hi,

I am trying to understand how do I use the arguments in SAM scripts when writing a Windows Script Monitor in python so that I can get the node IP/Name, username and password passed into the script?

I have tried adding the arguments to the arguments field at the top with it inside the script, inside the script without in the arguments field, as "python {SCRIPT} arg1 arg2 ar3" in arguments field with also in the script and other variations but I can't get it working.

Any suggestions?

Any help would be much appreciated, thanks.

  • Solved this one myself today Here is how you do it if anyone else is having the same issue.

    Nothing needed in the arguments field at the top.

    In the script you can have the argument as '${arg}'. You must have the single quotes around the argument.

    So for example:

    user = '${USER}'
    password = '${PASSWORD}'
    node = '${IP}'

    This should hopefully fix your issues too as this one was bugging me for a long time.