Jump to content

OutlookEX UDF: Anyone using _OL_Warnings to suppress Outlook security warnings?


_OL_Warnings from OutlookEX UDF  

8 members have voted

  1. 1. Do you use _OL_Warnings?

  2. 2. Would you spend a few minutes to test the AdLib version when available?



Recommended Posts

Does anyone use _OL_Warnings.au3 to suppress Outlook security warnings?

At the moment it is a separate exe (for historical reasons). I would like to change this and use AdLibRegister so no second script is needed.

If there are enough people using _OL_Warnings I'm going to rewrite this code.

But I need a few users to test because here I don't get the security warnings.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 1 year later...

Would be more than happy to do so. Could not use the _InetSMTPmail at work... tried the OutlookEX and it works as a charm but getting those "annoying" warnings... I was already thinking of what do to get the script itself to handle them but apparently somebody is already working on something much better.

Following Topic :-)

Link to comment
Share on other sites

You know that there is already a way to automatically get rid of this warnings? Set parameter $sWarningProgram to the program that waits for a warning and clicks it away. There is an example _OL_Warnings.au3 available. Should work for English systems. Just compile and set the parameter for _OL_Open.

Depending on the language and the Outlook version modifications might be necessary.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

You know that there is already a way to automatically get rid of this warnings? Set parameter $sWarningProgram to the program that waits for a warning and clicks it away. There is an example _OL_Warnings.au3 available. Should work for English systems. Just compile and set the parameter for _OL_Open.

Depending on the language and the Outlook version modifications might be necessary.

 

Thanks for pointing it out, I was actually just reading that a few moments ago. Luckily, at work, my system is in English so it should be ok. For the moment having to click the window isn't a big deal as I'm behind the screen monitoring my script and the email function is being called in only at the end in order to send the mail + attachments reporting script results.

By the way, congrats on the job done on the function! Amazing work!

Link to comment
Share on other sites

Glad to hear you like the UDF :D

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

This function isn't needed very much nowadays. As soon as you have an up-to-date AV program installed Outlook doesn't display this security warnings.

_OL_Warnings is a separate exe because often some customization is needed. So I think it will stay as it is for the moment.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

This function isn't needed very much nowadays. As soon as you have an up-to-date AV program installed Outlook doesn't display this security warnings.

_OL_Warnings is a separate exe because often some customization is needed. So I think it will stay as it is for the moment.

 

Unfortunately, where I'm currently running the scripts - workplace - I have zero control over what I can install / update on the machine so I'm really happy that _OL_Warnings was included in the UDF :thumbsup:

Furthemore, it helped me discover the "ToolTip" command which I might be using in the future now that I know about it.

Link to comment
Share on other sites

That was one of the great ideas by the author of the original Outlook UDF - wooltown.

We have AV software installed so _OL_Warnings is one of the features of the UDF I can't test. I'm glad it works for you.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

quinnj09,

thanks for the offer!

As I haven't coded the AdLibRegister feature yet AND the demand is quite low AND we have a working alternative I think I will invest my time in enhancing the UDF with features of Outlook 2010 and 2013.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

hello all,

first, @water: i know you probably her this a lot, but here's one more: THAT IS ONE AWESOME UDF!

i had an issue with _OL_Warnings - the language support is not "out of the box", and i need it running for at-least 2 languages, without knowing which it is being currently used. so i took the concept of _OL_Warnings and rewrote it using a different method to detect the warning window: instead of checking for title and text, i took the following route:

1) before anything happens: take a list of all open windows related to Outlook (i.e. the Outlook application and any open message)

2) in the main loop: for every pass, take again the list; compare it to the saved list taken in step (1); if there is a new window, it's probably the warning; try to acknowledge it.

so this is not language-dependent.

i'm sure there is plenty to improve on this, but here's what i've got working for me:

#NoTrayIcon
#Include <Array.au3>
If $CmdLine[0] = 0 Then Exit 1
$iOL_ProcessID = $CmdLine[1]
If Not ProcessExists($iOL_ProcessID) Then Exit 2
If $CmdLine[0] > 1 Then $iOL_WinCheckTime  = $CmdLine[2]
If $CmdLine[0] > 2 Then $iOL_CtrlCheckTime = $CmdLine[3]
If $CmdLine[0] < 2 Then $iOL_WinCheckTime  = 10
If $CmdLine[0] < 3 Then $iOL_CtrlCheckTime = 10
$WinList_base=GetWinList('Outlook')
While True
    Sleep($iOL_WinCheckTime)
    If Not ProcessExists($iOL_ProcessID) Then Exit
    $WinList_curr=GetWinList('Outlook')
    If $WinList_curr[0]=$WinList_base[0] Then ContinueLoop
    For $i=1 To $WinList_curr[0]
        $TargetTitle=$WinList_curr[$i]
        If _ArraySearch($WinList_base,$TargetTitle)=-1 Then
            WinActivate($TargetTitle)
            ControlCommand($TargetTitle,'','Button3','Check')
            Sleep($iOL_CtrlCheckTime)
            ControlFocus($TargetTitle,'','[CLASS:Button; INSTANCE:4]')
            Send("{SPACE}")
            Sleep($iOL_CtrlCheckTime)
        EndIf
    Next
WEnd

Func GetWinList($sPartOfTitle)
    Dim $local_WinList_final[1]=[0]
    Local $i
    Local $iNext=2
    $local_WinList_full=WinList()
    For $i=1 To $local_WinList_full[0][0]
        If StringInStr($local_WinList_full[$i][0],$sPartOfTitle) And IsVisible($local_WinList_full[$i][1]) Then
            ReDim $local_WinList_final[$iNext]
            $local_WinList_final[$iNext-1]=$local_WinList_full[$i][0]
            $local_WinList_final[0]=$iNext-1
            $iNext+=1
        EndIf
    Next
    Return $local_WinList_final
EndFunc

Func IsVisible($handle)
  If BitAnd(WinGetState($handle),2) Then
    Return True
  Else
    Return False
  EndIf
EndFunc

again, thanks for your amazing work.

Or

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

orbs,

thank you very much for the positive feedback! I'm glad you like the UDF!

_OL_Warnings intentional is not ready to run for every Outlook version in any language. But to make it easier to adopt the language code is passed.

It's great to now have a language independant version of the function.

But as you have seen by the large amount of replies I got the Outlooks warnings don't seem to be a big problem nowadays. Most of the users have moved to Outlook 2077 or later and have current AV scanners installed.

Thanks for posting your code. That's a good reference for future users!

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

@Orbs If there is an open popup, this will grab it much easier:

$GW_ENABLEDPOPUP= 6
$hCurrentWindow = _WinAPI_GetWindow($hOwner, $GW_ENABLEDPOPUP)

if it's a valid handle (IE not 0x0000000), you can use wingettitle

not sure of your exact situation...but just to demonstrate, open an email, and send with no data (get a popup)...then attach to the email:

#include <WinAPI.au3>
$hwnd = WinGetHandle("Untitled")
$hwnd2 = _WinAPI_GetWindow($hwnd, 6)
ConsoleWrite($hwnd2 & @CRLF)
ConsoleWrite(WinGetTitle($hwnd2) & @CRLF)
ConsoleWrite(WinGetText($hwnd2) & @CRLF)

output:

0x005913E4
Microsoft Outlook
OK
There must be at least one name or contact group in the To, Cc, or Bcc box.
 

also, use controlclick rather than send :)

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

@water: well, your humble servant is working in a place where Office 2003 is the ruling environment. and that's the good news. its a very big organization, and very, very conservative. so don't dump us out just yet...

@jdelaney: thanks, i will try your suggestion. the helpfile is kind of lacking when it comes to _WinAPI stuff, but i assume the return value would be a handle to a popup window of the specified owner window? if so, what would happen in case several pop-ups exist for the owner window?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

use this, if you havent downloaded the winapi udf (it's in the sample scripts forum)

$hwnd = WinGetHandle("Untitled")
ConsoleWrite($hwnd & @CRLF)
$h = DllCall("user32.dll", "HWND", "GetWindow", "HWND", $hwnd, "UINT", 6)
;~ _ArrayDisplay($h)
ConsoleWrite("parent:" & $h[1] & @CRLF)
ConsoleWrite("popup:" & $h[0] & @CRLF)

again, if there is no popup, you will get something like this:

0x007C0B38
parent:0x007C0B38
popup:0x00000000

with popup, something like this:

0x007C0B38
parent:0x007C0B38
popup:0x002314B8

edit: sorry that this is off topic, water :)

Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
Share on other sites

thanks jdelaney for the explanation, i'l give it a try.

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
Share on other sites

@water: well, your humble servant is working in a place where Office 2003 is the ruling environment. and that's the good news. its a very big organization, and very, very conservative. so don't dump us out just yet...

I hope to support Outlook 2003 as long as there are users of this version out there.

Unfortunately new functions will only be available for later versions :(

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...