Top "Applescript" questions

AppleScript is an end user scripting language that has been available in Mac computers since System 7 Pro (7.1.1). It allows for automation of system tasks, communication between processes, and creation of workflows, amongst other functions.

Applescript - Bring window to foreground

I have an application with several windows opened at the same time. I'd like to bring a specific window to …

macos window applescript foreground
How can one invoke a keyboard shortcut from within an AppleScript?

I need to invoke a keyboard shortcut from within an AppleScript code, e.g. Cmd+Ctrl+Opt+E.

applescript
Can the UI Automation instrument be run from the command line?

Is there a way to open the UIAutomation instrument through the terminal? Will it be possible to write an AppleScript …

iphone xcode applescript instruments ios-ui-automation
OSX 10.11 El Capitan - setting boot device property not working

I am working on a dualboot system and used the following applescript to set the startup volume: tell application "Finder" …

macos terminal applescript bless
Using Applescript to Execute a Complicated Keystroke

I'm trying to write an Applescript in Automator that will press the left arrow button while holding down control, option, …

applescript
AppleScript: on error (try) line number

Is it possible to get the line number, where the script threw an error? Example: try set a to "abc" + "123" …

applescript try-catch onerror
Applescript testing for file existence

OK, I thought this would be a simple one, but apparently I'm missing something obvious. My code is as follows: …

file if-statement applescript
Using quotes in a AppleScript string

I am working with AppleScript and need to do this: set TextToWrite to " #!/bin/bash cd "$( dirname "$0" )" java -server -Xmx4…

applescript
Is there a command-line interface to list all Bluetooth devices in range on mac?

I want to list all in-range Bluetooth devices, ideally with hostnames, but MAC addresses would be sufficient. I need a …

objective-c swift macos bluetooth applescript
Applescript: Get filenames in folder without extension

I can get the names of all files in a folder by doing this: tell application "Finder" set myFiles to …

applescript filenames finder