Run Task Menu Scripts ![]()
Special purpose scripts can be created and automatically linked to the standard menus in most areas of CAPITAL. For more information on Script Programming see the Visual Builder help file.
Up to 9 scripts can be associated and added to the Run Task menu. If CAPITAL does not find any scripts in the CAPITAL program directory, the Run Task menu option is not made visible.
To associate a script with a menu entry, see the code in the table below. Add a number between 1 and 9 to the code name and end the script with the extension .MAC. For example, if you want to execute a script in the Customers area, then suitable names would include CUST1.MAC, CUST2.MAC, CUST3.MAC, etc.
|
Area |
Code |
|
CAPITAL Main Menu |
TASK |
|
Card Files |
CARD |
|
Cash Management |
CASH |
|
Customers |
CUST |
|
Hire Manager |
HIRE |
|
Invoicing & Point of Sale |
INVOICE |
|
Order Entry |
ORDER |
|
Purchase Orders |
PURCH |
|
Quotations |
QUOTE |
|
Stock Receipts |
RECEIPT |
|
Stock Return |
RETURN |
|
Requisition |
REQUIT |
|
Service Manager |
SERV |
|
Stock Control |
STOCK |
|
Suppliers |
SUPP |
Script Contents
The first line of the script must be a comment line beginning with the symbol * (asterisk). The text that follows the script will be used as the menu entry description. You can place an ampersand (&) symbol in front of any letter in the description, which will then be used for the menu short-cut. For example:
* Open Cashdraw
To underscore the letter O so that it is highlighted as a short-cut on the Run Task menu, use the ampersand symbol:
* &Open Cashdraw
Example Script
The following script (CUST1.MAC) opens a customer's associated web page.
* &Goto Web Site
If IsEmpty(SCRRead("Cuswebsite"))
Echo("Sorry, no web site is specified for this account.")
Return
Endif
Shell(SCRRead("Cuswebsite"))
____________________________
Related Topics:
Screen Builder Script Functions
![]() |