| View previous topic :: View next topic |
| Author |
Message |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 11:24 am Post subject: last active window |
|
|
Hi,
Can't find it on the forum so i'll ask it
How to find the "last" active window ?
Andre |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Fri Aug 05, 2005 11:42 am Post subject: |
|
|
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 |
|
 |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 11:45 am Post subject: |
|
|
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 |
|
 |
BoBo Guest
|
Posted: Fri Aug 05, 2005 11:52 am Post subject: |
|
|
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 !!!!  |
|
| Back to top |
|
 |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 11:56 am Post subject: |
|
|
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  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Fri Aug 05, 2005 12:07 pm Post subject: |
|
|
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 |
|
 |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 12:11 pm Post subject: |
|
|
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 |
|
 |
BoBo Guest
|
Posted: Fri Aug 05, 2005 12:28 pm Post subject: |
|
|
| 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.
Das [Deutsche AHK Forum]
Have fun.  |
|
| Back to top |
|
 |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 12:35 pm Post subject: |
|
|
Meinen englisch ist aber besser wie meinen Deutsch
Sorry.
Andre |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Aug 05, 2005 1:16 pm Post subject: |
|
|
Pardon.  |
|
| Back to top |
|
 |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 1:23 pm Post subject: |
|
|
We kunnen natuurlijk ook gewoon in 't Nederlands gaan praten maar ik denk dat de meeste forumgebruikers daar nog meer moeite mee hebben  |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Fri Aug 05, 2005 1:38 pm Post subject: |
|
|
aachtendachtig is prachtig.
Ok, we will give your "fiets" back. :) _________________ Ciao
toralf  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Fri Aug 05, 2005 1:39 pm Post subject: |
|
|
HADEHADEHADEHADEHOOOOOOOOOOOOO
Oranje Bouwe!!!  |
|
| Back to top |
|
 |
Andre
Joined: 22 Jul 2005 Posts: 52
|
Posted: Fri Aug 05, 2005 2:05 pm Post subject: |
|
|
but no answer to my question yet ?
Andre |
|
| Back to top |
|
 |
toralf
Joined: 31 Jan 2005 Posts: 3841 Location: Bremen, Germany
|
Posted: Fri Aug 05, 2005 2:10 pm Post subject: |
|
|
And what do you call the second post right after your question?
Have you tried it? _________________ Ciao
toralf  |
|
| Back to top |
|
 |
|