Jump to content
Sign in to follow this  
Rawox

WinSetState not working

Recommended Posts

Rawox

Does anyone knows why this code isn't working.

It does not hide and show again :P

Run("C:\Program Files\Mozilla Firefox\firefox.exe")
Sleep ( 2000 )
WinSetState("Firefox", "", @SW_HIDE)
Sleep(3000)
WinSetState("Firefox", "", @SW_SHOW)

Share this post


Link to post
Share on other sites
DexterMorgan

Does anyone knows why this code isn't working.

It does not hide and show again :P

Run("C:\Program Files\Mozilla Firefox\firefox.exe")
Sleep ( 2000 )
WinSetState("Firefox", "", @SW_HIDE)
Sleep(3000)
WinSetState("Firefox", "", @SW_SHOW)
Well when i open Firefox it says Mozilla Firefox but it depends on your Home page, I.E if this site is the homepage you would use

WinSetState("Autoit Forums", "", @SW_HIDE)


code

Share this post


Link to post
Share on other sites
Rawox

Can't it be contained in the name.. because it always opens my previous tabs...

or is there any other way to do that?

Share this post


Link to post
Share on other sites
DexterMorgan

Can't it be contained in the name.. because it always opens my previous tabs...

or is there any other way to do that?

nope it doesnt work like that for me unless you add

Opt("WinTitleMatchMode", 2)

Edit: Example

Opt("WinTitleMatchMode", 2) 

WinSetState("Mozilla Firefox", "", @SW_HIDE)
Sleep(3000)
WinSetState("Mozilla Firefox", "", @SW_SHOW)
Edited by DexterMorgan

code

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.