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
25 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
56 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
10 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
14 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
8 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
13 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
429 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 ...
2
votes
1answer
60 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 ...
5
votes
2answers
4k views

List of (activated) fonts with shell command in os x

Is here any shell command for getting the list of activated fonts? Mean something like: some_font_util -activated -format 'file: name' for getting a list of activated fonts in a form: /Library/...
1
vote
2answers
44 views

How to pass a file set as a variable from AppleScript to a Bash shell script

I've got a two part problem. I am trying to pass a variable from AppleScript to be used as a variable inside a bash shell script. I cannot figure out how to this work. I have read about ...
1
vote
1answer
24 views

Toggle Hidden Files without Relaunching Finder

I'm pretty new here, and I looked for an answer to this question, and found some answers but none seemed to work for me. I want to be able to run an applescript that toggles hidden files and ...
0
votes
0answers
12 views

Keep window on bottom

I'm trying to keep one window on the very bottom of my other windows. In attempt to do that I have the following: repeat until application "Firefox" is not running tell application "System Events"...
0
votes
0answers
16 views

apple-script to display a dialogue box with username and password

I am using this command which gives a dialogue box with input field for just password. osascript -e 'tell app "System Preferences" to activate' -e 'tell app "System Preferences" to activate' -e '...
2
votes
1answer
41 views

Sharing multiple files on iCloud by using System Events in Applescript: How to intercept an option?

I am trying to share a folder with many Numbers files with iCloud, by sharing each file with an AppleScript and saving the path of each shared file so that I can send it to my collaborators. To do ...
3
votes
7answers
10k views

Mail.app in Lion - is there a way to create tasks from email?

I'm not sure if I haven't seen that in earlier versions of Mail.app, but I would really love to have the ability to create a task in iCal from an email - and that this task could link to the original ...
0
votes
0answers
34 views

FFMPEG Unable to find a suitable output format for [partial path from input]

Up until a little bit ago I had an Automator app with applescript and embedded bash for video conversion with ffmpeg and it worked great. Now for some reason I keep getting the following error: [NULL ...
0
votes
2answers
57 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
0answers
12 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 ...
-4
votes
1answer
36 views

Write an AppleScript to combine multiple pdf pages in one pdf

I am designing a workflow in which multiple one page-long PDF files should be combined into a single PDF file using Folder Action Script. If you have any script for that please share.
1
vote
2answers
99 views

AppleScript set focus on terminal window

I have a AppleScript, which changes the position and the size of the application Terminal: Like here: tell application "Terminal" set position of front window to {1, 1} set size of front ...
1
vote
1answer
41 views

Applescript - Open password protected excel file

Is there a way for Applescript to open an Excel workbook (.xls) that is password protected? I see that in the library there are functions to check if a workbook has password, but I do not know the ...
0
votes
1answer
30 views

NSString doesn’t understand the “stringWithString_” message

I'm creating an AppleScript Script Library, and want to call some Cocoa methods on NSString. I created an .SCPTD file with this method: on xtrim(sourceText) set the sourceString to current ...
0
votes
0answers
26 views

Calling terminal command (pdfcrop) either directly from python or from within applescript (do shell script)

on OSX, I am using applescript to get a latex string from an application (OmniOutliner), process it via a python script that calls pdflatex and pdfcrop, and paste the final cropped pdf back into ...
0
votes
1answer
37 views

Problem “do shell script” on curl – Works in Terminal, but not via “do shell script”

I want to use "curl" with "do shell script" in an apple script. It already worked some months ago, but then the provider changed to https-only service. So I update curl on Mac OS Terminal: $ curl -V ...
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 ...
2
votes
2answers
829 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
1answer
19 views

Open Scripting Architecture Reference

Lots of documents, like this one, refer to the "Open Scripting Architecture Reference," which sounds useful to me. But I can't find it anywhere. Googling the title gets lots of non-authoritative links ...
3
votes
1answer
45 views

How to open a URL without launching a new safari tab?

I would like to write a script (AppleScript or shell script) to open a URL such as https://itunes.apple.com/ca/station/beats-1/idra.978194965 which then launches iTunes and play a radio station. ...
0
votes
1answer
31 views

Naming Folders using Clipboard

Is there a script that allows one to insert text from the clipboard into the name field of a new folder? I would like to name a new folder or change the name of a folder using the last text clip.
0
votes
1answer
62 views

FileMaker 6 and AppleScript: Deleting a Menu Item

I am trying to write an AppleScript to delete or at least disable certain menu items in FileMaker pro 6. My documentation indicates that it can be done, yet even the exact examples that they give, do ...
0
votes
0answers
27 views

AppleScripts move files with ‘System Events’ instead of ‘Finder'

When using Finder, script can take much longer. I also want this script to work on the background. How can I use System Events instead of Finder in this script? property source_folder_one : alias "OS ...
0
votes
0answers
8 views

Respond automatically to application dialogue pop up window

I am using the Sony Wireless Auto Import software on a a computer at my desk. It allows me to turn on my Sony camera and send my photos to the computer over my wireless network. It works fine but the ...
0
votes
1answer
12 views

How can I add a property to the window object in Chrome using Applescript?

In Chrome's JavaScript Console, I can type the following: window.myVar = "myValue"; I can then access myVar from the window context, where it returns "myValue". Excellent. However, if I do the ...
1
vote
0answers
172 views

AppleScript to automatically update IP-adress in Remote Desktop (ARD) on computers with DDNS

I've been searching for hours but couldn't find an answer yet hence my question here. I frequently use Apple Remote Desktop (ARD) and I have setup a DDNS for every computer. The only problem I have ...
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?
2
votes
4answers
3k views

Applescript - Unable to find resource when inside application

I have a regular Applescript application bundle that executes an applescript file when it's run. I'm trying to run a shell file that is located at "/Contents/Resources/Data/df.sh", however with the ...
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
0answers
18 views

Rogue Applescript

I am experimenting with automation, particularly the auto typing on other applications. I have followed this site's script and changed the delay between each entry to 0.5 – which is enough to type ...
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, ...
1
vote
2answers
35 views

Where's my Applescript application?

In the Applications folder (El Capitan iMac) there is no Applescript editor. I've also checked the Utilities folder, but didn't find it. I don't think I would have mistakenly trashed it. Should I ...
2
votes
0answers
44 views

Close Dock and top bar

Is there a way to keep the application Dock closed. Every time I do: killall dock It closes for a bit then automatically reopens. I want to be able to make an AppleScript program that keeps it ...
2
votes
2answers
40 views

How to enable/disable grayscale mode in Accessibility via Terminal/App?

I'm wondering what would be the process of enabling/disabling the grayscale mode in the Accessibility panel in System Preferences? I would like to run a simple script, either by clicking on an app in ...
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 ...
4
votes
2answers
139 views

How can I run a shell script that prompts for user input from within Applescript

I have two pieces of code. One is Applescript and the other a Bash shell script. The shell script needs to run concurrently with the applescript, return some values and then exit. The problem is the ...
1
vote
0answers
27 views

'Add notes' to a Calendar event using Automator

I would like to build a 'Service' for selected text which: Get the currently selected text Creates an Calendar event adds the selected text as a 'note' for that Calendar event I prefer Automator ...
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
vote
2answers
2k views

A turning gear appears when I run this workflow, why?

I am running the following script (called Restart AppleTV) using automator : on run {input, parameters} do shell script "sudo killall coreaudiod" with administrator privileges return input end ...
1
vote
1answer
1k views

How to automatically connect VPN when connecting to a network?

In my university, the only way to access Internet is to connect to a VPN server. I've configured the VPN on my Mac and it's working fine, but I need to manually connect to the VPN every time I connect ...