How to use pushbutton in program

i need help for my project, so i want to execute some functions when i press button on app site.
lets say i want to select mode of operation
1.automation mode
2.manual mode

when my button which is on aap site is press then i want to execute automation mode and if it is not press then want to execute manual mode operation.
so can you tell me how to read that button and write a program…


This is the very easy task. Have you:

  • looked at the examples included in the library?
  • checked the documentation: ?
  • searched the forum for similar questions?