Jump to content

equivalent of *


Recommended Posts

u need use that page : https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm

like this : https://www.autoitscript.com/autoit3/docs/functions/AutoItSetOption.htm#WinTitleMatchMode

Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

That style it's possible too (i see that on a melba post somewhere) :

;is the default option
;Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

;use subStr Mode
Opt("WinTitleMatchMode", 2) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

;Add your stuff

;return too default mode
Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase

;Other stuff

 

Edited by Synapsee
Link to comment
Share on other sites

A good time to learn some simple RegEx

https://www.autoitscript.com/autoit3/docs/intro/windowsadvanced.htm

 

Match mode is an easy fix, but a bit more shotgun where it will match anywhere, some easy regex can let you specify the start of the string and a lot more should you need to tweak it later on.  Plus you wont have to change your match mode for all other windows if you only need it for this particular one. 

 

WinSetState("[REGEXPTITLE:(?i)^rainbow.*]", "", @SW_MAXIMIZE)

 

https://regex101.com/r/sB3wJ9/1

Edited by ViciousXUSMC
Link to comment
Share on other sites

Quote

Match mode is an easy fix, but a bit more shotgun where it will match anywhere, some easy regex can let you specify the start of the string and a lot more should you need to tweak it later on.  Plus you wont have to change your match mode for all other windows if you only need it for this particular one.

well spotted

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...