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

Can't Set Desktop Background in Fullscreen App

I have an 11" Air so I usually run all of my open applications in fullscreen mode. I have a launchd job for my user that runs a script every hour and every login to set the desktop background ...
1
vote
0answers
23 views

How to get location on HDD of dropped webloc files? [closed]

I need to get the file path on the local drive of where a dropped (or several dropped) .webloc files are located. I have already encountered and understand that when dropped on an Applescript Droplet, ...
0
votes
1answer
49 views

Automator/Applescript using Tags

I need an Automator/Applescript to move a file to a certain folder based on a specific tag it contains. The input would be the file. Anybody have any ideas? TIA, Jake
0
votes
1answer
33 views

Move Application from Dock to Menu Bar

I have written an AppleScript application and when running, it appears in the Dock, however I would like it to have it in the menu bar, at the top of the screen, instead. How can I achieve this? Is ...
0
votes
1answer
34 views

update git repository with apple script

I want to update my git Bitbucket online storage with apple script. This is the code that works in Terminal, but not when i run apple script. cd /Users/mainuser/Desktop/Projects git add -A git commit ...
0
votes
0answers
19 views

Select multiple UI Elements from an Apple Script

I´m writing a script to facilitate some workflows within FCPX. In there I have to select multiple UI elements (rows) in a table (the Event browser). I found select *element* and set selection of *...
1
vote
0answers
138 views

Get posix path of .webloc in applescript droplet

If a .webloc is dropped onto the following script, the dialog won't be displayed; instead the url of the webloc is opened in the default browser. on open dropped_webloc display dialog "hey" end ...
4
votes
3answers
2k views

Emulating associative arrays in AppleScript

A problem that would be trivial to solve with key=>value pairs. For each item in list_a, find the matching item in list_b and compare a single attribute (calculate scale ratio for two sets of images). ...
0
votes
1answer
47 views

Use caps-lock to lock fn key or other way to lock fn key?

What I want to achieve is simple: caps lock on = fn locked (use function keys). caps lock off = fn unlock (use media keys). I found a couple of topics around this problem, but their solutions didn'...
1
vote
1answer
1k views

Repeated keystroke “w” for Agar.io

I've been searching for the relevant articles on the Internet and found nothing useful. Maybe I'm too stupid to understand. I would like to create a script that automatically keep pressing the "W" ...
4
votes
4answers
7k views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
0
votes
1answer
19 views

Is it possible to activate whichever mail client is connected by default to a mailto link in applescript?

So I have an apple script that sends an email via the mail app. I didn't make it myself though. tell application "Mail" set newMessage to make new outgoing message with properties {subject:...
0
votes
0answers
49 views

How can I use Applescript to repeat an iMacro in Firefox 8 times?

I have an iMacro created in Firefox that needs to be repeated 8 times to function properly. How can I automate the playing of the iMacro 8 times with Applescript? I've tried recording my workflow, ...
0
votes
1answer
37 views

In Applescript, how do I get a line number or stack trace on error?

I'm writing some fairly complex Applescripts, but when something goes wrong - Apple event timed out - or similar, I can't tell precisely where it failed. At the moment, I'm wrapping all handlers with ...
1
vote
2answers
3k views

AppleScript To Manipulate VLC

I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But ...
1
vote
3answers
232 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: /...
0
votes
1answer
102 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 ...
0
votes
1answer
32 views

How to cd into my local git repo from an AppleScript?

I am running a Mac using OSX Yosemite v10.10.5. I want to push my local git repo to my remote using AppleScript. So the git code would be: shell git init git add README.md git commit -m "first ...
1
vote
1answer
58 views

Set a Display colour profile via Terminal or AppleScript? (Macbook)

I would like to be able to change the display colour profile of my MacBook, with a view to writing a program that changes the loaded colour profile on a shortcut key-press, or automatically at certain ...
0
votes
0answers
16 views

Problem with AppleScript and ffmpeg

First, say I'm new to programming. I'm trying to make a script to encode a selected video. The problem is that this script allows me to select videos on the desktop but if I select a different path ...
0
votes
1answer
99 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
1answer
39 views

AppleScript : Dim brightness below factory setting

I want to dim the script below "0" on my iMac. Here is my current script, but this stick to OSX settings. try tell application "System Preferences" reveal anchor "displaysDisplayTab" of ...
1
vote
0answers
41 views

The process of making custom notifications, iOS GarageBand, iTunes database, iTunes file format, AppleScript

I'm developing an iOS and Android app which uses custom notification sounds to provide users with step-by-step instructions. I've recently stepped through a pretty messy process of creating these ...
0
votes
2answers
37 views

AppleScript returns error on defining date

my following code returns an error tell current application set b to "Tuesday 12 April 2016 at 18:06:10" date b end tell If I would write the string, defined in b, directly before date, it ...
3
votes
1answer
64 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?
1
vote
2answers
69 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
36 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
27 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.
0
votes
1answer
2k views

Trying to use applescript to launch cmd line 3 scripts in new tabs

I'm trying to launch 3 tabs and run a script in each with applescript. So far I havent been able to get this done. Currently I have: tell application "Terminal" activate do script "ping ...
1
vote
0answers
49 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
142 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
61 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
82 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.
18
votes
3answers
7k views

How do I make an AppleScript file into a Mac App?

I have an Applescript that simply opens a Dialog Box, asks for a user input and runs a Terminal Command and spits out the answer. It works great in AppleScript Editor yet I am trying to work out how I ...
-1
votes
1answer
3k views

How to add a script that types in the password for my vps through applescript

I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code tell application "...
0
votes
1answer
170 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
42 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 ...
1
vote
1answer
105 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
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
0answers
37 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 ...
0
votes
1answer
118 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
58 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
13 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 ...
0
votes
1answer
23 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 ...
1
vote
1answer
39 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:"...
3
votes
2answers
3k 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?
0
votes
0answers
20 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 ...
5
votes
1answer
210 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 ...
2
votes
2answers
13k views

AppleScript/Automate Mail Tasks

I've been trying to help a coworker automate a weekly email compilation he sends out but haven't yet been able to figure out how address a few specific areas...first I'll explain the situation, then ...