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
2answers
30 views

Easiest way to get path of currently-opened file in Adobe Acrobat?

When viewing a file in Adobe Acrobat Pro XI on OSX Yosemite, I sometimes want to send the file to another application. To create an action in KeyboardMaestro, I need to get the path of the ...
0
votes
0answers
16 views

Automator Services to transform text to Upper, Lower, and Sentence Case

What's the appropriate code to create Automator Services to transform the selected text to: Lower case Upper case Sentence case For Upper case this answer doesn't seem to work. I get this error: ...
0
votes
0answers
16 views

getting a color value of a specific point on screen

How can I get a color of a specific point on screen with Apple Script? I would give the point in pixels such as {120,400}. Should I use an external app and "tell" it to find color value of some point ...
0
votes
1answer
19 views

Why is AppleScript not ejecting my volume?

I have a hard drive in my mac with multiple partitions, and I want to eject some of them with AppleScript. Simple: tell application "Finder" eject disk "Photos" end tell Except it does not ...
0
votes
1answer
18 views

How to quit “Force Quit Applications” using AppleScript?

I've been learning lots of different programming languages when I came across AppleScript. Since I'm technically new to it, this question may seem dumb.I need an AppleScript script to quit the "Force ...
0
votes
0answers
20 views

Get result of Terminal tab do script via commandline

I've seen similar questions like this but none seem to deal with getting the result from a specific Terminal tab? I'm writing a Chrome extension to do some awesome stuff. Right now I'm just trying to ...
0
votes
1answer
25 views

unlock external locked encrypted disk with applescript command by filling dialog box to cracking password by force brut

I make a terrible mistake. I totally lost my paper with the secret password for my encrypted external GUID hard drive. This external drive contains many pictures but also some works documents very ...
1
vote
1answer
20 views

Can someone help me to translate this automator workflow to applescript?

What I want to do is select a bunch of images with varying dimensions and uniformly apply a percentage scale to resize them. The workflow comes very close to that. But I cant get more specific to ...
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 ...
1
vote
1answer
41 views

Automator: “Run Shell Script” throws error because of missing “on” command

OSX 10.11.4 here. I'm trying to create a workflow for use with a hotkey, to run a simple shell script. Created via: Automator -> New Service -> Utilities -> Run Shell Script, then set to 'no input' ...
4
votes
3answers
5k views

Using applescript to lock screen

I need an applescript which locks my Mac in the same way pressing "shift"+"ctrl"+"eject" would. I tried two different approaches, but both failed. The first one was to search the internet for a ...
0
votes
1answer
19 views

make “fit to screen” default window size in Quicktime

How can I make Quicktime to always open in Fit to Screen option (available at View->Fit to Screen)? It doesn't seem to remember the last window size. Is it possible to attach a script to a program, ...
0
votes
0answers
22 views

I need help with an AppleScript!

So after I transitioned to Mac, I found myself in a need for a script. Something similar to what I used with AHK on Windows. I would need a script that would spam Space multiple times, but only when ...
0
votes
0answers
11 views

Notify me when someone joins messages

When one of my contacts is using the Messages app (OSX 10.9), a blue dot appears next to their icon to show that they are available. Is there a way (probably using applescript or automator) to make a ...
1
vote
1answer
24 views

get name of file from file path using AppleScript

I am trying to get the name of file using AppleScript with the following code: tell application "Finder" set filename to name of "/Users/mainuser/Desktop/Test/shot.png" // should return shot.png ...
0
votes
0answers
37 views

How to create a service which starts an app without opening a selected file?

I'm trying to create a service, that opens an app (Terminal app). I created it with Automator. I selected "folder and files" and "finder" in the right-side menu. Since there doesn't seem to be a ...
0
votes
1answer
20 views

Open programs at random time with applescript

I was wondering how I can make a harmless "fake" virus to prank a friend. I am using Applescript Editor. The prank is going to open Safari at any random time. I know how to open Safari with ...
4
votes
2answers
38 views

change download folder based on website from which I download

Is it possible to change Downloads folder in Google Chrome (or any other browser) on the fly, based on the website from which I download? Example: I start downloading on facebook.com and it downloads ...
0
votes
0answers
17 views

How to have a script restore a desktop spaces default setup (as defined in the script)

Noob here so I might be asking the wrong questions... I'm on El Capitan and I tend to create and dump desktop spaces on the go. I've been trying to write a script that cleans op the Spaces situation, ...
3
votes
1answer
88 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
18 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
22 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
28 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
28 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 ...
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" ...
0
votes
0answers
13 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
127 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
31 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 ...
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
6k 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
15 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 ...
0
votes
0answers
16 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
17 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
2k 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
75 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
53 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
18 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
36 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
14 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
35 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
24 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
32 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
31 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
43 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
38 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
17 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
18 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
24 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.
1
vote
0answers
26 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 ...