Jump to content

winWait for notification popup


Recommended Posts

Hi,

I'm trying to trigger activity based on notification pop up(please check attached image).

winInfo gives me below details

 

>>>> Window <<<<
Title:  You just plugged a device into the audio jack.
Class:  tooltips_class32
Position:   890, 675
Size:   286, 74
Style:  0x940006C3
ExStyle:    0x00080088
Handle: 0x000100BE

>>>> Control <<<<
Class:  
Instance:   
ClassnameNN:    
Name:   
Advanced (Class):   
ID: 
Text:   
Position:   
Size:   
ControlClick Coords:    
Style:  
ExStyle:    
Handle: 

>>>> Mouse <<<<
Position:   989, 706
Cursor ID:  0
Color:  0xF5F6FA

>>>> StatusBar <<<<

>>>> ToolsBar <<<<

>>>> Visible Text <<<<


>>>> Hidden Text <<<<

 

I tried below codes, but no luck.

WinWait("[Title:You just plugged a device into the audio jack.;Class:tooltips_class32]","",30)
ConsoleWrite('popped up' & @CRLF)

and

WinWait("[class:tooltips_class32]","",30)
ConsoleWrite('popped up' & @CRLF)

 

popup.png

Link to post
Share on other sites

Could you try the advanced mode with your code?

If it doesnt work, try this one.

Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

WinWait("[W:286;H:74]","",30)
ConsoleWrite('popped up' & @CRLF)

 

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

Link to post
Share on other sites
  • 2 weeks later...

@careca

Thanks for your reply and apologies for late response from my end.

From your code I can see Advance mode can be sued by

Opt("WinTitleMatchMode", 4) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

so I tried it with Title but didn't work, the code you suggested (Width and Height) did work. so thanks for that.

I can use it as work around because its less reliable and will still keep looking for Title(text) thing to work.

 

Link to post
Share on other sites

The odds of having a window with that exact same size are not too big, and you can combine more parameters to make it more unique.

Good luck, glad it helped.

Spoiler

Renamer - Rename files and folders, remove portions of text from the filename etc.

GPO Tool - Export/Import Group policy settings.

MirrorDir - Synchronize/Backup/Mirror Folders

BeatsPlayer - Music player.

Params Tool - Right click an exe to see it's parameters or execute them.

String Trigger - Triggers pasting text or applications or internet links on specific strings.

Inconspicuous - Hide files in plain sight, not fully encrypted.

Regedit Control - Registry browsing history, quickly jump into any saved key.

Time4Shutdown - Write the time for shutdown in minutes.

Power Profiles Tool - Set a profile as active, delete, duplicate, export and import.

Finished Task Shutdown - Shuts down pc when specified window/Wndl/process closes.

NetworkSpeedShutdown - Shuts down pc if download speed goes under "X" Kb/s.

IUIAutomation - Topic with framework and examples

Au3Record.exe

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

    No registered users viewing this page.

×
×
  • Create New...