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
0answers
33 views

The process of making custom notifications, iOS GarageBand, iTunes database, iTunes file format, AppleScript

I'm developing an iOS and Android app which uses custom notification sounds to provide users with step-by-step instructions. I've recently stepped through a pretty messy process of creating these ...
0
votes
2answers
34 views

AppleScript returns error on defining date

my following code returns an error tell current application set b to "Tuesday 12 April 2016 at 18:06:10" date b end tell If I would write the string, defined in b, directly before date, it ...
3
votes
1answer
47 views

Create a new space using a keyboard shortcut

I am aware you can do it from Mission Control by clicking and there is no shortcut available in 'Keyboard'. Are there any ways to do this by using a 3rd party program or Applescript?
1
vote
2answers
48 views

How can I format a time to HHMM with AppleScript?

Is it possible to get the hour and minute in 24 hour HHMM format so that 1:01 would be 0101 I figured out a way to do it for the month and year but can't find a way for the hour and minute. Here is ...
0
votes
0answers
24 views

How to send sms/iMessage when calendar event occurs with applescript? OS X El Capitan

Is there any way to send sms or iMessage (or e-mail) to a contact from a contact book, when a certain calendar event occurs? e.g. There is Bob in address book with phone number and e-mail. And there ...
0
votes
0answers
22 views

Applescript triggered by mail rule does not refernce the new message

In Apple Mail I use a mail rule to trigger an Applescript for one specific sender. This script for the moment just logs the subject of the mail message. The script looks like this: using terms from ...
0
votes
2answers
27 views

Is there way to custom program an F key?

I have an email address that is about 21 characters. Is there way to program, say F15, to paste in the address? This would be while in any app.
1
vote
0answers
35 views

Making a FaceTime Audio call using AppleScript

I have read through Make a FaceTime call using AppleScript, but the provided solution is for starting a video call. I am wondering if that solution can be adapted to make a FaceTime Audio call (and by ...
0
votes
1answer
2k views

Trying to use applescript to launch cmd line 3 scripts in new tabs

I'm trying to launch 3 tabs and run a script in each with applescript. So far I havent been able to get this done. Currently I have: tell application "Terminal" activate do script "ping ...
0
votes
0answers
37 views

Run Automator script when new files are added

I'm trying to make an automator script to import photos in Photos.app that are in my DropBox folder. Nothing spectacular you'd say - true. But I can't get it to work. On a change in the folder, the ...
0
votes
1answer
114 views

What can you tell applications to do using AppleScript?

I know that you can use the tell application "" command in AppleScript to do many simple things like open a website in Google Chrome, play and iTunes song, or do keystrokes with System Events. Are ...
0
votes
1answer
39 views

Automator or AppleScript to Remove Multiple Strings from File Names?

I deal with a lot of files (mostly images and video) with quite a few different words and phrases that I want to remove from the filenames. I keep finding Automator tutorials or AppleScripts to ...
0
votes
2answers
62 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.
17
votes
3answers
7k views

How do I make an AppleScript file into a Mac App?

I have an Applescript that simply opens a Dialog Box, asks for a user input and runs a Terminal Command and spits out the answer. It works great in AppleScript Editor yet I am trying to work out how I ...
-1
votes
1answer
3k views

How to add a script that types in the password for my vps through applescript

I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code tell application ...
0
votes
1answer
104 views

How to automate renaming a file based on its parent folder?

I have done a lot of research and cannot find a simple solution for renaming a file by its parent folder. Basically I am zipping a bunch of files from an online file manager and I receive them in a ...
0
votes
0answers
33 views

AppleScript Remove Safari Cache but keep cookie and history

I want to get rid of Safari cache and website data but keep cookies and history. The script will be added to my computer startup script for optimizing the system performance. I was considering this ...
1
vote
1answer
86 views

Applescript/Automator task to change default downloads folder

I need to create an automation to make a new folder named by my selected text and then make that folder the new default Safari downloads folder. This would be the default folder when I click on a ...
0
votes
0answers
13 views

How can I factor out a long 'every radio button in every…' query in AppleScript?

I'm trying to press the 'Log in as yourself' radio button on the Screen Sharing app. I can achieve that with this: to clickAsYourself() tell application "System Events" to tell application process ...
1
vote
0answers
29 views

Why would a codesigned app suddenly start triggering “… not allowed assistive access.” error?

Environment: OS X 10.10.5 Background: I have an applescript I've been using for past year or so. I use it for copying a password from my password manager (1Password, in my case), and it then pastes ...
0
votes
1answer
75 views

Calling Python 3 script from AppleScript

I have a Python 3 script that I'd like to add as a Service using Automator. The idea is that I can right click on a text file, and an option will display to run my script on said file. The shebang ...
0
votes
1answer
38 views

change url of a tab using apple script

I am trying to set the url of Chrome tab using Apple Script. I am using this code. It successfully sets url string, but in order to change url, enter needs to be pressed. This last step makes my code ...
2
votes
0answers
12 views

Get current time with/in milliseconds from OS X command line [duplicate]

I'm trying to get the current time from OS X command line to work with in AppleScript to output the elapsed time. Currently I'm using this script: set timea to do shell script "date +%s" ##something ...
0
votes
1answer
21 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 ...
1
vote
1answer
30 views

Trying to wake my Mac using Apple / Power Manager Script triggered by Folder Actions

I've been trying to tweak the following script to achieve this. (original script) tell application "Power Manager Scripting" tell workshop set myEvent to make new event with properties ...
3
votes
2answers
2k views

Double click in AppleScript

How do you write the command to carry out a double click with a mouse at a specific location in AppleScript?
0
votes
0answers
18 views

Applescript: Choosing Sound Output

I want an applescript which allows me to choose sound output. Using this link, I created the following applescript. set theSource to (choose from list {"A", "B"} with title "Sound Picker" default ...
5
votes
1answer
193 views

How to register AppleScript as default web browser in Yosemite?

This is essentially the same question as How to register an AppleScript as a potential default web browser?, but the solution there doesn't seem to work on Yosemite (LSIsAppleDefaultForScheme no ...
2
votes
2answers
12k views

AppleScript/Automate Mail Tasks

I've been trying to help a coworker automate a weekly email compilation he sends out but haven't yet been able to figure out how address a few specific areas...first I'll explain the situation, then ...
3
votes
1answer
42 views

Need my automator script to display the regular shutdown prompt before shutting down

I'm using the script below to trigger a shutdown but I would like it to give me the normal warning menu with the 60 sec. countdown, I can't figure out the warning menu. tell application "finder" to ...
3
votes
2answers
805 views

Changing trackpad scroll direction with AppleScript in Yosemite

I prefer "natural" scroll direction when using my MBAir trackpad, but "unnatural" when using the mouse. I frequently switch back and forth depending on where I'm working, so I've been using a bit of ...
0
votes
3answers
181 views

How to use Applescript to find duplicate files and .mp3 files in my iTunes “Music” folder and subfolders?

I recently moved my iTunes music library onto a new computer set-up by copying the "iTunes Media" folder onto an external HD and then onto my local disk. When I opened iTunes for the first time, it ...
3
votes
1answer
119 views

Problems reconnecting to WiFi if connection is lost

In the area where I live there are frequent power outages for a few seconds. I am connected via a router, which (of course) restarts each time. Unfortunately my Mac (2011 MB Pro) does not ...
0
votes
2answers
58 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 ...
2
votes
2answers
971 views

How to make Rsync copy alias files?

System specs: 2011 iMac, OS X Mountain Lion 10.8.4 I have come to understand that Rsync does not handle Mac Alises properly, and have now discovered that hundreds of aliases I've previously copied ...
1
vote
0answers
127 views

Curl terminal command syntax from Applescript

I want to execute a curl command in Applescript that does the following (per this SE question/answer): http://superuser.com/a/1054803/471181 ...Do an HTTP POST of the contents (as a string) of a ...
1
vote
0answers
22 views

Change Notification Style from Banner to Alert via AppleScript

does anybody know an easy way to make an apple script that changes the notification style for a specific app from "banners" to "alerts"? I've been trying for hours but I'm finding it hard to use the ...
0
votes
0answers
22 views

applescript - extract filename from posix path

set p to "/Users/myAccount/Desktop/testfilename.txt" set a to POSIX file p I would like to extract "testfilename.txt" from the posix path above? Anyone know how to go about to do that?
0
votes
0answers
17 views

Apple Script for Mail Rule

Q regarding Apple Mail Version 9.2 (3112): Can Apple Script be written to open message(s) upon receipt in the “VIP” mailbox? I already have a rule that sends messages with a certain sender to the VIP ...
1
vote
1answer
104 views

Open the same terminal without switching spaces

I'm looking for an AppleScript (or anything, really) that will do the following: If a Terminal window is open in the current space, bring it to the front. If not, open a new one in the current ...
0
votes
0answers
23 views

Applescript. Create new, separate variables in a repeat loop

So I've made a script and at one point in it, it does this. set x to 0 repeat numberOfFiles times set x to x + 1 set {Frame, x} to {destination,x} as text end repeat What I ...
1
vote
1answer
37 views

Applescript code to find path to Desktop picture in Desktop 2

I need an applescript that will find the path to the desktop picture used in Desktop 2. As this isn't the current desktop the code below doesn't work. tell application "Finder" set DesktopPath to ...
0
votes
0answers
37 views

Applescript, CSV, Text to Speech

I've now a script which reads a comma separated CSV-file with two columns, one for language 1 words and another for language 2 words. The script makes from each word an aiff-audiofile which is spoken ...
1
vote
1answer
31 views

How to get an applescript to play a song file

Okay so I want an applescript app that plays a song. The song isn't already on the computer and it's contained inside contents/resources of the app's package contents. This is my current code tell ...
1
vote
0answers
28 views

How to get the fps of a video from QuickTime Player's inspector using applescript

I need a quick and easy way to find the frame rate of a video in applescript. So far grabbing it through QuickTime Player's inspector seems like the easiest option. tell application "QuickTime ...
0
votes
1answer
39 views

Getting the First Cell NOT Containing Certain Text in Numbers

I have a table in Numbers, and I'm trying to get the value of the first cell that contains the character …. In order to do so, I wanted to use MATCH(), but had no luck after I realized it could only ...
4
votes
5answers
2k views

Show text using Large Type without relying on third-party applications

Apple has this amazing feature called 'Large Type', chiefly implemented into Address Book. When you look up a contact, you can right-click the phone number and click 'Large Type', and it will display ...
1
vote
1answer
44 views

How do I script the forced logging out another desktop user from OS X?

We're running tests that require multiple desktops on a Mac Mini. We're successfully using an ssh TCP tunnel to localhost, 5900 to 6900, to make Screen Sharing let us log into other users on this ...
0
votes
0answers
7 views

Calendar id which doesn't change

I am trying to write some scripts for calendar on Mac. I learned that the uid changes as the calendar event is moved from one day to another. Is there way to recognize the same event uniquely even ...
2
votes
2answers
54 views

Can Someone Explain Why These Scripts Work?

I'm a brand new AppleScript initiate. I was at a Developer Summit and needed to stop messing with my windows so much. So I looked up scripting the window sizing and positioning. I was on my MacBook ...