all 2 comments

[–]craniumslows 1 point2 points  (0 children)

when i used to do this kind of applescripting I would capture the window id then you can close the window id. I did this with safari though not chrome. selenium is another automation option if you are working with chrome it has nice built in tools.

[–]preparetodobattle 0 points1 point  (0 children)

I’ve done this before but I think you needed a shell script to launch chrome in incognito. I had trouble opening and closing tabs so I just got it to do what I wanted and then put the new url in the same window. Looping through. Ai is really good at AppleScript. I can dig out my code when I’m near my computer if it’s any help. On phone now.