About how to get the value when the button is pressed

 
ObjectCreate(0,"A",OBJ_BUTTON,0,0,0);
ObjectSetInteger(0,"A",OBJPROP_CORNER,0);
ObjectSetInteger(0,"A",OBJPROP_XDISTANCE,30);
ObjectSetInteger(0,"A",OBJPROP_YDISTANCE,30);
ObjectSetInteger(0,"A",OBJPROP_SELECTABLE,false);

ObjectSetInteger(0,"A",OBJPROP_SELECTED,false);


I created a button with the above code.

I think that the value is different when the button is pressed and when it is not pressed.

int i = ObjectGetInteger(0,"A",OBJPROP_SELECTED);

Print(i);

I tried the code above and it didn't change anything.

How can I get the value when the button is pressed?

 
if(ObjectGetInteger(0,obname,OBJPROP_STATE))
   {
   }
 

Keith Watford #:

Thank you. I Solved.