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

learn more… | top users | synonyms (3)

-1
votes
1answer
1k 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
63 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
7k 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
765 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
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
131 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
473 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
1k 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
618 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
787 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
338 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
560 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
781 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
174 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
505 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
1k 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
140 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
407 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
764 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
432 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
1k 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
505 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 ...
1
vote
1answer
111 views

How to start a service automatically after openning an application?

For example, I have a service that I want it to be started automatically when I open Firefox. I know how to write scripts as services in automator, but I don't know how to make a hook that when ...
1
vote
2answers
479 views

Automatically move files into correct folder on server

I often need to move files from one location on a server into a set of hierarchical folders. The filenames are usually 7 digits long - sometimes with some extra characters at the end. The folders ...
0
votes
1answer
417 views

Programmatically read both per-tab Terminal.app titles

When bringing up the Inspector (⌘I) in Terminal.app to edit the title (⇧⌘I), there are actually two titles that can be entered. The first is known as the Tab Title and affects the terminal window ...
0
votes
1answer
196 views

Script to Update/download most recent iTunes podcast WITHOUT opening iTunes at all?

I have a couple favorite podcasts that I subscribe to in iTunes. I'm using You Control (so I don't have to open iTunes to play my music). I'm using Keyboard Maestro. I've made a macro that runs ...
4
votes
1answer
292 views

Any way to write the Terminal scrollback history?

I would like to open a new tab in Terminal with custom scrollback history. The primary use-case is to "fork" an existing tab such that both tabs contain the same scrollback history, but more generally ...
1
vote
2answers
4k views

How can I get certain types of files dropped in certain folders based on file type?

I was wondering if it is possible to have the following: In my Downloads folder, I have 2 subfolders : IMAGES and VIDEOS. Is it possible to automatically move every image downloaded to the Downloads ...
0
votes
2answers
3k views

Applescript to add sender of message to specific group in Contacts

I'm trying to set up an Applescript to add the sender of a selected message in Apple Mail to a specific group in the Contacts app. By reconfiguring the code provided in this answer, I worked up the ...
0
votes
1answer
6k views

Automatically Save Attachments in Mail.app in 10.8 Mountain Lion

I am trying to automatically save all email sent to one address (let's call it test@example.com) to this folder /Users/luomat/Dropbox/Incoming/e2w/ (where /Users/luomat = $HOME). Here is the rule ...
0
votes
1answer
89 views

Turn on iTunes EQ via AppleScript

Can I turn the iTunes EQ on/off using AppleScript? I found a way to change the preset, but not turn the EQ on or off.
2
votes
1answer
277 views

Safari - menu to show live tabs open in open windows

I often have five or six Safari (and Chrome) windows open, each containing several tabs. I often lose track of where a live tab is when I want to return to it. I can use the Safari window menu option ...
1
vote
2answers
2k views

Applescript to type text, followed by a modifier key combo?

I want to use TextExpander to activate when I type the specific text "attached", and have the AppleScript type out the word "attached" (since TextExpander will remove it), and then invoke the ...
0
votes
1answer
3k views

How to initiate a specific keystroke using automator?

I have the following code : on run {input, parameters} if application "KeyboardViewer" is running then quit application "KeyboardViewer" else activate application ...
-1
votes
1answer
453 views

Applescript opens new window for everything when run

I have the following code I did for a tweetbot keyboard shortcut to open tweetbot and create a new tweet. on run {input, parameters} activate application "Tweetbot 2" tell application ...
1
vote
1answer
499 views

How to start an app in the foreground?

For some reason, gitk always starts under all other apps. How to make it start on top of all other apps, like a normal program? Start it from the terminal with the gitk command, which lives in ...
1
vote
1answer
225 views

F.lux does not always work on resolution changes. Is there a way to check if the resolution changes?

I'm a happy user of f.lux, but sometimes when I plug in my external monitor on my macbook air it returns to full brightness. This also sometimes happens if I unplug my external monitor and switch to ...
2
votes
1answer
419 views

How to replace images in iPhoto with higher quality versions?

I use Aperture for photo editing and processing, but prefer iPhoto for keeping a gallery of my pictures. For a long time, I used the built-in tools in iPhoto to "Import from Aperture Library". What I ...
3
votes
0answers
311 views

Applescript vs. Spaces in Lion (10.7)

In Snow Leopard (10.6), I had an applescript that toggled iTunes between "maximised on Space 2" and "mini-player on all spaces": set app_identifier to do shell script "echo 'com.apple.iTunes' | ...
2
votes
1answer
361 views

Can I run a program whenever I open the lid of my MacBook Air? [duplicate]

Possible Duplicate: Run AppleScript after waking from Sleep? I have a program, InstantShot!, set to launch at logon and start taking a screen shot every 10 seconds. Unfortunately, when I ...
4
votes
3answers
642 views

How can I make this Apple Script shorter? (quitting multiple apps via tell)

I want to edit a part of an Apple Script to quit various applications at once: tell application "TweetDeck" quit end tell tell application "Google Chrome" quit end tell Over all there are ...
0
votes
4answers
684 views

Pressing the control key with AppleScript

I use Voice Over and Dragon Dictate. I have figured out how to make Dragon Dictate press Control-Option-A, which makes Voice Over read a page of text, and now I would like to figure out how to tell ...
1
vote
2answers
2k views

How to check which files are not in iTunes library, but are in iTunes folder?

This is a question from Wil Wheaton's google+, but I would like to get an answer too, stackexchange style. Suppose you have all your music in a folder called /iTunes/Music. When you add files to ...
0
votes
2answers
291 views

How do I copy the location of a track to the “Comments” section in iTunes?

I dont understand why this is not working. If anybody knows how to resolve this issue: tell application "iTunes" copy location of track 1 of playlist "Test" to Comments end tell Applescript ...
0
votes
2answers
614 views

Display a notification with AppleScript

I would like to trigger a notification with AppleScript. I have seen How can I trigger a Notification Center notification from an AppleScript or shell script? but I would like to have a native ...
3
votes
1answer
300 views

AppleScript/Automator Workflow to restore OS X to “mint” condition

Under Mountain Lion, I wanted to create an AppleScript that would essentially restore my OS X install to "mint" condition, if possible even to the point of showing you the ML welcome screen asking you ...