Skip to main content

Button Command Action

  1. Navigate to HSYCO Manager

  2. Create a anew project or open an existing one

  1. Go into the "home" page

  1. Click "add"

  1. Add a "Button"

  1. You can align the button in the middle of the page by clicking "Align" and then "Align horizontally" and "Align vertically"

  1. Go back to "edit" mode

  1. Change the "Label" to "Send Command"

  1. Change the "Description" to "Click to send a command to the server"

  1. You can also change the "Width" and the "Height" of the button so that the two strings are clearly visible

11. Change the "Action" to "command". This specifies a command to send to the server with a name and a parameter

12. Change the "Name" to "commandtest". If not specified, the default name is the "ID" of the button. In our case, we haven't specified an "ID" so the "Name" is mandatory. This can be any string

13. Change the "Parameter" to "1". This can also be any string

  1. The button should now look like this:

  1. Click "Save" to save the project

Tip: Good! The button is now working. Let's test it

  1. Click "Run" and then "Default" to launch the application

  1. The page should look like the one in the Project Manager:

  1. Click the button to send the command

  1. Go back to the Project Manager and click this icon to open up the Menu

  1. Click "Log Viewer"

21. As you can see, the Command has been sent and shown in the logs. The name (the one between the square brackets) is "commandtest" and the parameter (after the colon) is "1".