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

learn more… | top users | synonyms (3)

3
votes
1answer
58 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?
0
votes
0answers
32 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
23 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
2answers
60 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
43 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
81 views

Use AppleScript to send all emails in a folder at a certain time

I'd very much like to please develop an AppleScript to send all emails inside a specific mailbox whenever it is run. Then I can create a mailbox called "9AM", place emails inside there, and with a ...
2
votes
1answer
59 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
124 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
132 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
38 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 ...
0
votes
0answers
14 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
1answer
94 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
1answer
91 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
51 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 ...
1
vote
1answer
32 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 {id:"...
0
votes
1answer
74 views

Automator service not showing in services menu

I know next to nothing about the OS X, but I've been asked to make a few different scripts for actions in Apple Mail. One is to bind a hotkey that will create a reminder with a followup time of two ...
0
votes
0answers
19 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 ...
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 ...
3
votes
1answer
45 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 ...
2
votes
2answers
103 views

Wanted: Apple Script for copying file name and pasting it in Spotlight Comment box Mac OS X 10.8.5

Global Peace Mission Project looking for automating pre sorting movie file routines. Due to the instant impact inflow of third party YouTube contributions triggered by a blog launched March 22 after ...
0
votes
1answer
44 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
77 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 ...
1
vote
0answers
183 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
31 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 ...
1
vote
0answers
25 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 ...
1
vote
1answer
38 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 ...
0
votes
0answers
24 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
64 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 ...
1
vote
0answers
37 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 Player"...
3
votes
1answer
129 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
0answers
38 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
33 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 ...
0
votes
1answer
49 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 ...
1
vote
1answer
112 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 space....
0
votes
0answers
8 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
58 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 ...
1
vote
1answer
48 views

Hide a Fluid app toolbar using applescript

I've been trying to hide the toolbar from a Fluid app application using applescript, but it doesn't seems to be working at all. I've also tried on Safari (fluid apps are built on top of safari web ...
0
votes
2answers
69 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
0answers
18 views

How to generate pdf with MS WORD 2011 from Command line?

Is there a way to call MS Word 2011 from the command line to generate pdf from DOCX or PPTX?
1
vote
1answer
52 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
71 views

Remove All Illegal Characters from All Filenames in a Given Folder and subfolders

I Know this was was basically answered on the net and using automator with the shell script (Sanitize Filenames) works great, but I need it to also do all subfolders as well. And if possible trim the ...
2
votes
1answer
42 views

Problems creating OS X installer with AppleScript

I’m trying to create a bootable OS X Installer (Including Mavericks, Yosemite and El Capitan) on an external disk with AppleScript. But now I have some trouble. Here is the code: display dialog "...
0
votes
0answers
28 views

Make an applescript that ticks the reopen windows at login box automatically

I'm currently making a script that will logout the user while reopening the windows at login. The problem is a can't find a way to tick the checkbox or specifically, find what process the login ...
1
vote
0answers
40 views

trim Mac files to move to Windows

I have a large number of Mac files that I need to remove illegal characters that Windows will not like and to shorten the file names while preserving the extension. I have found a Bash script that ...
1
vote
1answer
30 views

osascript dialog box is blocking.

I'm using osascript to display dialog box from bash script, but it's blocking the script, until i press the 'ok' button. I wonder if there's a way to make this display window asynchronous. osascript ...
0
votes
1answer
48 views

How can get an applescript to add itself to the open at login menu automatically

In El Capitan how can I get an applescript to make itself open at login? Such as adding it to the login items automatically? I want to be able to send people the applescript and the first time they ...
1
vote
1answer
49 views

AppleScript: Display alert or restart when application terminates/crashes?

I rely on Dropbox for syncing work files between two computes that are powered on 24/7. For some reason, Dropbox terminates (crashes or quits) after long periods of time, with no explanation. I just ...