Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
AppInitialized event
Answer
4/19/16 5:33 AM
Hello,

I want to execute a file on event 'AppInitialized' but when the ADOxx modelling toolkit starts, the file is executed before the initializing icon closes.I attach an icon to see what I mean.Is there a way to start the execution after closing of the initializing icon? Maybe with a timer or sth else? I didn't find sth in documentation.
I would appreciate any answer.

With regards,
Ioanna
Attachment

Attachments: initializing_icon.PNG (91.9k)

RE: AppInitialized event
Answer
4/20/16 6:29 AM as a reply to Ioanna Ramoutsaki.
Hi,
To avoid the overlapping of this two windows, you can again use the event MOCTimer in addition of a boolean attribute as follows:

1) Create an attribute in the class '__LibraryMetaData__' of type INTEGER
2) Add The following code into the event AppInitialized:

1CC "Core" GET_CLASS_ID classname:"__LibraryMetaData__"
2CC "Core" SET_ATTR_VAL objid: (classid) attrname:"Boolean" val:0

3) You can execute your AdoScript with the MOCTimer event
1CC "Core" GET_CLASS_ID classname:"__LibraryMetaData__"
2CC "Core" GET_ATTR_VAL objid: (classid) attrname:"Boolean"
3IF (val=0) {
4# Set the attribute value to 1 in order to trigger it only once.
5CC "Core" SET_ATTR_VAL objid: (classid) attrname:"Boolean" val:1
6############ MY ADOSCRIPT##########
7}