Jump to content

Window name with [ and ] in it.


 Share

Recommended Posts

$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.

Link to comment
Share on other sites

$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)
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...