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

learn more… | top users | synonyms (2)

0
votes
0answers
109 views

Get iTerm session by tty name

I want to run a command within an iTerm2 session like this: tell application "iTerm" tell session id "/dev/ttys020" exec command "ls" end end But I get the following error (with and without ...
0
votes
0answers
67 views

automator script to import last image in iphone to the mac's desktop and delete it from the iphone

I need a way to easily perform the following: import the last image saved on the camera roll on the iphone (it will always be the same iphone, can be hardcoded on the script) into the desktop ...
0
votes
0answers
40 views

How can I share subroutines between different applescript services

I use applescript to make a bunch of services for advanced hotkeys, like activate Finder, open Go to Folder…, and paste clipboard. There are plenty of usable subroutines available for applescript, ...
0
votes
0answers
37 views

Numbers 3.1: Maintain Link to CSV

Is there a mechanism to maintain a link between a CSV that may change and a Numbers file? I would like to maintain a Numbers file that uses table data from a CSV whose contents will be updated every ...
0
votes
1answer
239 views

How to get a list of application windows only from the current desktop with applescript?

Need to do something like the next tell application "Safari" activate set AllWindows to every window set WinCount to number of items in AllWindows repeat with i from 1 to WinCount ...
0
votes
2answers
51 views

Automate Receipt Filing from Emil

I currently have a workflow setup that when I get a paper receipt I highlight the company name and price in green then scan with my ScanSnap which it then OCR's. Then using Hazel I automate the ...
0
votes
0answers
29 views

How to schedule Skype launch with AppleScript only on weekdays?

I need to launch Skype only on work days using AppleScript. How could I do this?
0
votes
0answers
29 views

Error when duplicating to shared drive using AppleScript

I'm trying to get duplicate home folders (desktop, movies, music, home, etc..) to a shared server. I was finally able to get the drive mounted using a concatenation of string and variables. But now ...
0
votes
0answers
39 views

How to get Mail.app raw message in the Automator ? (version 2)

I tried this script and it work great. Thanks But my problem is that the text I receive has = character at the end of each line, resulting in some url to be truncated/separated by this = sign. Is ...
0
votes
1answer
38 views

AppleScript or Automator workflow to clean orphaned files on Kindle

I'm wondering if there's a way to clean orphaned files from a Kindle using AppleScript or Automator. It would basically look for any .sdr folder that doesn't have a matching .mobi or .azw and then ...
0
votes
0answers
227 views

AppleScript shows “Document could not be opened. You don’t have permission.” but file can be opened?

I am getting a "The document [filename] could not be opened. You don't have permission" when attempting to access several files in an AppleScript. However, I can open these files manually without ...
0
votes
0answers
31 views

What scripting framework could work with google translate for a non-programmer?

So I want to create a small workflow that I can integrate into my OS that does this: Translate selected sentence with google translate (fixed languages) and make it automatically get pasted where I ...
0
votes
1answer
114 views

Simulate shift-tab with Automator/AppleScript?

OSX 10.9.1, Late 2013 MBPr I am trying to make a Automator workflow to connect to another machine on my network. How can I do this with Automator? I have it all set up up to the point where I have to ...
0
votes
0answers
246 views

Applescript Display notification with Trigger

I have an applescript written to display a notification in the notification centre when I get a new email in outlook for mac. i.e. display notification mycontent with title mysubject subtitle ...
0
votes
0answers
14 views

How do I Install the xcode command line tools without the confirmation and license prompt? [duplicate]

I ended up answering this myself but I figured I'd throw it up here to document it. xcode-select --install asks if you are sure you want to install the script, then it prompts you to accept a license ...
0
votes
1answer
115 views

Automator rename finder item date and time

I want to use automator to create a project folder with a Automator service, but i like to add the month and year (with two decimals) not the day, month and whole year. want i can creatie is ...
0
votes
0answers
89 views

Export reminders from osx Reminders app programmatically

I need to get reminders list in any form (could parse it later) from Reminders app in osx (10.9.1) I know that i could do it from menu, but i need it programmatically. Perfectly it would be some ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
0
votes
1answer
56 views

Using quotes in SublimeText build system command

I'd like to execute a simple AppleScript command as part of a Sublime Text build system. I created a sublime-build file where the command is "cmd": ["osascript", "-e", """tell application "Preview" ...
0
votes
1answer
83 views

Automator application needs to ignore all files that aren't EPS

I've made an application that I drop EPS files on and it makes two copies and renames them and transfers them to SMB shares. But sometimes when I have more than one file selected in other windows, ...
0
votes
0answers
57 views

Change all birthday events to occur yearly in iCal?

I want to make all birthday events in my iCal repeat yearly(some of them were not added with "repeat yearly" set). I am doing them on a event by event basis but that is too painful. Is there a way to ...
0
votes
1answer
111 views

Error with AppleScript - Integer?

I have been making a simple script for my sister, but it does not work. It calls for an integer? I did not specify it in my program, but it calls it anyway...? My Script: activate display dialog ...
0
votes
0answers
121 views

move a file, replacing existing (if any), ideally by putting existing in the trash

I am trying to find a way to automatically (without user intervention) move a file from A to B, replacing B if it exists, ideally by putting the existing copy of B into the appropriate Trash folder. ...
0
votes
1answer
173 views

Apple Script Calendar permissions with a locked screen

at my work machine I've written an AppleScript that writes an reminder email for our group meeting. It is triggered by an event in Calender through Open Application at time of event and then ...
0
votes
1answer
254 views

How do I correctly use applescript 2.3 script library “use” rather than “tell”

When I use my library this way applescript will not parse the display dialog line, treating dialog as an identifier! Can anyone explain why this is not being understood in the way I want it to be? ...
0
votes
0answers
72 views

Change Text to speech voice automatically in one document

I am trying to use Automator and Text to Speech to do the following: Imagine that I have a text document (pages), this document has the 1st line in spanish, 2nd line in English, 3rd in Spanish, 4th in ...
0
votes
0answers
63 views

Making an Auto-Transfer app or script for Android

This question may be super broad so bear with me. In a nutshell I want to be able to connect an Android device to my Mac and then have a script go through, find the DCIM folder and then copy that ...
0
votes
0answers
297 views

How to export a movie from Keynote via AppleScript at greater than 540p?

I want to create a tool that will automatically convert Keynote presentations to movie files. I have discovered that the current version of Keynote has an export command in its AppleScript dictionary: ...
0
votes
0answers
96 views

Script that outputs number of emails in Mail.app inbox (again)

(I would request a clarification to the nice answer at Script that outputs number of emails in Mail.app inbox if I had the privileges to do so, but I'm new here) I am finding that on Mavericks (OS ...
0
votes
0answers
95 views

How to run an AppleScript whenever a VNC connection is established?

I want to run a script whenever any user connects remotely to my Mac. I've Googled a bit about it but no perfect tutorial is there. I am less comfortable working with OS X.
0
votes
0answers
53 views

Change destination mailbox of Command+Control+A in Mail

In my Mail.app, I have only one account set up, which is an Exchange account. When I click on a message on my Inbox (which is a server folder), and press Command+Control+A to archive it, Mail.app ...
0
votes
0answers
48 views

Script to change mail heading

I often need to change the heading of a received mail item, so that I can find it again in a Mail folder. Easy on Outlook, not in Mail. I found a tip as to how to do it (possibly on this forum): ...
0
votes
0answers
149 views

Applescript to enable internet sharing, but select where to share the connection from

I have the following applescript code that turns on internet sharing. What I want to be able to do is also have the applescript choose which connection I am sharing from the dropdown menu list. 1 ...
0
votes
0answers
40 views

Applescript to change main monitor

Is it possible to record some actions for figuring out the right applescript? I'm looking for applescript to toggle my computer from screencast settings to regular: Regular: 1. Display Time. 2. Main ...
0
votes
1answer
524 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
1answer
108 views

How can I keep System Events from deactivating?

I'm using more and more Applescripts for home automation that rely on System Events being active. The problem is that System Events shuts down if it hasn't been used for a while. I'm not sure how ...
0
votes
1answer
2k views

Get Current Path to Script within AppleScript and Append Subdirectory

I have an AppleScript that I would like to be able to use from anywhere in the file system. Currently, it has some paths which are hardcoded, so it runs only from the Downloads folder. How should I ...
0
votes
2answers
79 views

How do I save a screenshot with the ISO 8601 date format with Applescript?

I am building a script that saves many consecutive screenshots. I would like to save the files in the ISO 8601 date format.
0
votes
0answers
32 views

Is there a way to recognise active applications that are not being used so a script could shut them down?

Is there a way to recognise active applications that are not being used so a script could shut the down? I'd like to recognise an application that is running but has not accepted keystrokes recently ...
0
votes
1answer
494 views

Start screensaver/ lock screen on screen sharing disconnect

Is there a way with an AppleScript or shell script to start the screensaver when you disconnect from a screen sharing session? For example, I connect via screen sharing from Mac A to Mac B. When I ...
0
votes
2answers
460 views

Restart OS X if an application has crashed/is not responding/beachballed?

How can I automatically restart the machine if an application has crashed in any way? It might have cleanly exited, have a quit unexpectedly error, or be frozen with the spinning beachball. I don't ...
0
votes
1answer
319 views

Access OS X Mail message by its ID

I am trying (unsuccessfully) to get a Mail message (located in the 'Drafts' folder) by its message id. The following code: set theContent to getContent(123456) on getContent(theID) tell ...
0
votes
1answer
85 views

Enumerating messages in Outlook's Drafts folder generates an error

I would like to enumerate the messages in Outlook's 'Drafts' folder. When I run this script: tell application "Microsoft Outlook" set theMessages to every message in the drafts --returns 1 ...
0
votes
1answer
152 views

Applescript Replace sub-procedure doesn't work with '@'

I'm trying to substitute an email address for a symbolic character in a block of text. The text block: Dear %%FirstName%%- ... This message was sent to %%EmailAddress%%. The script: ... set ...
0
votes
1answer
491 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 ...
0
votes
1answer
101 views

Open contact group on Mac

I just want to use AppleScript to open an existing group in Mac Address Book (v7.1). tell application "Contacts" set selected of group "friend" to true activate end tell above is the sample ...
0
votes
1answer
173 views

How to ask for a mail folder in applescript?

I apologise in advance since this will be a long question. I hope that somebody with applescript knowledge can help me. I am transferring whole of my Windows machines to Apple and I am stuck with one ...
0
votes
2answers
637 views

Script or workflow to modify find and replace text in clipboard

I need give unique names to many, many files as part of my job. I download dozens of PDFs from a research database which all come with the same name (date of download). I have to open the file, select ...
0
votes
1answer
236 views

Applescript to delete iMessages from Messages app

I have an Applescript that sends myself and colleagues iMessages when certain events happen. Some times hundreds of iMessages are sent in a short space of time to lots of people and the Messages app ...
0
votes
1answer
283 views

Expand Sending Email with Applescript

I read with interest the article regarding sending an email based upon parsing through a csv file to pick up the name and email address. This looks like most of what I need to accomplish my objective ...