How to move between two windows quickly Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
hancre
Posts: 248
Joined: 02 Jul 2021, 20:51

How to move between two windows quickly

02 Sep 2021, 04:33

I want to move between two windows quicky.
( ex. wordpress and a dictonary program )

If I use win+1,2, the other windows minimize.
If I use alt+tab, win+tab, I should click one.

How can I move between two windows quickly ?

Thanks for any help in advance.
Attachments
temp_0902_004.jpg
temp_0902_004.jpg (141.44 KiB) Viewed 1526 times
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to move between two windows quickly

02 Sep 2021, 06:44

  • store the hwnds of each window(WinExist())
  • swap between them with a hotkey(WinActivate)
then there'd be no ambiguity as to which window is supposed to be activated
hancre
Posts: 248
Joined: 02 Jul 2021, 20:51

Re: How to move between two windows quickly

02 Sep 2021, 09:58

swagfag wrote:
02 Sep 2021, 06:44
  • store the hwnds of each window(WinExist())
  • swap between them with a hotkey(WinActivate)
then there'd be no ambiguity as to which window is supposed to be activated
Sorry. I don't know how to make a script with your tip.
I searched the commands. But . .

Could you give me a detaild script ?
hancre
Posts: 248
Joined: 02 Jul 2021, 20:51

Re: How to move between two windows quickly

02 Sep 2021, 10:00

swagfag wrote:
02 Sep 2021, 06:44
  • store the hwnds of each window(WinExist())
  • swap between them with a hotkey(WinActivate)
then there'd be no ambiguity as to which window is supposed to be activated
Sorry. I don't know how to make a script with your tip.
I searched the commands. But . .

Could you give me a detaild script ?
swagfag
Posts: 6222
Joined: 11 Jan 2017, 17:59

Re: How to move between two windows quickly  Topic is solved

02 Sep 2021, 10:59

Code: Select all

notepad := WinExist("notepad")
calc := WinExist("calc")

q::WinActivate % "ahk_id " (t := !t ? notepad : calc)
hancre
Posts: 248
Joined: 02 Jul 2021, 20:51

Re: How to move between two windows quickly

19 Sep 2021, 19:47

swagfag wrote:
02 Sep 2021, 10:59
I didn't want to fix the programs.
But it's also useful for my work. ^^
Thank you for your help.
MangerzArt
Posts: 13
Joined: 22 Jul 2021, 00:07

Re: How to move between two windows quickly

08 Sep 2023, 18:31

Hi , i use this code, idk if is the most efficient.
The only problem is that it minimizes the window.

Code: Select all

#tab::
	IF T
		send !{esc}
	Else
		send +!{Esc}
	T:=!T
	return

~!Tab::
	T:=1
	return
actually , im dumb sending !{tab} just works well, D_D , just like mikeyww said.

Code: Select all

#TAB::send !{tab}

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Holarctic, Rohwedder and 195 guests