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

learn more… | top users | synonyms (3)

0
votes
1answer
2k 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
424 views

How do you set the selection in iTunes in an AppleScript

I'm writing a script in iTunes, part of which changes the selected playlist. When I'm all done, I want to restore the playlist and the selected tracks. I was able to do the first, but haven't found a ...
0
votes
1answer
1k views

Sending emails with the Apple Mail program using AppleScript.

I don’t know AppleScript at all so thanks in advance for any help offered on this question. I’m on my Macbook Pro laptop with the latest version of OSX installed. I have a csv file that looks like ...
0
votes
2answers
124 views

Process list with name and VPRVT

Is there any way to get just name and VPRVT of running processes?
2
votes
3answers
512 views

Sort Finder columns reversed

I can't get this reversed thing to work: Tell application "Finder" to set the sort direction of the modification date column to reversed
2
votes
1answer
75 views

Have OS X auto-search for WiFi

My school has installed PowerCloud, which does not officially support OS X. It works sometimes, sometimes it doesn't. I've tried to narrow it down but it's impossible. I was wondering if there is a ...
0
votes
1answer
641 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 ...
2
votes
1answer
680 views

How can I script Preferences changes in an application?

I want to use applescript to change a checkbox in the preferences box of Safari. I can open the preference window, but how to code the check box change? Example: I'd like to toggle the check box for ...
0
votes
1answer
34 views

Window and Menu IDs

There's a tool on OS X, and I can't remember what it is for the life of me, that will display what the menu and window IDs are of a selected tab, window, or checkbox. Can anyone refresh my memory?!
3
votes
2answers
438 views

Alfred extension or equivalent that brings a single window to the forefront

Right now, if I want to switch to a Sublime Text 2 window open to a "project" called foo, I can do option+space, type Sub hit enter and then hit cmd+` repeatedly until I arrive at the window I want. ...
1
vote
5answers
12k views

How can I create a stand alone APP to run a terminal command

I have the requirement to manually run the OSX maintenance scripts in OSX (Lion / Mountain Lion). I would like to create a completely stand alone application that would achieve the following goals: ...
3
votes
1answer
324 views

Is it possible to launch a Linux application running under Parallels from OS X?

I am looking for a way to launch an individual application (e.g. Firefox) on my Ubuntu installation which is running under Parallels. I am open to any method of launching such as a shortcut (like how ...
1
vote
1answer
2k views

Automator -> send file to email (from filename)

Im trying to create an Automator folder action that sends an email with an attached file. In my folder the files will be generated with the email as name: Example: name@company.com.jpg, ...
3
votes
2answers
2k 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
1
vote
1answer
4k 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
388 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
1k 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
449 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 ...
5
votes
2answers
5k 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
892 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
382 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
143 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
1k 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
2answers
1k 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
2k 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
2answers
521 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 ...
6
votes
1answer
757 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 ...
3
votes
1answer
283 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
8k 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
533 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
807 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
179 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
758 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
468 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
85 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
356 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 ...
-1
votes
1answer
3k 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
72 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 ...
5
votes
5answers
10k 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
959 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
2k 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
2k 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
1k 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
143 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
3k 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
630 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 ...
1
vote
3answers
2k 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
873 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
982 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 ...