furrycow Posted September 15, 2008 Share Posted September 15, 2008 Ok, so you know if youve got an internet explorer window open and maximized, and then you press the taskbar at the bottom of the window, the explorer window then changes....is it still active? visible? does it still exist? what is its state??I've tried so many different combinations...all i want to happen is if the internet explorer becomes "that certain state" how to get it back to how it is if you were using itSo, this is pretty much what i mean...Oh, and ive also tried using focus as well, but no sucess, have anyone any ideas? Thank You!! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 15, 2008 Share Posted September 15, 2008 @furrycow...Did u use WinActivate? Link to comment Share on other sites More sharing options...
furrycow Posted September 15, 2008 Author Share Posted September 15, 2008 (edited) @furrycow...Did u use WinActivate?I just tried it, and it still doesnt work...i mean i can still use:$oIE = _IECreate ("www.google.com", 0);lots of code inbetweenWinActivate($oIE,"")cant i? Sorry i am a bit of a noob, but that doesnt work for me, the window remains inactive...im trying to find a blue pixel in the window, and if the window is active, like in the first part of the image above, it finds it perfectly, but is unable to find it when it is inactive, like in the middle part of the image above.Thanks, but any more suggestions??EDIT: Just seen that it returns a 1 as well, so it thinks its activated it sucessfully :S? Edited September 15, 2008 by furrycow Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 15, 2008 Share Posted September 15, 2008 @furrycow...You are using Winactivate incorrectly. WinActivate ( "title" [, "text"] ) Link to comment Share on other sites More sharing options...
furrycow Posted September 15, 2008 Author Share Posted September 15, 2008 @furrycow...You are using Winactivate incorrectly. WinActivate ( "title" [, "text"] ) Am i? oops :S. But this method works for things like... WinSetState($oIE,"",@SW_MAXIMIZE) How would i go about using the WinActivate("title" [, "text]) if the title keeps changing to a random webpage?? Thanks again! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 15, 2008 Share Posted September 15, 2008 Try this.. WinActivate("[CLASS:IEFrame]", "") Link to comment Share on other sites More sharing options...
furrycow Posted September 15, 2008 Author Share Posted September 15, 2008 Try this.. WinActivate("[CLASS:IEFrame]", "") Wow, that works thanks! But is there anyway of relating this to the original window that was created at the beginning $oIE = _IECreate ("www.google.com", 0) Because if a popup/advert comes in as the top window, the WinActivate("[CLASS:IEFrame]", "") would relate to that popup, instead of the internet explorer generated? Thanks for your hellp so far! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
DjDeep00 Posted September 15, 2008 Share Posted September 15, 2008 Get the handle of the original window by using: $Handle=WinGetHandle ("[CLASS:IEFrame]","") and call WinActivate($Handle, "") whenever.... Link to comment Share on other sites More sharing options...
furrycow Posted September 15, 2008 Author Share Posted September 15, 2008 Get the handle of the original window by using: $Handle=WinGetHandle ("[CLASS:IEFrame]","") and call WinActivate($Handle, "") whenever.... Thats it! It completely works, thanks you so much DJDeep! You have saved me an incredible amount of time! Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
PsaltyDS Posted September 15, 2008 Share Posted September 15, 2008 Thats it! It completely works, thanks you so much DJDeep! You have saved me an incredible amount of time! Since you had the IE reference from _IECreate() already, you can get the window handle like this: #include <IE.au3> $oIE = _IECreate("http://www.google.com") $hIE = _IEPropertyGet($oIE, "hwnd") Sleep(2000) WinSetState($hIE, "", @SW_HIDE) Sleep(2000) WinSetState($hIE, "", @SW_SHOW) WinActivate($hIE) Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law 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