« Back

Time trigger

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Time trigger
community documentation adoscript trigger
Answer
3/27/14 11:06 AM
is there a  Time-trigger to read/export external files for ADOxx?

RE: Time trigger
Answer
1/20/14 8:48 AM as a reply to Fadi.
ADOxx offers a generic event that is triggered periodically. This event is triggered periodically each 55ms while the application is in idle state. It makes it possible to call procedures periodically. Please find below the event specification and a sample how to use it. As any kind of AdoScript functionality can be triggered, this answer does not provide details on how to export information or read from external sources as this is also the question in the post http://www.adoxx.org/live/faq/-/message_boards/message/59640

1ON_EVENT "MOCTimer" {
2# PEFORM functionality as AdoScript
3}

In order to test this functionality, you can add the following event specification to your library (or use the attached library for review) resulting in the creation of a LOG DEBUG WINDOW and a continuous log statement produced by the timer. Please consider that you would need to merge code if you have one of these events already specified.

 1ON_EVENT "AppInitialized" {
 2      # create the dockable window for the output stream
 3      CC "AdoScript" CREATE_OUTPUT_WIN winid:"EVENTLOG" title:"Debug Logging"
 4      # establish a global procedure as a helper implementation for timestamped logging
 5      PROCEDURE global EVENT_LOG msgType:string message:string {
 6        CC "Application" GET_DATE_TIME date-format:"dd/mm/yyyy" time-format:"hh:mm:ss"
 7        SET currentDateTime: ((date) + " " + (time))
 8        CC "AdoScript" OUT winid:"EVENTLOG" text: ("[" + (msgType) + "@" + currentDateTime + "]: " + (message) + "\n")
 9      }
10}
11
12ON_EVENT "MOCTimer" {
13  #log periodically to the log window
14  EVENT_LOG msgType:"MOCTIMER" message:"Periodically triggered functionality"
15}
Attachments: MOCTimer Library.abl (7.2k)