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

learn more… | top users | synonyms (2)

1
vote
0answers
7 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
10 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 ...
0
votes
1answer
21 views

How to make a colour clicker using AppleScript?

How can AppleScript be used to make the mouse cursor search for a colour on the screen and click on it when found and return to its starting position after? How to make a script that can do this ...
1
vote
1answer
42 views

How to programmatically get the path to the wallpaper on the active desktop?

I'm trying to get the path to the wallpaper in the active desktop. However, I'm having trouble reliably getting this. The following sources indicate that ~/Library/Application ...
1
vote
1answer
14 views

Can there be different passwords for the same account that prompts a certain reaction from Applescript?

Can I set two passwords for the same user account so if one password is entered the computer opens up normally, and if another password is entered, Applescript locks certain applications from opening? ...
0
votes
1answer
15 views

AppleScript to Delete Folder

I was wondering if anyone can give me some advice on how I can use apple script to delete this folder? Users/user1/Library/Application Support/Skype/tankitan
1
vote
1answer
19 views

Have Automator folder action pass a list of files to AppleScript

I need to pass to a .jsx script (a Photoshop script written in JavaScript) a list of image files as arguments when they are added to a folder. According to the Adobe documentation, you can call a .jsx ...
1
vote
0answers
136 views

“Fetching…” Behavior in Finder “Open With” Menu in Yosemite

I don't know if other people have notice this in Yosemite: With a file in Finder in focus, when you move the cursor to "Open With" entry, whether from context menu or menu bar -> File, a ...
1
vote
3answers
39 views

Hide/Show Battery Icon in Menu Bar with AppleScript

Is there any method to display the battery menu bar status item with AppleScript? I’ve tried to browse the script library but unable to find one that matches this capability. I simply want to toggle ...
0
votes
1answer
14 views

Focus most recent window of pid without requiring accessibility approval

I currently use this AppleScript to try to set focus to the most recent window of a PID, in example here my pid is 450. tell application "System Events" set frontmost of the first process whose ...
0
votes
0answers
7 views

I want to automate the task of sending email

I want to automate the process of sending an email in my automator workflow. In my workflow I want to create a new email every time I receive text as an input and the email has to be sent without my ...
1
vote
0answers
24 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
10 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 ...
2
votes
0answers
13 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 ...
-1
votes
0answers
12 views

I want to run this old applescript in automator [duplicate]

I want to use automator to extract text from mail. The applescript used to do that is an old version of the scripting language. My mac will accept only the latest. Is it possible that I can run the ...
1
vote
0answers
19 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
26 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
1answer
22 views

In mail.app, get list of Previous Recipients for just one of my many email accounts

I use mail.app to interact with about a dozen different email accounts, which I use for different purposes. I need to create a list of the Previous Recipients of just on of those email accounts. A ...
2
votes
4answers
81 views

Toggling wi-fi on and off

I need an applescript that will toggle wi-fi off and on at set intervals, say every 10 or 15 minutes. I'm using a 2012 MacBookPro running 10.9.5.
0
votes
1answer
45 views

Run old applescript in automator

I want to use automator to extract text from mail. The applescript used to do that is an old version of the scripting language. My mac will accept only the latest. Is it possible that I can run the ...
2
votes
0answers
25 views

Scriptable menu bar icons

Is there an easy way I can add custom icons to the menu bar status area? Ideally something like Growl (e.g., where you can just execute a command) but instead of notifications, just renders icons in ...
1
vote
2answers
28 views

Applescript to automatically add .noindex extension to a file?

I'm interested in excluding certain files from Spotlight, and it was suggested to add the .noindex extension. I'd like to automate this. How is it possible to do via Applescript?
1
vote
1answer
54 views

Notification Center message via AppleScript/osascript — specify an application name and icon

When sending a notification to OS X's Notification Center via AppleScript's osascript, such as in: osascript -e 'display notification "Finished that long running task." with title "Finally!"' The ...
0
votes
1answer
20 views

How to merge lecture notes from the web into a single PDF file

I have some lecture notes which are located at: www.mywebsite.com/Lecture1.pdf www.mywebsite.com/Lecture2.pdf etc In Automator I currently have done the following: Get specified URLs Download ...
1
vote
0answers
51 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
2answers
60 views

Saving applescripts as scripts versus text

When saving a script in Applescript Editor, it defaults to the Script file format. The file produced is binary and cannot be indexed by Spotlight. So if I want to search a script based on a word used ...
0
votes
2answers
20 views

Prompting user for input on locking screen

I'm relatively new to OSX (running Mavericks), but my goal is to create a script that reminds me to take notes on the day's work. The script will ideally: run upon the user clicking 'Login window' ...
0
votes
1answer
26 views

How to “archive” iTunes files with all metadata?

I recently decided to do a big cleanup of my iTunes library. I am low on disk space and have quite a bit of music that I haven't listened to since I was a much younger man, but I can't bring myself to ...
1
vote
0answers
25 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
45 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 ...
0
votes
0answers
14 views

How to react to click on a notification?

So I've got my applescript script throwing up notifications. And that's awesome. Now can I control what happens when the user clicks on it? Ideally I want it to just open a file, but can't surmise ...
0
votes
0answers
13 views

Run kinit as AppleScript promting for network username and password

I need to develop a small app (currently using AppleScript to do it) that I can send to users to run a "kinit" shell script command. This is on machines that are not bound to the domain, but needs to ...
0
votes
1answer
15 views

How to run a script on login whilst being hidden

I have an applescript (scpt) script that I would like to run on login of a user. I would like the script not be visible in the dock, menu bar, etc. (This would probably mean running it in the ...
0
votes
1answer
76 views

How to trigger Notification Centre notification from JavaScript? [closed]

The other question asks the same but using AppleScript. Apple introduced JavaScript as a new language for Automation in OS X 10.10.
0
votes
0answers
45 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: ...
0
votes
0answers
34 views

Running an apple script repeatedly and stopping if the application unexpectedly quits

I've been searching for hours for a solution to this but have been unable to find anything. Currently I have the following applescript: repeat set core_is_running to is_running("MyApp") if ...
0
votes
0answers
25 views

apple script to copy Items to usb

i REALLY need a apple script that would copy items(files,folders everything so whatever is in this folder must be copied) of a folder in my documents to a usb folder but only when the usb is mounted ...
0
votes
0answers
55 views

transfer label from afp to smb

Is a possibility known to transfer label from afp to smb (Server files/directorys)? When changing from afp to smb all tags are disabled. Does anyone have a script? I've found on the subject: ...
0
votes
0answers
17 views

What is required to make a bookmark that creates calendar events from values on a web page?

So I have a page that has days and times on it, and I want to know how to make a script or bookmarked script that will find these values and put them into my calendar. Any idea?
-2
votes
1answer
40 views

error “Can’t get button returned of \”C\“.” number -1728 from button returned of “C”

set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?") if button returned of buttonChoice = "No" then return "No" end if repeat set levelnum to text returned of ...
1
vote
0answers
31 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 ...
0
votes
1answer
22 views

iTunes: get selected mobile apps with AppleScript

I fear I already know the answer to this one, but is there any way to access the locally-stored Mobile Applications in an iTunes library using AppleScript? The selection property appears to not ...
2
votes
0answers
19 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 ...
0
votes
3answers
85 views

How do I determine which application launched automator service?

Is there a way to determine which application launched a Automator Service? The idea is to check the app that launched the service, with a shell/apple script and react differently depending which ...
0
votes
1answer
43 views

How to change filepath structure using automator (windows to mac)?

I use a mac at work and people send me windows file paths all day. Does anyone know how to convert the filepath using applescript in an automator so I can right click in an email and then open it? ...
0
votes
1answer
83 views

Get the process id of the app, which called the service

I have an service in automator, which is binded to the Safari ,no input option. Now is there any way for the service in automator to get the process id of the Safari, which called it ? New to ...
0
votes
3answers
102 views

How can I set the default browser depending on time of day?

I have a MacBook Pro from work. To keep my browsing history separate, I use 2 different browsers. (Chrome = Work, Safari = Fun) I want to make my default browswer Chrome while at work (9 am to 6pm), ...
1
vote
0answers
30 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 ...
0
votes
1answer
100 views

Applescript date manipulation to get multiple formats

I need to get a date (month, day, year) in multiple different formats for each part. So, for January 2, 1999 I need: the month as January and Jan and 01 and 1 the day as 2 and 02 the year as 1999 ...
2
votes
1answer
86 views

Can only run AppleScript from Automator

I have the following AppleScript which toggles the scroll direction on the trackpad: tell application "System Preferences" activate set current pane to pane "com.apple.preference.trackpad" ...