This code works with the onkey event and ontimer event. This presents a dialog box once to warn there is no activity logged. After the first warning it takes action when the next ontimer event takes place. The dialog can be adjusted on how many cycles it goes through by modifying the "nbr" counter.
The onkey event resets the timer to the current time when key press activity detected. Use the time interval setting on the form properties to determine how often the check for activity is performed.

Variable to be created:

nbr as n
acttime as n

Onkey code:

acttime = toseconds(time())

OnTimer code:

'Date Created: 04-May-2013 02:54:47 PM
'Last Updated: 04-May-2013 05:18:39 PM
'Created By : yagabu
'Updated By : yagabu
'Dialog code copied from someone on A5 Forum

if convert_type(acttime, "n") > toseconds(time()) then
if nbr < 1 then
nbr = nbr + 1
dim title as c
title = "No Activity Detected"
{title=No Activity Detected}
<20,2Click Here to continue!MyButton>;
if a_dlg_button="MyButton"
'Resets time counter
acttime = toseconds(time())
'Any additional code to run with reset
end if
'Close dialog window
ui_modeless_dlg_close("No Activity Detected")
'Code you wish to execute

end if
end if