How to Run Scripts in CANape?
There are different ways how scripts can be executed in CANape:
- in CANape task manager [Tools |Task Manager…]
- with a link in a panel object
- within functions and scripts with CallScript("Demo.scr");
- from CANape 16.0 onwards there is also the option to include scripts as icons directly in the ribbon area of CANape. A maximum of 16 scripts is possible:
To include a script in the ribbon, please proceed as follows:
- Please select the respective script in the Function Editor.
- Right click on the script (here: Demo.scr) and select Properties. Then activate the option Show script in the program menu:
- Now, the script appears under Tools | Execute and will also be a selectable item for the ribbon.
- To include the script in the ribbon, a new user-defined tab has to be created: right click into the ribbon to Customize ribbon. On the right hand side, Create Tab, e. g. “New Tab”.
- Now select the script (here: Demo) on the left hand side and add it with to the created tab.
- After this, the script is displayed and can be executed in the “New tab”.
- with user-defined shortcuts [Backstage Tab] | Customize
For executing scripts with user-defined shortcuts, please follow the instruction above. Steps 1-3 are similar. In the Customizing Dialog, please place the cursor on the respective script. Double-click the script to open the input box. Then confirm the key combination which shall be assigned.
Please complete all required fields. Fields marked with * are required.