« 回到AAU Project

Time trigger

組合檢視 平均檢視 瀏覽樹狀資料
相關串連 [ 前一個 | 下一個 ]
toggle
Time trigger
community documentation adoscript trigger
答覆
2014/3/27 上午 11:06
is there a  Time-trigger to read/export external files for ADOxx?

RE: Time trigger
答覆
2014/1/20 上午 8:48 作為回覆給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}
附件: MOCTimer Library.abl (7.2k)