Skip to main content
2 votes

How to osacompile a script containing `tell Application` and NSAppleScriptEnabled without activating it

You are correct that the application is launched to get its scripting terminology. Your best bet would probably be to create and test the individual scripts, then escape each script as a string and ...
red_menace's user avatar
  • 1,470
1 vote
Accepted

Change app's icon by script

Using the answer from @wch1zpink , I was able to come up with a solution that uses the Foundation framework instead of UI scripting. There's a caveat: it works when run in Automator but not as a ...
JBart's user avatar
  • 41
1 vote

Change app's icon by script

You should not alter files in an application bundle, as that may break the code signing. Also, the Finder's scripting dictionary shows the icon property as being a bitmap, so you would need to ...
red_menace's user avatar
  • 1,470
1 vote

Change app's icon by script

This following solution is not exactly what you may be looking for but I think it is enough to set you on the right path. This following AppleScript code uses the fileicon shell script utility. If ...
wch1zpink's user avatar
  • 7,621
1 vote

Toggle menu bar auto hide by pressing F6

The following AppleScript automates the toggling between Always and Never modes for automatically hiding the menu bar on macOS 14.5 (Sonoma): tell application "System Settings" reveal ...
preseren's user avatar
1 vote
Accepted

How can automatically insert Shortcuts output into the current window?

There is a built-in option to do what you want In the shortcut options menu (🛈 in the right top side) mark "Use as Quick Action" and in the sub-menu of that mark "Provide Output". ...
yehsuf's user avatar
  • 133
1 vote

Use AppleScript to search for message by subject

I've been able to search mail by subject using the AppleScript below: tell application "Mail" open (every message of inbox whose subject contains "KeyPhrase") end tell I have ...
Izaac Post's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible