Plugin Window Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
boiler
Posts: 16767
Joined: 21 Dec 2014, 02:44

Re: Plugin Window

Post by boiler » 19 Apr 2020, 12:40

@Philharmonic - No problem. Glad to help. As BNOLI said, the AHK community is just a bunch of people trying to help each other, and everyone’s contributions are valued.

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 19 Apr 2020, 15:12

w0z wrote:
19 Apr 2020, 11:58
try this way I hope it works for you. :beer:

Code: Select all

#IfWinActive, Pro Tools
	+d::
	WinMenuSelectItem, Pro Tools, , AudioSuite, Other, Gain
	if WinExist("AudioSuite")
		WinActivate

	Sleep, 1000
	WinGetPos, wX, wY, wW, wH, AudioSuite
	SetMouseDelay, 20

	t1:=A_TickCount, X:=Y:=""

	Text:="|<>*190$41.zzzzzzz1UakM8CtTBirrBqy/QjisABKt31qvuBmyrgrqPhxbQUiks/bzzzzzzw"

; Text:="|<Render Button>*188$66.zzzzzzzzzzzU1zzzzzVzzzU1zzzzzVzzzbsTzzzzVzzzbsTzzzzVzzzbsM7U7U1US1bsM7U7U1US1U1VVbbba66TU1VVbbba66TbbU1bbba06TbbU1bbba06TbVtzbbbbbyTbVtzbbbbbyTbsM7bbU7USTbsM7bbU7USTzzzzzzzzzzzU"



	if (ok:=FindText(wX, wY, wX+wW, wY+wH, 0, 0, Text))
	{
	CoordMode, Mouse,Screen
	MouseGetPos, Orig_X,Orig_Y

	X:=ok.1.x, Y:=ok.1.y, Comment:=ok.1.id
	Click, %X%, %Y%
	} else {
		MsgBox, 48, , No render button found!, 2
	}

	for i,v in ok
	if (i<=2)
	 FindText_MouseTip(ok[i].x, ok[i].y)

	MouseMove, %Orig_X%, %Orig_Y%

	Sleep, 1500
	if WinExist("ahk_class DigiFloaterClass")
	WinKill

	Return 

#IfWinActive

Thanks for the added tip. I went with an image search script and now it seems to be working the way I wanted, but I really appreciate your FindText suggestion. It seemed to work really well and hopefully I can apply to a different application one day. Thanks a bunch for everything! :clap:

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window  Topic is solved

Post by Philharmonic » 19 Apr 2020, 22:33

boiler wrote:
19 Apr 2020, 05:38
Below is how to use MouseGetPos and MouseMove to return the mouse pointer to its original position.

Code: Select all

~+d::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click

Sleep, 500

CoordMode, Pixel, Screen
CoordMode, Mouse, Screen
MouseGetPos, PrevX, PrevY
loop, 50 ; wait a maximum of 5 seconds (50 * 100ms) for render button to appear
{
	ImageSearch, ImX, ImY, 0, 0, A_ScreenWidth, A_ScreenHeight, render.png
	Sleep, 100
} until !ErrorLevel
if ErrorLevel
	MsgBox, Could not find 'Render' button
else
	Click, %ImX%, %ImY%
MouseMove, PrevX, PrevY
Sleep, 2500

if WinExist("ahk_class DigiFloaterClass")
	WinKill

Return 
I suspect the reason it didn’t work on your laptop is that you have a Windows setting for scaling at something other than 100%. What I’ve seen is that when the scaling factor is greater than 150%, Windows doesn’t render graphics at their true pixel-for-pixel representation, but it stretches and blends the pixel colors, usually making ImageSearch impossible even with high allowable variation in color.

Just tried MouseGetPos and MouseMove and it worked like a charm. :bravo: Thanks a bunch. I think this problem for now is officially resolve, that is if I can think of something else to tinker with. :HeHe:

[Moderator: marked as resolved]

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Plugin Window

Post by malcev » 21 Apr 2020, 06:56

Just installed this software and I do not understand why all suggested You to use imagesearch or findtext?
As I said before it works like this: (on my monitor 1920x1080)

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 03 May 2020, 15:18

malcev wrote:
21 Apr 2020, 06:56
Just installed this software and I do not understand why all suggested You to use imagesearch or findtext?
As I said before it works like this: (on my monitor 1920x1080)

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA
Hi Malcev,

Obvious I'm a novice on AHK (based on my initial thread), but is your script using mouse clicking coordinates? I purposely decided not to use any mouse clicking coordinates due to the fact that opening up an Audiosuite plugin can change in location. Because of that, the suggestions proposed here on this thread helped immensely. The trouble I had is now finally resolved. When I have some time I will definitely check out the script you wrote. Again, I truly appreciate your input. :D

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Plugin Window

Post by malcev » 03 May 2020, 16:21

AudioSuite plugin has its own window.
And Render button always has the same position (right-bottom) in this window.

Jrdixon_
Posts: 7
Joined: 09 Jul 2020, 19:41

Re: Plugin Window

Post by Jrdixon_ » 09 Jul 2020, 20:28

Philharmonic wrote:
03 May 2020, 15:18
malcev wrote:
21 Apr 2020, 06:56
Just installed this software and I do not understand why all suggested You to use imagesearch or findtext?
As I said before it works like this: (on my monitor 1920x1080)

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA
Hi Malcev,

Obvious I'm a novice on AHK (based on my initial thread), but is your script using mouse clicking coordinates? I purposely decided not to use any mouse clicking coordinates due to the fact that opening up an Audiosuite plugin can change in location. Because of that, the suggestions proposed here on this thread helped immensely. The trouble I had is now finally resolved. When I have some time I will definitely check out the script you wrote. Again, I truly appreciate your input. :D
@Philharmonic
I've just started to seek out ways I can use ahk with Protools and would love to pick your brain!

Any chance you could point me in the direction of some videos or reading material that helped you get started??

Or even some of the scripts you use regularly.

Josh

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 09 Jul 2020, 21:07

Jrdixon_ wrote:
09 Jul 2020, 20:28
Philharmonic wrote:
03 May 2020, 15:18
malcev wrote:
21 Apr 2020, 06:56
Just installed this software and I do not understand why all suggested You to use imagesearch or findtext?
As I said before it works like this: (on my monitor 1920x1080)

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA
Hi Malcev,

Obvious I'm a novice on AHK (based on my initial thread), but is your script using mouse clicking coordinates? I purposely decided not to use any mouse clicking coordinates due to the fact that opening up an Audiosuite plugin can change in location. Because of that, the suggestions proposed here on this thread helped immensely. The trouble I had is now finally resolved. When I have some time I will definitely check out the script you wrote. Again, I truly appreciate your input. :D
@Philharmonic
I've just started to seek out ways I can use ahk with Protools and would love to pick your brain!

Any chance you could point me in the direction of some videos or reading material that helped you get started??

Or even some of the scripts you use regularly.

Josh

Honestly, if I broke it down, I would say I used 20% of the manual, 40% of trial and error and the other 40% from this forum. The folks in this forum are wizards and can help you out tremendously if you clearly explain what you are after.

This thread contain my script I use for Pro Tools, and I believe it can be easily swapped out for the functions you may want. Feel free to copy it.

Jrdixon_
Posts: 7
Joined: 09 Jul 2020, 19:41

Re: Plugin Window

Post by Jrdixon_ » 10 Jul 2020, 04:31

@@Philharmonic Yeah everyone seems super helpful on here! I just bought the elgato streamdeck so looking to spend the whole day today setting up hotkeys to help with mixing and recording.

I can't believe i hadn't heard of these types of scripts sooner. It's amazing the stuff you can do. I used to have a raven that ran macros but the whole experience wasn't smooth and definitely not worth the £1,000 price tag!

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 25 Dec 2020, 00:59

malcev wrote:
21 Apr 2020, 06:56
Just installed this software and I do not understand why all suggested You to use imagesearch or findtext?
As I said before it works like this: (on my monitor 1920x1080)

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA
Hey Malcev,

So I finally got a chance to look at the script you suggested a while back :P So if you recall, I used the script everyone recommended by using imagesearch and it works. Since I have some time in my hands now, I tried out the script you suggested Malcev and it seems very efficient. If you would be so kind, I'm trying to understand how your script actually knows where to click on the render button. I don't quite understand the coordinates you wrote but I'm assuming that has to do something with clicking on the render button. Thanks a bunch! :D

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Plugin Window

Post by malcev » 26 Dec 2020, 20:26

Render button always has the same offset from window position.
Therefore it is easy to get its position.

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 26 Dec 2020, 21:05

malcev wrote:
26 Dec 2020, 20:26
Render button always has the same offset from window position.
Therefore it is easy to get its position.
Ahhh. Really. So regardless of the size of the window, the offset is always the same huh. Wow :bravo:

I'll probably change my current script to the one you wrote because from testing it seems very efficient. Even placing the plugin window at the far corners of my monitors, it can still locate the window and click the render button. So that's a big plus for me.

Thanks for the lesson and being a stud Malcev! :thumbup:

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 29 Aug 2021, 11:45

malcev wrote:
26 Dec 2020, 20:26
Render button always has the same offset from window position.
Therefore it is easy to get its position.
Hi Malcev,

I've been using your script suggestion for a while now and it has been wonderful for me. Saves a lot of time on mundane task. Now I would like to add another step that requires to click on another button in that same window that's located somewhere else.

If I wanted to click a button on different parts of the window position, is there a general offset to get that position as well. Is there a link where I can get this information and reference from? I wouldn't want to bother you for simple task as this. Thanks a bunch!

malcev
Posts: 1769
Joined: 12 Aug 2014, 12:37

Re: Plugin Window

Post by malcev » 29 Aug 2021, 17:02

I use ahkspy.
https://github.com/serzh82saratov/AhkSpy/blob/master/AhkSpy.ahk
Go to tab "Control" and on the top You will see ---(Mouse)---.
Here You can see coordinates relative to Window.

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 30 Aug 2021, 09:43

malcev wrote:
29 Aug 2021, 17:02
I use ahkspy.
https://github.com/serzh82saratov/AhkSpy/blob/master/AhkSpy.ahk
Go to tab "Control" and on the top You will see ---(Mouse)---.
Here You can see coordinates relative to Window.
Thanks a bunch! I'll look into that.

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 01 Nov 2021, 16:23

malcev wrote:
29 Aug 2021, 17:02
I use ahkspy.
https://github.com/serzh82saratov/AhkSpy/blob/master/AhkSpy.ahk
Go to tab "Control" and on the top You will see ---(Mouse)---.
Here You can see coordinates relative to Window.
Hi Malcev,

So I finally had a chance to dive into your recommended ahkspy and I am at a complete lost. AHKspy definitely looks useful but I don't know how to read its's coordinates. Under the "control" tab, I see relative window and noticed the decimal number changing and the "for" with the (w,h) staying consistent. Is that the number I should be focusing on, and if so, I still don't understand how you get this in the script bwlo.

Code: Select all

ontrolclick, % "x" w-45 " y" h-25,,,,, NA
Ultimately, there's a series of clicks I would like to happen, and then finally click the "render" button. I've attached an image below to get an idea. I'm a complete doofus regarding AHK, so apologies in advance for the complete noob questions.
Attachments
plugin Capture1.PNG
plugin Capture1.PNG (45.87 KiB) Viewed 2471 times
plugin Capture2.PNG
plugin Capture2.PNG (46.07 KiB) Viewed 2471 times

Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: Plugin Window

Post by Lepes » 02 Nov 2021, 11:04

I'm not malcev but I think I can explain it:

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA
Once you detected the window, you get the width and the Height of the window (that is the right bottom corner of the window), since the render button is always on the right bottom of the window, He just subtract 45 to the width so your mouse will be horizontaly inside the render button. Then he subtract 25 to the height because the mouse is at the bottom of the window and we need the mouse inside the button. It is just a trick for that button.


So, let's go for a general technique for any control of any window:
- You already are at the window with winwait, AudioSuite
- You will get the left top corner of the window with: wingetpos, xWindow, yWindow
- Now we will search the coordenates where we want to click: you open the AudioSuite window, Open AhkSpy and go to the "Control" and with your mouse pointing at the button of the AudioSuite you want to get the coordenates, pauses AhkSpy with Shift + Tab. In AhkSpy you Go to Mouse -> Window and right click to copy those coordenates, let's say you obtain x547 y65

At this point you need to know how Windows and controls works (I assume you already know, but let' explain for everyone):
- Your left top corner of your screen is the coordenate (0,0) (x, y)
- Your right bottom corner of your screen is the resolution you use in Windows, I use 1920x1080 so it is (1919, 1079) The zero coordenate already count!
- Windows OS place a window on your screen based on the left top corner of that window, and those parameters are exactly what we already got by "wingetpos, xWindow, yWindow "
- Now each control of a Window maybe placed directly on a window, or maybe placed into a containner of the windows (a panel, a toolbar, a statusbar). That's complex, and We just avoid all of this complexity by obtaining with AhkSpy The "Window Mouse coordenates", that is, coordenates "x547 y65" are based on The left top corner of the AudioSuite Window, so we just need to ADD those coordenates to get the real one.


Final code:

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,xWindow, yWindow
xMouse := 547  ;ahkSpy X window mouse coordenate
yMouse := 65   ;ahkSpy Y window mouse coordenate
controlclick, % "x" xWindow + xMouse + 5 " y" yWindow + yMouse + 5,,,,, NA
xWindow: x coordenate of the Audiosuite window
xMouse: x coordenate of the button you want to click
"+ 5": well your mouse is at the left top corner of the button you want to push, we want the mouse inside of the button, so I use 5 pixels to enter at the button. Some controls may have a border around it, and it usualy are 3 pixels borderwidth, so I just use 5.

This could be enhanced by obtaining the size of the control you are pointing with your mouse (width and height of the button) and then instead of "xWindow + xMouse + 5", you can use "xWindow + xMouse + ButtonWidth/2", so your mouse will be horizontal centered of the size of the button. Same for height: "yWindow + yMouse + ButtonHeight/2"

To obtain the size of the control its a bit tricky:
- Point your mouse at the button you want to detect. Freeze AhkSpy, go to AhkSpy Control -> (Accesible) and click on "flash" button just to ensure the button you were pointing is the one that is flashing and nothing else.
- (Accesible) -> Position relative -> Size, is the size of the button. Let's say you obtain w300 h32. It makes sense, 300 width because it is wide, 32 pixels high, not too tall.

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,xWindow, yWindow
xMouse := 547  ;ahkSpy X window mouse coordenate
yMouse := 65   ;ahkSpy Y window mouse coordenate
buttonWidth := 300
buttonHeight:= 32
controlclick, % "x" xWindow + xMouse + buttonWidth/2 " y" yWindow + yMouse + buttonHeight/2,,,,, NA
this code is just for teaching, since we get coordenates width AhkSpy I wouldn't use so many variables, it will be hardcoded:

Code: Select all

controlclick, % "x" xWindow + 547 + 150 " y" yWindow + 65 + 16 ,,,,, NA

I hope I could be clear and you understand the whole process. If you have problems with coordenates just create a blank script and use MouseMove (screen coordenates) and move your mouse width those coordenates so you can visualize what you are mathematically doing. We sometimes get the wrong coordenates and mouse goes out of screen, so it doesn't point where we want to.

Philharmonic
Posts: 50
Joined: 22 May 2017, 13:51

Re: Plugin Window

Post by Philharmonic » 02 Nov 2021, 14:33

Lepes wrote:
02 Nov 2021, 11:04
I'm not malcev but I think I can explain it:

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,,, w, h
controlclick, % "x" w-45 " y" h-25,,,,, NA
Once you detected the window, you get the width and the Height of the window (that is the right bottom corner of the window), since the render button is always on the right bottom of the window, He just subtract 45 to the width so your mouse will be horizontaly inside the render button. Then he subtract 25 to the height because the mouse is at the bottom of the window and we need the mouse inside the button. It is just a trick for that button.


So, let's go for a general technique for any control of any window:
- You already are at the window with winwait, AudioSuite
- You will get the left top corner of the window with: wingetpos, xWindow, yWindow
- Now we will search the coordenates where we want to click: you open the AudioSuite window, Open AhkSpy and go to the "Control" and with your mouse pointing at the button of the AudioSuite you want to get the coordenates, pauses AhkSpy with Shift + Tab. In AhkSpy you Go to Mouse -> Window and right click to copy those coordenates, let's say you obtain x547 y65

At this point you need to know how Windows and controls works (I assume you already know, but let' explain for everyone):
- Your left top corner of your screen is the coordenate (0,0) (x, y)
- Your right bottom corner of your screen is the resolution you use in Windows, I use 1920x1080 so it is (1919, 1079) The zero coordenate already count!
- Windows OS place a window on your screen based on the left top corner of that window, and those parameters are exactly what we already got by "wingetpos, xWindow, yWindow "
- Now each control of a Window maybe placed directly on a window, or maybe placed into a containner of the windows (a panel, a toolbar, a statusbar). That's complex, and We just avoid all of this complexity by obtaining with AhkSpy The "Window Mouse coordenates", that is, coordenates "x547 y65" are based on The left top corner of the AudioSuite Window, so we just need to ADD those coordenates to get the real one.


Final code:

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,xWindow, yWindow
xMouse := 547  ;ahkSpy X window mouse coordenate
yMouse := 65   ;ahkSpy Y window mouse coordenate
controlclick, % "x" xWindow + xMouse + 5 " y" yWindow + yMouse + 5,,,,, NA
xWindow: x coordenate of the Audiosuite window
xMouse: x coordenate of the button you want to click
"+ 5": well your mouse is at the left top corner of the button you want to push, we want the mouse inside of the button, so I use 5 pixels to enter at the button. Some controls may have a border around it, and it usualy are 3 pixels borderwidth, so I just use 5.

This could be enhanced by obtaining the size of the control you are pointing with your mouse (width and height of the button) and then instead of "xWindow + xMouse + 5", you can use "xWindow + xMouse + ButtonWidth/2", so your mouse will be horizontal centered of the size of the button. Same for height: "yWindow + yMouse + ButtonHeight/2"

To obtain the size of the control its a bit tricky:
- Point your mouse at the button you want to detect. Freeze AhkSpy, go to AhkSpy Control -> (Accesible) and click on "flash" button just to ensure the button you were pointing is the one that is flashing and nothing else.
- (Accesible) -> Position relative -> Size, is the size of the button. Let's say you obtain w300 h32. It makes sense, 300 width because it is wide, 32 pixels high, not too tall.

Code: Select all

f11::
WinMenuSelectItem, Pro Tools, , Audiosuite, Noise Reduction, RX 7 De-click
winwait, AudioSuite
wingetpos,xWindow, yWindow
xMouse := 547  ;ahkSpy X window mouse coordenate
yMouse := 65   ;ahkSpy Y window mouse coordenate
buttonWidth := 300
buttonHeight:= 32
controlclick, % "x" xWindow + xMouse + buttonWidth/2 " y" yWindow + yMouse + buttonHeight/2,,,,, NA
this code is just for teaching, since we get coordenates width AhkSpy I wouldn't use so many variables, it will be hardcoded:

Code: Select all

controlclick, % "x" xWindow + 547 + 150 " y" yWindow + 65 + 16 ,,,,, NA

I hope I could be clear and you understand the whole process. If you have problems with coordenates just create a blank script and use MouseMove (screen coordenates) and move your mouse width those coordenates so you can visualize what you are mathematically doing. We sometimes get the wrong coordenates and mouse goes out of screen, so it doesn't point where we want to.
You sir (as well as everyone here that chimed in) are a stud! 8-)

I've been completely swamped with work and haven't had the chance to experiment on your advice, but the fact that you took the time off your schedule to elaborate on your explanation is just plain awesome!

When I do get a moment, I'll dive right in and see if I can implement this to my task I'm trying to achieve. I'll report back once I do. Until then, thank you kind sir! :)

Raimoraimo
Posts: 4
Joined: 26 Nov 2021, 14:00

Re: Plugin Window

Post by Raimoraimo » 26 Nov 2021, 15:10

I have a related question (trying to move to using Pro Tools from Mac to Win) and this thread seems to have people who could know the answer, I hope it's okay to ask?

I've been using my mouse thumb for years for the key command Crtl+Opt+Cmd+W (the same 3+1 finger salute on Windows i.e. Ctrl+Win+Alt+W), it has a menu command Window / Hide All Floating Windows.

I can map it to Control+Shift+1 with
#IfWinActive ahk_class DigiAppWndClass
^+1::WinMenuSelectItem, Pro Tools, , Window, Hide All Floating Windows

And this works from Logitech Options (Ctrl+Shift+1 as a keystroke)

BUT, it only works 1 or 2 times (i.e. hides a plugin window and brings it back). After that I need to click the "Window" menu open for it to "reset" and work 1-2 times again.

The actual key command Ctrl+Win+Alt+W doesn't do this and works every time. (But using it won't reset the AHK key command to work, only opening the menu will)

I notice there is a checkbox in the Window menu after the key has been used once (to indicate that it's remembering the closed floating windows to bring back I guess), maybe this has something to do with this?

Raimoraimo
Posts: 4
Joined: 26 Nov 2021, 14:00

Re: Plugin Window

Post by Raimoraimo » 27 Nov 2021, 13:40

Answering myself as I got help from a AHK knowledgeable friend - when using this menu command, PT focuses the floating windows on reopening. So this works:

Code: Select all

#IfWinExist ahk_class DigiAppWndClass
^+1::
IfWinNotActive ahk_class DigiAppWndClass
{ 
	WinActivate ahk_class DigiAppWndClass
	WinWaitActive ahk_class DigiAppWndClass
}
WinMenuSelectItem, Pro Tools, , Window, Hide All Floating Windows
Return
[Mod edit: [code][/code] tags added.]

Post Reply

Return to “Ask for Help (v1)”