BrunoStivicevic Posted September 27, 2022 Share Posted September 27, 2022 All, problems with WinActivate started when I downloaded and installed AutoIt 3.3.16.0. I posted a question, and the answer was that the RegEx was broken in 3.3.16.0 and to install Beta or wait for the 3.3.16.1. I opted to wait for the 3.3.16.1 and now I tried again. When I noticed that the problem persists, I used the simple script below, launched from the latest Scite released, and replicated the problem. The Chrome version is 105.0.5195.127 (Official Build ) (64 bit); the Windows 10 version is Enterprise, 21H2 build OS 19044.2006. MsgBox(0, "Version", @AutoItVersion) ;version 3.3.16.1 ;~ Fails to activate Chrome but returns a valid window handle. $hndwin = WinActivate("[CLASS:Chrome_WidgetWin_1]") MsgBox(0,1,$hndwin) ;~ Activates Chrome and returns a valid window handle. AutoItSetOption("WinTitleMatchMode",2) $hndwin = WinActivate("Google Chrome","") MsgBox(0,2,$hndwin) Is it a Chrome problem, a Windows 10 problem, or an Autoit problem, or I misunderstood something? Thanks! Bruno Link to comment Share on other sites More sharing options...
HurleyShanabarger Posted September 27, 2022 Share Posted September 27, 2022 How many windows does WinList find that matchtes Chrome_WidgetWin_1? For me it is 7: #include <Array.au3> _ArrayDisplay(WinList("[CLASS:Chrome_WidgetWin_1]")) Link to comment Share on other sites More sharing options...
BrunoStivicevic Posted September 28, 2022 Author Share Posted September 28, 2022 Hi Hurley, thank you for looking into it. There are two windows, one is the page ("Sedi loca..."), other is Tray Assistant. The handle that is returned by WinActivate is the #1, which is the correct one... Link to comment Share on other sites More sharing options...
HurleyShanabarger Posted September 28, 2022 Share Posted September 28, 2022 Okay, it seems if multiple windows match the criteria WinActivate will activate the Windows that matches the criteria and was the last active window. What is your result when using this? WinActivate("[CLASS:Chrome_WidgetWin_1]") WinWaitActive("[CLASS:Chrome_WidgetWin_1]") MsgBox(0, "", WinGetTitle("[CLASS:Chrome_WidgetWin_1]")) Link to comment Share on other sites More sharing options...
BrunoStivicevic Posted September 28, 2022 Author Share Posted September 28, 2022 The result is an empty string... Anyway, when I shutdown Chrome and I run winlist again, the _arraydisplay continues to show Tray Assistant, and the only candidate for it is Tray Assistant of the Dropbox which is visible in windows as a process but not visible among tray icons. When I shut it down, the Tray Assistant entry doesn't appear. What is strange is that Dropbox has nothing to do with Chrome_Widget_Win_1...! Link to comment Share on other sites More sharing options...
BrunoStivicevic Posted September 28, 2022 Author Share Posted September 28, 2022 Just one remark: I'm using Dropbox for years, but only after I switched to 3.3.16.x, the problem with Winactivate appeared,,,, Of course, the Dropbox is perhaps autoupdated to a new version, and somehow added a window that corresponds to the Chrome_Widget_Win_1... 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