ACFadmin Posted October 24, 2013 Share Posted October 24, 2013 I have a situation where my Merchant Services Program sends an email to each of my vendors at the end of the business day each day. I have 37 emails that go out each evening. The problem is that Microsoft Outlook catches the program, forces me to wait until the activity bar is full before it enables the [Allow] button. I've done a fairly simple script to wait for the window then click Button4, but I suspect it is clicking the button before it is enabled and thus not doing anything. Question 1: How do I get AutoIt to wait until Button4 is enabled? Question 2: How do I make the script persistent so it selects the Allow button each of the 37 times it gets displayed each evening? Link to comment Share on other sites More sharing options...
kylomas Posted October 24, 2013 Share Posted October 24, 2013 (edited) ACFadmin, Hi and welcome to the forum... You may not need to interact with Outlook at all. See >this thread. If you have questions please remember to define exactly what you tried and what happened or did not happen as expected. Post code to demonstrate your problem whenever possible. If you do not understand the code that I am pointing you to, please take a look at the Help file. Good Luck, kylomas edit: The outlook dialog box can be interacted with but the code from the link is a much cleaner way, in my opinion. Edited October 24, 2013 by kylomas Forum Rules Procedure for posting code "I like pigs. Dogs look up to us. Cats look down on us. Pigs treat us as equals." - Sir Winston Churchill Link to comment Share on other sites More sharing options...
somdcomputerguy Posted October 24, 2013 Share Posted October 24, 2013 If you end up having to interact with the Outlook dialog box, perhaps code like this will work for you ControlClick("Forum Spam List Checker", "", "Button5") ;Submit button Sleep(250) Do Sleep(100) Until ControlCommand("Forum Spam List Checker", "", "Button5", "IsEnabled") ;Wait until button becomes enabledNote the use of the ControlCommand function, and that you will have to use the Window Info Tool in order to get the proper window title and button ID to use. Another welcome to this great forum! And remember, the Help file is your friend, and will probably become one of your best friends!! - Bruce /*somdcomputerguy */ If you change the way you look at things, the things you look at change. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now