AppleScript is a proprietary programming language in Mac OS X to control and exchange data with applications.

learn more… | top users | synonyms (3)

1
vote
1answer
26 views

Need help creating Automator Service to perform similar tasks to a residual uninstall

I've been having an issue with a program I use heavily every day, where it it acts like it is recovering from a crash even when it was quit properly and all files saved. The app is FontLab Studio, not ...
1
vote
2answers
57 views

Sending commands from TextWrangler to the terminal

I want to send commands from TextWrangler to the terminal. Even if I found this, I don't understand how that works since I'm brand new to Unix and running Applescripts. tell application "...
5
votes
3answers
2k views

How do I assign a keyboard shortcut to an AppleScript I wrote?

How do I assign a keyboard shortcut to an AppleScript? I found a script for automatically going back to the inbox in Office 2011.
1
vote
1answer
26 views

How to make automator app use a specific folder as input

I have a number of processes that I need a Mac Mini to run with no input. One of these tasks is to take ingested video files, rename them and transfer them to another location. The app I am using ...
173
votes
8answers
93k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
2
votes
2answers
861 views

Applescript to turn off Mission Control in OS X 10.7

I found most of the below on https://discussions.apple.com/thread/3046230?start=0&tstart=0, but I believe it relates to OSX10.6 (or earlier) given that Mission control seems to have replaced ...
0
votes
0answers
18 views

How do I fix this AppleScript error?

I have the following AppleScript: do shell script "/System/Library/CoreServices/Menu\\ Extras/user.menu/Contents/Resources/CGSession -suspend" Whenever I run it, I get the following error: ...
0
votes
0answers
10 views

AppleScript User Chrome to Click Page Button

I am trying to setup an AppleScript that will click a Login button on a webpage. Here is the HTML: <div id="tmpovj" style="margin-top: 50px; width: 600px; height: 400px; background: #FFF url(/...
0
votes
0answers
21 views

Send server links through Mail

I would like to send links to other Mac users (who are connected to the same server) so that they can click and open the link in the Finder. The afp or smb methods explained here Send file:// links ...
0
votes
0answers
9 views

Is there a way to combine two fullscreen windows into a split view window with Automator/AppleScript?

I'm currently making a workflow in which I need to combine two windows into a split view window (the feature from OS X El Capitan). I'd there any way to do that with AppleScript?
2
votes
1answer
22 views

Detect battery percentage applescript

How would I detect what my computer's battery percentage is using applescript? All answers to similar questions say to install additional software, but I would like to do this with purely applescript. ...
0
votes
0answers
12 views

Why is this AppleScript idle timer not triggering correctly?

I am trying to create a timer that increments at a certain time (in this case, whenever the time is xx:03:24) and sends a notification when it reaches a user-inputted value. Once it does so, it resets ...
0
votes
1answer
5k views

How to locate UI Button for AppleScript using Accessibility Inspector

There are several articles here that address this question, but none offer the help to connect-the-dots. The attached screen shot shot shows Accessibility Inspector for the button in question, which ...
0
votes
0answers
20 views

Setting target of Finder front window to a folder in El Capitan (10.11.5)

I'm trying to open a selected folder in the same Finder window (perserving navigation history) with Applescript. None of the answers I've found so far for opening a folder in the current from Finder ...
2
votes
2answers
114 views

How to ensure that windows opened from the Dock open in the current Space/Desktop

A Mail window was in the Dock, and I clicked on it to restore it to my current Desktop. Instead of opening where I can see it, it went to some other Desktop, presumably the one it was in when it was ...
0
votes
1answer
23 views

AppleScript to record webcam video

I am new to AppleScript and trying to write a script to record from webcam for say X seconds. The script below gives an error that I do not have permission to save this file to Desktop. How can I ...
0
votes
0answers
49 views

macOS Sierra: AppleScript mount volume keeps asking for login

For several OS X versions I've used: /usr/bin/osascript -e mount volume "smb://yourserver" as user name yourusername" with password “yourpassword” This has worked great, a nice and quiet mount of ...
-1
votes
1answer
38 views

Apple Script : Remove space / line in variable

I'm using applescript to collect a lost of number from a website, and my script is working fine, I just get a lot of space and a line between the result which I can't figure out how to get rid of. ...
0
votes
0answers
10 views

Is there a way to display an instance of BezelUI (brightness HUD, volume HUD) using BASH or AppleScript?

Long story short, I've written a simple BASH script to control the brightness of a non-Apple external monitor using ddcctl. It works, with a couple hacks. It would be really cool if I could display a ...
3
votes
2answers
1k views

Batch compress multiple folders into individual zip files

I have dozens of folders that I need to compress into individual zip files. If I select all of these folders in the Finder and do "Compress [X] Items," I get one zip file containing all of the ...
1
vote
0answers
20 views

Is there an app to replace in bulk an area of a PDF with a preset image?

I have several PDF documents that follow the same template. In all of them there is an address that needs to be replaced with another. I'm looking for a way to do that in bulk and automagically.
1
vote
2answers
44 views

How to get rid of Applescript confirmation?

I am an OS X novice. I have an Applescript set to run at boot and instead of running automatically, I have to trigger the script with a run confirmation: "Press Run to run this script, or Quit to ...
0
votes
0answers
16 views

Warning when starting script with osascript within script

scriptName.sh contains the following code. osascript <<EOD (display dialog "To: $name $number \n $sentence" ¬ with title "Message" ¬ buttons {"Send", "ReDo", "...
0
votes
1answer
26 views

How can I truncate filenames after X number of characters using Automator or AppleScript?

I have IFTTT sending several new desktop wallpapers per day from Reddit to Dropbox. These wallpapers arrive often with very long filenames. I need a way to automatically shorten their names (without ...
1
vote
1answer
24 views

Listing all opened documents across all open visible apps in AppleScript

I've come across doing something like: Code: tell application "Preview" set p to {} set p to documents end tell Output: {document "1st.pdf" of application "Preview", document "2nd.pdf" of ...
7
votes
3answers
8k views

How do I collect all of my notes and highlights from iBooks?

I've got a lot of highlighting and notes in iBooks that I've read, and would like to be able to collect them in one easy to use and manipulate format (e.g for writing papers and citing quotes). For ...
2
votes
1answer
1k views

How can I permanently force Xerox secure printing?

My clients are printing direct to a network printer (no print server). Xerox have confirmed that the Secure Print Only option is only available in Windows, so I am looking at editing .plists, ...
0
votes
2answers
1k views

How to select message in Mail with ID using AppleScript?

With the help of "Ask Different" I got my first AppleScript program working, and I'm trying to improve it. I'm again stymied though. I have found the message number ID of a particular message in my ...
0
votes
0answers
19 views

Dismiss notifications with keyboard shortcut

I've found this Keyboard shortcut to dismiss notifications and this article http://www.genuinecuriosity.com/genuinecuriosity/2016/6/5/clear-away-multiple-os-x-alerts-with-a-keystroke to close open ...
2
votes
1answer
2k views

Adding Bounce Message back to Mail in Yosemite

Does anyone have an updated version of this workflow for adding a Bounce Message feature to Apple Mail in OSX 10.10.3? Applescript: on run {input, parameters} tell application "Mail" ...
-1
votes
0answers
16 views

Apple script editor questions

What do i have to write if in order to make it hold shift? or any key in general/ Like i'd like my computer to make it so the key "Shift" or "1" is held for x seconds... Thanks.
0
votes
2answers
148 views

Need script to automatically export Skim PDFs with embedded notes

I have a folder with a few thousand PDF files, most of which have Skim annotations (e.g., highlights and notes). If I had fewer files, I'd just go through each one, export the PDF with embedded notes, ...
0
votes
1answer
2k views

copy calendar entries from one calendar to another via apple script throws error

i am trying to copy ical entries from one calendar to another using the following script: tell application "iCal" set localEvents to events of calendar "Privat" set remoteEvents to events of ...
0
votes
1answer
20 views

Script to automatically make a new bookmark folder in Skim for each PDF and store every bookmark created in it's respective folder?

Skim by default makes every new bookmark in the bookmark menu for all the pdf's, even if I create a bookmark folder for the pdf manually, there is no way of making it save the bookmark in this folder ...
1
vote
1answer
25 views

applescript help

I'm trying to make a math addition program, and I have a few questions. How do I make it so when it asks the question, it says it on the same dialog box? Such as: "What is the answer of x and y" ...
0
votes
1answer
19 views

Script or App that identifies corrupt music files?

I'm wondering if there is a Terminal command or AppleScript or any sort of app that can scan a collection of MP3s, WAVs, and FLACs, and determine if they are corrupt. iTunes skips songs once it hits a ...
2
votes
2answers
1k views

Applescript to kill open applications and log out user after 30 min. of inactivity

I'm looking for a way to automatically log off a user after 30 minutes of inactivity, as well as close all open applications. As of now, there is really only one user to deal with. I'd prefer an easy (...
0
votes
0answers
29 views

Sharing Keyboard shortcuts

I want to share my keyboard shortcuts for Keynote with my team at work. Is that scriptable? If so how would I go about it? I know there is Applescript available in OS X, but haven't found any good ...
0
votes
0answers
25 views

AppleScript : Safari : Open link in a new tab (Command+Click)

I need applescript to open a link listed on a page in a new tab here is the page HTML <form name="k_1_1_1_1_7_0_7_7_1" method="post" action="/WebObjects/WEBTOOLS.oa/o/GdghsdhHSRHdsh/10.56.14.55"&...
0
votes
0answers
19 views

Applescript dialog loses focus when I click another window, but doesn't get focus back when I click the dialog window

I have a short applescript I run on a schedule to pop up a dialog and ask me to log an entry. The script then submits the data to a shell/curl script. I must note that I barely know how to use ...
0
votes
1answer
18 views

error “The variable var is not defined.” number -2753 from “var” in a method

I'm trying to write a method that waits for an element on a webpage to appear before continuing, this code works when not placed in a method but I cannot appear to place it in one without getting the ...
1
vote
1answer
43 views

Minimize all but the active of the current application's windows

I switch to, for example, Safari and find the window I want. I can Command-Option-H to hide all the other applications, but I also want to minimize all the Safari windows except the one I'm using (the ...
5
votes
6answers
14k views

How can I write a script to open multiple terminal tabs and execute code in them?

I want to be able to open the terminal application and have it either automatically run a script that opens several tabs and run an arbitrary set of commands in each. For example I would like one tab ...
-1
votes
1answer
73 views

Batch copy time creation and modification date from files using OSX

First of all, I have asked the same question at stack overflow, but I am not sure if it's right over there. That's why I decided to post it here, too. t'm having a hard time trying to copy the ...
0
votes
0answers
22 views

Apple script not working with folders containing special letters (hebrew)

I am basically a Java developer, but had to run an apple script on my mac to batch convert doc/docx to PDF. I run the following apple script via Automator: property theList : {"doc", "docx"} on run ...
1
vote
0answers
28 views

AppleScript : write text on menu bar

I wonder if AppleScript can print a variable in the top menu bar in OSX 10.11 ?
-1
votes
0answers
7 views

how to make an apple script executable [duplicate]

I have a script with terminal commands. I want to convert into an executable file such that it runs on double click, is machine independent and runs on any MAC machine when transferred. chmod makes it ...
0
votes
0answers
15 views

Flag a message when sent in Apple Mail using AppleScript

I can use a Rule to Flag all incoming messages in Mail but not those I send. Is there a way of automatically flagging a message when it moves from Outbox to Sent? I am using El Capitan with all the ...
0
votes
0answers
29 views

How do I set the number of decimals in a Numbers cell using AppleScript?

I can set the format of a cell in a Numbers spreadsheet using: tell application "Numbers" activate tell document 1 tell active sheet set the selectedTable to ¬ ...
0
votes
2answers
435 views

Writing an e-Mail app in applescript

I'm using a webmail account(NOT Gmail: hate its interface), and I DON'T want to use the mac's Mail app(must maintain double contacts lists for one thing). I use Google Chrome and have set the ...