AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

5
votes
1answer
997 views

Folder actions on OS X observing all subfolders

I have a folder that I would like to add a folder action to. The action works great when the file is added to the top level. But when a file is added to and sub-folders, the action is not enabled. Is ...
3
votes
1answer
1k 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
597 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.
2
votes
1answer
638 views

Get the media buttons on my bluetooth headset working with Spotify on OS X

I just bought a Parrot Zik, which is a pair of bluetooth headphones with volume control, play/pause and next-prev buttons. (Or gestures, as they come with the Zik). The phones work beautifully with ...
2
votes
1answer
706 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
430 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
578 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
770 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 ...
2
votes
1answer
886 views

Save and reopen Spaces configuration in Mac OS X

Let's say that I am working using several spaces. In one of them I have 20 applications opened with their respective files. My computer crashes and I have to open everything again. Instead I want to ...
2
votes
1answer
80 views

Are Snow Leopard text substitutions scriptable?

I prefer using typographical quotation marks when possible, so I love the Smart Quotes part of Snow Leopard’s text replacement feature. But there are a few cases in which I need to toggle it, and it’s ...
1
vote
1answer
65 views

How to allow an application in Mountain Lion in the “Security and Privacy” settings?

Every time I was trying to use an Alfred workflow written in Applescript, I got the error "No user interaction allowed". In Mavericks there is an "Accessibility" option in the "Security and Privacy" ...
1
vote
1answer
199 views

Sorting Files into Subfolders based on EXIF Date

I have a huge directory from a HDD recovery that contains 70000+ JPEG files. I tried playing around with some AppleScripts, that I found, but had no luck. I already installed EXIFtool, which might be ...
1
vote
1answer
24 views

Register a file specified by open

So I have this small bundle with applescript made, and it even seems to work as it should. However, it appearently doesnt open my files when it is asked to via the open utility. It works though when I ...
1
vote
1answer
186 views

OSX script to Check if ffmpeg process has stopped

I have a Automator Workflow that uses Videobox to convert flash videos for multiple devices but cannot tell when it finish a conversion,I know that it uses ffmpeg for its conversion as I can see it in ...
1
vote
1answer
258 views

Applescript to shell script watch folder

I am trying to setup a watch folder so that when a file is added to a folder, I can run a shell script...for this purpose I made a simple test but cannot make it work... Here is my applescript on ...
3
votes
0answers
534 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
286 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
83 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
247 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
19 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
108 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
146 views

AppleScript - “Close tabs to right of current tab” in Safari 7

I have been using the AppleScript below as an Automator service in order to get Safari to close all tabs to the right of the current tab. However I have updated to Mavericks (10.9) and find that this ...
1
vote
0answers
120 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
200 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
130 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
130 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
120 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
155 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
36 views

Why Does Clicking on Applescript Notifications Open the AppleScript Editor?

I'm experimenting with AppleScript and with Python. But the big issue i'm having now is not about Python specifically. The end goal is to be able to write Python scripts that use AppleScript features. ...
0
votes
0answers
19 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
20 views

Applescript for Hotspot Shield

I'm trying to build a simple Applescript to control the 'Connect' and 'Pause Protection' buttons in Hotspot shield VPN, but there is no applescript dictionary or menu bars for the programme. Does this ...
0
votes
0answers
15 views

Prevent application from detecting screen zoom on Mac OS X

I have an application which streams live television, using a rather expensive portable mobile decoder. And for some reason the company that controls the app has decided to limit the screen size of the ...
0
votes
0answers
13 views

Applescript won't open applications on my external monitor

I'm trying to open a new MacVim window with Applescript, and have found partial success with this: do shell script "cd \"~/code/application\"; ~/bin/mvim > /dev/null 2>&1" This works ...
0
votes
0answers
52 views

Can one show or hide the Mac OS X on-screen keyboard via either keystroke or API?

I would like to show and hide the Mac OS X on-screen software keyboard (fig. 1) with a keystroke, but no actions to do so are available when customizing the keyboard shortcuts via System Preferences. ...
0
votes
0answers
61 views

disabling password require via applescript freezes Mac

I wrote little script to enable/disable screensaver and password check. Idea is that when my iPhone is near to my Mac (Proximity app checking this), screensaver and password check should be disabled. ...
0
votes
0answers
73 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 ...
0
votes
0answers
45 views

Outlook on a MAC and the 1GB limit

While waiting for MS Office 2014 to arrive and address the 1GB limitation, has anyone written an AppleScript for detecting file size on an Outlook file/folder to send a threshold exceed warning ...
0
votes
0answers
46 views

Changing Mac OS X text-to-speech voice per contact in Messages.app

I am quite enjoying using the Speak Events.applescript handler in my Messages.app. It speaks the incoming messages. I'd like to have a male voice for my male contacts and a female voice for female ...
0
votes
0answers
136 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
16 views

Automator service - deleting last page from PDF

I was reading this post on deleting first page from the PDF. How can I modify the desribed work flow in order to delete the last page from the PDF?
0
votes
0answers
120 views

How to automate a printer installation on a Mac

I would like to automate the installation of network printers (shared via Windows print servers - i.e. smb) onto clients' Mac. Since I am new to the Mac world, I would like to get recommendations ...
0
votes
0answers
44 views

How can I launch an app, wait for it to exit, then launch another app with AppleScript/Automator?

Without printer drivers on mavericks, I have to launch a headless VM on Fusion to get an AirPrint server but I don't want to keep it on when I start another VM on Parallels, so I want to stop it at ...
0
votes
0answers
25 views

Is it possible to duplicate mail.app and access using applescript on mac?

I made a simple applescript to create an email conversation. It was a program that, when you sent it an email that said "update schedule", it would send the sender of the message an updated schedule ...
0
votes
0answers
85 views

How to make my Macbook to reconnect automatically to my WIFI network when the connection timeouts

I'm using a white 13" Macbook to stream a radio station to my workplace, this computer is at home, and I'm looking for a way to guarantee that its signal will be on 24/7. Software-wise everything is ...
0
votes
0answers
30 views

clicking on a menu extra of a 3rd party application using applescript

Is there a way to click on a 3rd party app extra menu status items? This is "TouchlessForMac", an app for LeapMotion. I would like to click on Advanced using applescript.
0
votes
0answers
102 views

Printer Deploy with and custom preset profiles to Mac OS X workstations

How would I go about deploying a network printer (Sharp MX-2600N) to Mac OS X machines that would include a custom printer preset profile (Embedded Printer User Authentication Code)? I am newbie when ...
0
votes
0answers
45 views

Applescript to change the address of an iTunes streaming file

it's a really really simple concept, I just can't figure out to do it... I'm trying to use Applescript to use iTunes to listen to different files on a site almost like a background radio. To get this ...
0
votes
0answers
110 views

Making Google Chrome bookmarks update/overwrite with page last left off in same domain

I'm wondering if there's a way I can make Google Chrome 'save my progress' through a certain domain, and update with that page to the same bookmark. Just a quick time saver to avoid re-bookmarking, ...
0
votes
0answers
224 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
571 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 ...