r/applescript • u/UnhappyRecognition91 • Apr 14 '25
Adjust Brightness
Hello, I was recently introduced to Applescript from trying to find a way to adjust the brightness of my Macbook Pro through code and it lead me here but I have yet to find a solution because of how outdated this language is.
P.S. Is it worth learning/using this language further for future/current projects for resumes? I haven't seen much use of it and worried I might be wasting my time.
Thank you for the help if anyone can!!!
3
Upvotes
2
u/airdrummer-0 Apr 14 '25
automator is now the preferred tool now, but this seems to work also:
https://www.reddit.com/r/applescript/comments/11vssuy/adjust_brightness_with_applescript/
2
u/HelloImSteven Apr 16 '25
You can simulate pressing the brightness up/down keys:
Decrease Brightness:
Increase:
The alternative is to either use something like the third-party brightness CLI someone else mentioned or implement the same logic yourself using ASObjC.
AppleScript isn't really a resume booster, but it can be useful in many situations. If nothing else, the ASObjC bridge lets you use the full power of Objective C, which allows for some pretty powerful use cases.
2
u/roycetech Apr 16 '25
Probably not worth it for resume, but for me, it is the language I used the most. Been a software engineer for decades.