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

Is there a way to see the automator script in text?

If i create some type of workflow on Automator, can I see the script in plain text? For example, maybe get the script and push it out through Apple Remote Desktop to a remote computer?
0
votes
0answers
3 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
0answers
13 views

Apple Mail script/plugin for moving mail between accounts

I need a script/plugin for moving mail, in the Apple Mail app, between accounts (online ↔︎ online and/or online ↔︎ local). The standard build-in move option isn't reliable enough, at least from my ...
0
votes
1answer
50 views

How to get and set metadata of a m4a file?

I am trying to automate some changes in m4a metadata and would prefer doing it through AppleScript other than popular solutions like mutagen. How can I address m4a files metadata? I need not only ...
0
votes
2answers
47 views

applescript will not stop running

I have an applescript that utilizes a named pipe and pipes data over to it. I have my script passing said data in a while loop, which is working, but I find that I am unable to stop the script ...
3
votes
2answers
3k views

How do I collect all of my notes and highlights from iBooks?

I've got a lot of highlighting and notes in iBooks that I've read, and would like to be able to collect them in one easy to use and manipulate format (e.g for writing papers and citing quotes). For ...
0
votes
0answers
10 views

Searching iTunes Library for file location?

For any given track in my iTunes library, I can easily ask for the physical location of the file like this, tell application "iTunes" set ilib to library playlist named "Library" set z to ...
0
votes
2answers
2k views

Access application submenus with AppleScript

I am trying to learn to access any menu item within an application with AppleScript. I can orient to the actual menu tab, and then access clickable menu items, but I can't access menu items within ...
1
vote
0answers
19 views

SecurityAgent Password not getting filled via AppleScript 10.11 El Capitan

My AppleScript no longer seems to work in 10.11. I put quite a few debug statements in my script and it doesn't seem like the script continues to run after the dialog appears. Does anyone have a ...
4
votes
6answers
10k 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
vote
0answers
31 views

How to run AppleScript (.scpt) as LaucnDaemon by root

I have an AppleScript or set of Applescripts that I am trying to run as a LaunchDaemon. I have no problem running the LaunchDaemon with my user. The problem comes in where I have the need to read a ...
0
votes
0answers
8 views

Keep screen off while moving mouse/clicking etc. (iMac)

Usually, with my macbook pro i can turn off the screen by setting the brightness to 0 and keep it off even if i move the mouse or do anything else (usually doing something with applescript). Now that ...
0
votes
2answers
1k 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
2answers
42 views

multiple dropbox instances hangs in starting loop

So I have recently installed two separate concurrent instances of dropbox on Mavericks. There are plenty of scripts on the web (all roughly the same) that seem to lead to a common issue, specifically ...
0
votes
1answer
1k 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 ...
0
votes
1answer
46 views

Make script run without interrupting GUI experience

I have an AppleScript that automatically opens SelfControl.app to help avoid distractions when I want to be working. The script is very similar to automate an Internet content filter, and it is ...
0
votes
1answer
44 views

How does one Copy, Paste and Tab using AppleScript?

I am looking to automate Copy, Paste, Tab and Left in Microsoft Excel and either Safari or Firefox using Applescript. I have limited experience in coding, and have recently complied a code, but ...
0
votes
1answer
14 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 ...
7
votes
5answers
189 views

How to create an OSX Application to wrap a call to a shell script?

My goal is to include in a zip file what amounts to a shortcut, instead of telling my customer(s) to open up Terminal and run a shell script. My deployable essentially looks like this: $ unzip ...
0
votes
0answers
12 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
1answer
19 views

Can a custom label be applied to a contact field using partial text from the field value?

In the Contacts app in OS X Yosemite it is currently impossible to import custom field labels when importing from a CSV file. I use a 3rd party app to manage my contacts and I would like to import the ...
4
votes
4answers
3k views

AppleScript “delay” command not working since switch to Yosemite

Ever since I upgraded to Yosemite, Applescripts that use delays have stopped working. How can I fix this? Here's the world's simplest Applescript, for the sake of an easy example: set volume output ...
6
votes
2answers
14k views

How can I configure my computer to run an AppleScript at a specific time? Caveat: without using iCal

Since upgrading to Lion, I have seen a sleight decrease of productivity when it comes to using iCal. As a result, I am trying alternatives such as BusyCal. The application seems great, however I cant ...
1
vote
2answers
30 views

Can I replace characters in AppleScript?

I'm working on an AppleScript to mount our Active Directory Home Shares and I've come up with the following part that looks at the logged in users "SMBHome:" and it gives me the users home share but ...
5
votes
1answer
122 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 ...
0
votes
2answers
29 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
0answers
51 views

How to pause Applescript when another process is not responding to system events?

I would like a Applescript to pause while a specific process/script/app is not responding (temporarily or permanently) to system events, and to start-up again when the other process is back. In ...
0
votes
2answers
37 views

Gaining access to data acquired by AppleScript outside of the script

I'd be interested in using the data that I acquire with an AppleScript in another Framework, or even to write it to disk (the former is preferable). For example, I have an AppleScript where I ask ...
1
vote
1answer
37 views

How to get the PID of every window 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 (the same with position). Is ...
1
vote
0answers
14 views

Using osacript to access Finder from crontab (or from non-interactive session)

I have a script that generates a dmg file from my application bundle. This is generated every night from our subversion repository. If would be interesting to set up things like the DMG's window ...
0
votes
1answer
33 views

How to activate and run JavaScript in AppleScript?

I'm trying to run simple script in AppleScript Editor on OS X 10.9.5, but using JavaScript, e.g.: var SE = new Application("System Events"); SE.processes.windows.name() However my dropdown only ...
3
votes
1answer
506 views

What's the equivalent of “do shell script” with javascript automations? (Yosemite)

Support for javascript automations started with Yosemite. How could I run using javascript an external command? (i.e. the equivalent of do shell script of applescript?
0
votes
0answers
79 views

Outlook 2016 for Mac won't return “current messages” from main window

In Outlook 2011 for Mac, I was able to use an AppleScript to move currently-selected messages from the main Outlook window. The script started like this: tell application "/Applications/Microsoft ...
0
votes
0answers
16 views

AppleEvent Handler failed (-10000)

I'm having issues with a simple part of script, where I wanna get the property dock preferences of System Events. I have the following: tell application "System Events" tell appearance ...
0
votes
1answer
40 views

Send Command to Add remote users through ARD

so I'm trying to create an extra admin account on all Macs on the network. There are quite a few so I'm trying to do it through Apple Remote Desktop. Do you guys know how to do this? This is all I ...
1
vote
1answer
33 views

Why is my AppleScript not working?

Making an AppleScript but for some reason it isn't working. Any ideas why not? delay 1 set volume 1 say "Hello " & (do shell script "whoami") using "Whisper" say "Do you want to play a game?" ...
13
votes
4answers
22k views

How do I open Google Chrome in Incognito mode by default

Is there any way (using apple script or by using settings on chrome) to open Google Chrome in incognito mode.
0
votes
0answers
52 views

Automator shell script - change file extension

I currently have a task that is working. It takes whatever files are added to particular folder and compresses them via Handbrake to another folder: for f in "$@" do HandBrakeCLI --preset="iPhone ...
2
votes
2answers
149 views

AppleScript to create spacing format like “S P A C I N G”?

In order to format text documents in a more readable way it would be nice to format selected texts by an apple script executed via the context menu services in the following way: select "text" with ...
1
vote
0answers
31 views

Applescript exits with error when run via launchd

I have an applescript running beautifully in Script Editor as well as from an osascript command at the Terminal. The script talks to the Reminders.app in order to pass iCloud reminder entries to a few ...
0
votes
3answers
1k views

AppleScript for iCal events from Address Book entries

I want to create a script that creates alarmed events in iCal for birthdays of people that I have in my address book. Unfortunately, I am very bad working with AppleScript. Below is the outline of ...
1
vote
0answers
23 views

How to create an app with the ability to open files in finder with right click

I want to create a very simple app like this: #!/bin/sh /opt/local/bin/evince $1 evince is a pdf viewer I compiled in OS X. I want to navigate to a pdf document in finder and then right click and ...
2
votes
1answer
93 views

How to capture mail.app message url that will remain persistent when message is moved?

So mail.app has this wonderful message:// URL scheme, which works great—until the message is moved. Then links created sometimes work—and sometimes don't. I can't figure out the difference. So my ...
1
vote
1answer
1k 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?
-1
votes
0answers
8 views

don't understand command for playing audio in applescript through Quicktime [duplicate]

I'm making a very simple electronic sampler and I need to know how to play audio in applescript. I heard that Quicktime Player was a good way to do it, so I tried some stuff from people on Apple ...
2
votes
1answer
44 views

Launching apps behind the lock screen?

I need to run an application behind the lock screen, e.g., just as Time Machine or Sophos antivirus (and others) can run when the screen is locked. Specifically, I would like to schedule an ...
1
vote
1answer
34 views

Set Brightness to Full on Boot (MacBook Pro)

I frequently have the problem where my laptop's screen is too dim prior to login and I can barely tell where my account or the mouse is. Is there a way to set the brightness to maximum on boot before ...
2
votes
4answers
10k views

How do I create an AppleScript that will quit an application at a specific time and then put the computer to sleep?

I've been toying around with AppleScript and Automator to get this thing to work, but I just can't seem wrap my head around it. If anyone could show me an example or give me some tips on how I can set ...
1
vote
1answer
62 views

AppleScript: move a folder to library (to root) in iTunes

Does anybody know how to move some folder to library playlist in iTunes? I can move some folder to another folder using the following script: tell application "iTunes" move folder playlist "3" ...
0
votes
1answer
14 views

Re-numerate selected tracks in iTunes

I often do the same job: select each track in selected set of tracks, open Properties of track and set the number of the track. I am just wondring may be there is a script or plugin for iTunes to ...