Chrispy1 Posted April 6, 2007 Posted April 6, 2007 This is my first attempt at writing a script in AutoIT, so please excuse any silly gaffes or questions that I have... I need to run an autoemailing database every night at 3 a.m. The scheduled task will open the database, the database generates the reports and emails 'em out. No problems - until I get to the email. Outlook forces me to click "Yes" to a dialog box that pops up asking me if I'm sure that I want to send the email. I have to wait 5 seconds after the dialog box appears to click Yes. Below is the code that I wrote to try and accomplish this task automatically...But I get an "Unable to parse" error... I've triple checked the documentation and can't see anything wrong with this - I know I still need to add the "Wait 5 seconds", but I wanted to try this out first......Any ideas? I need to have this running by Tuesday, and it's not looking promising. Really appreciate any and all assistance. Chris CODEControlSend ("Microsoft Office Outlook", "A program is trying to automatically send e-mail on your behalf."&Chr(13)&"Do you want to allow this?"&Chr(13)&Chr(13)&"If this is unexpected, it may be a virus and you should choose ""No"".",1,{Left}{Enter})
PaulIA Posted April 6, 2007 Posted April 6, 2007 This is my first attempt at writing a script in AutoIT, so please excuse any silly gaffes or questions that I have... I need to run an autoemailing database every night at 3 a.m. The scheduled task will open the database, the database generates the reports and emails 'em out. No problems - until I get to the email. Outlook forces me to click "Yes" to a dialog box that pops up asking me if I'm sure that I want to send the email. I have to wait 5 seconds after the dialog box appears to click Yes. Below is the code that I wrote to try and accomplish this task automatically...But I get an "Unable to parse" error... I've triple checked the documentation and can't see anything wrong with this - I know I still need to add the "Wait 5 seconds", but I wanted to try this out first......Any ideas? I need to have this running by Tuesday, and it's not looking promising. Really appreciate any and all assistance. ChrisWelcome to the forum. The problem is with your punctuation: ControlSend ("Microsoft Office Outlook", "A program is trying to automatically send e-mail on your behalf." & @CR & _ "Do you want to allow this?" & @CR & @CR & _ 'If this is unexpected, it may be a virus and you should choose "No".', 1, "{Tab}{Enter}") However, I would suggest skipping Outlook altogether and sending directly to the SMTP server. Do a search here on the form for SMTP and you'll find several working pieces of code that allow you to send email without using Outlook. Auto3Lib: A library of over 1200 functions for AutoIt
Chrispy1 Posted April 6, 2007 Author Posted April 6, 2007 Thanks PaulIA - I'm using the code at http://www.autoitscript.com/forum/index.ph...781&hl=SMTP - granted, i'm having problems with it, but I'm getting there.Thanks again for your help........Chris
Prim Posted April 9, 2008 Posted April 9, 2008 This free add-on for Outlook removes the security warning message:http://www.mapilab.com/outlook/security/
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