You are here: Home DOCUMENTATION Debugging Tools uBug12JE User Manual - Script Command Buttons

Technological Arts Inc.

Your Shopping Cart

Your Cart is currently empty.

uBug12JE User Manual - Script Command Buttons

Article Index
uBug12JE User Manual
Installation
Connecting to the Module
Programming the Module
Extending uBug12 INSTALL
Assemblers
Developing Software Using Projects
Script Command Buttons
uBug12 Miscellaneous Features
Command Glossary
Writing Compatible Applications
Appendix
All Pages

Script Command Buttons

At the top of the uBug12 program window, above the text boxes, there are four buttons. These are provided for user-defined functions.  The first one is already defined with a sample script that executes the 'help start' command.  (More recent versions of uBug12 define the second button as 'Help assemblers'.)  You can change this to your own defined function.  For example, instead of having to type 'CON 5' every time you need to reconnect to the board, a button can be set up to do this automatically. uBug12 can also be set up to run a command or commands at start up of uBug12, or at the opening of a Project directory.

To do this, you will have to manually create a text file listing the commands you want run, one command per line. As a test, create a text file called 'connect.txt', and have it contain the following two lines:

CON 5 VERSION

Now at the top of the uBug12 window, click on File. Under this will be an option for 'Script Paths'. Click on this option. Once selected, a new dialog box will appear. This will allow you to set up the name for each of the four buttons, as well as enter the path to the command script text file to parse when the associated button is clicked. The first path name text box will not have a button name text box to go with it. This is because this first entry is for the command script to use when the program is first started.

Go ahead and enter a name of 'Connect' for the first button name text box. Use the 'Browse' button at the end of the line to browse to where you have saved the 'connect.txt' file created above. After the file is accepted, you will see the file path in the path text box. Finally, press on OK to accept these changes.

The main screen will now be updated with the first button showing 'Connect' as its label. Clicking on this button will now run the connect command, followed by VERSION.

The other script buttons can be set up similarly. A typical setup could be for Connect, Erase, Program, and Debug for the four button names.

One other command available with command scripts is the apostrophe character. This is used to denote the start of a comment, as in this example line:

' This script does xxx.

The comment will print to the uBug12 output window when it is encountered, as will each command in the script as it is run. However comments do not cause any communication with the S12 board.



Last Updated ( Tuesday, 13 September 2016 08:12 )