lanch a script by click-event (or other user-actions)
if(sparam=="Reset Button" && ObjectGetInteger(0,"Reset Button",OBJPROP_STATE)==true)
{
if(ReSet())
ObjectSetInteger(0,"Reset Button",OBJPROP_STATE,false);
}
Here's an example of what I do in OnChartEvent (Object Clicked) with a button object.
The function ReSet() returns a bool when complete and so the button is un-clicked automatically.
Francis