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
6 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 ...
0
votes
2answers
22 views

Mission control: switch to desktop1 + show desktop

I'm bored of pressing 2 key shortcuts need to write a script that tells mission control the following: if not at desktop1, switch to desktop 1 perform "show desktop" (windows will be ...
1
vote
0answers
12 views

AppleScript-sent messages pop up as unsent drafts when trying to quit Mail

I have a spam processing script that I use to forward spam messages as attachments to my spam filter using the 'send' command in AppleScript. Everything processes and delivers fine, but later when I ...
0
votes
2answers
87 views

Toggle Bluetooth AppleScript not Working in Yosemite

Prior to upgrading to Yosemite, I used Keyboard Maestro to invoke this Applescript with a shortcut: tell application "System Preferences" reveal pane "com.apple.preferences.Bluetooth" end tell ...
0
votes
1answer
8 views

How to get the first name of the recipient to be auto-added to new messages in Mail.app?

I'd like new messages that I create, including replies to messages I receive, to automatically get a "Hi <name>," inserted in their first line. <name> should be the first name of the first ...
0
votes
1answer
58 views

iTunes 12: How to cycle through View Options with script/shortcut?

I'm trying to writing an applescript that cycles through Songs, Albums, Artists, Composers, Genres, and back to Songs. There is nothing in applescript Dictionary with regards to this, so I have to ...
0
votes
0answers
62 views

Folder Action Script stop working after Yosemite install

I have an AppleScript that worked fine with Mavericks: on removing folder items from this_folder after losing lost_items repeat with i from 1 to number of items in lost_items set nameOfLostFile ...
0
votes
1answer
28 views

How to periodically run a script/command when a specific application is being used?

I would like a certain applescript to run every 10 seconds but only when a specific application is being used (i.e. both being the front application AND the mouse or keyboard being used in the last ...
0
votes
0answers
12 views

Apple Script not running as expected

The following is an applescript which is meant to take the body of the latest email and extract text out of it. As you can see the result is shown below. This result is show as the script was running ...
1
vote
0answers
15 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
12 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
25 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
51 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
15 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
19 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
27 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 ...
3
votes
0answers
374 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
56 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
19 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
9 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
36 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
12 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
15 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
21 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
27 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
26 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
3answers
83 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
0answers
47 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 ...
4
votes
2answers
45 views
+50

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
32 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
68 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
21 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
64 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
63 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
14 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
16 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
97 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
47 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
39 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
59 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
45 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
35 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 ...