lanch a script by click-event (or other user-actions)

 
(Please, some patience because I just started in MQL.)
On the chart I put an OBJ_BITMAP_LABEL, which has two states: on and off. When I click the image changes (img1 in img2 or img2 in img1), and so on.
But the key-thing for me is: how to launch a script when I click?
I searched the internet but I found nothing.
Thank Guys

Francis

 

 

 
   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. 

Reason: