I don't have a runner machine assigned so I am using the creator machine for testing. My requirement is to close all browsers window except the AA control room window before the bot execution. Close all action closes all windows including the AA control room window . Kindly suggest an alternative.
Page 1 / 1
@Sai Deepan.R use below script
#NoEnvSendMode InputSetWorkingDir %A_ScriptDir%^q:: WinGet, WindowList , List , ahk_class IEFrame Loop %WindowList% { WinID := WindowList%A_Index% WinGetTitle Title , ahk_id %WinID% if ( not InStr( Title , "Google" ) ) WinClose , ahk_id %WinID% }Return
@rbkadiyam Thanks for the reply and info. I am having trouble executing this.
Do I need to use JavaScript action to execute the code. I also did try vbscript .Please refer to the screenshot below.
As per the code I believe we are trying to close all the windows except window title “Google” . In my case the window title is “Master bot for …...” and should not closed . Can I use “%Master%” ?
Looking for recommendation to handle this!!
Looking for recommendation to handle this!!
I think the first step is get the windows names. I saw some scripts without success but i still dont have a progress with this question.
@Sai Deepan.R
As per the code I believe we are trying to close all the windows except window title “Google” . In my case the window title is “Master bot for …...” and should not closed . Can I use “%Master%” ?
Yes, you have to provide the title of the browser which wanted to alive….. “ Master * “
if ( not InStr( Title , "Master *" ) )
@Sai Deepan.R other way to do this within AA
Logic
Start
Loop
Open Browser Window
Act (Record/Capture)
Assign currently active window to a window variable and check if condition
Close the window if active window value does not match
@rbkadiyam Thanks again for the reply. Before my step execution I need to close all the active windows except one window. With your solution I believe you are opening all the windows and then closing it(Step 3). Is there a way to get the list of all open windows ?