Jump to content
Sign in to follow this  
Guest Landvermesser

Last Active Window

Recommended Posts

Guest Landvermesser

In the version 2.x of the program a command Send, ^C sent Ctrl+C in a window which was last active even if this window was not active now. In AutoIt 3.x pressing is sent in an active window only. For me it is not clear, how I can make active the uppertop window on a desktop, not knowing his name.

I want analogue

WinGetActiveTitle, myvar

MsgBox, 0, AutoIt, The active window was %myvar%

WinGetTitle("") not work, weil the target-window not active.

And I want start exe-file from the faststart-toolbar.

Yes, I can send Alt+Tab and activate this window. Its work. But if this window war minimized, Alt+Tab maximize window and I dont need that.

Share this post


Link to post
Share on other sites
Andre

Hi,

This works for me :

$dum = WingetTitle("")
MsgBox(4096,"Title of active window",$dum)

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites
this-is-me

@Landvermesser, look at controlsend in the helpfile and the Au3_spy in the start menu. These functions can send to non-active windows without the effect of restoring that window.


Who else would I be?

Share this post


Link to post
Share on other sites
Guest Landvermesser

Excuse, probably I have incorrectly told (I know English bad).

For example, I want to close the uppermost window with help of the button on the panel of fast start. The button starts a script. The script does not know title of the top window and what controls at this window. The script has just started. The top window can be any program, active or not active. It should be simply closed with help Send, !{F4}

If all windows are minimized, should be closed MS Windows.

And I want can send any combination of keys, ^c, ^a, or ^x. This keysequence should be sent in the uppermost window with unknown title and contents, active or inactive. If windows in general are not present, is sent on a desktop.

I can write it in AutoIt 2.x. But how it to make in AutoIt 3.x?

Thanks.

:ph34r:

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.