AppleScript is a proprietary programming language in Mac OS X to control and exchange data with applications.

learn more… | top users | synonyms (3)

4
votes
0answers
234 views

Is it possible to compose Mac OS Mail in an external editor?

For Thunderbird there is the External Editor extension a very very classical piece of software that, when called via a shortcut, pops up your external editor (emacs in my case) and let's you edit your ...
3
votes
0answers
58 views
+50

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

Is it possible to disable Safari extensions when using Private browsing?

I recently switched from Chrome to Safari for a few choice web applications, and I found that I couldn't disable extensions like Lastpass when browsing privately, at least not apparently, like I could ...
3
votes
0answers
190 views

Create Custom Drop Down Menus in the Finder Toolbar

Happy (belated-ish) new year! Hope it's been a great one. Any Dropbox users out there will recognize the drop down menu that one can add to their Finder toolbar. Upon discovering that this ...
3
votes
0answers
70 views

Tmux hampers osascripts display notification

I like to show notifications from scripts using osascript -e 'display notification "Some text"'. This works fine from the plain shell but it stop working when in tmux. It just doesn't show the ...
3
votes
0answers
317 views

Applescript vs. Spaces in Lion (10.7)

In Snow Leopard (10.6), I had an applescript that toggled iTunes between "maximised on Space 2" and "mini-player on all spaces": set app_identifier to do shell script "echo 'com.apple.iTunes' | ...
2
votes
0answers
334 views

batch convert iWork 08 files to new version on Yosemite

TL;DR Short version: I have a bunch of files that were created with iWork 08. Is there a way, maybe using AppleScript or Automator, to convert them to the new format (Pages 5.5, Numbers 3.5) without ...
2
votes
0answers
40 views

How do I make an applescript launch as soon as it exits screen saver

I would like my mac to to say 'Login Authorized' as soon as I exit screen saver mode. Where should I place the script? Thank you in advance!
2
votes
0answers
176 views

Tell application “Microsoft Outlook” not working after Yosemite upgrade

I have two Macs. The AppleScript code below runs on one Mac ("Mac 1"), but not on the other ("Mac 2"). Mac 1 is running Snow Leopard, where Mac 2 was upgraded to Yosemite, and the AppleScript below ...
2
votes
0answers
65 views

Export image from clipboard to folder

I create a lot of mockups for my mobile phone. I recently heard of the brilliant idea to just put your current mockup as an image into your Dropbox (or whatever cloud your using). Then just take your ...
2
votes
0answers
283 views

AppleScript to read all notifications in the Notification Center OSX 10.10 Yosemite

It seems like the following AppleScript is no longer working in the latest version of the OS X 10.10 (Yosemite): on run tell application "System Events" tell process "Notification Center" ...
2
votes
0answers
34 views

Applescript Editor's compiler erratic behaviour

I've just come across some bizarre behaviour in the Applescript Editor (Snow Leopard - 10.6.8) that I was wondering if anyone knows how to get around it. Basically, one second a statement will ...
2
votes
0answers
208 views

AppleScript for enabling VPN broken after update to 10.9.3

I've been using an AppleScript for connecting to my office VPN. After updating my macbook to 10.9.3, it fails to execute, and throws an exception Unable to get network preferences (honestly, it is ...
2
votes
0answers
66 views

Run rake using Automator

I have install ruby using RVM. Next I create workflow in Automator, which detects new files in folder and then copies them to another dir. The next thing I want - to switch to those folder and run few ...
2
votes
0answers
301 views

Detecting typing in Messeges app using applescript?

In the new Messages app, which replaced iChat, you can see when another person is typing: And i've been scripting around the messages app and was wondering if there was any way to detect when the ...
2
votes
0answers
50 views

Sort Stickies by desktop

I have OS X Lion 10.7.5 with four desktops and also have 4 groups of stickies (one group per desktop). Every time that I have to reopen the Stickies app, they are unsorted (all stickies open on the ...
2
votes
0answers
373 views

AppleScript to find old mail messages is slow in ScriptEditor

So I have an AppleScript that iterates over all the messages in various mailboxes and finds messages which meet various criteria and moves them to Deleted Items. The mailboxes in question are ...
2
votes
0answers
127 views

AppleScript deployment conventions?

I haven't seen a package-management system for AppleScripts, but it seems like the foundations for one are present. Given: Scripts (and folder) located in the ~/Library/Scripts/Applications folder ...
2
votes
0answers
69 views

Have OS X auto-search for WiFi

My school has installed PowerCloud, which does not officially support OS X. It works sometimes, sometimes it doesn't. I've tried to narrow it down but it's impossible. I was wondering if there is a ...
2
votes
0answers
693 views

With Lion, Problems Accessing Shared NTFS Folders with SMB://

We are testing a local login script that we created for our Macintosh users on Lion. It has worked fine on all OS X versions prior to 10.7. Listed below is the script that we are using. When we run ...
1
vote
0answers
19 views

I need to batch move files from one location to another, and put them in pre-existing folders with the same first 7 characters

I am looking to automate moving large amounts of files. Basically I have one location on our network full of .zip files. They are all named like "12-3456.zip" etc. I need to move each of these .zip ...
1
vote
0answers
44 views

How to: Automator, launch an app, as if I dragged n dropped file on App's dock icon?

Using automator, I know how to "Launch an App". I would like to know how to "Launch an App in a specific way". The app I want to launch, acts differently depending how its launched. If one: clicks ...
1
vote
0answers
22 views

Tell last media player to skip song

I bought a new keyboard that, of course, works almost perfectly, minus the media buttons. Luckily it has open source drivers specifically for linux and mac, but unfortunately the media buttons ...
1
vote
0answers
45 views

How to detect if chrome (or any other app) is playing sound using bash/applescript

I am writing a script to turn off audio on my mac, but need to check if its coming from the browser or an app (say Spotify). Is there a way to detect which app is playing sound?
1
vote
0answers
33 views

How can I programmatically read and write the texttone of a Contact in the OSX' Contacts app?

On the Contacts app (V9.0) of Mac OSX 10.10 Yosemite I want to read and write programatically the texttone property in some of my contacts. How can I do this with Applescript or another scripting ...
1
vote
0answers
23 views

How do I automate selecting files in a .jar file?

My .jar file has a number of buttons that, when clicked, prompts me to select a file to load. I need to find a way to get this file selection to be automated, and decided on applescript. ...
1
vote
0answers
35 views

Forcing application to go to selected window on startup

I run a multi-monitor set-up on a single "Desktop". All of my applications when opened run on the primary monitor, which is the smaller monitor. I would like to have some (e.g. browser, mail client) ...
1
vote
0answers
61 views

select a menu item of a window instead of a process using Applescript

I'm quite new to applescript (and a beginner programmer) and I've hit a dead end. I figured out how to access a menu item of a process but I do not know how to do it once I have multiple windows. ...
1
vote
0answers
24 views

Help with Applescript to paste text into Word

I've just started using Apple Script and I was trying to make Word paste some text in an unformatted way. This is the code I am using: tell application "Microsoft Word" tell selection try set theClip ...
1
vote
0answers
106 views

Start QuickTime and set camera to iPhone from command line

I'm attempting to start QuickTime from AppleScript and select the camera of my iPhone like I do from QuickTime. I can't seem to make it change the camera. The script I have now is: tell application ...
1
vote
0answers
44 views

Create intelligently parsed reminders from applescript or automator

I have found that I can programmaticly create reminders in Reminders.app from applescript or using automator on the command line, but I'd like to be able to do so while taking advantage of the ...
1
vote
0answers
157 views

Automount afp Volume with AppleScript

I know this is similar to other open questions about mounting network drives, but this one is slightly different. I have an AppleScript that runs at startup that looks like this: tell Application ...
1
vote
0answers
21 views

Filling areas of Json script with user prompts

I am wanting and Applescript to fill certain parts of a Json script via user input prompts, but not sure how to place the results in the correct areas? And to then have the result copied to the ...
1
vote
0answers
37 views

How do I simulate a random VPN disconnect?

I'm trying to write an applescript that reconnects a VPN that gets disconnected (sort of like this one) and I want to test it to see if it works. One of the key parts of the script is being able to ...
1
vote
0answers
34 views

Apple Script notification bubble - quick reply style prompt

I know that you can trigger a notification using Apple Script: osascript -e 'display notification "Hello" with title "How are you feeling?"' However, I also want to be able to prompt for certain ...
1
vote
0answers
79 views

How to execute javascript from an applescript (Yosemite)?

Since Yosemite, the Script Editor allows using javascript. What is the best way to execute javascript from an applescript? My use case is an existing applescript which needs to send some parameters ...
1
vote
0answers
89 views

Extract links from email based on the anchor text, not the href

I am putting together an Automator workflow that will allow me to bind a hotkey to a Smart Mailbox listing and effectively automate the task of clicking "Unsubscribe" in emails which have that text ...
1
vote
0answers
32 views

Speed up moving mails in Mail with AppleScript

Moving or deleting mails in Mail with AppleScript is dog slow. One of my scripts is: tell application "Mail" set SelectedMails to selection repeat with currentMail in SelectedMails ...
1
vote
0answers
74 views

Applescript Service Won't Run From Some Applications

Okay, so I have a non-Apple keyboard and wanted to bind function keys to the basic media controls such as play/pause iTunes, change volume etc. So I decided to create a service in Automator with an ...
1
vote
0answers
370 views

Applescript, OS X : How to Get a list of phone numbers from Contacts, and send an iMessage with Messages App? Halfway there I think..?

I am trying to create an applescript that will grab all of the labeled phone numbers of 'mobile' and 'iPhone' from the every contact in Contacts App (specifically the phone numbers from the iCloud ...
1
vote
0answers
251 views

Access OS X Yosemite “Share Menu” extension through Apple Script

I'd like to make an Alfred workflow that would send a file as an attachment through Airmail. I noticed that Airmail has a "Share Menu" extension to do just that. Is there a way to access this ...
1
vote
0answers
123 views

Change Managed, Mobile Account Password through script?

Wondering if anyone has worked with something similar before - we have a number of Mac laptops connected to an Active Directory server, and on first login users create a Managed, Mobile account. When ...
1
vote
0answers
78 views

“New mail message” action in automator not working

In the description of the action "New mail message" in automator, it says that it will send a mail message with the text that I have set as input as the body of the email. That is not happening. In my ...
1
vote
0answers
146 views

Apple Script - FIND files containing… in prefix, in ALL SUBFOLDERS, COPY

I'm looking for an Apple Script that will: REFERENCE a list of names in a column on an Excel sheet (not complete file names). SEARCH a specified folder, including subfolders FIND file names that ...
1
vote
0answers
80 views

How to set positioning/filling of desktop background image with AppleScript

How can I set the positioning/filling of the desktop background image from the command line with one of the available options listed in the Desktop & Screen Saver preferences: Crop, SizeToFit, ...
1
vote
0answers
47 views

How can I change the text on the shutdown window?

When you press the power button on a mac laptop, a window is shown that reads "Are you sure you want to shut down your computer now?" An image of the power symbol is shown next to this text and at the ...
1
vote
0answers
423 views

Applescript / Automator - Pass variables between them

I have a question about how to pass the applescript input from one computer to another computer's automator input (I created it as a program). I've created the script below to ask for the filename and ...
1
vote
0answers
43 views

Click in finder vs “open -a” on command line

I have a file type (.mxl -- compressed MusicXML) which if I double click in Finder opens properly in my .mxl reader (Finale 2014.app) but which if I call "open file.mxl" or "open -a ...
1
vote
0answers
84 views

Rename iMessage group with AppleScript

While the new iOS 8 group naming can be great, if the people in the group aren't very mature it can be...very not great. How would I go about renaming a group in Messages.app with AppleScript? I ...
1
vote
0answers
229 views

Applescript automate to click button on Safari webpage

Trying to do some automation in safari here using applescript, keep getting error, please help! Here's the DOM Tree codes <div id="sc1789" class="tvb4 sc-view" style="left: 0px; right: 0px; top: ...