AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

3
votes
1answer
2k views

Applescript create event in calendar, how do I remove the default alert?

Running 10.8 Mountain Lion, I'm trying to create a new event with Applescript like this: set theDate to (current date) tell application "Calendar" tell calendar "Calendar" set timeString ...
3
votes
1answer
824 views

How can I run an AppleScript or shell command on Mac OS X at screen unlock?

Note that this is not the same as startup or login. I never log out of my machine and I want to run the script whenever I unlock the machine to start working.
3
votes
1answer
947 views

Set OS X application preference to stop prompting for admin password

I am trying to write an applescript that sends some actions to an application (specifically waterroof). The problem is, the application periodically asks me for the admin password when I open the ...
2
votes
1answer
469 views

OS X Lion: AppleScript unbearably slow for moving Mail messages

I've been using for years now the following applescript, triggered via iKey by an F12 keystroke: tell application "Mail" to move (get selection) to mailbox "Archive" I'm using it to move inbox ...
2
votes
1answer
585 views

Different Wallpaper if two monitors are attached

I am working on my MacBook Pro. In the office I have 1 27" Monitor attached to it, at home I tend to work without an second monitor. For that setup I want to change the wallpaper if no 2nd monitor is ...
2
votes
1answer
933 views

Save as PDF to Folder Script for Apple Mail

I want to add a script to a rule to auto-print messages as PDF to a specific Folder. What I found was this: http://is.gd/acmsE but it doesn't work for me on OS X 10.6. I already know the Save to PDF ...
3
votes
0answers
838 views

Applescript to connect to bluetooth device

I'm trying to create an applescript to allow me to connect to a bluetooth device by it's Bluetooth ID. So far, i've managed to get an applescript to turn on bluetooth if it's off. Here's the code: ...
3
votes
0answers
386 views

iTerm2: How to get output of a shell command with applescript

I want to get the output of a shell command run through iTerm2's applescript into an applescript variable. I tried the following but it does not work: tell application "iTerm" activate try ...
2
votes
0answers
96 views

Applescript Adobe Updater

So, I am new to Applescript editor and I am trying to write code to automatically update computers. For some odd reason I can not seem to get Adobe to update successfully. I tried using Accessibility ...
2
votes
0answers
303 views

Script to join WPA2 Enterprise wifi

When I head to work with my MBP running OSX 10.7, I have to go through this series: Join Other Network Enter SSID select Security = WPA2 Enterprise generate a pw via my RSA soft token Join ...
1
vote
0answers
5 views

Applescript to create hyperlink at cursor location on MS Word

I want an applescript to create a hyperlink at the blinking cursor. I can't change the range so that it matches the cursor. Any help on this? Thanks! tell application "Microsoft Word" tell ...
1
vote
0answers
31 views

Toggling Yosemite's Notification Center between “Today” and “Notifications” views (back and forth)

I want to create a keyboard shortcut/trackpad gesture to: - display Yosemite's Notification Center first - then toggle back and forth "Today" and "Notifications" panes every time the corresponding ...
1
vote
0answers
15 views

How do I close a window from an application but not quit the application

I'm trying to have a shell script run and then close itself but not quit Terminal all together. Here's what I have: #!/bin/sh while [ "$JOB_NUMBER" = '' ]; do echo -n "++++++++++++++++++++Job ...
1
vote
0answers
30 views

Mail.app rules not triggering

I have a mail.app rule set up to run an applescript when incoming emails come in with a certain subject, but it does not trigger. I see the emails in my inbox, and the rule is activated, but it does ...
1
vote
0answers
231 views

AppleScript shows “Document could not be opened. You don’t have permission.” but file can be opened?

I am getting a "The document [filename] could not be opened. You don't have permission" when attempting to access several files in an AppleScript. However, I can open these files manually without ...
1
vote
0answers
299 views

Applescript + pdfpen for ocr on multiple files: how to move on when pdfpen freezes

I'm using the following AppleScript to batch-process pdfs for ocr: tell application "Finder" set target_folder to target of front Finder window repeat with i from 1 to count (every folder of ...
1
vote
0answers
184 views

Applescript app. won't force OSX to connect with VPN on Mac 10.8.4

I set up an applescript application (saved under the name "BTGuard VPN-OSX) to force OSX to connect with my VPN service (BTGuard). I followed instructions from this link ...
1
vote
0answers
292 views

Trying to re-direct emails as plain text using Applescript. Code (inside) isn't working, any help would be great

I have users sending mail through Outlook which formats the text as Rich text. I'm trying to create script where a "catch-all" email address intercepts the email, converts it to plain text then send ...
1
vote
0answers
146 views

Add a contact from an email address within email text

I came to Office/Outlook 2011 from Mac Mail, and now I find that I'm unable to do something that I need to do ALL THE TIME. In Mail, if there was an email address within the text of an email message ...
1
vote
0answers
137 views

Switch between Tabs with Applescript

I have a cocoa-applescript application whose GUI interface has 3 tabs.The identifiers for these 3 tabs are "item 1" "item 2" and "item 3" respectively. Tab1 is the default tab with a form on it. Tab ...
1
vote
0answers
134 views

Desktop Picture Placement

I made an Automator app that changes the desktop picture to whatever image file you drop on its icon. It used to work perfectly until Snow Leopard. Now the image placement always resets to Full ...
1
vote
0answers
172 views

process pdf attachments with applescript and pdfpenpro

I've set up a gmail account that will contain nothing but emails with pdf attachments. I've also set apple mail up to check this account. Now, I would like to set up an applescript to take the pdfs ...
0
votes
0answers
7 views

Missing file alert - OS X 10.9

A local folder receives one file per hour (via ftp). I would like a notification if the expected file does not arrive. I've thought about using hourly Calendar events to trigger a check but do not ...
0
votes
0answers
7 views

Applescript - how to tell which window is topmost on second screen?

I need to find topmost window on a given screen. I thought I could calculate the screen using position or bounds so this is not a problem, however I am struggling with the index property. I tried ...
0
votes
0answers
7 views

Send click event to dialog shown through display dialog command in OS X Terminal

I have an sh script that displays a dialog; this dialog can be closed by the user but I am looking at a gracious way to close it, from within another similar script, run at a particular moment, if ...
0
votes
0answers
17 views

Applescript to create link in specific place of MS Word document

I'm trying to make an applescript to work like this: 1) I let the flashing cursor at the precise place where I want the link to appear in the MS Word (v. 15) document. 2) I press a keyboard command ...
0
votes
0answers
28 views

Is there a way to have two or more clipboards via keyboard shortcuts for storing & using multiple text items simultaneously? (OSX)

I would like to be able to have multiple clipboards on Mac OSX (happen to be using Mavericks currently). The end-solution would look something like this: Let's say I copied one piece of text using... ...
0
votes
0answers
44 views

How to launch an AppleScript via URL handler?

Here's my workflow, I want to create clickable links in various places that run scripts with inputs. For example, I might have a link ...
0
votes
0answers
20 views

Conditionally change colors of events in calendar on mac?

Is it possible to conditionally change colors of particular events in calendar for mac ? the same way week cal on iOS works? Maybe with applescript? I havent found any apps for mac that can do that. ...
0
votes
0answers
37 views

NSUserAppleScriptTask and Script Monitor

I am wondering why some users of our app ghostnoteapp.com see the Script Monitor icon in their menu bar and others, including myself do not. According to the AppleScript release notes " (Script ...
0
votes
0answers
40 views

Speech Recognition in Yosemite blocks sound from other sources

I have found the answer to this one before, it is somewhere on this site. However, I couldn't find it, and I searched for quite a while. When I start the Speech Recognition Server (I use it with my ...
0
votes
0answers
42 views

Apple script or automator to process list of names

So I have an automator or apple script job and I have never done this kind of process before. I need to use a list of about 5000 names as input, open an application called LINE messenger, use that ...
0
votes
0answers
74 views

Mac OS X Mail messages moving back to inbox after Applescript moves them to another folder

I used Automator with an Applescript to move messages from my inbox to designated folders. When I check, they are all there. If I get another message with a related topic, it seems that both messages ...
0
votes
0answers
79 views

Yosemite run “mount volumes” is not same as Mountain Lion

This content has posted in Apple support community but I need the solution urgently so I copied to here. I have a script to mount the shared folder from Windows server (named: servicedesk) as a ...
0
votes
0answers
52 views

Applescript command to make window unclosable

I have an applescript program that auto opens whenever I wake my computer. I would like it to be unclosable until I input a password into it. Tried searching but found absolutely no sources that ...
0
votes
0answers
27 views

Why would this tell command start a program?

The following applescript is run as part of a larger program that I regularly use: on run {viewer, path_to_pdf} if viewer is "Skim" then display notification "Skim opened: " & viewer ...
0
votes
0answers
113 views

PHP - Exec on user's GUI session

I am trying to get a PHP script to execute an Applescript which opens an application.* PHP is running under the _www user. And while it can execute Applescripts with the osascript command, it can't ...
0
votes
0answers
226 views

How to create a schedule for SelfControl app

I want to block my blacklist Mon-Fri 6am-12pm and 1pm-5pm (closely related to this post), but I don't know enough about Applescript to know how to set up a schedule. Any ideas for how to achieve ...
0
votes
0answers
57 views

Lync Contacts on Skype not found via AppleScript

When I run the following AppleScript my Lync contacts (added to Skype and visible in my contacts list) are not returned, only native Skype contacts: tell application "Skype" ...
0
votes
0answers
29 views

Closing SugarSync Mac app window with AppleScript

I am trying to set up an AppleScript that will open some apps (including SugarSync) after startup so I don't need to have them as login items. It works, except that with SugarSync it also opens the ...
0
votes
0answers
166 views

MAC OS X - remote SCCM 2012 R2 client installation

I have came across a task to deploy CM client on couple MAC devices in order to manage them. I've watched several instruction videos about how to setup the site server and I'm pretty much clear on ...
0
votes
0answers
199 views

accessing mail attachments with AppleScript in Yosemite

I have an AppleScript to save the attachments of an e-mail message. It worked under OS X 10.9 (Mavericks). Now, with OS X 10.10 (Yosemite), it seems that every attempt to access "mail attachments" in ...
0
votes
0answers
47 views

AppleScript and MacOS X for launching App with credentials

Good day, I haven't done a lot of Scripting, and I need to find out how to make a shortcut for an App on the Desktop that will include the user name and password (so they don't have to type each ...
0
votes
0answers
45 views

applescript permissions for copied files

Using applescript, I'm copying PY files to a location in OSX. However, they don't compile when I load Python, it seems because the permissions havent been set on the files. When I look at "get info" ...
0
votes
0answers
118 views

Read a notification from OS X Notification Center using AppleScript

Is there a way to gain access to OSX Notifications with an AppleScript? For example, a notification is displayed: Skype - John says: Do you have time? The AppleScript would detect the new ...
0
votes
0answers
118 views

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

I want to initiate a Google Hangouts phone call with Applescript, or Terminal ... or python. (Hangouts.app has an AS dictionary, but with only the default suites.) Basically I want to emulate ...
0
votes
0answers
115 views

Applescript to run when connection to specific network on OSx

I have an apple script that I can manually run that will connect to a couple network drives. I would like it to have that script run when my mac connects to a specific wireless network connection ...
0
votes
0answers
274 views

OSX : Find all zip and rar in a selected folder then unzip and unrar

I am in the process of cleaning a huge library of mangas (mostly -but not only- image files ). Each manga has a main folder containing the different volumes, sometimes in .zip, sometimes in .rar. ...
0
votes
0answers
274 views

Force a file to overwrite instead of appending the filename

I've got an application running is OS X that won't overwrite a file with the same filename. It will only append the filename with a 'space 1'. If I write a file more than once I get something like ...
0
votes
0answers
590 views

Script Mail.app to auto-save attachments?

In similar thinking to a previous question, is it possible to script Apple's Mail.app to auto-save attachments from a given address or file type? Presuming it is, what would that AppleScript look ...