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

learn more… | top users | synonyms (2)

3
votes
5answers
7k views

How can I write a script to open multiple terminal tabs and execute code in them?

I want to be able to open the terminal application and have it either automatically run a script that opens several tabs and run an arbitrary set of commands in each. For example I would like one tab ...
2
votes
1answer
912 views

applescript (osascript) for changing Terminal.app profile

Is here a way to changing the Terminal.app profile from the command line? Here is already couple of questions about changing colors, but I need change the whole profile from the "Basic" (what is my ...
1
vote
2answers
586 views

Automator or AppleScript Rename Workflow

Is it possible to automate the following action: Example Folder name: "TEST" the name of the file inside the folder is: "Evelyn.jpg". How do I rename the folder using the name of the file inside of ...
2
votes
1answer
410 views

Applescript to change Wacom Driver settings

Can an Applescript change the primary monitor option within the Wacom Driver, and do it near instantly?
5
votes
2answers
2k views

Is there a fast way to change proxy setting?

On my laptop I usually have a ssh connection open and use the remote machine as a proxy server just so that all my network traffic is over ssh. I know that it's hopeless and we're all doomed, but it ...
3
votes
5answers
682 views

Good/inspiring uses of automation on Mac OS X

I have been a mac user for quite a while now (about 5-6 years) and I would consider myself rather tech-savvy. That being said I have very little insight to the automation capabilities that have been ...
3
votes
2answers
11k views

Converting HTML to PDF using convert utility in Mac OS X

I'm trying to convert a bunch of HTML files into PDF files. I'm looking for an automated solution so that i don't have to open each HTML file individually and convert it to PDF. In Mac OSX, convert ...
2
votes
2answers
3k views

How do I use Applescript with Keynote?

My first Problem: For some reason the Applescript Editor is not able to pick up events when recording from Keynote'09 (I already turned on the acessibility options). The Editor stays blank for all ...
4
votes
3answers
1k views

How to make a simple app from an applescript!

I've got an applescript that I use to open files such as test.txt in vim, using the terminal. I usually open a file by right-clicking it an selecting the service open in vim (this service is created ...
1
vote
2answers
849 views

Cannot start MySQL server with AppleScript - Snow Leopard

I've sucessfully installed MySQL server (5.5.11) on my MAC Snow Leopard. I can start the server using PreferencePane, using command line sudo /usr/local/mysql/bin/mysqld_safe but cannot use the same ...
1
vote
3answers
832 views

Trigger 'Gather Windows' programmatically (or other quick way)

I'm trying to make myself a little script that I can run on the fly that gathers all my open windows onto the main display. I think a good starting place would be to be able to trigger Gather Windows ...
2
votes
2answers
2k views

Automatically press a key every 60 seconds

Is it possible via Automator, an app, applescript, etc. to automatically press a key (i.e. "g") every 60 seconds?
1
vote
1answer
799 views

AppleScript app started prompting to run or quit. How can I disable this?

I'm not entirely sure why this has started happening since this is completely new behaviour and I haven't done any system updates but I have a nice little toolbar app for my Snow Leopard Finder.app ...
1
vote
2answers
296 views

Compare my iTunes library with the iTunes Store's

Is there a way to compare my iTunes library with the iTunes Store's library, so I can find what songs I'm missing by a particular artist? Ideally, I would be able to compare the Store and my Library ...
5
votes
1answer
2k views

Is there a way to force Mac OS X to close all the applications when restarting?

I sometimes shut down my Mac, and I cannot wait it shuts down because I am urgently requested to do something in another office that would require some hours. In some cases, an application that opens ...
1
vote
2answers
116 views

Scripting environment setup

When I start a session programming on my macbook pro, I have a bunch of apps I'd like open and ready: DevNull smtp java server (run from terminal with java -jar DevNull.jar) Terminal shell in the ...
13
votes
3answers
7k views

How can I “say” to another Mac?

I have two Macs in our house (iMac and MacBook Pro). I would like to use the say command-line utility to type something on my MPB and have it speak on the iMac, rather like an intercom system. Plus, ...
3
votes
1answer
3k views

how to send scheduled mails with Mail?

I would love to send mails in my apple mail scheduled! What is the most comfortable way to do that? only method i found: http://homepage.mac.com/aamann/Mail_Scripts.html (but this is quite tricky + ...
1
vote
2answers
585 views

AppleScript “Open With…” icon

I've written an AppleScript app that I use to open certain files with (it sends them to Vim in the Terminal). I'd like to set all my .Tex files to automatically open with this app. The problem is ...
8
votes
2answers
3k views

Automatically delete a folder daily

Is there a way to automatically have a folder deleted every day at 4am? I'm running 10.6.7.
2
votes
3answers
993 views

Check if a process is running, if not execute it again in Terminal

Is there a way to periodically check if a process is running with (probably with Apple script, or some other shell script) and if not then to execute it in Terminal? I have a PHP script that is needs ...
5
votes
3answers
2k views

Programmatically/Script-atically changing the default Open-With setting

Is there a way to change what app opens a file type programmatically/with a script? Basically, sometimes I'm working on a web site, and I want to set all web files to open with a text editor (*.php, ...
2
votes
1answer
353 views

Force a file to overwrite instead of appending

I've got an application that won't overwrite a file with the same filename. It will only append the filename with a 'space 1'. If I write a file more than once I get something like this: ...
3
votes
3answers
5k views

Applescript to retrieve account and password using keychain scripting

How can I use keychain scripting to write a script in Applescript that retrieves the login and password of a website from the login keychain, given the website's URL?
1
vote
1answer
651 views

AppleScript to spit out Incremented Number with Leading Zeros

So I am trying to create a simple script that will use a file to store an integer. When the script is called (in my case as part of a keyboard macro) it will drop in (where I'm typing) the current ...
7
votes
6answers
3k views

Sending push notification to iPhone via AppleScript

Is there any combination of iPhone and/or Mac apps that I can use to send a push notification to my iPhone? For example, let's say I want to create a service (invoked via (Application Name) > ...
2
votes
1answer
255 views

Undocumented applescript functions

Is it possible for an application to have undocumented applescript functions. Commands that do not appear in the Applescript Editor Library for the application? Is this common? Is there someway to ...
1
vote
1answer
1k views

How to interact with programs when names read from a list

I have a script which checks for loads of applications if they are open, and closes them if yes, and opens them if not. Until now I had a simple: tell application "System Events" if exists (process ...
2
votes
1answer
356 views

Is it possible to set a Custom quick look preview image in OS X?

Is there any way to set a custom quick look image in OS X? I'd like a command line tool or applescript to change or embed a custom preview for a file using a jpeg.
1
vote
1answer
163 views

Toggle Ink's WriteAnywhere with AppleScript

How can you easily toggle the Ink preference pane setting "Write Anywhere"?
3
votes
2answers
1k views

Is it possible to disconnect a bluetooth connection using Applescript?

I want to disconnect a connection to a bluetooth device through an Applescript. Please note that I don't want to disable or enable bluetooth, I just want to disable one specific connection.
0
votes
1answer
1k views

AppleScript - Changing Width of Dialog Box and Adding Text

I have a normal display dialog working using AppleScript within the Editor. How would one increase the width of the display dialog and add text under the input field and above the buttons. In advance, ...
2
votes
2answers
1k views

AppleScript or Automator Workflow for Bulk-Converting Powerpoint Presentations to Keynote

I have a large set of Powerpoint presentations that I would like to convert to Keynote. I can convert each one manually by following these steps: In Finder, right-click Powerpoint document and ...
16
votes
2answers
2k views

How do I make an AppleScript file into a Mac App?

I have an Applescript that simply opens a Dialog Box, asks for a user input and runs a Terminal Command and spits out the answer. It works great in AppleScript Editor yet I am trying to work out how I ...
5
votes
6answers
6k views

How to run Applescript on Disk mount

I want to run an Applescript when I mount a specific disk. It isn't if the script is located on the disk or not, it should just run when OS X mounts the disk. I tried to accomplish this with folder ...
2
votes
1answer
2k views

Script that outputs number of emails in Mail.app inbox

I'd like to have a command-line script I can invoke at the Terminal that will output the total number of messages in my "Work" Inbox in mail.app. Usage would look like this: $ inbox-count 48 What ...
1
vote
2answers
2k views

How do I do custom key binding in iTunes?

How would I assign ⌘1 to Music (Library item) ⌘2 to Movies ⌘3 to Podcasts Surprisingly enough, these key bindings are not assigned to anything yet, and IMO they would be most convenient ones ...
2
votes
1answer
1k views

How to use the built–in VPN Server on Mac OS 10.6.6

I know that Mac OS 10.6.6 has a built in VPN server that one can access through command line. Is there an easier way? Can I make an Automator or AppleScript program that starts and stops the built–in ...
1
vote
3answers
348 views

Temporarily disabling the startup sound

Is it possible to disable the startup sound on an iMac G5, or at least decrease its volume? The obvious way to do this would be to put a script in the shutdown folder (OS X 10.4.11) that mutes the ...
0
votes
3answers
707 views

Save .mov file with applescript

I've installed the Perian addon for Quicktime so it can open .flv files, and then I can save them as .m4v or .mov. I'm trying to make an Applescript to convert from .flv to .m4v automatically by ...
1
vote
2answers
633 views

Binding an applescript to a button in osx

I have asked a question here. But it is for adding a custom button in osx finder toolbar. Suppose I have an applescript & I want to bind it on a custom button. & then I want to place that ...
13
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 ...
5
votes
1answer
2k views

Command-line voice recognition with Mac OS X

How can I do voice recognition on Mac OS X from the command line? Details: % When I look in ~/Library/Speech/Speakable Items, I see many files, like "Tell me a joke", whose contents are: ...
9
votes
2answers
4k views

How to change AppleScript path to a Terminal-style path?

I have a custom Service that I've created in Automater (I'm on OSX 10.6.5). The Service executes an AppleScript which in turn executes a shell script. Here is the AppleScript: on run {input, ...
3
votes
1answer
608 views

Passing selected folder path to custom Service executing AppleScript

I have a custom Service I created in Automater. Right now, the service shows up in my context (right-click) menu, when right-clicking on any folder. In Automater, I added the Run AppleScript action, ...
5
votes
1answer
406 views

How to Listen For an Application Launch Event on Mac OS X

I wrote an AppleScript to mount a bundled sparse disk image. I want this script to be executed exactly when Time Machine launches. I can check if Time Machine is running with on idle statement, on ...
5
votes
1answer
1k views

Run Command Line Script from Finder's contextual menu

I have a shell script that deletes exif data from images. I would like to right-click the folder with the images and execute the command from the context menu. How can I do this? The Shell script ...
5
votes
2answers
3k views

Is it possible to restart an application using AppleScript?

I want to restart Safari and reopen it with some tabs that I specify.
5
votes
4answers
2k views

Automatically quit Terminal when typing exit

Scenario I use terminal to SSH a lot, however would like the Terminal App to quit when the last Tab closes using exit. I already have the terminal window itself set to close on successful exit, ...
4
votes
2answers
1k views

OS X - AppleScript Question about moving files daily to another folder (folders vary)

I am currently using this ( http://lifehacker.com/193778/download-of-the-day--auto+applescript-tickler-file ) for a tickler file system and have it setup in my Dropbox (so it works across systems). ...