Author Topic: Issue with Chrome not recognizing two differently named windows  (Read 1254 times)

rottjr

  • Newbie
  • *
  • Posts: 1
Hello all;

I am having an issue with my profile. Essentially the issue seems to come to down VA not being able to differentiate between two different Chrome Windows. Attached is a video of me issuing a series of commands, you can see that after the first chrome window opens VA doesn't seem to understand which window is open or what the name of it is...Attached also are all the commands used in that video. I've experienced this issues with other profiles as well, this was merely to test this specific issue and some other things like variables.

OPEN_BROWSER_WINDOW
Code: [Select]
Set text [window_title] to '* {TXT:requested_window} *'
Begin Text Compare : [{{WINDOWEXISTS:window_title}}] Equals '1'
    Say, 'Showing {TXT:requested_window}'
    Execute command, '==FOCUS_WINDOW==' (and wait until it completes)
Else
    Say, 'Opening {TXT:requested_window}'
    Run application 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe' -with parameters '--new-window "{TXT:requested_url}"'
    Pause 0.5 seconds
    Execute command, '==FOCUS_WINDOW==' (and wait until it completes)
End Condition

OPEN_WINDOW[NOT USED]
Code: [Select]
Set text [window_title] to '* {TXT:requested_window} *'
Begin Text Compare : [{{WINDOWEXISTS:window_title}}] Equals '1'
    Say, 'Showing {TXT:requested_window}'
    Execute command, '==FOCUS_WINDOW==' (and wait until it completes)
Else
    Say, 'Opening {TXT:requested_window}'
    Run application '{TXT:requested_app}' -with parameters '{TXT:requested_params}'
    Execute command, '==FOCUS_WINDOW==' (and wait until it completes)
End Condition

FOCUS_WINDOW
Code: [Select]
Set text [window_title] to '* {TXT:requested_window} *'
Display window '{TXT:window_title}' as [Force Minimize] (pause up to 2 seconds for availability)
Display window '{TXT:window_title}' as [Show Maximized] (pause up to 2 seconds for availability)

CLOSE_WINDOW
Code: [Select]
Set text [window_title] to '* {TXT:requested_window} *'
Begin Text Compare : [{{WINDOWEXISTS:window_title}}] Equals '1'
    Say, 'Closing {TXT:requested_window}'
    Execute command, '==FOCUS_WINDOW==' (and wait until it completes)
    Pause 0.5 seconds
    Close window '{TXT:window_title}' (pause up to 3 seconds for availability)
Else
    Say, '{TXT:requested_window} not found'
End Condition

HIDE_WINDOW
Code: [Select]
Set text [window_title] to '* {TXT:requested_window} *'
Display window '{TXT:window_title}' as [Force Minimize] (pause up to 3 seconds for availability)
Say, 'Hiding {TXT:requested_window}'

OPEN_PANDORA
Code: [Select]
Set text [requested_url] to 'https://pandora.com'
Set text [requested_window] to 'Pandora'
Pause 0.1 seconds
Execute command, '==OPEN_BROWSER_WINDOW==' (and wait until it completes)

OPEN TWITCH
Code: [Select]
Set text [requested_window] to 'Twitch'
Set text [requested_url] to 'https://twitch.tv/following'
Execute command, '==OPEN_BROWSER_WINDOW==' (and wait until it completes)

HIDE TWITCH
Code: [Select]
Set text [requested_window] to 'Twitch'
Execute command, '==HIDE_WINDOW==' (and wait until it completes)

CLOSE_TWITCH
Code: [Select]
Set text [requested_window] to 'Twitch'
Execute command, '==CLOSE_WINDOW==' (and wait until it completes)
« Last Edit: May 16, 2020, 10:04:25 AM by Gary »

Gary

  • Administrator
  • Hero Member
  • *****
  • Posts: 2832
Re: Issue with Chrome not recognizing two differently named windows
« Reply #1 on: May 16, 2020, 10:04:00 AM »
Hi, Rottjr

To be brief, the way things in Chrome work are different than with other applications (as you'll notice that chrome spawns a new instance for every tab that is opened).  I'd have to take an in-depth look at what you're reporting as I'm sure with a little tinkering it could be made to do what you would like it to do.  Unfortunately, I don't have an ETA on when I can run through all this to find a solution for you that will work.