I'm trying to set up a macro that toggles on/off a button in Pro Tools (the Grid show/hide button) using Findtext. Only issue is it works clicking once, but not the second time because the color of the background changed. I have two separate commands:
Code: Select all
t1:=A_TickCount, X:=Y:=""
Text:="|<>*103$21.0001s44EU0W0owHYYW0Y4MYYVsYw0004"
if (ok:=FindText(914-150000, 106-150000, 914+150000, 106+150000, 0, 0, Text))
{
CoordMode, Mouse
X:=ok.1.x, Y:=ok.1.y, Comment:=ok.1.id
Click, %X%, %Y%
}
Code: Select all
t1:=A_TickCount, X:=Y:=""
Text:="|<>*105$20.zzzw7rqRzxjlMP0qqwBBb3PQ4q7zzzU"
if (ok:=FindText(914-150000, 106-150000, 914+150000, 106+150000, 0, 0, Text))
{
CoordMode, Mouse
X:=ok.1.x, Y:=ok.1.y, Comment:=ok.1.id
Click, %X%, %Y%
}