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
1answer
71 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 ...
4
votes
1answer
284 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)? Ideal Method of ...
3
votes
2answers
114 views

Use one AppleScript to toggle on and off (1 or 0)

I'm wondering if there's a simple way to use one AppleScript program to turn something on and off. Basically I want it to do this. Check current pmset sms if sms = 0 then do shell script sudo ...
2
votes
2answers
56 views

AppleScript - Get the path to an application without opening it

I need to store the path to Chromium to use later in the script, however running set chromium to (POSIX path of (path to application "Chromium")) in AppleScript Editor opens the application. How can I ...
1
vote
0answers
23 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 ...
2
votes
1answer
69 views

Binding DualShock 4 button to AppleScript?

I setup a dualshock 4 (PS4) controller to work with my Mac Mini for XBMC, which can play games on emulators like SNES9x. The issue I'm having though, is that when I want to quit the game/emulator that ...
0
votes
0answers
21 views

Apple script on network share not working

Hi I would like my apple mini server (mavericks) monitoring a folder on another NAS (running linux). If other users add files I would like it to send an iMessage or email to notify me that a folder is ...
2
votes
0answers
116 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
665 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
33 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
53 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
51 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
64 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
34 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
61 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
151 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
65 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
5k 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
158 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
365 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
669 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
128 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
67 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
87 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?
2
votes
1answer
94 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
119 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
56 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
64 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
618 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
113 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
36 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
21 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
71 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
119 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
533 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
86 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 ...
12
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
62 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 ...
4
votes
3answers
947 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
464 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
104 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
99 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
349 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 ...
2
votes
1answer
160 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
51 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
109 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
352 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
1k 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 ...