Buffer List Functions
Examples of input functions
:
// input a keypress and decode it key = GetKey() if (IsFuncKey(key))
Msg cat("Function key = ", FuncFromKey(key)) if (IsAltKeyDown(key))
Msg "Alt key down" if (IsCtrlKeyDown(key))
Msg "Ctrl key down" ch = CharFromKey(key) if (Ascii(ch) == 13)
Msg "You pressed Enter!" else if (toupper(ch) == 'S')
Search_Files
...
Msg (s)
Display a message window showing the string s. The message box has a Cancel button that the user can click to stop the macro.
StartMsg (s)
Display a message window showing the string s. The message box has a Cancel button that the user can click to stop the macro. The message window stays up after returning.
Buffer List Functions
A buffer list is a collection of file buffer handles. There is only one buffer list in the Source Insight application.
It contains the file buffer handles for all open source files. You can use the buffer list functions to enumerate through all file buffers.
BufListCount ()
This function returns the number of buffers in the buffer list. Use BufListItem to access the buffer handle at a particular index position.
BufListItem (index)
This function returns the buffer handle at the given index. The size of the buffer list is returned by BufList-
Count. Index values start at zero, and continue up to one less than the value returned by BufListCount.
Source Insight 4 User Guide 387