Skip to main content
Navigator | Tier 3
May 24, 2023
Solved

Regex in Windows

  • May 24, 2023
  • 15 replies
  • 521 views

I have to work with windows whose titles are varying. I know I have to use Regex functions. But unable to get it. Can someone help me please.

Best answer by Padmakumar

HI @SaiRahul02 ,

 

Why don’t you follow the below approach?

  •  Use Currently Active Window and then capture the object.
  •  In case if user wants to run this task in unattended mode and other applications are also open with the current application then we need to use below approach:

Try to activate the currently active window where you need to perform the functions using Windows Actions → Activate Window command and build the code accordingly.​

15 replies

Theodore Xypteras
Navigator | Tier 3
May 24, 2023
I have a cunning plan!
Navigator | Tier 3
May 24, 2023

You can use the Regular Expression Tools Package

Can’t we do without getting the package. because, in the variable, it directly asks for Regex right?

 

Fresher
Theodore Xypteras
Navigator | Tier 3
May 24, 2023

The “Find” action of the String package also accepts RegEx.

I have a cunning plan!
Navigator | Tier 3
May 24, 2023

I wanted to do it for windows

Fresher
Theodore Xypteras
Navigator | Tier 3
May 24, 2023

I wanted to do it for windows

Can’t you capture the title with recording?

I have a cunning plan!
Navigator | Tier 3
May 24, 2023

I have to perform same action in different windows in a loop. Here the windows title is varying. And also I cannot use * as wild card beacuse there is no common thing in the title of the window. So I have to use regex

Fresher
Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
May 24, 2023

HI @SaiRahul02 ,

 

Why don’t you follow the below approach?

  •  Use Currently Active Window and then capture the object.
  •  In case if user wants to run this task in unattended mode and other applications are also open with the current application then we need to use below approach:

Try to activate the currently active window where you need to perform the functions using Windows Actions → Activate Window command and build the code accordingly.​

Padmakumar
Navigator | Tier 3
May 24, 2023

HI @SaiRahul02 ,

 

Why don’t you follow the below approach?

  •  Use Currently Active Window and then capture the object.
  •  In case if user wants to run this task in unattended mode and other applications are also open with the current application then we need to use below approach:

Try to activate the currently active window where you need to perform the functions using Windows Actions → Activate Window command and build the code accordingly.​

Even for activating window, we need to give the title of the window right ?

 

Fresher
Padmakumar
Premier Pathfinder | Tier 7
Premier Pathfinder | Tier 7
May 24, 2023

HI @SaiRahul02 ,

 

Why don’t you follow the below approach?

  •  Use Currently Active Window and then capture the object.
  •  In case if user wants to run this task in unattended mode and other applications are also open with the current application then we need to use below approach:

Try to activate the currently active window where you need to perform the functions using Windows Actions → Activate Window command and build the code accordingly.​

Even for activating window, we need to give the title of the window right ?

 

 

Not actually. You can either mention the Window name or can use the Currently Active option.

 

Padmakumar
Navigator | Tier 3
May 24, 2023

HI @SaiRahul02 ,

 

Why don’t you follow the below approach?

  •  Use Currently Active Window and then capture the object.
  •  In case if user wants to run this task in unattended mode and other applications are also open with the current application then we need to use below approach:

Try to activate the currently active window where you need to perform the functions using Windows Actions → Activate Window command and build the code accordingly.​

Even for activating window, we need to give the title of the window right ?

 

 

Not obviously. You can either mention the Window name or can use the Currently Active option.

 

can’t get it

Fresher