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

learn more… | top users | synonyms (3)

1
vote
1answer
1k views

How to automatically connect VPN when connecting to a network?

In my university, the only way to access Internet is to connect to a VPN server. I've configured the VPN on my Mac and it's working fine, but I need to manually connect to the VPN every time I connect ...
1
vote
0answers
12 views

'Add notes' to an Calendar event using Automator

I would like to build a 'Service' for selected text which: Get the currently selected text Creates an Calendar event adds the selected text as a 'note' for that Calendar event I prefer Automator ...
0
votes
0answers
9 views

Alternate to GlovePie Script [on hold]

While playing GOW with keyboard i got stuck with analog joystick. I need to rotate analog joystick, which is not possible with keyboard without a script I found this script which emulate keyboard keys ...
2
votes
1answer
606 views

Batch compress multiple folders into individual zip files

I have dozens of folders that I need to compress into individual zip files. If I select all of these folders in the Finder and do "Compress [X] Items," I get one zip file containing all of the ...
1
vote
1answer
29 views

How do I get AppleScript to open another script file

So I'm working on a script and I want one of the buttons to open another script file. I have: tell application "AppleScript Editor" to open "Fallen_Order_Intro.sctp" When I do this, it says ...
2
votes
0answers
26 views

Sharing multiple files on iCloud by using System Events in Applescript: How to intercept an option?

I am trying to share a folder with many Numbers files with iCloud, by sharing each file with an AppleScript and saving the path of each shared file so that I can send it to my collaborators. To do ...
4
votes
1answer
35 views

How can I run a shell script that prompts for user input from within Applescript

I have two pieces of code. One is Applescript and the other a Bash shell script. The shell script needs to run concurrently with the applescript, return some values and then exit. The problem is the ...
3
votes
2answers
32 views

Applescript string matching failed

I want it so that if the current date matches the string, it will log "works!". However it doesn't seem to work. set datesubmit to "27, May, 2016" set trydate to {day, month, year} of (current date) ...
0
votes
1answer
21 views

Applescript email

I have been messing around with applescript for the last week or so and i'm wondering if its possible to attach applescript to an email somehow so that it runs when the email is opened. It might not ...
3
votes
3answers
142 views

Automator service script ALWAYS launches application, disregarding conditional

I wrote a little service script to open an iTerm terminal window on an arbitrary folder on Finder. I want it to check if iTerm is running, and if it is to open the terminal session in a new tab ...
0
votes
1answer
38 views

Applescript with get every file loop fails

I want to run a script on all files with two specific extensions on a disk with a hierarchy of multiple nested folders. My script works fine when I choose a folder further down the line with fewer ...
0
votes
2answers
1k views

How to select message in Mail with ID using AppleScript?

With the help of "Ask Different" I got my first AppleScript program working, and I'm trying to improve it. I'm again stymied though. I have found the message number ID of a particular message in my ...
0
votes
0answers
8 views

Applescript remote keypress syntax

What is the correct syntax for this? I am trying to mess with my brother by taking a photo of him playing his games. However the syntax for the keystroke line doesnt seem to be working on remote ...
10
votes
1answer
12k views

How do I focus a specific window with applescript without doing an activate and bringing other windows to the front?

I'm looking for a method w/ AppleScript to select/focus a specific window of an application without actually doing an "activate" which brings all windows to the front. Here's what I have so far: ...
-1
votes
0answers
20 views

CMStorm Devastator 2 doesnt light up to the max [closed]

Okay, so I found a thread that helped me get my keyboard to light up,as on mac it isnt compatible, but, it doesn't light up all the way, as I know it does, and the light difference is huge, and while ...
0
votes
1answer
39 views

AppleScript URL from open safari window

I have a Safari window displaying a webpage. I want to be able to retrieve the open URL into AppleScript. However when I do this: if URL of window 1 is "www.google.com" then --do something end if ...
-1
votes
0answers
16 views

Applescript Keystroke [closed]

I was making an applescript ''virus'' when this happened Help plz I was trying to make it read out all the files, like the tree command for PC
0
votes
0answers
16 views

programatically mimic events on a Mac [duplicate]

How can I listen for an event on my Mac, record the event and than execute it programatically. For example, I want to reload extension I made programatically. For that I need to go to Extension ...
0
votes
0answers
23 views

programatically reload Safari extension

How can I programatically reload extension I created in Safari? This image shows the reload button that I manually have to click every time I update my extension: Any way to this is ...
0
votes
1answer
79 views

How to map buttons on my mouse with AppleScript?

Since BetterTouchTool is becoming paid, I was looking for an alternative solutions to map my navigation buttons (prev. page, next page) on my mouse (Logitech MX518) that I enjoy using for browsing ...
0
votes
1answer
28 views

OS X Automator: Using custom command in AppleScript's “do shell script”

I have recently asked a question about automatically inserting a value produced by a custom executable into a prompt field. Please look over this post to know exactly what I am talking about. The ...
0
votes
1answer
21 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
1
vote
2answers
50 views

How to pass an AppleScript variable to Perl script?

I have a Perl script that does some text transformation on a given file. Now I would like to call this script from an AppleScript which in turn I could execute from the script menu in order to run ...
2
votes
1answer
22 views

Automator task to open screenshots in Preview automatically

I'm pretty new to Automator but it seems like it's possible - I just can't seem to get it to work. I'd like to be able to take a screenshot and then open it up in Preview for easy annotation. If it's ...
-1
votes
0answers
22 views

How to find a file on a remote computer and delete it?

I gave this AppleScript to a person, and he gave it to a lot of people. However, the AppleScript could potentially get them suspended, but they are reluctant to give it up. The file is called "MASTER ...
0
votes
0answers
21 views

Extension : Multi-highlight on safari

I'm not sure this topic is appropriate for this forum but I'm looking for a Multi-highlight extension or AppleScript for Safari. I using Multi-highlight for Google Chrome at the moment but I would ...
0
votes
0answers
43 views

Apple Script to Apply Rules in Mail.app

I've created some rules in my Mail.app to change background color of specific messages And also I've created rules in the mail server to move specific messages to some folder For messages in the ...
0
votes
2answers
31 views

Applescript remote control volume

Wondering how to turn up the volume on my computer from another computer. set volume 4 of machine remMachine doesn't work Any suggestions?
0
votes
0answers
18 views

Changing the font of selected text with AppleScript/Automator

I'd like to set up an Automator service to set the font face, size, color, and background color of the currently highlighted text in Microsoft OneNote, e.g. Consolas 11pt, black text, white background ...
0
votes
1answer
26 views

How do I find the application name to open a file using AppleScript?

I find the AppleScript method of opening a file convenient but often cannot guess at the application name to use when I do not want the default options. As an example, I have installed Foxit PDF ...
0
votes
2answers
721 views

How to use AppleScript application with “open file -a AppleScriptApp”?

Some information about what I am trying to achieve I am using emacs inside of terminal. I know about existence of cocoa versions of emacs (like GNU Emacs for OS X, Aquamacs and Emacs Mac Port). But I ...
2
votes
0answers
19 views

How to fix «event coreslct» error?

I have an AppleScript source with this code: tell "Microsoft Word" «event coreslct» (last row of table X of document Y) insert rows selection position below number of rows Z end tell After ...
-1
votes
0answers
16 views

Apple Script for automation task in Mail

I am looking for a genius to help me develop a script that: Extracts attachments from my emails on receipt Files them in my local drive in a folder named after the sender Put the date and time stamp ...
0
votes
0answers
19 views

Preview.app and creating PDFs - Three methods - How do they differ?

Preview.app has three options for turning an image into a PDF: File > Export..., Format = PDF File > Export as PDF... File > Print..., Save as PDF The first method yields a PDF that looks exactly ...
0
votes
0answers
35 views

-p: command not found - Automator help needed

I'm using Automator to run a shell script for taking an interactive screencapture and opening it in Preview for easy annotation. When running the script it fails and states -: -p: command not found. ...
0
votes
0answers
51 views

Can I programmatically control the sound volume on a application level?

SoundBunny does exactly what I need, the ability to mute/unmute and change the volume of the audio, on demand, at an individual application level. Unfortunately I can't control it via AppleScript as ...
1
vote
1answer
31 views

How do I address an object value in a whose clause in AppleScript

I am trying to test a object property of elements in a whose clause. For example, let's use the common elements "document" and "window" that almost every Mac app has: tell application "TextEdit" ...
0
votes
1answer
14 views

Applescript character count in words with combining diacritics

If I combine an acute accent with, say "x", with a w before it and a y following, like this: "wx̀y", this will look good in BBEdit and Word, and both programs will give a character count of 4. ...
0
votes
1answer
63 views

Extract text between two unicode symbols using AppleScript or bash?

My goal is to take text from a standard .txt document, and use (preferably) Terminal or Applescript to extract text between the symbols ▶ and •. While there is only one ▶ symbol there are multiple ...
0
votes
0answers
19 views

How to make an AppleScript app open another one?

The title says it all. What would be the line of code to open a specific app created in AppleScript? tell application "userappname" to open/launch/what? What would be the last piece of the code? ...
0
votes
1answer
31 views

Apple Script for copying path and name and pasting it in Spotlight Comment box Mac OS X 10.9.5 (and 10.11.4)

I have a bunch of files to rename from someone else that sit inside folders and subfolders, and would like to copy the path and file name to the Spotlight comment of each file before I do anything ...
2
votes
2answers
81 views

Wanted: Apple Script for copying file name and pasting it in Spotlight Comment box Mac OS X 10.8.5

Global Peace Mission Project looking for automating pre sorting movie file routines. Due to the instant impact inflow of third party YouTube contributions triggered by a blog launched March 22 after ...
1
vote
1answer
1k views

Insert images into Pages document using AppleScript

I'm trying to automate the construction of a document, and am looking for a way to insert images into a Pages document with AppleScript. For example: tell application "Pages" make new document ...
0
votes
1answer
29 views

In Applescript, search the web

How would I have Applescript display the first one or two options in a google search in a display dialog window? Is there a way to create a functional browser through applescript?
0
votes
0answers
21 views

AppleScript: Trouble controlling Spotify over eppc (Apple Remote Events)

I would like to know if it is possible to control Spotify remotely using AppleScript. Spotify has a nice AppleScript dictionary, and I can control the software successfully as long as I do it ...
0
votes
1answer
52 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 ...
0
votes
0answers
17 views

How can I run a project that I made(within another script), without having to click the icon on the dock?

I made a script that will take user input, and if that input is an application, run the application. This works for all of the preset applications, they all open, and run. For my programs, it only ...
0
votes
0answers
15 views

Applescript applets - can I make an applet immediately if it is already running?

If I make Applet Zed, I can open it again and again with multiple copies running. Can I change this behavior before saving the applet? If not, is there script that can detect the first occurrence and ...
0
votes
2answers
128 views

Need script to automatically export Skim PDFs with embedded notes

I have a folder with a few thousand PDF files, most of which have Skim annotations (e.g., highlights and notes). If I had fewer files, I'd just go through each one, export the PDF with embedded notes, ...
0
votes
1answer
5k views

How to locate UI Button for AppleScript using Accessibility Inspector

There are several articles here that address this question, but none offer the help to connect-the-dots. The attached screen shot shot shows Accessibility Inspector for the button in question, which ...