There should be some differences in writing scripts for automation and profile properties especially on interfaces between the script and the tool (how the script retrieves input values from the tool and return resulting value to the tool, what predefined variables are available and so on).