Jump to content
Sign in to follow this  
Gizmo42

Little question about window

Recommended Posts

Gizmo42

Howdy! :)

I'm new using the autoit software and it looks awesome and very useful !

I just started to learn from the helpfile and kinda understood :]

I have just a little question:

I created this code:

Run("Notepad.exe")

WinWait ( "Notepad", "" )

WinWaitActive ( "Notepad", "" )

WinClose( "Notepad", "" )

~ Just an example ~

Now, how can I do that:

If the notepad run, I want to wait 5 seconds before it close.

Which means - After I saw the notepad, it waits 5 seconds then do the WinClose.

What command should I write before the WinClose?

Thank you for helping,

cheers!

Share this post


Link to post
Share on other sites
JoHanatCent

Howdy! :)

I'm new using the autoit software and it looks awesome and very useful !

I just started to learn from the helpfile and kinda understood :]

I have just a little question:

I created this code:

~ Just an example ~

Now, how can I do that:

If the notepad run, I want to wait 5 seconds before it close.

Which means - After I saw the notepad, it waits 5 seconds then do the WinClose.

What command should I write before the WinClose?

Thank you for helping,

cheers!

Try:

$NP = Run("Notepad.exe")
 WinWait ( "Untit", "" )
 WinWaitActive ( "Untit", "" )
Sleep(5000)
WinClose("[CLASS:Notepad]", "")

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.