Sign in to follow this  
Followers 0
DelioPontes

Count the number of annoying messages clicked automatic by the script

6 posts in this topic

#1 ·  Posted (edited)

Hi all!
 
I wrote a code that  save and click automatic "ok" in annoying dialogbox boxes error messages from a software that I work a lot.
The script is almost finished and until now is working correct! 
 
For experts...I just would like to know if will be difficult to create a code to count how many annoying boxes errors opened during the script execution and when the script stop show that number in a final textbox.
 
Because I think in some projects this software will open more 1000 error messages....
 
 
Someone can give me a help whrere I need to start?
 
The dialog boxes I would like to be count are "Share Changes" and "Saving shared data failed! Error Code 27."
 
Cheers and thanks in advance
 
 
My code until now:
 
#include <MsgBoxConstants.au3>
Example()
Func Example()
Local $sAnswer = InputBox("BUZ OFF!!!", "Project name?", "" , "") & ""
While 1
Local $hWnd = WinWait($sAnswer)
WinSetState($hWnd, "", @SW_SHOWNORMAL)
if WinExists("Colorize scan"& "") then WinWaitClose("Colorize scan"& "")
if WinExists("Saving shared data...") then WinWaitClose("Saving shared data...")
IF WinExists($sAnswer) Then Send("^s")
WinWaitActive("Share Changes")
if WinExists("Share Changes") then ControlClick("Share Changes", "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive("SCENE")
if WinExists("SCENE") then ControlClick("Saving shared data failed! Error Code: 27.", "", "[CLASS:Button; INSTANCE:1]")
WinWaitActive("SCENE")
if WinExists("SCENE", "Successfully saved shared data to revision" & "") then Exit 0
WEnd
Edited by DelioPontes

Share this post


Link to post
Share on other sites



#5 ·  Posted (edited)

ok , thanks all for the help

I will test now...

Edited by DelioPontes

Share this post


Link to post
Share on other sites

It works!

Thanks a lot!

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
Sign in to follow this  
Followers 0