Frescard Posted March 2, 2015 Share Posted March 2, 2015 A process I'm trying to automate creates a popup window that stays there for the whole duration, and if it runs into a problem, it creates a type of sub-window (sub-control?), beneath itself, that can be somewhat identified via AutoIt's Window Info, but I have been unable to read it from a script. The permanent window gives me this info: And the eventual error window gives me this: I am looking for the error message in [CLASS: Static; INSTANCE: 2], but whether I address it via this class specifier, or via the ID, I never get anything back. If I use the code below, to search through all windows with the "VBS3" title (which those two seem to have), I only get the little one at the top back (twice): $windows = WinList("VBS3") For $i=1 To $windows[0][0] $size = WinGetPos($windows[$i][0]) ConsoleWrite($windows[$i][0] & ": " & $size[2] & "/" & $size[3] & @CRLF) ; returns "VBS3: 245/81" twice Next Link to comment Share on other sites More sharing options...
orbs Posted March 2, 2015 Share Posted March 2, 2015 how about this: if you get two results, query the style of each. the styles differ, so you can derive the handle according to the style. then use the handle to access the desired one. note: by the looks of it, it may well be that this error message cannot be automated (retrieve data or click OK). if so, at least you can be informed that an error appeared, and someone needs to address it manually. hope it doesn't happen that much Signature - my forum contributions: Spoiler UDF: LFN - support for long file names (over 260 characters) InputImpose - impose valid characters in an input control TimeConvert - convert UTC to/from local time and/or reformat the string representation AMF - accept multiple files from Windows Explorer context menu DateDuration - literal description of the difference between given dates Apps: Touch - set the "modified" timestamp of a file to current time Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes SPDiff - Single-Pane Text Diff Link to comment Share on other sites More sharing options...
Frescard Posted March 2, 2015 Author Share Posted March 2, 2015 (edited) Actually, it seems I just found a method. The problem was that both windows have the same title, and if I query them by that I always get the first one back. But if instead I use the handles that are returned by WinList, I do get the proper sizes and control texts! Unfortunately, these errors happen all the time, and if they do, I have to re-download the affected file — all of which I'm trying to do while I'm still in bed... Edited March 2, 2015 by Frescard Link to comment Share on other sites More sharing options...
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