GitHub30 / win11toast

Toast notifications for Windows 10 and 11 based on WinRT
https://pypi.org/project/win11toast/
MIT License
246 stars 16 forks source link

Button Delay show and button callbacks #33

Open Wizzard88 opened 9 months ago

Wizzard88 commented 9 months ago

Any way possible to delay the button appearance? Say 10 seconds

After timeout of toast showing python steps on an unable to log button press. Any way to create a web hook \ callback?

def button_click(id): value = str(id)
D = id["arguments"].strip('http:')

print("value passed " + value)
print(D)

def launchtoaster(ip_address, localtime, messagetype, messagetodisplay, serversocket, maxConnect): username2 = get_display_name()

icon = { 'src': 'C:/PatchDeploymentX64/note-task-comment-message-edit-write_108613.ico', 'placement': 'appLogoOverride' }

apptitle = 'Message from Admin                     Version:'+ messagingVersion
titleheader = 'Notification ' + messagetype
msgbody = 'Listen up ' + username2 + '\n' + messagetodisplay + '\nSent ' + localtime

toast(app_id=apptitle,title=titleheader,body=msgbody,buttons=['Dismiss'],on_click=lambda args: button_click(args),icon=icon,dialogue=messagetodisplay,duration="long" )    

logMessage = "Python Moved past Toast"
logToFile(logFile, logMessage)