JulianMummery Posted August 19, 2007 Share Posted August 19, 2007 (edited) Hi, I have a script that works on XP SP2 but not on Vista. The WinActivate does not seem to work on Vista, is there any known issues with this and if so, is there a work around? Thanks in advance Julian Edited August 19, 2007 by JulianMummery Link to comment Share on other sites More sharing options...
ZyntaxError Posted August 19, 2007 Share Posted August 19, 2007 (edited) $title = WinGetTitle("") WinSetState($title, "", @SW_MINIMIZE) Sleep(1000) WinActivate($title) $title = WinGetTitle("") WinSetState($title, "", @SW_MINIMIZE) Sleep(1000) WinSetSTate($title, "", @SW_RESTORE) both tested and working for me... using vista home premium and zipped version of autoit 3.2.4.9 Edited August 19, 2007 by ZyntaxError Link to comment Share on other sites More sharing options...
TK_Incorperate Posted August 20, 2007 Share Posted August 20, 2007 i use the most recent beta and my script is like this..... If WinActive("example") = 0 Then WinActivate("example") and it worked fine for about 10 minutes, then it randomly stopped working, and started to minimize the window instead of activate it. i dont know any fix for it as of yet Link to comment Share on other sites More sharing options...
sandman Posted August 20, 2007 Share Posted August 20, 2007 Try using WinSetState() instead of WinActivate(), like ZyntaxError did. Just guessing here I think being more specific helps sometimes with bugs. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
TK_Incorperate Posted August 20, 2007 Share Posted August 20, 2007 he is using winsetstate to minimize, that's not what either of us is trying to do... Link to comment Share on other sites More sharing options...
sandman Posted August 20, 2007 Share Posted August 20, 2007 he is using winsetstate to minimize, that's not what either of us is trying to do...So change it so it makes it active. @SW_SHOW. [center]"Yes, [our app] runs on Windows as well as Linux, but if you had a Picasso painting, would you put it in the bathroom?" -BitchX.com (IRC client)"I would change the world, but they won't give me the source code." -Unknownsite . blog . portfolio . claimidcode.is.poetry();[/center] Link to comment Share on other sites More sharing options...
ZyntaxError Posted August 20, 2007 Share Posted August 20, 2007 fount that... if you have script activating "test gui" whenever its not active and at same time you spam mouse at other window then... the other window is above our "test gui" but "test gui" has still input focused there, so maybe you need WinSetOnTop()? GUICreate("test gui", 200, 100) GUICtrlCreateInput("", 0, 0, 200, 100) GUISetState() WinSetOnTop("test gui", "", 1) While 1 If WinActive("test gui") = 0 Then WinActivate("test gui") EndIf Sleep(1000) WEnd Link to comment Share on other sites More sharing options...
Cusem Posted August 29, 2007 Share Posted August 29, 2007 I'm experiencing the same problems with "WinActivate" with Vista (x64 Ultimate). Everything works fine for 4 days. No problems at all. While using the script, all of a sudden the Winactivate feature did not work anymore. I'ved tried using the window handle instead of the title, @SW_SHOW, @SW_SHOWMAXIMIZED, altering the SetOnTop flag (WinSetOnTop), but nothing works. Anybody got a solution yet? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now