Jump to content

re-activate last active window...


Recommended Posts

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

Window A means random window, so we don't know the title of window A.

Hi

Simulate ALT + TAB

Maybe it helps

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

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

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

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

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

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

but still the window that acrivetes when ALT + TAB are pressed will be visible and that's not "elegant"!!

Hummm

And 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

Hummm

And 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

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

  • 7 years later...

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...