This function executes the script for given layout for the current db.

def doScript(self, script_name, params=None, return_all=False):
		"""This function executes the script for given layout for the current db."""
		request = [
			uu({'-db': self._db }),
			uu({'-lay': self._layout }),
			uu({'-script': script_name})
		]

		if params:
			request.append(uu({'-script.param': params }))

		request.append(uu({'-findall': '' }))

		result = self._doRequest(request)
		result = FMResultset.FMResultset(result)

		try:
			# Try to return results from the script
			resp = result.resultset if return_all else result.resultset[0]
		except IndexError:
			resp = None

		return resp