anixon Posted September 18, 2009 Share Posted September 18, 2009 I am currently using the AutoIT $objEmail = ObjCreate("CDO.Message") code to transport Emails to a Recipient. For this to work seamlessly [where the Outlook security Pop-up is not triggered] I have the MAPILab 'Advanced Security for Outlook" installed. A better solution would be the ability to switch Outlook security On and Off using AutoIT Code. My understanding this might be achieved by developing a UDF library for Redemption. Comments as to how this might be achieved would be appreciated. Ant.. Link to comment Share on other sites More sharing options...
DaleHohm Posted September 18, 2009 Share Posted September 18, 2009 If I remember correctly. Wooltown implemeted it in his Outlook UDF... see here: http://www.autoitscript.com/forum/index.php?showtopic=89321&hl=wooltown&st=0 Dale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
anixon Posted September 18, 2009 Author Share Posted September 18, 2009 If I remember correctly. Wooltown implemeted it in his Outlook UDF... see here: http://www.autoitscript.com/forum/index.php?showtopic=89321&hl=wooltown&st=0DaleThanks for that quick response which was very much appreciated. I have reviewed Wooltown code which is very impressive and usefull to say the least. He has written a routine that automatically processes the Outlook Pop-Up Security Message called Warning1. He also provides a shortcut to the MAPIlab Outlook Advance Security Offering which I currently have installed and managing the issue. My question was really in respect to the http://www.dimastr.com/redemption/ solution being adapted to AutoIT which my understanding would give the coder the ability to seamless manage the security trigger rather than the Outlook triggered response the Pop-Up. Ant.. Link to comment Share on other sites More sharing options...
anixon Posted September 19, 2009 Author Share Posted September 19, 2009 Thanks for that quick response which was very much appreciated. I have reviewed Wooltown code which is very impressive and usefull to say the least. He has written a routine that automatically processes the Outlook Pop-Up Security Message called Warning1. He also provides a shortcut to the MAPIlab Outlook Advance Security Offering which I currently have installed and managing the issue. My question was really in respect to the http://www.dimastr.com/redemption/ solution being adapted to AutoIT which my understanding would give the coder the ability to seamless manage the security trigger rather than the Outlook triggered response the Pop-Up. Ant.. I have modified the Wooltown code as follows_OutlookWarning() Func _OutlookWarning() For $iNum = 1 to 5 If WinExists("Microsoft Office Outlook") Then While 1 WinActivate("Microsoft Office Outlook") If ControlCommand ("Microsoft Office Outlook","","Button4","IsEnabled") Then Sleep(500) ControlFocus ("Microsoft Office Outlook","","[CLASS:Button; INSTANCE:3]") Send ("{SPACE}") Sleep (500) ControlFocus ("Microsoft Office Outlook","","[CLASS:Button; INSTANCE:4]") Send ("{SPACE}") ExitLoop 2 EndIf Sleep (250) Wend EndIf Sleep(1000) Next EndFunc The routine closes the Outlook Window but then produces a Line -1 Error: Error in Expression and on another occasion the Error: Variable used without being declared" causing the script to terminate. Why is it so? Link to comment Share on other sites More sharing options...
anixon Posted September 19, 2009 Author Share Posted September 19, 2009 (edited) Fixed the missing () in the Exitloop (2) but when it as run as compiled script I am getting the -1 processing error. Can anyone help? Edited September 19, 2009 by anixon Link to comment Share on other sites More sharing options...
anixon Posted September 19, 2009 Author Share Posted September 19, 2009 And this is the code that will in addition manage Microsoft Office Outlook Security Pop-Ups when using CDO.Message as the Email Transport. I have also modified the splashtexton window mask to the same size and x y location as the Outlook Security Popup. expandcollapse popup#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_outfile=c:\sms_server\warningclick.exe #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** Opt("TrayIconHide", 1) ;0=show, 1=hide tray icon Opt("WinSearchChildren", 1) ;0=no, 1=search children also ;//Global Variables Global $Title = "sEmailSMS", $Font = "sans-serif", $FontSize = 10, $FontWeight = 600, $Just = 32, $MsgDuration = 40, $SysMessage ;//Call the Warning Click Routine _OutlookWarning() ;//Exit the Application Exit ;//Outlook Security Window Processor Func _OutlookWarning() While 1 ;Send an email using Microsoft Outlook If WinExists("Microsoft Office Outlook","A program is trying to automatically send e-mail") Then ;//Microsoft Office Outlook Window [x, y, width, height] $WinSize = WinGetPos("Microsoft Office Outlook") ;//Message is Designed to Mask the Outlook Office Security Prompt $SysMessage = "sEmailSMS will process the" & @CRLF & "'Microsoft Office Outlook' Security Pop-Up" & @CRLF & @LF & "Please wait..." _MessageDisplay($MsgDuration, $WinSize[2], $WinSize[3], $WinSize[0], $WinSize[1], $Just, $SysMessage) While 1 WinActivate("Microsoft Office Outlook") If ControlCommand ("Microsoft Office Outlook","A program is trying to automatically send e-mail","Button4","IsEnabled") Then ControlFocus ("Microsoft Office Outlook","A program is trying to automatically send e-mail","[CLASS:Button; INSTANCE:4]") Send ("{SPACE}") ExitLoop (2) EndIf Wend EndIf ;Send an email using CDO.Message [Access allowed for 1 Minute] If WinExists("Microsoft Office Outlook","A program is trying to access e-mail addresses you have stored in Outlook") Then While 1 WinActivate("Microsoft Office Outlook") $WinSize = WinGetClientSize("Microsoft Office Outlook") $SysMessage = "sEmailSMS will process the" & @CRLF & "'Microsoft Office Outlook' Security Pop-Up" & @CRLF & @LF & "Please wait..." _MessageDisplay($MsgDuration, $WinSize[2], $WinSize[3], $WinSize[0], $WinSize[1], $Just, $SysMessage) If ControlCommand ("Microsoft Office Outlook","A program is trying to access e-mail addresses you have stored in Outlook","Button4","IsEnabled") Then ControlFocus ("Microsoft Office Outlook","A program is trying to access e-mail addresses you have stored in Outlook","[CLASS:Button; INSTANCE:3]") Send ("{SPACE}") Sleep (500) ControlFocus ("Microsoft Office Outlook","A program is trying to access e-mail addresses you have stored in Outlook","[CLASS:Button; INSTANCE:4]") ExitLoop 2 EndIf Wend EndIf Sleep(1000) WEnd EndFunc ;//Message Display Func _MessageDisplay($Duration, $Width, $Height, $WinX, $WinY, $Just, $Message) Sleep(2000) ;Time Delay between Multiple Messages SplashTextOn($Title, $Message, $Width, $Height, $WinX, $WinY, $Just, $Font, $FontSize, $FontWeight) ;//Length of display in milliseconds Sleep($Duration * 100) SplashOff() EndFunc ;==>_MessageDisplay 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