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

learn more… | top users | synonyms (2)

3
votes
0answers
34 views

What are the differences between Applescripts saved as *.scpt and *.applescript?

It seems to me that those scripts that are saved as *.applescript are always meant to be the raw, uncompiled text while those that are saved as *.scpt can be either the raw text or the compiled ...
3
votes
0answers
27 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
283 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
19 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
53 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 ...
2
votes
0answers
26 views

Why are Script Editor .scpt files not saved as plain text files?

The Script Editor (formerly ApplerScript Editor pre-Yosemite) saves .scpt files as binary files, not plain text files. It makes working with them in source code control systems somewhat cumbersome. ...
2
votes
0answers
44 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
40 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
28 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
172 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
55 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
249 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
47 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
326 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
114 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
68 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
668 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
16 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
28 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
23 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
14 views

Including Python Script Dependencies (virtualenv contents) in Platypus

I'm trying to turn a python script into a OS X App that you can run directly from Finder. I'm trying out Platypus, which seemed like the simplest option. The problem I'm running into is with the ...
1
vote
0answers
28 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
119 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
134 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
136 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" ...
1
vote
0answers
48 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
36 views

How do I Launch an Applescript with a Hotkey Without Automator?

I'm running Yosemite and looking to launch Terminal with a keypress in any application. One solution was creating a Service in Automator that launched terminal and assigning a key to it in System ...
1
vote
0answers
38 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
113 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
36 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 ...
1
vote
0answers
51 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
37 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
276 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
33 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
69 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
49 views

Automatically saving message attachments to a mailbox

I subscribe to a rather odd mailing list, through which I receive emails to which further emails are attached (in eml format). I want to archive those attachments into a dedicated mailbox, all within ...
1
vote
0answers
48 views

Sync applescript calls.

I'm very new to applescripting and I have the following code: tell application "Safari" tell document 1 do JavaScript "document.getElementById(\"binaryFilePath\").click()" end tell ...
1
vote
0answers
56 views

How can I start a Hangouts phone call with Applescript/Terminal?

I want to initiate a Google Hangouts phone call with Applescript. Hangouts has an AS dictionary, but with only the default suites. I want to emulate opening the Hangouts popup, typing in a phone ...
1
vote
0answers
456 views

Set iMessage sender in applescript for a new message

Applescript allows you to send messages via iMessage and the command line, ie) http://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service Is ...
1
vote
0answers
53 views

Creating an Automator/Applescript to compare two versions of an MS Word document

I'm storing MS Word documents in GIT and would like to have an rudimentary document compare system on the rare occasion that I need to diff them. I've seen: ...
1
vote
0answers
150 views

Add local file URL handling to Applescript Application

I am using a simple applescript application to open different URL schemes in different Fluid Apps. By setting this app as the default browser, I can effectively parse out the URL scheme and open the ...
1
vote
0answers
380 views

AppleScript auto Email attachment save

I am looking for an AppleScript, that simply uses an email defined by the "Mail Rules" and extracts the attachment to a specific folder. I found different codes, but they all didn’t do want I want. I ...
1
vote
0answers
243 views

Automator or Applescript for custom script to download bank statements?

What's the best tool to script to automate downloading statements from my bank and credit card companies' website in each of their statement download area? All banks, credit card companies, and ...
1
vote
0answers
241 views

AppleScript editor cannot save .scpt file

I've created a simple AppleScript .scpt file, using TextEdit. If I now open it with AppleScript editor, I can run it. But when I try to modify and save it, I get the following error: It's ...
1
vote
0answers
128 views

Get Finder tab-locations with applescript

I know how to get the location of the current finder window, but I would like to be able to also get all locations of open tabs in the current finder window. How do I do this with applescript?
1
vote
0answers
30 views

Different results of running the same AppleScript

The script is: tell application "DEVONthink Pro" activate end tell tell application "System Events" tell process "DEVONthink Pro Office" tell menu bar 1 tell menu bar ...
1
vote
0answers
137 views

Get iTerm session by tty name

I want to run a command within an iTerm2 session like this: tell application "iTerm" tell session id "/dev/ttys020" exec command "ls" end end But I get the following error (with and without ...
1
vote
0answers
74 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 ...
1
vote
0answers
97 views

Third party apps can't call applescript that otherwise work in 10.9

I am invoking my apple script from third party executable(C executable). Here is the applescript: on run argv do shell script ("open -n /Applications/Test.app/ --args " & "'" & item 1 ...
1
vote
0answers
39 views

Automatically reduce MacBook brightness on connecting to external display?

I would like my macbook to reduce its screen brightness to zero when I connect it to an external display. I know there's no such setting, but how would I go about writing a script that would do that? ...