Jump to content
Sign in to follow this  
Amethyst

Window name with [ and ] in it.

Recommended Posts

Amethyst

$window = "[ SG:O ][Linux Server Ver : 1.13.0 ][ Host : unix ][ Game Rateing : PG-Unrated ]"
TrayTip("Currently", "Waiting for window to be active.", 0)
MsgBox(4096, "Test", $window, 10)
WinWaitActive($window)

This is the code I'm having problems with, even when the window isn't active, it still runs through WinWaitActive.

Share this post


Link to post
Share on other sites
Malkey

$window = "[ SG:O ][Linux Server Ver : 1.13.0 ][ Host : unix ][ Game Rateing : PG-Unrated ]"
TrayTip("Currently", "Waiting for window to be active.", 0)
MsgBox(4096, "Test", $window, 10)
WinWaitActive($window)

This is the code I'm having problems with, even when the window isn't active, it still runs through WinWaitActive.

Title:

Class:

Position:

Size:

Style:

ExStyle:

Handle:

These are valid window properties copied from the Au3Info.exe window (Au3Info.exe is found in AutoIt installed directory). Controls within the window also have their own properties.

These window properties can be used to identify the window's title for the WinWaitActive parameter.

The properties you have used are SG:, Linux Server Ver:, Host:, Game Rateing:.

From the thread's title, it is easier to use Opt("WinTitleMatchMode", 2).

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

$window = " and " ; Find window title with the sub-string, ' and ' in it.
TrayTip("Currently", "Waiting for window to be active.", 0)
MsgBox(4096, "Test", $window, 10)

; See help file for meaning of return value
ConsoleWrite(WinWaitActive($window) & @CRLF)

Share this post


Link to post
Share on other sites
Richard Robertson

You could try doubling up the [ and ] in the title. The help file says to double up ; if they are used, so maybe the same goes for [ and ].

$window = "[[ SG:O ]][[Linux Server Ver : 1.13.0 ]][[ Host : unix ]][[ Game Rateing : PG-Unrated ]]"
Edited by Richard Robertson

Share this post


Link to post
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
Sign in to follow this  

×