RE: How to start Agent Script after agent gets logged in USD(Unified Service Desk) or on Button Click i.e. without starting a session
The agent scripting control was specially designed to be a session based control. Not sure why though, but you can see all the controls have been hidden automatically if you select the control type as Agent scripting. You can try with some sort of workflow to make it as global but not sure what could be adverse effect of that..
For your requirement, I would suggest you to go for a custom control which may look like Agent script and configure it as Global hosted control in left panel. If it is exactly the same functionality you are looking for then a custom hosted control might kill lot of time, but I'm afraid I can't see any other supported option ..
Happy coding !!
Srikanth