| Useful Script Functions |
News Flash
| PC: nwsflashsg.ZIP 1,237 |
Newsflash() / NFIdle()
If you add these functions to your own scripts in order to create Message boxes on the screen similar to those generated by the built-in Message() procedure but with the following extra features:
| PC: hiderestsg.ZIP 889 |
proc HideApps(); and proc RestoreApps();
These procedures can be used to hide all of the floating windows and toolbars etc. at the start of a script and restore them at the end. This maximises the available screen area during script operation. The gFloat%[] array should be a global at the start of your script.
These procedures are used in many CED scripts. The particular variant given here keeps the script window itself hidden. You can find a slightly simplified version of these procedures and further information under App() in the Signal Help index.
These functions should be compatible with all versions of Signal.
| PC: clearlogsg.ZIP 885 |
proc ClearLogQ():
This Signal script procedure checks whether there is any text in the Log window. If the log contains text a Query box is displayed so that you can choose whether or not to clear the log before continuing. If you choose the answer No, the text caret is moved to the end of the log file. The procedure leaves the current view unchanged.
Add this function to the functions and procedures section of your own scripts. You can then call it at the beginning of script functions that write data to the log file or perhaps in the Quit() function, as an aid to keeping the log file in a tidy state.
This procedure should work in all versions of Signal
| PC: dobuttonsg.ZIP 2,127 |
func DoButtons%()
This function allows you to set the enabled /disabled state of multiple toolbar buttons.
The ToolbarEnable() and ToolbarClear() script functions can only act on one (or all) buttons. Thus, you may need sequences of 4 or 5 calls to ToolbarEnable() at each point in the script where you need to set the enabled state of multiple buttons. The DoButtons%() function provides a method of setting the state of multiple buttons with a single function call. To use it, simply copy the DoButtons%() function into the functions and procedures section of your script and call it as illustrated in the example script.
This function requires Signal version 3.0 or higher
These scripts are stored as WinZip files, myscript.zip, except where they are shown as signal\scripts\myscript.sgs. Those files were installed with Signal. See the summaries by clicking on the description line, below. Then you can down-load them by clicking on the filename; please check the size received.
![]()