AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

last active window
Goto page 1, 2  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 11:24 am    Post subject: last active window Reply with quote

Hi,

Can't find it on the forum so i'll ask it Smile

How to find the "last" active window ?

Andre
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Fri Aug 05, 2005 11:42 am    Post subject: Reply with quote

what do you mean by "last"?
The previously active window?

If so, There was a a topic on the topmost window. Maybe you can use it to find the previous one. Check it out

http://www.autohotkey.com/forum/viewtopic.php?t=4663

here is the code that shows the list of windows
Code:
F2::
  WinGet, WindowList, List
  ToolTip
  List =
  Loop %WindowList%
    {
      WinUID := WindowList%A_Index%
      WinGetTitle, WinTitle, ahk_id %WinUID%
      List = %List%Window %A_Index% of %WindowList%`n%WinTitle%`n%WinUID%`n`n
    }
  ToolTip  %List%
Return
and here is another one that activates the topmost window
Code:
^a::
WinGet, WindowList, List
List =
Loop %WindowList%
{
WinUID := WindowList%A_Index%
WinGetTitle, WinTitle, ahk_id %WinUID%
If WinTitle <>
Break
}
WinActivate, ahk_id %WinUID%
Return

_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 11:45 am    Post subject: Reply with quote

Hi,

What i need is this....

for example i have an gui with an button.
when i press that button i want to send/control the window that was active before my gui became active......

Andre
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Fri Aug 05, 2005 11:52 am    Post subject: Reply with quote

So "where's the beef?". What's your goal?

Ma Butter bei die Fische!
Dann haste den Knop und dann???
Komm zur Sache Schätz'chen!!!
Würmer aus der Nase ziehn is nur minder spannend !!!! Rolling Eyes Wink
Back to top
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 11:56 am    Post subject: Reply with quote

I'm just trying to do some funny things.
Make an gui with some buttons that send text to the previous active window.

Und warum in Deutsch und nicht im English Question
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Fri Aug 05, 2005 12:07 pm    Post subject: Reply with quote

So:
Based on what action does your GUI pop up? Is it possible that you just grap the current active Window before you start your GUI?

If you close your gui, the above codes might work. please try the second.
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 12:11 pm    Post subject: Reply with quote

I'm new in the AutoHotKey world....

The idea is to make an gui that can be activated by the tray menu.
Then the selected action in the gui has to be sent to the window that was active before the gui was shown.....

Andre
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Fri Aug 05, 2005 12:28 pm    Post subject: Reply with quote

Quote:
Und warum in Deutsch und nicht im English
Weil ich den Eindruck habe, das für dich die Beschreibung der Aufgabenstellung durch die Verwendung der englischen Sprache nicht zwingend einfacher wird.

Und bevor es zu einer Aneinanderreihung von Missverständnissen kommt, frag ich lieber. Funzt auch meistens. Wink
Das [Deutsche AHK Forum]

Have fun. Cool
Back to top
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 12:35 pm    Post subject: Reply with quote

Meinen englisch ist aber besser wie meinen Deutsch Smile

Sorry.

Andre
Back to top
View user's profile Send private message
BoBo
Guest





PostPosted: Fri Aug 05, 2005 1:16 pm    Post subject: Reply with quote

Pardon. Smile
Back to top
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 1:23 pm    Post subject: Reply with quote

We kunnen natuurlijk ook gewoon in 't Nederlands gaan praten maar ik denk dat de meeste forumgebruikers daar nog meer moeite mee hebben Smile
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Fri Aug 05, 2005 1:38 pm    Post subject: Reply with quote

aachtendachtig is prachtig.

Ok, we will give your "fiets" back. :)
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
BoBo
Guest





PostPosted: Fri Aug 05, 2005 1:39 pm    Post subject: Reply with quote

HADEHADEHADEHADEHOOOOOOOOOOOOO
Oranje Bouwe!!! Very Happy
Back to top
Andre



Joined: 22 Jul 2005
Posts: 52

PostPosted: Fri Aug 05, 2005 2:05 pm    Post subject: Reply with quote

but no answer to my question yet Smile ?

Andre
Back to top
View user's profile Send private message
toralf



Joined: 31 Jan 2005
Posts: 3841
Location: Bremen, Germany

PostPosted: Fri Aug 05, 2005 2:10 pm    Post subject: Reply with quote

And what do you call the second post right after your question?
Have you tried it?
_________________
Ciao
toralf
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group