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

learn more… | top users | synonyms (2)

0
votes
0answers
8 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 ...
3
votes
0answers
191 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 ...
0
votes
0answers
14 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
0answers
17 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
7 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
8 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
1answer
46 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
0answers
11 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 ...
4
votes
3answers
2k views

How can I stream audio to multiple computers at the same time?

I'm trying to stream music to different computer's speakers simultaneously. Currently I'm doing this by physically timing the start of the song on each computer. Are there any built in utilities or ...
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
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 ...
0
votes
1answer
17 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 ...
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
0
votes
3answers
914 views

creating script for ical events from properties of address book entries

I want to create a script that creates alarmed events in ical for birthdays of people that I have in my address book. Unfortunately, I am very bad working with applescript. Below is the outline of ...
1
vote
3answers
43 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 ...
1
vote
1answer
23 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 ...
0
votes
0answers
8 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 ...
2
votes
1answer
2k views

How do I give accessibility permission to my AppleScript and System Events in Mavericks?

I've got this old AppleScript that uses a mouseclick function: activate application "Safari" tell application "System Events" tell process "Safari" click at {424, 699} end tell end ...
1
vote
0answers
26 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
11 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
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.
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 ...
66
votes
5answers
29k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
-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
20 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 ...
0
votes
1answer
46 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 ...
3
votes
1answer
552 views

Hide windows in current desktop (Lion)

I'd like to make a keyboard shortcut that hides all windows on the current desktop, while ignoring windows on other desktops. Is this possible using Applescript?
2
votes
1answer
1k views

Waiting until a window exists in Applescript?

I'm trying to work with the script below and the repeat until exists window "Print"loop never returns true (I never hear the beep 3). Is this the correct way to wait for a window to appear? I am ...
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 ...
2
votes
3answers
4k views

How do I create an AppleScript that will quit an application at a specific time and then put the computer to sleep?

I've been toying around with AppleScript and Automator to get this thing to work, but I just can't seem wrap my head around it. If anyone could show me an example or give me some tips on how I can set ...
1
vote
2answers
30 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?
2
votes
2answers
680 views

Applescript to kill open applications and log out user after 30 min. of inactivity

I'm looking for a way to automatically log off a user after 30 minutes of inactivity, as well as close all open applications. As of now, there is really only one user to deal with. I'd prefer an easy ...
1
vote
1answer
56 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 ...
3
votes
1answer
842 views

enabling/disabling internet sharing with terminal in mac osx 10.9.2

Very much on the line of already existing questions, but not having enough reputation to comment by following existing threads, I can only ask my own, at the risk of duplicating may be, certainly ...
1
vote
1answer
29 views

Pausing workflow until action complete

I have Hazel set up on a media server to automatically add files to specific iTunes playlists based on a text tag in the directory name. Several users will send us individual files or directories ...
0
votes
2answers
82 views

Is there a way to extract contents from AppleScript file without using AppleScript editor?

I have a bunch of applescript files I need to run but some that were running yesterday are not running today. Applescript is showing me this beautiful message. When this message is shown, console ...
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
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 ...
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' ...
1
vote
0answers
52 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
3answers
1k views

Using automator and handbrake cli to convert videos automatically

I am trying to automate video conversion process using Automator and Handbrake CLI version. I am trying to implement the functionality that whenever a video is downloaded in my dropbox folder on my PC ...
2
votes
1answer
246 views

How can I permanently force Xerox secure printing?

My clients are printing direct to a network printer (no print server). Xerox have confirmed that the Secure Print Only option is only available in Windows, so I am looking at editing .plists, ...
0
votes
1answer
855 views

copy calendar entries from one calendar to another via apple script throws error

i am trying to copy ical entries from one calendar to another using the following script: tell application "iCal" set localEvents to events of calendar "Privat" set remoteEvents to events of ...
1
vote
2answers
292 views

How can Growl trigger an shell script or AppleScript (NOT vice versa!)

When a Growl notification gets issued I want to trigger an AppleScript. I had a look at the "Actions" in the Growl preferences, and you can trigger things like an email or a text-to-speech call, but ...
0
votes
1answer
85 views

How to fix my Applescript plugins for the Contacts application that are no longer available since 10.9 Mavericks upgrade?

I have got 5 scripts listed in ~/Library/Address Book Plug-Ins/ SkypeABDialer.bundle SkypeABSMS.bundle TelephoneAddressBookPhonePlugIn.bundle TelephoneAddressBookSIPAddressPlugIn.bundle Dial with ...
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
1answer
887 views

AppleScript to close “About this Mac” window

How could I use AppleScript code to close the window named "About this Mac" (A propos de ce Mac in French). I need an AppleScript for this because I use Dragon Dictate 3 commands. I am handicapped and ...
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 ...