kanber Posted April 15, 2009 Share Posted April 15, 2009 Hi, I want to log when windows is opened and closed for example 15/04/2009 13:53 Windows Opened 15/04/2009 15:53 Windows Closed is there any way to do this with Daqfactory? Link to comment Share on other sites More sharing options...
AzeoTech Posted April 16, 2009 Share Posted April 16, 2009 If you have DF autostarting with windows, you could log the start time (approximately) by adding some script to a sequence marked AutoStart. It will run whenever the doc loads, so may not be competely accurate. To get the shutdown time, you could create a sequence called OnShutDown and put code there. It will, however, run whenever DF shutsdown or your load a different .ctl doc, so may not be completely accurate. You also might consider using the windows system log to do this, and depending on your OS it might do this already. How you'd do it is beyond the scope of this forum since its outside DF. Link to comment Share on other sites More sharing options...
kanber Posted April 17, 2009 Author Share Posted April 17, 2009 I am logging when daqfactory is opened. but I want to know. when is pc shut down and open. I am logging datas by date. but someday I cant find data files. is it logging problem or windows is not running or runtime is not working. I want to konw that and said to customer details about program open/close and windows also. can you give me example for OnShut Down() function... Thanks for help... Link to comment Share on other sites More sharing options...
kanber Posted April 17, 2009 Author Share Posted April 17, 2009 I do an example which I attached. but when I press restart buton it is sometimes working sometimes not. but when I close to programme it is OK. what can it be? eventsample.ctl Link to comment Share on other sites More sharing options...
AzeoTech Posted April 17, 2009 Share Posted April 17, 2009 Are you talking about the restart button on the PC? Its possible that windows is shutting DF down hard and so DF never gets a chance to run that script. If you truly want to control this, you should lock your PC and run DF in full screen mode, either without a keyboard, or with a kiosk type application running to prevent the user from accessing the windows system. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.