_screen.forms(1).AddObject("tmrAutoClose", "myTimer", tnTimeout)And then have a myTimer class defined which is something like (untested):
DEFINE CLASS myTimer AS Timer PROCEDURE Init LPARAMETERS tnTimeout this.Interval = tnTimeout * 1000 PROCEDURE Timer this.Enabled = .f. KEYBOARD '{Escape}' ENDDEFINEIf something like this works, then you could write a little parser tool which reads in your .SPR files, and inserts that code appropriately for compilation in the Visual FoxPro version.
local t, ln >for ln = 1 to 6 > t = seconds() > msgbox( "hello", m.ln * 10 ) > ? m.ln, seconds()-t >next > >FUNCTION MsgBox > PARAMETER m.tcMsg, tnTimeout > > local lnChoice, lcMsg > > lnChoice = 0 > > lcMsg = m.tcMsg + " (This message should disappear after " + ltrim( str( m.tnTimeout ) ) + " seconds of complete inactivity.)" > > DEFINE WINDOW MsgBox AT 0,0 SIZE 10, 100 SYSTEM FLOAT SHADOW TITLE "msgbox" > > ACTIVATE WINDOW MsgBox NOSHOW > > @ 2, 2 say m.lcMsg > @ 10, 50 GET m.lnChoice FUNCTION '*H' > > ACTIVATE WINDOW MsgBox > > READ CYCLE MODAL TIMEOUT m.tnTimeout > > RELEASE WINDOW MsgBox > > RETURN