Title cmd 'Administrador C:\Windows\System32\cmd.exe' , 'C:\Windows\System32\cmd.exe'

Hints, tips and tricks for newbies

Moderators: Dorian (MJT support), JRL

Post Reply
jrosales
Newbie
Posts: 8
Joined: Tue Aug 02, 2016 5:34 pm

Title cmd 'Administrador C:\Windows\System32\cmd.exe' , 'C:\Windows\System32\cmd.exe'

Post by jrosales » Fri Jan 22, 2021 2:36 pm

Hello users, if I want to open a window but search like this?
//waitwindowsopen> *: \ Windows \ System32 \ cmd.exe
Let>titwin=*: \ Windows \ System32 \ cmd.exe
WaitWindowOpen>%titwin%
¿The asterist forward can be done? or what solution do I have?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Re: Title cmd 'Administrador C:\Windows\System32\cmd.exe' , 'C:\Windows\System32\cmd.exe'

Post by Marcus Tettmar » Mon Feb 01, 2021 4:55 pm

Hi,

The asterisk in the window functions means "find the text preceding the asterisk ANYWHERE within the title". So this WILL find your match:

Code: Select all

WaitWindowOpen>Windows\system32\cmd.exe*
The asterisk just means "do a substring search and don't care where the text is".

HOWEVER, if you WANT more control you can use RegEx. E.g.

Code: Select all

Let>WIN_REGEX=1
WaitWindowOpen>.*\\windows\\system32\\cmd.exe
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts