oSlave = CreateObject( "SlaveExeName.SomeClassName" ) oSlave.fAddJob( "JobOne" ) && assume "JobOne" is an entry in a Job.DbfThe slave COM object has code like this:
Define Class SomeClassName As Custom OLEpublic *- Add tmrDoTheWork As myTimer. Defined below (can't remember the exact syntax for this). *- Add array aJobs as a property (can't remember the exact syntax). Function fAddJob( cJobID As String) As Boolean *- Add the new job to an array of Jobs. If Empty( This.aJobs ) Then This.aJobs[ 1 ] = cJobID Else *- Increase the size of the array and add the job to the end. Dimension This.aJobs[ ALen( aJobs, 1 ) + 1 ] This.aJobs[ ALen( aJobs, 1 ) ] = cJobID Endif This.tmrDoTheWork.Interval = 100 This.tmrDoTheWork.Enabled = .T. Return .T. EndFunc && fAddJob( cJobID As String) As Boolean. End Define Define Class myTimer As Timer Function Timer This.Interval = 0 This.Enabled = .F. Do While Not Empty( This.Parent.aJobs ) *- Retrieve Job from Jobs.Dbf and delete entry from This.Parent.aJobs *- Perform the job. EndDo Return .T. EndFunc && Timer(). End DefineHope this helps. Note: I found I was able to call oSlave.fAddJob() even while the timer event was running.