Added API for getting variable values from scripts