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

learn more… | top users | synonyms (2)

2
votes
0answers
98 views

AppleScript for enabling VPN broken after update to 10.9.3

I've been using an AppleScript for connecting to my office VPN. After updating my macbook to 10.9.3, it fails to execute, and throws an exception Unable to get network preferences (honestly, it is ...
1
vote
2answers
564 views

How to go to tab 5 in Safari? (AppleScript)

Is there any way to go to tab number 5 in Safari? tell application "Safari" to set current tab of document 1 to 5
0
votes
1answer
28 views

For each press of spacebar, pass keystroke to app and increment input counter

I would like for each time user press spacebar, for the script to pass keystroke space to a browser (Firefox) to play a game while counting the number of times spacebar was hit. How do you do that ...
0
votes
0answers
40 views

Need Apple Script to redirect work mail - Mail rules don't work

I have to use MS Exchange at work for email, so I have Outlook and Apple Mail set up. I want to use Gmail but POP is disabled for us, so I can't just pop it to gmail. So, I tried setting up a rule in ...
0
votes
0answers
33 views

AppleScript editor cannot save .scpt file

I've created a simple AppleScript .scpt file, using TextEdit. If I now open it with AppleScript editor, I can run it. But when I try to modify and save it, I get the following error: It's ...
1
vote
1answer
57 views

How do I add a script to the Service menu?

See "How do I automate this repetitive task?" I'm posting here so I can show some screenshots of the work in progress. I'm very new to both StackExchange and also Automator. Don't yet know my way ...
0
votes
0answers
26 views

Why don't my volume-control AppleScripts run when called as Services?

I've got three AppleScripts that respectively toggle system mute, increase volume, and decrease volume. (For use with an old keyboard). They work fine when I run them as a workflow in Automator and ...
2
votes
1answer
48 views

Possible to automate entering star ratings and play counts for identical/duplicate song in iTunes?

I'm in the process of replacing my low quality <192 kpbs MP3s into either 320 kpbs MP3 or ALAC files in iTunes. Right now my routine is to import the new HQ files to iTunes, go to "Show Duplicate ...
5
votes
1answer
141 views

AppleScript to make the preview image become the master in Aperture library?

Recently I accidently deleted the folder that contained most of my Aperture library (I didn't think they were refenced, I assumed they were all in my library file, but unfortunately this was not true) ...
-1
votes
1answer
43 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 ...
5
votes
3answers
4k views

Activating screen saver from AppleScript in Mountain Lion

I had a script that I used to use to activate my screen saver, and it no longer works in Mountain Lion. It was a shell script that called an AppleScript script: #!/bin/bash osascript ...
1
vote
1answer
80 views

ffmpeg working from command line in Terminal but not in an Automator shell script!

I have just compiled my own copy of ffmpeg on my system and it's located in the following path: /opt/local/bin/ffmpeg When I run the following command in Terminal.app, it runs smooth: ffmpeg -i ...
2
votes
5answers
183 views

Ejecting all network drives via Applescript/Automator/Shell?

I use the following script to attempt to eject all disks that aren't internal: tell application "Finder" eject (disks whose ejectable is true) end tell This has the advantage of skipping ...
6
votes
3answers
1k views

How to disable individual USB ports by script?

I am looking for a script which will allow me to disable one specific USB port on my Mac mini. It would only serve a purpose if it works in real-time and didn't require a reboot. I've found scripts ...
3
votes
1answer
77 views

Log software usage time on Mac OS 9 (Oct. 1999)

I'm needing to log the time a user spends inside of an application in Mac OS 9. I created a simple bash script "launcher" to do this, but then discovered OS 9 doesn't have bash installed. Here is the ...
2
votes
2answers
300 views

Passing a password to an Automator application

I have written an Automator application with the following shell script to open an FTP connection on my system: sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist osascript -e 'tell ...
3
votes
1answer
116 views

Display IP address in an Automator alert

I am running an Automator script to launch SFTP on my Mac when double-clicked. Here’s the script: do shell script "sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist" with ...
1
vote
1answer
57 views

Check FTP status using AppleScript

I have an AppleScript Automator application that, when double-clicked, opens FTP and displays an alert confirming the same. It is working perfectly as expected. However, I am looking to make it a tad ...
1
vote
0answers
58 views

Get Finder tab-locations with applescript

I know how to get the location of the current finder window, but I would like to be able to also get all locations of open tabs in the current finder window. How do I do this with applescript?
3
votes
2answers
249 views

Automating ffmpeg using Automator Service

I often use ffmpeg off the command line to convert video files into mp4 on my Mac (running Mavericks). Do note, however, that I am NOT re-encoding my videos; am just changing the container from an avi ...
2
votes
1answer
66 views

Is it possible to submit not sandboxed app to the Mac App Store

I have an AppleScript Cocoa application that does a lot of shell scripts like kill or chflags. Is there any way I can try to send it on review to MAS and get it approved? According to Wikipedia: ...
0
votes
0answers
101 views

Adding alarms to a calendar entry using AppleScript in Mavericks causes error

I have following scripts (see bottom) that is meant to open all calendar entries and create alarms for each. This is working fine on 10.8.x. I've been testing the same script on Mavericks and I'm ...
0
votes
1answer
45 views

Why does this AppleScript not run in Outlook?

I would like set up an inbound rule in Outlook to run applescript on certain messages. However the rule fails with the following message: While processing message "Test" (ID 39523), the rule ...
0
votes
2answers
49 views

AppleScript to get all tracks from albums with less then a certain number of tracks

How would I write an AppleScript to get all tracks from albums with less then n tracks in iTunes?
2
votes
4answers
303 views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
1
vote
1answer
93 views

Encrypting a PDF during Hazel processing

I've created an Automator Workflow which can take the selected Finder item (being a PDF) and encrypt it using the Apple-provided "Encrypt PDF Documents" action. The problem with this action is it ...
0
votes
1answer
28 views

How can I locate in iPhoto an image selected in the Finder?

This is essentially the reverse of this question: given that I have selected an image in the Finder, is there an applescript or similar tool which will open iPhoto and highlight this file in the ...
1
vote
0answers
18 views

Different results of running the same AppleScript

The script is: tell application "DEVONthink Pro" activate end tell tell application "System Events" tell process "DEVONthink Pro Office" tell menu bar 1 tell menu bar ...
1
vote
2answers
47 views

Applescript to forward email but preserve sender

How can I make an Applescript that Mail.app on my Mac can run? When it encounters a message that is being sent to mac@email.com, I'd like it to redirect it to email@gmail.com, where the "From" field ...
2
votes
2answers
98 views

How to reset OS X volume after sleep using launchd?

I'm been trying to write a plist file on which when I return from sleep mode, I always want to make my Mac volume to the minimum amount. However, it looks like the following plist doesn't work, with ...
2
votes
3answers
512 views

Create a command to focus a specific window from anywhere in OS

While developing for the web I tend to jump back and forth between my text editor and the browser a lot. I'd like to set a keyboard shortcut at the OS level that allows me to jump to a specific, ...
1
vote
3answers
74 views

Trim first 6 characters from Folder Names [AppleScript]

I've found an AppleScript online which trims the first characters from a FILENAME, however, it does not seem to work on FOLDERS. How could this be modified to rename folder names? set whichFile to ...
11
votes
7answers
2k views

Is there a bash command to check to see if Time Machine has finished backing up?

I'm writing a script that will rsycnc my Time Machine directory to a remote server using ssh. I've switched from a shell script to an AppleScript and then back to an Apple script and I don't really ...
0
votes
1answer
48 views

I am trying to make an Applescript that launches a different set of apps depending on user input. However, it won't compile. What is wrong with it?

I made a simple AppleScript that launches a different set of apps depending on user input. I am new to AppleScript and it is tweaked from a bunch I found on the internet, modified for my usage. It is ...
3
votes
3answers
757 views

look up a word in Dictionary.app in Terminal

Is there a bash or applescript to look up a word in /Applications/Dictionary.app from a Terminal window ? open -a /Applications/Dictionary.app/ --args word ignores --args, says "type a word to look ...
5
votes
3answers
396 views

“drag n drop” application to convert images to base64 string (for web development)

I'm after an osx program that will convert an image into a base64 string (for web development). Basically replicates this: http://webcodertools.com/imagetobase64converter/Create I suspect there is ...
1
vote
2answers
92 views

How can you set up a free, universal OS X-wide ‘autosave’ script?

I want to set up a free solution in OS X for a universal ‘autosave’ function (given Apple’s own solution is limited to only a few apps - at least for now), and let Dropbox do my file versioning and ...
1
vote
1answer
82 views

Script to check Software Version

Hi i'm tryin to write a script to check software version. I want to pass my own variables, which are name of the Application and Version. Here's a copy. It's not working for me currently... i'm a ...
1
vote
1answer
326 views

How to create an apple script that forwards a flagged email

I want to create an apple script that will forward a flagged email to x@mail.asana.com I have tried this script: on run tell application "Mail" repeat with _acct in imap accounts ...
1
vote
1answer
372 views

need to script connection to telnet and send commands to remote device with no user input

Ok I need some help making a script that will connect to a server and send 2 commands Ideally I would have telnet 192.168.2.230 9993 and once it logs in (no user name or password required - the ...
2
votes
1answer
109 views

Trim filenames in automator w. shell or applescript

Why doesn't this work? (The automator is in swedish but the parts are: get selected finder objects - get folder contents - run shell script) I want to trim the first three characters of the ...
0
votes
0answers
41 views

How to click on an exact element in chrome using apple script?

I know it's website specific, but i'm just having a hard time understanding exactly how the do Javascript function works. For example, say I have this site to vote on and i wanted to run an apple ...
1
vote
1answer
71 views

SpeechRecognitionServer not found in Mavericks with applescript?

I am trying to use an applescript to get speech input from a user and then perform and action. However, the code i'm using was made for osx lion. When I put it into applescript editor, the editor ...
1
vote
1answer
243 views

AppleScript To Manipulate VLC

I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But ...
3
votes
1answer
907 views

Toggling screensaver password with script

I am using a rather old application called Proximity to trigger applescripts when my phone goes in and out of bluetooth range of my mac. Along with other tasks, I want to secure my laptop when the ...
1
vote
1answer
41 views

Can I give Automator apps a window?

Can I create a window / UI for applications created using Automator? Or is this just not possible with Automator apps? Background: I created an "application" through Automator, and dragged the app ...
3
votes
2answers
149 views

LaunchBar script that returns the path of a folder “dropped” on it

I want to make a LaunchBar script that displays in a dialog the path of a file or folder that's chosen in the first pane and then "dropped" on a script. But I can't make it work. I've got a couple of ...
0
votes
0answers
40 views

Authomatically press a keystroke with Automator/Applescript when a specific application is active

Background to problem: Spotify rolled out a new update, with new dark, high contrast color scheme, which is very tiring for eyes and difficult to read for people with various health issues. Inverting ...
2
votes
1answer
37 views

Running script through launchd with no annoying prompts

I have an applescript that checks my macbook battery and forces hibernation when it reaches a certain level, after displaying a 60 sec countdown. I've successfully set it up to run in the background ...
4
votes
2answers
9k views

How can I configure my computer to run an AppleScript at a specific time? Caveat: without using iCal

Since upgrading to Lion, I have seen a sleight decrease of productivity when it comes to using iCal. As a result, I am trying alternatives such as BusyCal. The application seems great, however I cant ...