Jump to content

Recommended Posts

Posted

Good Afternoon Everyone,

Is there a way to keep toast notifications from closing?  :think:

In particular I'm dealing with Microsoft Lync... it's a pain in the @#$. :censored:

I have been looking at ways around it... but I really need to keep these notifications from closing.

If ProcessExists ("communicator.exe") Then
WinWait ("Instant Message from")
WinSetState ("[CLASS:MsCommunicatorToastPopup]", "", @SW_FREEZETHEPOPUP )

FREEZETHEPOPUP = Freeze the toaster window - is there such a thing ???  Can someone make it happen please!!!

Thanks a Million $$$

:thumbsup:

"Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"
Song Title: I guess you could say
Artist: Middle Class Rut

Posted

Okay, well... haven't heard from anyone so I'm posting more code to hopefully get things rolling.
Instead of making the toast / pop up freeze... maybe I should take a screen shot of the pop up and have it display in a clickable Window without borders?  Tried taking examples from AutoIT site and help file and put them together here... a little buggy.

  :ILA2:
 

#include <ScreenCapture.au3>
#include <GUIConstants.au3>
#include <WindowsConstants.au3>
#include <SendMessage.au3>

If ProcessExists ("communicator.exe") Then Call ("LyncPop01")

Global $Title01, $RTitle01, $RTitle02, $size, $JpegFileName01

Func LyncPop01()

If ProcessExists ("communicator.exe") Then
WinWait ("Instant Message from")
$Title01 = WinGetTitle ("[CLASS:MsCommunicatorToastPopup]", "")
$size = WinGetPos("[CLASS:MsCommunicatorToastPopup]")
WinSetTrans("[CLASS:MsCommunicatorToastPopup]", "", 255)

#comments-start
 $size[0] = X position
 $size[1] = Y position
 $size[2] = Width
 $size[3] = Height
#comments-end

$JpegFileName01 = @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC

Sleep (1000)

_ScreenCapture_Capture(@MyDocumentsDir & "\" & $JpegFileName01 & ".jpg", $size[0], $size[1], $size[0]+$size[2], $size[1]+$size[3])

    Local $n, $msg

    GUICreate("My GUI picture", $size[2], $size[3], $size[0], $size[1], $WS_SIZEBOX + $WS_SYSMENU)

    GUISetBkColor(0xE0FFFF)
    $n = GUICtrlCreatePic(@MyDocumentsDir & "\" & $JpegFileName01 & ".jpg", $size[0], $size[1], $size[2],$size[3])

    GUISetState()

    ; Run the GUI until the dialog is closed
    While 1
        $msg = GUIGetMsg()

        If $msg = $GUI_EVENT_CLOSE Then ExitLoop
    WEnd

WinWaitClose ("Instant Message from")
$RTitle01 = StringReplace($Title01, "Instant Message from ", "")
$RTitle02 = StringReplace($RTitle01, ".  Press Windows key plus A to accept.", "")
MsgBox(0, "IM From: ", $RTitle02)
Call ("LyncPop01")
EndIf
EndFunc


MsgBox(0, "Lync Is Not Running - Exiting", "Lync Is Not Running - Exiting")

Exit

Sorry if my code isn't the best - still work in progress / testing phase! - Hoping for someone to take a peek at it when they have time to sort out the bugs :idiot:

"Maybe I'm on a road that ain't been paved yet. And maybe I see a sign that ain't been made yet"
Song Title: I guess you could say
Artist: Middle Class Rut

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
  • Recently Browsing   0 members

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