Find current tab in Terminal with Applescript

pbw


Joined
Aug 31, 2008
Messages
19
Reaction score
1
Points
3
I want to be able to execute an osascript from within my .profile when terminal tabs are starting, which will find the tab object that the script is currently running in, and allow me to access the background color of the tab.

I can find the background colour of all tabs using a script, but I wnat to be able to find THIS tab, for every tab that is being opened, or re-opened on system restart.
 

vansmith

Senior Member
Joined
Oct 19, 2008
Messages
19,924
Reaction score
559
Points
113
Location
Queensland
Your Mac's Specs
Mini (2014, 2018, 2020), MBA (2020), iPad Pro (2018), iPhone 13 Pro Max, Watch (S6)
Unfortunately, I can't help you much more than beyond what I'm about to say but it looks as if the AppleScript dictionary has the answer for you. Under "Terminal Suite," there's a collection for "settings set" of which "background colour" is a property. Maybe that'll work for you.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top