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

learn more… | top users | synonyms (3)

0
votes
2answers
2k views

Automator & AppleScript: How do I import the texts of Notes and Reminders as PDFs and RTFs?

I would like to export and save the Notes and Reminders documents or texts as PDFs and RTFs, keeping or preserving the formatting and the background of Notes or Reminders, but the Notes doesn't have ...
0
votes
2answers
3k views

Applescript to add sender of message to specific group in Contacts

I'm trying to set up an Applescript to add the sender of a selected message in Apple Mail to a specific group in the Contacts app. By reconfiguring the code provided in this answer, I worked up the ...
0
votes
1answer
7k views

Automatically Save Attachments in Mail.app in 10.8 Mountain Lion

I am trying to automatically save all email sent to one address (let's call it test@example.com) to this folder /Users/luomat/Dropbox/Incoming/e2w/ (where /Users/luomat = $HOME). Here is the rule ...
0
votes
2answers
457 views

How do I copy the location of a track to the “Comments” section in iTunes?

I dont understand why this is not working. If anybody knows how to resolve this issue: tell application "iTunes" copy location of track 1 of playlist "Test" to Comments end tell Applescript ...
0
votes
2answers
705 views

Display a notification with AppleScript

I would like to trigger a notification with AppleScript. I have seen How can I trigger a Notification Center notification from an AppleScript or shell script? but I would like to have a native ...
0
votes
1answer
197 views

Applescript to monitor terminal changes

I want to be able to check if a word appears in a terminal window running a java application and then display a notification. Any ideas?
0
votes
2answers
3k views

Setting a automator action to run everyday

I have an automator action that downloads file from our server. Easy enough to setup but can't quite sort out how to set it so it will operate automatically at a certain time everyday. Tried hooking ...
0
votes
2answers
2k views

How do I display a hyperlink with an AppleScript?

I am trying to get a URL via AppleScript, then displaying it as a clickable link via a window. How do I do this? (if I need to use Xcode for this, please add the answer, but provide detailed ...
0
votes
2answers
507 views

Auto vpn connection dependent on Wifiname

I recently asked a question Auto connect vpn upon login/boot which got answered well using apple script . I want to extend this question to the following problem: The vpn connection should be ...
0
votes
1answer
52 views

Run AppleScript Applet at boot

I am a complete amateur at this. How would I get this AppleScript to work on my Macbook Pro on boot? What steps do I need to take? What does the script do?
0
votes
2answers
56 views

Applescript with get every file loop fails

I want to run a script on all files with two specific extensions on a disk with a hierarchy of multiple nested folders. My script works fine when I choose a folder further down the line with fewer ...
0
votes
1answer
57 views

AppleScript URL from open safari window

I have a Safari window displaying a webpage. I want to be able to retrieve the open URL into AppleScript. However when I do this: if URL of window 1 is "www.google.com" then --do something end if ...
0
votes
1answer
32 views

OS X Automator: Using custom command in AppleScript's “do shell script”

I have recently asked a question about automatically inserting a value produced by a custom executable into a prompt field. Please look over this post to know exactly what I am talking about. The ...
0
votes
1answer
28 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
0
votes
1answer
68 views

Extract text between two unicode symbols using AppleScript or bash?

My goal is to take text from a standard .txt document, and use (preferably) Terminal or Applescript to extract text between the symbols ▶ and •. While there is only one ▶ symbol there are multiple ...
0
votes
1answer
64 views

Improve applescript to open New Private Window with Safari

I made this AppleScript to use with the script tool. It can be saved as the application to launch from a click. I have to approve the application though in the Security edit tool. This open the ...
0
votes
1answer
24 views

AppleScript without showing what program it opened and edited

I wrote an AppleScript that goes into System Preferences and clicks on some of the buttons. I does that by literally opening System Preferences and clicking UI Elements. I'm wondering, is it possible ...
0
votes
1answer
33 views

get radio buttons in System Preferences

I am trying to click at radio buttons in Displays panel of System Prefernces. This is the code I use to identify radio buttons: tell application "System Preferences" activate reveal anchor "...
0
votes
1answer
43 views

change screen resolution with AppleScript

How can I change change screen resolution using AppleScript? If AppleScript can't do it, what about Terminal? I tried with examples at How to set screen resolution with a keyboard shortcut on Retina ...
0
votes
1answer
67 views

unlock external locked encrypted disk with applescript command by filling dialog box to cracking password by force brut

I make a terrible mistake. I totally lost my paper with the secret password for my encrypted external GUID hard drive. This external drive contains many pictures but also some works documents very ...
0
votes
1answer
53 views

make “fit to screen” default window size in Quicktime

How can I make Quicktime to always open in Fit to Screen option (available at View->Fit to Screen)? It doesn't seem to remember the last window size. Is it possible to attach a script to a program, ...
0
votes
1answer
32 views

Move Application from Dock to Menu Bar

I have written an AppleScript application and when running, it appears in the Dock, however I would like it to have it in the menu bar, at the top of the screen, instead. How can I achieve this? Is ...
0
votes
1answer
34 views

update git repository with apple script

I want to update my git Bitbucket online storage with apple script. This is the code that works in Terminal, but not when i run apple script. cd /Users/mainuser/Desktop/Projects git add -A git commit ...
0
votes
1answer
25 views

How to cd into my local git repo from an AppleScript?

I am running a Mac using OSX Yosemite v10.10.5. I want to push my local git repo to my remote using AppleScript. So the git code would be: shell git init git add README.md git commit -m "first ...
0
votes
1answer
22 views

Zip email with con AppleScript

I need to zip all email that have in the body this words "Identificativo messaggio: CA3DA789.008822A5.C33F80AE". I have many email in AppleMail so i think if it's possible to create an AppleScript ...
0
votes
2answers
74 views

How to write a script that runs whenever a new file is added to a specific directory?

I've never written a script for OS X, and I don't really know which scripting tool i'll use for this task. Here's a pseudo code for the script I want to build : whenever a new file X is added to ...
0
votes
2answers
68 views

How to send an email to myself with Applescript or Terminal automatically when my Mac reboots?

I wonder if there is a way to send an email to myself with Command Line or AppleScript service automatically when my Mac reboots? Thanks for your suggestions.
0
votes
1answer
32 views

Applescript: automated key press of spacebar/left click at defined intervals

I'm new to apple scripts and was wondering if there is a way the program the computer to press spacebar or left-click at defined times upon running of the script. For instance I will be able to same ...
0
votes
1answer
57 views

Switch spaces with apple script

My goal is to switch spaces from within an apple script. My shortcut to switch to the 4th space is ctrl+4, but when I tried this in an apple script nothing happens: tell application "System Events" ...
0
votes
1answer
95 views

Terminal Command into Applescript

I have the following terminal command that I want to automate using applescript. I also would like to have a command to cd directories to the folder where I want to apply the command first. After cd ...
0
votes
1answer
32 views

App made in Applescript Icon wont change

The app's Icon wont change for me I tried copying in contents as "applet.icns" I tried Copy + Paste in get info nothing will work I found a article on the internet about this problem they say that you ...
0
votes
1answer
82 views

Help converting Apple Script to Shell Script

This Apple Script works great to mount the logged in Active Directory users network homedrive as a mounted network drive but we currently have it running as an App at login via "Login Items". ...
0
votes
1answer
214 views

How to get the window id with title of every process?

I'm using the following simple script: tell application "System Events" to get the title of every window of every process Which works by printing titles of every window. tell application "System ...
0
votes
1answer
105 views

Convert image type and save to relative folder with automator

I found a question and working answer here How to create an Automator service to convert images from one file type into another file type using the right-click contextual menu? but it is saving the ...
0
votes
1answer
45 views

Need an Applescript to handle specific incoming mail.

Here's what I'd like the Applescript to do: upon receiving an email (I'm using Apple Mail) from a specific address, I'd like, firstly, that email to be deleted (not just moved to trash), and secondly, ...
0
votes
1answer
191 views

Applescript to change subject line

I have been looking up for the last two days and found a few applescripts that claimed to change the subject lines. But none of them seem to be able to change/set the subject line. What do you guys ...
0
votes
1answer
28 views

Move Certificates from Server to Remote Computer (MACS)

So I am trying to push a certificate from a location (server) onto a remote mac computer so that then I can run a script that installs the certificates onto keychain and installs the application. Do ...
0
votes
1answer
179 views

type of emails from Contacts.app in AppleScript (on El Capitan)

I want to work with a list of all email addresses that appear in my address book. I thought I could simply set such a list with AppleScript, and use the elements, maybe after casting the references to ...
0
votes
1answer
145 views

Smart Playlist in Itunes based on file location

I'd like to create a smart playlist in iTunes based on a specific folder (I manage my media library manually). Is that somehow still possible in ITunes 12 (even if it involves scripting)?
0
votes
2answers
286 views

Use Applescript/Automator to select a window highlighted in the Finder

I have an applescript which extracts the name, associated process and and other information about a target window. As of now, the script selects the target window via a "choose from list" dialog that ...
0
votes
2answers
945 views

Applescript “expected then but found identifier”

At present, I have a very simple bash script which calls osascript -e a bunch of times; it looks like this (newlines added for readability): #!/bin/sh osascript \ -e 'tell application "Terminal" to ...
0
votes
1answer
187 views

Need assistance with AppleScriptObjC conversion from AppleScript

I need to preface this with the statement that I am not a programmer, so I need to be talked down to. I have done what I described below using guides and lots of trial and error I have a functioning ...
0
votes
1answer
171 views

How to make automator run an applescript that turns of mac?

I want to make an applescript that taps the apple in the corner, taps shut down, and then taps shut down. I can't record it, since it actually involves shutting down the computer, making the script ...
0
votes
1answer
69 views

Applescript variable not being passed

I have a basic applescript to request a user's input, then pass the variable into a path for mounting a volume: display dialog "What is the first letter of your last name?" default answer "" set ...
0
votes
1answer
179 views

Prevent VPN Disconnection message OSX

When my computer wakes from sleep, it tries to reconnect to my VPN network before the Wifi connection is fully established. The result is that nearly every time I get this message, "You were ...
0
votes
1answer
47 views

Need help with applescript and wolfram alpha interface

Okay so here's my code... My question is, can I determine what type of data it is before grabbing the text, because if I search something like "how many tablespoons in an ounce, it just gives me a ...
0
votes
1answer
152 views

Applescript or Automator service that automatically trusts certificates

I would like to know, if there is a way to make an Automator service or an Applescript that automatically trusts a root certificate. If possible without a prompt for password or Admin privileges. ...
0
votes
1answer
153 views

Applescript for multiple find/replace using separate masterlist

I am trying to create a script to extract a list of data from column A on document 1, and then use columns A & B on document 2 as multiple find/replace data. Everything works in so far as ...
0
votes
1answer
252 views

How can I use Applescript or any other utility to send a daily text message to my bank?

I have searched and I find a lot of results for specific methods of sending an iMessage with Applescript, but they all seem to contain extraneous code for specific needs that I don't need. I'm ...
0
votes
2answers
147 views

How to check if invisible items are visible?

How do I check in AppleScript, if invisible objects are visible? If visible, do: defaults write com.apple.finder AppleShowAllFiles 0 in invisible, do: defaults write com.apple.finder AppleShowAllFiles ...