esahtar90 Posted December 17, 2013 Posted December 17, 2013 Hi All, I have written a script in Autoit to automate a trivial task which is repetitive. But i facing some difficulties with my my code. In my code i need to detect a popup window on a GUI and depending on that i need to perform some actions and proceed further. Can anyone advise on "how to i detect a small pop up window on a GUI" Thanks in Advance
Moderators Solution Melba23 Posted December 17, 2013 Moderators Solution Posted December 17, 2013 esahtar90,How does this popup distinguish itself from any other window on-screen? Does it have a specific title? Or some identifiable text? Once you have someting unique to identify the popup you can use WinExists to detect it. Or perhaps even WinWait if you have no actions to take until it appears. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
jdelaney Posted December 17, 2013 Posted December 17, 2013 (edited) My fave route is: $GW_ENABLEDPOPUP = 6 _WinAPI_GetWindow($hOwner, $GW_ENABLEDPOPUP) If there is a popup created by $hOwner (handle to your parent window), it will return a valid HWND (which will be the popup) Then you can Use WinGetTitle, WinGetText to logically determine which popup it is, and have a script to do some required action on it...I do this by using arrays of expecteced controlid's to manipulate against the title/text. As you find more of these popups, you would only need to add them to the array. Edited December 17, 2013 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.
esahtar90 Posted December 31, 2013 Author Posted December 31, 2013 esahtar90, How does this popup distinguish itself from any other window on-screen? Does it have a specific title? Or some identifiable text? Once you have someting unique to identify the popup you can use WinExists to detect it. Or perhaps even WinWait if you have no actions to take until it appears. M23 Hi M23, thanks a lot that solved my problem.
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