Jump to content

Control several scripts with a main application


Recommended Posts

Hello!

I am new to AutoIt and I am developing some monitor tools to monitor a specific application (disk monitors, http monitor, process monitor and screen monitor).

At this point I have everything done but I developed this 4 applications separately and I am trying to include them in a whole AutoIt script which would control each one of the monitors.

Just some basic info :

1. each monitor has a different sleeping delay : how long should wait to gather more info

2. each monitor writes data to different files regarding a specified structure (e.g. log/MonitoredApplication/monitorAppName/log_timestamp.txt)

3. each monitor is developed in a separate au3 script with one main function (the monitor loop itself)

My scripts look like these :

Func DiskMonitor() 
   While True
    DumpDiskInfo()
    Sleep(DISK_MONITOR_DELAY)
   WEnd
EndFunc

Func HttpMonitor() 
   While True
    DumpHttpInfo()
    Sleep(HTTP_MONITOR_DELAY)
   WEnd
EndFunc

Ideally I could launch 1 thread for each monitor but it seems that there is no multi-thread support for AutoIt (I searched in this forum and I could not find it) so basically my solution is to code a scheduler to coordinate all this functions or do you have any other ideas ?

Some other questions :

1. Is there some tool that gathers all the setupudf header of each function like javadoc for autoit ?

2. The function listings that I see in the UDF threads are done manually or do you have a automatic way to generate them ?

3. how do you usually manage the versions ?

Thank you in advance,

trapbite

Edited by trapbite
Link to comment
Share on other sites

How long does the dump take?

Is there a problem with going:

while 1

DiskMonitor()

httpmonitor()

processmonitor()

...

wend

Which would be a 100 times easier to do?

Link to comment
Share on other sites

Actually Adlib would be perfect?

AdlibRegister ("function", 250)

AdlibRegister ("function2", 250)

AdlibRegister ("function3", 250)

AdlibRegister ("function4", 250)

Link to comment
Share on other sites

How long does the dump take?

Is there a problem with going:

while 1

DiskMonitor()

httpmonitor()

processmonitor()

...

wend

Which would be a 100 times easier to do?

Yes because since each monitor has a different delay they will not run at the same time and this is a requirement.

Link to comment
Share on other sites

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...