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

learn more… | top users | synonyms (3)

1
vote
2answers
1k 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
2k views

Searching for items in list

I'm trying to search within a list of items (specifically, a list of files from a folder) for certain files. However, I don't know the names of these files; all I know is that they all begin with the ...
0
votes
1answer
287 views

Automator: start embedded YouTube

So, I need to show some kids a sequence of YouTube videos (with Automator, because there's no one available to man the computer for 30 minutes), but it's at a school where the YouTube domain is ...
1
vote
1answer
786 views

How to create Automator Service to change font of selected text?

I'm trying to create a "Service" in Automator that changes the font of the selected text in the frontmost app.
1
vote
2answers
297 views

Applescript to compare two lists of domains and eliminate duplicates

I tried to do this with Automator and found it...lacking. I have tried to look for solutions everywhere else I can think of, but my searches keep pointing me to Applescript as the only available ...
2
votes
2answers
2k views

Problem with empty spaces when executing shell commands in AppleScript

The following code to purge a directory recursively does not work because I cannot get past the Application Support folder. try do shell script "rm -r ~/Library/Application\ ...
1
vote
1answer
549 views

Checking button text with applescript

I'm trying to automate CCleaner, so far I can start the application and click the button that starts the cleanup job, however I'm relying on a delay to determine when I should move onto the next ...
0
votes
1answer
236 views

Applescript and Fantastical

I trying to add a Fantastical event with AppleScript. Aparently the Fantastical Suite is quite simple as there is only one verb. parse sentence v : parse sentence parse sentence text : sentence ...
1
vote
1answer
101 views

How can I make compiled applescripts on $PATH be found and executed?

I have some short applescripts that I want to use as utility functions inside shell scripts-- for example, one returns the name of the frontmost application. The scripts reside in a personal scripts ...
0
votes
2answers
779 views

Applescript dialog, Bash alias/function

I'm trying to create a short alias for creating System dialogs from the Terminal. I tried to create a Bash function (since an alias didn't seem to take arguments) and add it to my .bash_profile, but ...
1
vote
1answer
659 views

using automator/applescript to upload files to a web form?

I have a bunch of files I want to upload to web page. Unfortunately the web form for uploading only allows me to specify one at a time (it spawns and 'open file' dialog). Is there an easy way to do ...
3
votes
1answer
1k views

Save attachments from Mail.app based on subject

I have been trying to write an Applescript to help me saving attachments, but realized quickly that I do not have the knowledge to do such a difficult script. Here is some background. We receive ...
1
vote
1answer
350 views

AppleScript: Open a new window in current space without switching to active window in another space

I want to have an application open a new window in the current space without switching to a space in which a window is already open, but I want to keep the When switching to an application, switch ...
5
votes
1answer
529 views

Execute a custom script when OS X 10.8 is in Power nap?

Apple new feature of OS X 10.8 in new Macs "Power Nap" checks email and does make backups. Is it possible to execute a custom script (bash, AppleScript,...) when OS X 10.8 is in Power nap mode? For ...
3
votes
2answers
2k views

Applescript giving error 1728 when checking if file exists

I'm trying to make compressing a video file using HandBrake easier through applescript and have been basing most of the code off of templates I've found. At this point in the code, the user has ...
2
votes
1answer
234 views

troubleshoot applescripted typing missing shift key and numerics in windows xp under parallels 8?

I am using a Windows XP VM with Parallels 8 under Mountain Lion. I have a remote desktop connection from XP that does not allow pasting from the clipboard, but typing works, of course. I have an ...
3
votes
3answers
4k views

Applescript click automation in Google Chrome browser?

Hello fellow programmers! I would like to save some applescript code as an application, so that when I open the application it will go to Google Chrome and answer an incoming call in Google Voice. I ...
1
vote
2answers
362 views

How can Growl trigger an shell script or AppleScript (NOT vice versa!)

When a Growl notification gets issued I want to trigger an AppleScript. I had a look at the "Actions" in the Growl preferences, and you can trigger things like an email or a text-to-speech call, but ...
2
votes
2answers
474 views

Using cURL to download images in XML feed?

I have an XML file that has links to various .jpg I want to create an applescript that downloads a local copy of these. The idea is to also label them sequentially with a number say 001 to 030. ...
0
votes
1answer
170 views

Toggle Apple Mail “Classic Layout” with shortcut?

Can anyone figure out a way to switch Apple Mail (v5.2) to/from "Classic Layout" mode with a hotkey? Maybe via Applescript?
2
votes
2answers
527 views

Inconsistent results when getting folder size in AppleScript

I'm using this line to get the size of a folder: set thesize to physical size of folder x The problem is that sometimes it works, other times it doesn't, and it's very annoying because there ...
0
votes
1answer
393 views

Applescript to automate drop-down selection in Mozilla Firefox

I'm trying to automate the selection of a value from a drop-down box in Mozilla using an applescript. What I want it to do is to tab to the drop-down box and enter down twice to select the third item ...
1
vote
0answers
80 views

Why would a Folder script stop working in 10.8.2? I have been using this script for several years

property disk : "Webserver:RAID:active_jobs" -- name of mounted disk where all work resides property folderactive : "Active" -- name of Folder were active jobs folders are held property destination : ...
1
vote
0answers
214 views

How do I tell Finder to read the network folder contents?

I use the following AppleScript script to automatically connect a remote drive when my VPN connection is established using Viscosity: do shell script "sleep 5" tell application "Finder" mount ...
0
votes
1answer
756 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 ...
1
vote
1answer
62 views

How to invoke a script when closing any file with a given extension

Is it possible to automatically invoke a given applescript when closing -any- file with a given extension in a specified folder (and subfolders)? If not in AS, is this possible in bash? (The AS I am ...
4
votes
5answers
6k views

Can I download all pictures on a page?

Is there a way I can run a script with a certain web page as the argument that will download all the images from there?
3
votes
1answer
692 views

Hide windows in current desktop (Lion)

I'd like to make a keyboard shortcut that hides all windows on the current desktop, while ignoring windows on other desktops. Is this possible using Applescript?
0
votes
1answer
1k views

Script to be activated if web page changes [closed]

I'm looking for a way to have a script running on my desktop that will check a certain webpage for changes every x seconds, and if a change is made, it gives me an alert. I understand that with ...
2
votes
2answers
1k views

Applescript Click “Go” and “Open” - dialog inside application

In PCSX, (ps1 emulator), I'm trying to automate the steps to play an ISO. So, I'm doing this: set thepath to path to me set thesecondpath to POSIX path of thepath set thethirdpath to ...
0
votes
1answer
984 views

Apple Script + VPN + Textbox

I have an applescript : tell application "System Events" tell current location of network preferences set VPNService to service "VPN (Cisco IPSec)" if exists VPNService then ...
2
votes
1answer
120 views

Unique volname for DMGs

We have a build process that is now doing the common layout for distributed DMGs. This is done in a way that I've seen in many places -- the DMG is attached, then Finder does its job via osascript. ...
3
votes
1answer
2k views

Create playlists for full albums in iTunes (i.e. albums with all songs)

How could I create playlists for all of the albums in iTunes for which I have all of the songs? Assume that track number & track count metadata is accurate where specified, and don't worry about ...
1
vote
2answers
443 views

Applescript creating Sym link with spaces in the path

I'm trying to create a sym link to a network directory when i log in. This is working for a couple of other directories without spaces in the name, but for the life of me I cannot get this one ...
0
votes
3answers
846 views

Setting a variable to the result of a terminal command within an applescript

I'm trying to make a script that ejects all connected external drives and does not move on until they are all disconnected. The main problem I'm having is being able to set the variable vol_count to ...
2
votes
1answer
578 views

Automator finish one task before moving on?

I have automator running several applescript commands that I want to happen sequentially. For example, I have an empty trash command, then a shut down command. When I run the script, the computer ...
0
votes
1answer
745 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 ...
2
votes
1answer
324 views

Is there a GUI viewer of databases created by Database Events?

I wrote a simple AppleScript that saves data to a Database Events database. I see the database (DBEV file) in my ~/Documents/Databases folder, and I am wondering if there is a simple graphical utility ...
2
votes
1answer
481 views

Can OS X automate creating a reminders from a page in a web browser?

I enjoy the feature of creating reminders from a web page with one click. similar to how Omnifocus does this. Can Apple's Reminders do the same by apple scripting or other addition/short cut?
2
votes
1answer
759 views

Activating Mountain Lion screen saver from Applescript, part 2

This example was shown earlier: tell application "System Events" set ss to screen saver "Random" start ss end tell Is there an incantation instead of "Random" to display a slideshow from ...
1
vote
2answers
158 views

automator: get a folder if it dropped or ask for one otherwise

I'm building an automator application that acts on a folder that needs to be specified. Until now, I've been using the "Ask for Finder items" action to ask for a the folder to be used, but I would ...
0
votes
2answers
421 views

Applescript to update year tag for audio files

I have a lot of tracks in iTunes where the files are named "music-NNNN.mp3" with NNNN being the year the track was recorded. How can I use Applescript to automatically set the year tag for these files ...
1
vote
2answers
1k views

How can I automatically run an AppleScript on shutdown or logout?

I am more used to the Javascript style event handlers, but is there a similar thing in applescript that listens to system events like logout or shutdown to execute code or is there a way to have an ...
0
votes
1answer
901 views

Position windows via command line

I've got a little bit of ruby that sizes and repositions windows to a saved layout. It uses a snippet of AppleScript to actually do the positioning: osascript -e 'tell application "Twitter" to set ...
3
votes
1answer
139 views

Can I run an AppleScript upon my 3G modem connecting?

I'm looking for a way to run an AppleScript after my 3G modem is successfully connected to the carrier. The modem is using the standard OSX network panel to connect, so it's not using any crappy ...
2
votes
2answers
354 views

Applescript to quit all active browser processes

I am trying to quit all the active browsers using the below code, but am unable to get the list of all active browsers to quit. tell application "System Events" set appList to every process ...
3
votes
1answer
656 views

Get notified when battery is charged

Is there a way to write a custom apple script or any other way to get a Alert or Desktop notification when the battery on my Macbook Pro reaches a certain percentage of charge?
3
votes
1answer
382 views

Problem with my applescript to export keynote files to powerpoint

I've a big problem with an export applescript. I would like to export many keynote files to powerpoint files. I found this script below, but there is an error that tells that the menu item ...
0
votes
2answers
921 views

Automator & AppleScript: How do I import the texts of Notes and Reminders as PDFs and RTFs?

I would like to export and save the Notes and Reminders documents or texts as PDFs and RTFs, keeping or preserving the formatting and the background of Notes or Reminders, but the Notes doesn't have ...
1
vote
1answer
468 views

How do I command Automator to convert the multiple images from PNG to ICNS once at all? (Solved)

I use OS X Mountain 10.8.2. I used Automator and added AppleScript, copying the command from the old app's developer at the Iconoodle - Convenient ICNS to PNG image conversion (Iconoodle isn't ...