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
4 views

Manipulating messages in Outlook 2011 from on IMAP account with applescript

I am currently using a great applescript that deletes duplicate messages from whatever currently selected folder. I use it mostly on IMAP folders to avoid downloading duplicate messages to POP ...
1
vote
0answers
7 views

How to click the OK button in Google Chrome alert, using AppleScript

I am using AppleScript with Google Chrome to automate a tedious process on a website. In certain conditions, the website has an alert popup to notify the user of an issue. This prevents the rest of ...
0
votes
0answers
10 views

how to send keystrokes from command line without a long delay?

when I use osascript to send keystrokes, I am finding that there is a long delay –– at least two seconds –– and this is unacceptable. is there a way to send keystrokes that is faster than ...
0
votes
0answers
30 views

Launchd Applescript Timeout Error

On Yosemite 10.10.5, I have an Apples Script application that runs and completes as desired under 2 of 3 conditions. The application is set to launch, by launchd plist 3 times per day at 7:05am, ...
0
votes
0answers
11 views

Applescript to change subject line

I have been looking up for the last two days and found a few applescripts that claimed to change the subject lines. But none of them seem to be able to change/set the subject line. What do you guys ...
0
votes
1answer
22 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
1answer
9 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
16 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
0answers
11 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 ...
1
vote
0answers
21 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 ...
0
votes
0answers
9 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 ...
1
vote
0answers
35 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
1answer
52 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
1answer
47 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
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 ...
0
votes
2answers
48 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 ...
0
votes
1answer
16 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 ...
1
vote
2answers
32 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 ...
0
votes
1answer
48 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
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 ...
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 ...
1
vote
1answer
38 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 ...
0
votes
1answer
34 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 ...
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 ...
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?" ...
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 ...
0
votes
1answer
44 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 ...
7
votes
5answers
202 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 ...
2
votes
2answers
151 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 ...
0
votes
0answers
55 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 ...
1
vote
0answers
32 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 ...
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 ...
0
votes
2answers
30 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
83 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 ...
-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 ...
0
votes
0answers
52 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 ...
2
votes
1answer
45 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
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" ...
1
vote
0answers
26 views

Email message duplicated from AppleScript

I'm using the following AppleScript within a rule to auto forward emails to Evernote. The issue I'm seeing is the email is duplicated in Evernote. Within Evernote the note contains the email twice. ...
0
votes
2answers
52 views

What is the default function for a play/pause media key?

I have a Microsoft Natural Ergonomic Keyboard 4000. It has a button labelled play/pause. When I have no keyboard drivers installed, the way the button behaves is by toggling playing and pausing in ...
0
votes
0answers
15 views

AppleScript application works not as UIElement

my AppleScript that contains on quit-Handler works if it is visible. If I add to the Info.plist-file of the application the Application is agent (UIElement) with YES. Then the application doesn't ...
0
votes
1answer
50 views

Applescript or Shell rename a file?

The following is the code I have, however, it doesn't let me choose the extension I want to save it as. How can I save the file as a ".plist" ? do shell script "echo '{ Filter = { Bundles = ( \"'" ...
1
vote
1answer
27 views

AppleScript - Add userinput to text file?

How can I add a user input variable to a text file? This is what I have right now: -- ask user display dialog "Enter Cheat" default answer "99 Gold, super health, unlimited Grenades.." set cheat1 ...
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 ...
0
votes
1answer
33 views

AppleScript: Get list of 15 most recent files in directory

I need to build a string containing the filenames of the 15 most recent files (by modification date) within a directory. Delimited only by a space: file1.jpg file2.jpg file3.jpg I'm using ...
0
votes
1answer
14 views

Applescript causes long error messages to be logged in system.log

I have this very simple script... tell application "System Events" set activeApp to short name of first process whose frontmost is true end tell tell application activeApp repeat 5 times ...
0
votes
0answers
22 views

How do I use Applescript to reply to an email?

Specifically I'm looking for a simple tweak in the Mail app. I have a rule set up to "Reply with text" to certain emails that come in, but one source in particular (Trulia) emails me messages from ...
0
votes
1answer
55 views

Applescript to Heart or Love or Favorite song

Anyone know if there's away to heart/love/favorite a song in the new iTunes via applescript? Basically I want the ability to heart a song from Apple Music without switching back to iTunes.
2
votes
1answer
59 views

Shell Script Commands Work Fine in Terminal But Not Via AppleScript

I have two commands that I need to run through the Terminal. They are cd /Users/[my name]/Desktop and curl 'www.google.com'>google.txt. When running these directly in Terminal they work just fine. ...