circcc Posted May 21, 2007 Share Posted May 21, 2007 Shortly, 1) window A is active. 2) run script(or, compiled exe) shorcut from start menu. now, window A is not active. 3) how can I re-activate window A, other than ALT-TAB ? any function? Link to comment Share on other sites More sharing options...
Davo Posted May 21, 2007 Share Posted May 21, 2007 Hi, WinActivate("titleOfWindowA") Dave ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!! Link to comment Share on other sites More sharing options...
circcc Posted May 21, 2007 Author Share Posted May 21, 2007 Hi,WinActivate("titleOfWindowA")DaveWindow A means random window, so we don't know the title of window A. Link to comment Share on other sites More sharing options...
November Posted May 21, 2007 Share Posted May 21, 2007 Window A means random window, so we don't know the title of window A.HiSimulate ALT + TABMaybe it helpsCheers! Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
James Posted May 21, 2007 Share Posted May 21, 2007 You will need to put the active windows into an array then use Random. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
PaulIA Posted May 21, 2007 Share Posted May 21, 2007 You will need to put the active windows into an array then use Random.And exactly how do you use Random to activate the previous active window? I'm guessing that nobody has heard of anything called the "Z-Order" in windows? Take a look at GetNextWindow on MSDN. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
Davo Posted May 21, 2007 Share Posted May 21, 2007 Opt("WinTitleMatchMode",4) $windowTitle = WinGetTitle("[ACTIVE]") WinActivate($WinTitle) Dave ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------"I don't need to know everything, I just need to know where to find it when I need it"....EinsteinAnd in our case... That's the AutoIT helpfile ;) Please read before posting!!! Link to comment Share on other sites More sharing options...
James Posted May 21, 2007 Share Posted May 21, 2007 PaulIA, use an array, then if a certain Au3 window is activated the array will get the last window before the AU3 window. Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
PaulIA Posted May 21, 2007 Share Posted May 21, 2007 PaulIA, use an array, then if a certain Au3 window is activated the array will get the last window before the AU3 window.Please educate me. Show me some code that uses Random to activate the last active window. Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
James Posted May 21, 2007 Share Posted May 21, 2007 (edited) WTF am I on about Random for? Must be thinking of something else. Ahh I got confused. He said Window A means random window, so we don't know the title of window ASorry PaulIA. Edited May 21, 2007 by Secure_ICT Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
PaulIA Posted May 21, 2007 Share Posted May 21, 2007 WTF am I on about Random for? Must be thinking of something else. Ahh I got confused. He said Sorry PaulIA.No problem. I thought maybe you had discovered some new method for manipulating the Z-Order in Windows. Now that would be useful! Auto3Lib: A library of over 1200 functions for AutoIt Link to comment Share on other sites More sharing options...
November Posted May 21, 2007 Share Posted May 21, 2007 LOL ALT + TAB still sounds better Cheers Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
James Posted May 21, 2007 Share Posted May 21, 2007 Sure would of. I wish I could that would make me well known Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ Link to comment Share on other sites More sharing options...
Gif Posted May 21, 2007 Share Posted May 21, 2007 LOLALT + TAB still sounds better Cheersbut still the window that acrivetes when ALT + TAB are pressed will be visible and that's not "elegant"!! Link to comment Share on other sites More sharing options...
November Posted May 21, 2007 Share Posted May 21, 2007 but still the window that acrivetes when ALT + TAB are pressed will be visible and that's not "elegant"!!HummmAnd if :After ALT + TAB, get window name and minimize or whatever?Sounds good? Old Scriptology Visual Ping 1.8 - Mass Ping Program with export to txt delimited. Desktop 2 RGB and YMCK - Pick a color in the desktop and get the RGB and YMCK code. Desktop 2 RGB - Pick a color in the desktop and get the RGB code. ShootIT 1.0 - Screen Capture full and partial screen [font="'Arial Black';"]Remember Remember The Fifth of November.[/font] Link to comment Share on other sites More sharing options...
Helge Posted May 21, 2007 Share Posted May 21, 2007 http://www.autoitscript.com/forum/index.ph...st&p=209852 Link to comment Share on other sites More sharing options...
Gif Posted May 21, 2007 Share Posted May 21, 2007 HummmAnd if :After ALT + TAB, get window name and minimize or whatever?Sounds good?this is not what i meant , if you press now and hold for a slit second the ALT+TAB you will see that a window appears with all the programms open listed , and it cannot be hide as it has no name ... , whatever if tis the best solution then it would sound perfect Link to comment Share on other sites More sharing options...
circcc Posted May 21, 2007 Author Share Posted May 21, 2007 (edited) http://www.autoitscript.com/forum/index.ph...st&p=209852 Thanks Helge. Finally, I got this working code. $a = WinList() For $i = 1 to $a[0][0] If $a[$i][0] <> "" AND BitAnd(WinGetState($a[$i][1]),2) Then ExitLoop Next WinActivate($a[$i][1]) Edited May 21, 2007 by circcc Link to comment Share on other sites More sharing options...
herewasplato Posted May 21, 2007 Share Posted May 21, 2007 Shortly,1) window A is active.2) run script(or, compiled exe) shorcut from start menu.now, window A is not active.3) how can I re-activate window A, other than ALT-TAB ? any function?While it looks like you have solved you problem - another option would be to start your script in a way that does not cause Window A to ever lose focus... You could start your script via an OS shortcut. [size="1"][font="Arial"].[u].[/u][/font][/size] Link to comment Share on other sites More sharing options...
remin Posted July 30, 2014 Share Posted July 30, 2014 While it looks like you have solved you problem - another option would be to start your script in a way that does not cause Window A to ever lose focus... You could start your script via an OS shortcut. I could not make the above script of Circcc working. I created a GUI with a few buttons to make the current active window move to a part of the screen (left, right, center, upperleft, upperright, leftdown, rightdown) When I click on a GUI button I lose the focus of my active window. How can I keep the focus on that window while clicking on a GUI button? 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