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
46 views

Script to change mail heading

I often need to change the heading of a received mail item, so that I can find it again in a Mail folder. Easy on Outlook, not in Mail. I found a tip as to how to do it (possibly on this forum): ...
0
votes
0answers
133 views

Applescript to enable internet sharing, but select where to share the connection from

I have the following applescript code that turns on internet sharing. What I want to be able to do is also have the applescript choose which connection I am sharing from the dropdown menu list. 1 ...
0
votes
0answers
40 views

Applescript to change main monitor

Is it possible to record some actions for figuring out the right applescript? I'm looking for applescript to toggle my computer from screencast settings to regular: Regular: 1. Display Time. 2. Main ...
0
votes
1answer
433 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
1answer
97 views

How can I keep System Events from deactivating?

I'm using more and more Applescripts for home automation that rely on System Events being active. The problem is that System Events shuts down if it hasn't been used for a while. I'm not sure how ...
0
votes
0answers
63 views

Applescript to move Calendar view of current week to top

Mavericks introduced a nice new feature in Calendar that puts a red bar above the current week while in the month view. You can also scroll by week, instead of by month, in the same view. With the ...
0
votes
1answer
1k views

Get Current Path to Script within AppleScript and Append Subdirectory

I have an AppleScript that I would like to be able to use from anywhere in the file system. Currently, it has some paths which are hardcoded, so it runs only from the Downloads folder. How should I ...
0
votes
0answers
102 views

How to style/format a string putting into Clipboard with Applescript?

How to style a string, which I want get copied into Clipboard, so I can paste it in the program's text window, which supports rich text? set the clipboard to myString as styled text doesn't work
0
votes
1answer
52 views

How to create a record at the runtime in applescript?

I would like to create a variable of type record at the runtime, I found this could work: set bcd to run script ("{" & "abc" & ":" & "def" & "}") But it doesn't: error "The ...
0
votes
2answers
74 views

How do I save a screenshot with the ISO 8601 date format with Applescript?

I am building a script that saves many consecutive screenshots. I would like to save the files in the ISO 8601 date format.
0
votes
0answers
31 views

Is there a way to recognise active applications that are not being used so a script could shut them down?

Is there a way to recognise active applications that are not being used so a script could shut the down? I'd like to recognise an application that is running but has not accepted keystrokes recently ...
0
votes
0answers
145 views

How Can I Automatically Add Email Senders To Address Book

I would like to run a script that will automatically add email senders to my address book. I saw a post that answered this exact question, but I had a question about how to correctly deploy the ...
0
votes
1answer
442 views

Start screensaver/ lock screen on screen sharing disconnect

Is there a way with an AppleScript or shell script to start the screensaver when you disconnect from a screen sharing session? For example, I connect via screen sharing from Mac A to Mac B. When I ...
0
votes
2answers
418 views

Restart OS X if an application has crashed/is not responding/beachballed?

How can I automatically restart the machine if an application has crashed in any way? It might have cleanly exited, have a quit unexpectedly error, or be frozen with the spinning beachball. I don't ...
0
votes
1answer
296 views

Access OS X Mail message by its ID

I am trying (unsuccessfully) to get a Mail message (located in the 'Drafts' folder) by its message id. The following code: set theContent to getContent(123456) on getContent(theID) tell ...
0
votes
1answer
77 views

Enumerating messages in Outlook's Drafts folder generates an error

I would like to enumerate the messages in Outlook's 'Drafts' folder. When I run this script: tell application "Microsoft Outlook" set theMessages to every message in the drafts --returns 1 ...
0
votes
1answer
132 views

Applescript Replace sub-procedure doesn't work with '@'

I'm trying to substitute an email address for a symbolic character in a block of text. The text block: Dear %%FirstName%%- ... This message was sent to %%EmailAddress%%. The script: ... set ...
0
votes
1answer
457 views

How to make Rsync copy alias files?

System specs: 2011 iMac, OS X Mountain Lion 10.8.4 I have come to understand that Rsync does not handle Mac Alises properly, and have now discovered that hundreds of aliases I've previously copied ...
0
votes
1answer
91 views

Open contact group on Mac

I just want to use AppleScript to open an existing group in Mac Address Book (v7.1). tell application "Contacts" set selected of group "friend" to true activate end tell above is the sample ...
0
votes
1answer
164 views

How to ask for a mail folder in applescript?

I apologise in advance since this will be a long question. I hope that somebody with applescript knowledge can help me. I am transferring whole of my Windows machines to Apple and I am stuck with one ...
0
votes
2answers
583 views

Script or workflow to modify find and replace text in clipboard

I need give unique names to many, many files as part of my job. I download dozens of PDFs from a research database which all come with the same name (date of download). I have to open the file, select ...
0
votes
1answer
209 views

Applescript to delete iMessages from Messages app

I have an Applescript that sends myself and colleagues iMessages when certain events happen. Some times hundreds of iMessages are sent in a short space of time to lots of people and the Messages app ...
0
votes
1answer
267 views

Expand Sending Email with Applescript

I read with interest the article regarding sending an email based upon parsing through a csv file to pick up the name and email address. This looks like most of what I need to accomplish my objective ...
0
votes
0answers
92 views

How can I use AppleScript to reshow the last OS X notification (in the notification banner)?

After the notification disappears, I want to be able to make it appear again through AppleScript.
0
votes
0answers
8 views

How to test if video is local or streamed from net? [duplicate]

If i watch video in QuickTime Player, how i can test in my AppleScript, is this video file in my Mac or is it streamed live from net? Anybody know address of QuickTime live streams i could use when ...
0
votes
1answer
40 views

script to cycle through multiple pdfs and want to close the windows

Hey everyone I am new to applescripting. I have a need for an applescript that will cycle through 3 PDFs, located out on a share drive. I have the script but the problem is that if a user overwrites ...
0
votes
1answer
156 views

make applescript close keynote after presentation is over

does anyone know how i would achieve the following? i want to make applescript close Keynote AFTER the slideshow is finished. any idea? mybe via the class "playing" in keynotes application properties? ...
0
votes
0answers
207 views

AppleScript works fine in 10.8 but not in 10.7

I have a simple AppleScript that works perfectly on two ML machines (10.8.3), but when I try to run it on a 10.7.5 machine it doesn't work. To make matters more confusing, in 10.7.5 it runs in the ...
0
votes
1answer
285 views

how to auto download a certain attachment in mail

I have looked on stack exchange and other sites for a simple applescript. I have found more complex scripts that it's hard for me to understand (not knowing a lot about the applescript syntax). So, ...
0
votes
2answers
276 views

Running Applescript using cron jobs not working

I'm new to conjobs and applescript but I have the script done correctly i believe. (any critique is welcome) I don't want to bloat my calendar with events to do this because I use my calendar for ...
0
votes
0answers
46 views

FileMaker 6 and AppleScript: Deleting a Menu Item

I am trying to write an AppleScript to delete or at least disable certain menu items in FileMaker pro 6. My documentation indicates that it can be done, yet even the exact examples that they give, do ...
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 ...
0
votes
1answer
423 views

How to save AppleScript Editor Documents?

I try to save script in front most window in AppleScript Editor to desktop as text without using GUI scripting. tell application "AppleScript Editor" to save contents of document 1 as text in ((path ...
0
votes
1answer
286 views

How to add a script that types in the password for my vps through applescript

I made a script recently and have turned it into an app, it basicly logs me into my vps via ssh but I don't know how to tell it how to type in my password for me, heres the code tell application ...
0
votes
1answer
652 views

Any way to delete custom fields of cards in Contacts.app?

Some custom fields of contact cards in Contacts.app are really annoying. For example, nicknames always appear in Mail.app. To make things worse, there seems to be no menu option to delete custom ...
0
votes
1answer
325 views

Programmatically read both per-tab Terminal.app titles

When bringing up the Inspector (⌘I) in Terminal.app to edit the title (⇧⌘I), there are actually two titles that can be entered. The first is known as the Tab Title and affects the terminal window ...
0
votes
1answer
257 views

Set Specific Podcasts to Show as TV Shows in iTunes, using AppleScript

I'm using on online TV recorder to record TV shows. Those recordings are downloaded as a podcast to iTunes. My following Applescript should just grab those podcasts, update some info fields and ...
0
votes
1answer
327 views

Detect the TV Show, Season and Episode from a mp4 file in applescript

Assuming I have an MP4/M4V file of a TV show. The file has the necessary metadata so it can be imported into iTunes and you'll see the all the relevant information. Using AppleScript, one can extract ...
0
votes
0answers
24 views

Launch program after inactivity [duplicate]

Possible Duplicate: How can I automatically launch an application whenever the Mac goes idle? I'd like to launch an AppleScript/ App after 30 minutes of system inactivity. e.g. no cursor ...
0
votes
2answers
494 views

Applescript - ignore modifier keys

I have an applescript that needs to be called by an external program with command-shift-click. However, the applescript then performs keystrokes with command & shift held down. How do I get ...
0
votes
3answers
916 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 ...
0
votes
0answers
222 views

How does Snow Leopard arrange files by “Date Added” for folders on the dock?

I would like to know the underlying mechanism that Snow Leopard uses to arrange files, within folders that are placed on the dock, by "Date Added." I would like to know this in order to retrieve the ...
0
votes
1answer
2k views

How to create applescripts for Outlook 2011 to replicate Quicksteps?

Outlook 2010+ for PCs includes Quickstep functionality, that allows you to create multistep rules or macros to easily perform actions on selected email(s). Examples are automatically categorize an ...
0
votes
2answers
85 views

Toggle Mail Classic View in Mountain Lion with

I found a script on this site which I edited to make work with Mountain Lion, I thought. It works fine from Automator, but when I save as a service and assign a keystroke to it, it does not. Any help ...
0
votes
2answers
380 views

Is there a dial from Addres Book and tel:/sip: protocol handler script/application available for 10.7?

We are currently using Mac OS X 10.6 and snomURLHandler to convert tel: uri's to a http GET request. This computer telephony integration let us click on a telephone number in Address Book.app and let ...
-1
votes
1answer
78 views

Get (tell) AXScrollArea in Applescript (Or, classes not appearing)

In my AppleScript I need to get the AXScrollArea on the left of Accessibility preferences. My first thought was to try using the AXRoleDescription, "scroll area", but it wouldn't compile. syntax ...
-1
votes
1answer
58 views

Can Applescript ask for the names of the people you want to send to and fill this in send to

I’d like to be able to send to people from my address book where a dialogue would say who would you like to send the email to and I would write in like peter, john, George etc and that would populate ...
-1
votes
1answer
42 views

Creating preview and icon for screenshots [closed]

I would like to make this code to automatically create preview and icon so it looks nice in Finder and so i don't have to wait my graphics app to create these things when i first time open in browse ...
-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
votes
1answer
417 views

Applescript opens new window for everything when run

I have the following code I did for a tweetbot keyboard shortcut to open tweetbot and create a new tweet. on run {input, parameters} activate application "Tweetbot 2" tell application ...