Automatically exiting omnis

RM research robertmostyn99 at gmail.com
Mon Dec 1 08:42:00 EST 2014


The solution I made some time ago, Omnis classic to be precise, was to run a timer upon startup.  Every 5 minutes it would fetch some records from the server from a single table.

One of the optional entries was to see if a curfew had been set.  This enforced logouts at the end of each day.  It could also be used on an ad hoc situation when you wanted to close the system at lunchtime for some maintenance issue.

Every 5 minutes the records would be read.  The records would include a message/explanation for the action. If the time in the record was within (or APPROACHING) the curfew time, a modeless window would display the message in the records.  I used to provide a warning at 10 minutes before shut down, then 5 minutes, then 1 minute.  At the right time, close Omnis.  By offering warning messages one can fairly discount the issue of user being in Enter data and shut Omnis regardless.
 
Rob

> On Mon1 Dec 2014, at 11:07, Phil Potter (ou) <Phil at pgpotter.demon.co.uk> wrote:
> 
> Hi Dave,
> 
> I prefer not to consider what time it is, just whether someone is trying to do some work!
> 
> in the $control of the task I have no 'on' statement' and just set a last activity variable to now...
> Calculate tdLastActivity as #D
> 
> The variable being set to date time, down to seconds.
> 
> then in the timeout of your timer...
> for example:
> 
> If (ddiff(kMinute,tdLastActivity,#D)<15)|#EDATA
> 15 minutes idle
> note: what to do when editing data...
> 
> Just some thoughts
> Phil.
> 
> 
> On 29/11/2014 09:19, Dave Jobling wrote:
>> Hi
>> 
>> Some of my users are leaving my application open for days at time.  Does anybody have a good way of getting omnis studio 4.3 to automatically quit at a certain time in the evening?  .
>> 
>> I suppose it could be done with a timer method.  If so, has anybody got any sample code?
>> 
>> Thanks
>> 
>> Dave Jobling.
>> 
>> 
>> -- 
>> Phil Potter
>> Based in Chester in the UK.
> _____________________________________________________________
> Manage your list subscriptions at http://lists.omnis-dev.com




More information about the omnisdev-en mailing list