DrLarch Posted September 3, 2015 Posted September 3, 2015 I have several windows that I'm trying to deal with that have no title, no consistent text or much else to match on except for the class. But the class itself varies each time the application runs and has colons in it. For example one class is: "Afx:8:17e:6:10de" and the last four characters are different every time. Could someone please provide an example of how this could be done? The help entry "Window Titles and Text (Advanced)" has a link for REGEXPCLASS directing to StringRegExp which has no examples for matching windows, much less the syntax for matching a window class via this method. Thanks...
jguinch Posted September 3, 2015 Posted September 3, 2015 (edited) Try Afx:8:17e:6:[a-zA-Z0-9]{4} Edited September 3, 2015 by jguinch Reveal hidden contents Network configuration UDF, _DirGetSizeByExtension, _UninstallList Firefox ConfigurationArray multi-dimensions, Printer Management UDF
Moderators Melba23 Posted September 3, 2015 Moderators Posted September 3, 2015 (edited) DrLarch,I would imagine this would work: Quote ("[REGEXPCLASS:(?i)Abx:8:17e:6:[a-z0-9]{4}")M23 Edited September 3, 2015 by Melba23 Wrong bracket 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: Reveal hidden contents 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
DrLarch Posted September 3, 2015 Author Posted September 3, 2015 Thanks Melba & jguinch, I'll give that a shot. But regarding the colons, I read somewhere that they need to be doubled up in some cases, but guessing not in a regular expression?
Moderators Melba23 Posted September 3, 2015 Moderators Posted September 3, 2015 DrLarch,Not according to my testing - the only characters that need to be "escaped" in a RegEx are:\ . ^ $ | [ ( { * + ? #and that involves a leading " \ ".You may be thinking of the double brackets when you deal with POSIX classes as when they are used inside existing class brackets it leads to the following rather odd syntax:[[:alnum:]]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: Reveal hidden contents 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
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