Sub Gfa_Minute
Sub Gfa_Second
The Gfa_Minute sub is called every minute (approximately), except if the program is running. Although it isn’t advised to perform complex and lengthy actions because this could slow down the editor, there is quite some room here to create useful extensions. The GFA-BASIC 32 editor uses the same timer interrupt to clock in the status bar.
The Gfa_Second sub is called every second (approximately), except if the program is running. Although it isn’t advised to perform complex and lengthy actions because this could slow down the editor, there is quite some room here to create useful extensions. The GFA-BASIC 32 editor uses the same timer interrupt to update the title of the IDE when the dirty status of program has been changed.
// Changing the timer interrupts
Global Const tMinuteId = $14D
Global Const tSecondId = $14E
~KillTimer(Gfa_hWnd, tSecondId) 'Set the Gfa_Second timer to
~SetTimer(Gfa_hWnd, tSecondId, 500, 0) '500 milliseconds, rather than 1000ms
//Show current procedure in the status bar each second.
Sub Gfa_Second
Gfa_StatusText = Gfa_Proc
End Sub
The second example of Gfa_Second is changed somewhat, and behaves more reservedly. Thus the Gfa_StatusText is changed only when the current procedure’s top line changes.
// Display current procedure in status bar.
Sub Gfa_Second
Static Int procline
If procline != Gfa_ProcLine
procline = Gfa_ProcLine
Gfa_StatusText = Gfa_Proc
EndIf
EndSub
Gfa_OnRun, Gfa_OnEnd, Gfa_Init, Gfa_Exit
{Created by Sjouke Hamstra; Last updated: 08/10/2014 by James Gaite}