monitoring program

3 posts in this topic

#1 ·  Posted (edited)

Hi, how to make autoit "monitoring" program, Basically i want autoit to autoclick "start" button only  when the program is "stop" ? thanks



Edited by irfan666
wrong image

Share this post

Link to post
Share on other sites

Hello. Wellcome to AutoIt Forum does Autoit Window Info Show any info?



Share this post

Link to post
Share on other sites

You need to have some way of determining the status (stopped) of the program.

Is another window open or some text somewhere showing percentage, etc?

AutoIt.4.Life Clubrooms - Life is like a Donut (secret key)

Make sure brain is in gear before opening mouth!
Remember, what is not said, can be just as important as what is said.


What is the Secret Key? Life is like a Donut

If I put effort into communication, I expect you to read properly & fully, or just not comment.
Ignoring those who try to divert conversation with irrelevancies.
If I'm intent on insulting you or being rude, I will be obvious, not ambiguous about it.
I'm only big and bad, to those who have an over-active imagination.

I may have the Artistic Liesense ;) to disagree with you. TheSaint's Toolbox (be advised many downloads are not working due to ISP screwup with my storage)


Share this post

Link to post
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

  • Similar Content

    • faldo
      By faldo
      "The why"
      I've been working over 15 years in the IT industry and have realised that the best way of streamlining operations and support is by combining the concept of selling services (instead of hours) along with a tool built for managing those services.
      For the past 10 years i've been working with some of the leading providers of MSP-tools. The prize set on these comercial tools is quite high and there are usually few licence models to choose from. A smaller it-company will find the cost hard to motivate and in turn have dificulties converting its busines model in order to make more money, classic catch 22
      "The how"
      During the years, i've gathered the pros and cons of these tools, dissected their core and realised there is no magic or rocket science going on. There is however a whole lot of scripting used and that's why i feel AutoIT would be a great foundation for a new project.
      So, i've decided to compile my years of experiance and create a tool for remote management and monitoring of machines over WAN. Instead of monetizing it and try to compete with the big companies i felt it more efficiant to make it open source and hope for community interest and development.
      "The what"
      The following features are under development, some arn't started, some are finished. Check the changelog for more info.
      Base components
      - Agent running as service
      - Central server with MySQL (hub engine)
      - Management client (AutoitGUI/WebGUI)
      Main features
      - Remote execution of shell commands as system or specific user
      - File transfer from/to agent
      - Live monitoring of system resources
      Consequential features (based on main features)
      - Hardware/software inventory
      - Software deployment/updating
      - Patch management
      - Antivirus management
      - OS deployment
      - Disaster recovery
      - Hardware/software/network monitoring
      - Wake on LAN
      - Reporting
      - Remote registry, event viewer, task manager
      - Scripting (obviously)
      Additional features (stand-alone modules)
      - Remote control
      - Servicedesk (based on ITIL)
      - AD-integration
      - Secure communication with SSL and rotating key for every session.
      - SHA256 encryption.
      Remmanaut network overview

      My knowledge of AutoIT is average but i'm novice when it comes to programing structure for collaboration, so if you're willing to help me out in making the project easy to share, i'd be very thankfull. Unfortunatly i'm no php-guru so i'll be concentrating on the AutoitGUI until the agent and hub engine reaches an adequate version.

      If you feel that this tool could benefit you in any way or just want to join the project for the fun of development, don't hesitate to post constructive feedback or hit me a PM.
      Code optimisation to do:
    • maddogrsf
      By maddogrsf
      hi everyone . Learning more and more of autoit and i have to say it is VERY powerful. now im into a small automation project
      Here is what i plan :  i want , using while/ wend to monitor a log file of an application and when there is a line added i need that auto it " exports" that line
      i need this for  an automation of my ftp server. it checks sfv files and when an upload is " COMPLETE "  the ftp server logs it . i need that when there is written this log entry to extract it and run unrar is some regex parameters are met. the hard part is the real time monitoring
      at the moment  my code is very unsuccessful (if required i can paste it here)
      plus after 40 sec of run time i usually get an out of memory error
      can you please me show some effective ways of to monitor a file and extract  last written line (guess using  readline -1) in real time ?
      thx and regards
    • jlorenz1
      By jlorenz1
      PixelSearch ( left, top, right, bottom, color [, shade-variation = 0 [, step = 1 [, hwnd]]] )
      Searches a rectangle of pixels for the pixel color provided  depending on a specified window handle.

      MouseClick ( "button" [, x, y [, clicks = 1 [, speed = 10]]] ) makes a click on a specified position.
      How can I simulate a MouseClick on a window depending on a specified handle, which is invisibel, and without moving the mouse really?
      Is this possible? How is the syntax?
      Thanks in advance
    • timmy2
      By timmy2
      I'm considering using a program called Frameless to display various graphic files -- including some animated gifs. Each graphic will have a button in it for the user to click on to move to the next graphic. (like a "Next" button).

      Frameless can display each graphic at a specific screen location so I can predict the coordinates of any element in the graphic, including this button.

      Frameless can force the graphic to be on top of all other windows, which I need.

      The problem with simply waiting for any mouse click is that my graphics tell the user how and where to click within programs that are visible behind each graphic. So the user will be clicking or or typing into those programs. All I can likely be sure of is that the user won't unintentionally click on the "Next" button in the graphic itself, thus my goal of limiting where this "hotspot" is.

      Can AutoIt be running in the background and detect when the user clicks on the button in each graphic?

      Bonus question: could AutoIt display the actual clickable button atop the graphic displayed by Frameless? No wait... I assume that's impossible if I set Frameless to always display "on top". Nevermind.

      Please don't recommend that I display the graphics using AutoIt because my experience with the hack to display animated gifs yields very slow-to-open graphics, and for me it's difficult to implement. Using Frameless to display the graphics seems to be a more efficient delegation of tasks.

    • DavidLago
      By DavidLago
      Hello, fellows.

      I recently gave fingerbirth to a script that reports out the current files, and users opening those files currently. Also provides a filter for strings/extensions.

      Suggestions and improvements are welcome.

      #cs ---------------------------Script Start------------------------------------- | Author: DavidLago (Hellfrost) | Script Function: Reports out a logfile containing openfiles within a (file)server, configured under an ini file #ce ---------------------------------------------------------------------------- ;---------------------------------------------------------------INCLUDES-------------------------------------------------------------------------------- #include <Process.au3> #include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <array.au3> #include <Date.au3> ;------------------------------------------------------------EXPORT-FOLDER-------------------------------------------------------------------------------- If Not FileExists(@ScriptDir & "\Export") Then DirCreate(@ScriptDir & "\Export") EndIf ;------------------------------------------------------------ WHILE LOOP -------------------------------------------------------------------------------- Global $iNow = _NowCalc() Global $TimeOut = False While $TimeOut = False ;---------------------------------------------------------VARIABLES----------------------------------------------------------------------------------- Global $Date = @MON & "-" & @MDAY & "-" & @YEAR Global $Hour = @HOUR & "'" & @MIN & "''" Global $FullDate = $Date & "_" & $Hour Global $ReportDir = @ScriptDir & "\Export\" ;----------------------------------------------------------INI_READ----------------------------------------------------------------------------------- Global $MailFrom = IniRead("Config.ini", "Mail", "MailFrom", "") Global $Mailto = IniRead("Config.ini", "Mail", "Mailto", "") Global $MailSubj = IniRead("Config.ini", "Mail", "MailSubj", "") Global $MailBody = IniRead("Config.ini", "Mail", "MailBody", "") Global $TimeFreq = IniRead("Config.ini", "Time", "Frequency", "60") Global $TimeDur = IniRead("Config.ini", "Time", "Duration", "24") Global $ReportOut = $FullDate & "_" & IniRead("Config.ini", "ReportOut", "ReportOut", "Report") Global $FilterExt = IniRead("Config.ini", "FilterExt", "FilterExt", "N") Global $FileExt = '"' & IniRead("Config.ini", "FileExt", "FileExt", "exe") & '"' Global $FormatOut = IniRead("Config.ini", "FormatOut", "FormatOut", "Table") ;-------------------------------------------------------MATH VARIABLES---------------------------------------------------------------------------------- Global $CommandCombo, $CommandFinal, $iDiff, $FreqDurMath $iTimeFreq = $TimeFreq * 60000 ; Turn to miliseconds $iTimeDur = $TimeDur ; Turn to minutes $FreqDurMath = ($TimeDur * 60) / $TimeFreq ;-------------------------------------------------------ERROR-TREATMENT--------------------------------------------------------------------------------- If $iTimeFreq < 900000 Then MsgBox(4112, "Error", 'The parameter "FREQUENCY" at the config.ini file is set to a number below 15. 15 minutes is the minumum threshold', 5) $MailBody = 'The Script "' & @ScriptName & '" is reporting the following error: The parameter "FREQUENCY" at the config.ini file is set to a number below 15. ' & @CRLF & '15 minutes is the minumum threshold' SendMail($MailBody) Exit EndIf If $FreqDurMath < 1 Then $MailBody = 'The Script "' & @ScriptName & '" The parameters "FREQUENCY" and "DURATION" at the config.ini file is set to a number which prevents it to loop more than once. Do you want to continue?' SendMail($MailBody) If MsgBox(4116, "Error", 'The parameters "FREQUENCY" and "DURATION" at the config.ini file is set to a number which prevents it to loop more than once. Do you want to continue?', 10) = 7 Then Exit EndIf ;----------------------------------------------------------COMMAND BREED I------------------------------------------------------------------------------- Global $QueryCommand = "/query " & "/FO " & $FormatOut & " /V " & "/nh " Global $FindCommand = "| find /I " & $FileExt Global $ExportCommand = " > " & '"' & $ReportDir & $ReportOut & ".log" & '"' If $FilterExt = "Y" Then $CommandCombo = $QueryCommand & $FindCommand & $ExportCommand Else $CommandCombo = $QueryCommand & $ExportCommand EndIf $CommandFinal = "openfiles " & $CommandCombo ;-------------------------------------------------------------OPTIONS----------------------------------------------------------------------------------- If $FilterExt = "Y" Then If $FileExt <> "" Then TrayTip("Message from the " & @ScriptName & " Script: ", 'The command "' & $CommandFinal & '" is running in this server. Options enabled are the following:' & @CRLF & @CRLF & "Filter: " & '"' & $FilterExt & '"' & @CRLF & "Ext/String: " & $FileExt & @CRLF, 1, 1) Else TrayTip("Message from the " & @ScriptName & " Script: ", 'The command "' & $CommandFinal & '" is running in this server.', 1, 1) EndIf EndIf ;--------MAIN COMMAND-----------------------------------################## _RunDOS($CommandFinal) ;--------MAIN COMMAND-----------------------------------################## $iDiff = _DateDiff('h', $iNow, _NowCalc()) Sleep($iTimeFreq) ; <-Frequency If $iDiff > $iTimeDur Then ; <-- Is time through? $TimeOut = True $MailBody = 'The script "' & @ScriptName & '", which was running at the server "' & @ComputerName & '", generated the requested logs successfully. Please, contact your Domain administrator to claim them' SendMail($MailBody) EndIf WEnd ;==> While from line 18 ;------------------------Function to send e-mail-------------------------------------------------------------------------------------------------------------- Func SendMail($MailBody) $objEmail = ObjCreate("CDO.Message") $objEmail.From = $MailFrom $objEmail.To = $Mailto $objEmail.Subject = $MailSubj $objEmail.Textbody = $MailBody $objEmail.Configuration.Fields.Item _ ("") = 2 $objEmail.Configuration.Fields.Item _ ("") = _ "" ; <----------------------------------------- Insert your mailserver here $objEmail.Configuration.Fields.Item _ ("") = 25 $objEmail.Configuration.Fields.Update $objEmail.Send EndFunc ;==>SendMail

      Contents of the config.ini file:

      #--------------------------------------------------------------------# # Config. ini # #--------------------------------------------------------------------# #--------------------------------------------------------------------# # OPENFILES REPORT: # Reports out a logfile containing openfiles within a server #--------------------------------------------------------------------# [Time] # What frequency? (Minutes [minimum: 15 min) / How long? (Hours [Minimum: 1H) Frequency = 15 Duration = 1 [FilterExt] # GREP Extension/String? ( Y, N) FilterExt = Y [FileExt] # What's the extension or string combo to be matched? (.exe; .doc; .csv; Solidworks; Report, etc. (default: line commented by #) FileExt = doc [ReportOut] # LogFile Sufix ReportOut = Report [FormatOut] # LogFile Format: CSV or Table. (default: table) FormatOut = CSV [Mail] MailFrom = Mailto = MailSubj = OpenFiles Alert Example MailBody = This message is an alert.

      It might be useful for a Domain admin someday.