is it possible to set up a script which logs in to Splunk automatically and performs a saved search or runs a query?
You can do this in a variety of ways, but using the REST API is likely your best approach.
Read http://docs.splunk.com/Documentation/Splunk/6.2.3/RESTUM/RESTusing#Authentication and http://docs.splunk.com/Documentation/Splunk/6.2.3/RESTTUT/RESTsearches.
thank you, will check from my side..!!