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
1answer
101 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
63 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
3answers
56 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 currently-...
0
votes
1answer
27 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 ...
1
vote
1answer
32 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 the ...
0
votes
1answer
91 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
116 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' ...
0
votes
0answers
26 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
1answer
84 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
12 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
36 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 ...
4
votes
2answers
82 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
40 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
0answers
30 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, ...
0
votes
1answer
28 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 ...
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
1answer
48 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
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
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 *...
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'...
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, ...
1
vote
3answers
231 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
31 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 ...
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
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 ...
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 ...
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
63 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?
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.
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 ...
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
99 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 ...
2
votes
1answer
77 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 ...
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
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 ...
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
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
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
57 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 ...
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:"...
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
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 ...