Andre Posted May 6, 2005 Share Posted May 6, 2005 Hi, I've tried to find this but no luck How do i display the previous active window ? For example : I'm running notepad, and switch to an AutoIt program, how can i see that notepad is my last active window ? Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
apsync Posted May 6, 2005 Share Posted May 6, 2005 dunno but if you want to reactivate it you send can alt+tab once Link to comment Share on other sites More sharing options...
Andre Posted May 6, 2005 Author Share Posted May 6, 2005 Hi, thnx works but... show the alt-tab dialog also quickly..... Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
jdickens Posted May 6, 2005 Share Posted May 6, 2005 $PrevWin = WinGetTitle("") $CurWin = WinGetTitle("") while 1 if $CurWin <> WinGetTitle("") Then $PrevWin = $CurWin $CurWin = WinGetTitle("") endif Sleep(100) Wend This is some off-the-cuff pseudo-code, but maybe you get my drift. Instead of Sleep, you could implement WinWaitNotActive($CurWin). I suppose I have not left you a good way to get out of the loop though. J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
Andre Posted May 6, 2005 Author Share Posted May 6, 2005 hi does not work..... Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
herewasplato Posted May 6, 2005 Share Posted May 6, 2005 AutoItSetOption("WinTitleMatchMode", 4) ;mode four allows for the use of "last" in the next line WinActive("last") ;activates the last active window [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
Andre Posted May 6, 2005 Author Share Posted May 6, 2005 "last" uses the last successful window match so you don't have to keep specifying the title and text again and again. e.g. Andre What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel! Link to comment Share on other sites More sharing options...
jdickens Posted May 6, 2005 Share Posted May 6, 2005 This is what they call a "proof of concept." It has a message box which pops up every whipstitch, but maybe it can be refined. The main prob. I had was with the scope of the variables. I tried several implementations, but my ideas all required some multi-threading, which wasn't working. ;Prog Start Global $PrevWin = "" Global $CurWin = "dummy" While 1 Sleep(100) WinWaitNotActive($CurWin) $PrevWin = $CurWin $CurWin = WinGetTitle("") MsgBox(4096, "This win excluded", $PrevWin, 5) WEnd J If I am too verbose, just say so. You don't need to run on and on. Link to comment Share on other sites More sharing options...
herewasplato Posted May 6, 2005 Share Posted May 6, 2005 "last" uses the last successful window match so you don't have to keep specifying the title and text again and again. e.g.Andre<{POST_SNAPBACK}>I know, but it worked for me at the start of a script... one that was started via an OS shortcut key... so, thinking about it further, the window that I was interested in never lost focus - so the "last" line probably did nothing for me. Thanks for helping me think thru that. I'll go back to sleep now. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
SupraNatural Posted August 24, 2005 Share Posted August 24, 2005 Well I guess you could have all you "extra" desktop icons in a folder somewhere and when the boss comes in you hit alt + b or something and it switches them all. As for the windows just do a WinList function and save that list then have autoit close them all, and open a few new "innocent" ones. Visit http://www.blizzedout.com/forums/register....referrerid=8306 for the top blizzard hacks. WoW, TfT, D2/LOD, CS. You name it we got it! 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