checking if console is opened

Discussions about Coding and Scripting
Post Reply
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

checking if console is opened

Post by Rakiayn »

is it possible to check if the player has opened the console?
the window in my mod gets stuck behind the console when the console is opened so I need to close the indow when that is the case
User avatar
anth
Adept
Posts: 257
Joined: Thu May 13, 2010 2:23 am

Re: checking if console is opened

Post by anth »

Code: Select all

if (!WindowConsole(MyConsole).Root.ActiveWindow.IsA('MyWindowClass'))
{
    MyWindow.Close();
    OpenMyWindow();
}
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: checking if console is opened

Post by Rakiayn »

thnx!
will try it
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: checking if console is opened

Post by Rakiayn »

I get the error: bad or missing expression after !
User avatar
Feralidragon
Godlike
Posts: 5493
Joined: Wed Feb 27, 2008 6:24 pm
Personal rank: Work In Progress
Location: Liandri

Re: checking if console is opened

Post by Feralidragon »

Rakiayn wrote:I get the error: bad or missing expression after !
anth posted "pseudo-code", you should replace "MyConsole" by the console instance you want to get, "MyWindowClass" for the window you want, etc...
User avatar
Rakiayn
Masterful
Posts: 550
Joined: Fri Aug 28, 2009 3:33 pm

Re: checking if console is opened

Post by Rakiayn »

I want to check if the console is opened.
but I dont know what I should replace it width
Post Reply