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
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
322 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: ...
2
votes
3answers
4k 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
561 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
2k 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
252 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
841 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
342 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
158 views

Toggle Ink's WriteAnywhere with AppleScript

How can you easily toggle the Ink preference pane setting "Write Anywhere"?
3
votes
2answers
945 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
940 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 ...
14
votes
1answer
1k 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 ...
4
votes
5answers
5k 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
331 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
626 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
548 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 ...
11
votes
6answers
1k 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
3k 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
563 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
366 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
2k 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
1k 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). ...
1
vote
2answers
486 views

How can one invoke a keyboard shortcut from within an AppleScript?

I need to invoke a keyboard shortcut from within an AppleScript code, later to be used as a startup item (i.e. the alternative to having to press something at every log in).
1
vote
2answers
691 views

Run an AppleScript by using a keyboard shortcut

I need to run an AppleScript using a keyboard shortcut. How can I do that? I think about Save AppleScript in textual format. Use Keyboard Maestro to launch 'osascript' to run the script when the ...
2
votes
1answer
309 views

Remember desktop state after reboot

Does anyone know if desktop switching can be done programatically? Exposé activation and deactivation? I know of the screencapture command for the last part of my proposed solution. I would like to ...
2
votes
1answer
634 views

How can I automate changing the quality of several photos?

I would like to be able to reduce the quality of the photos I have in a directory through some sort of automation. One of the requirements is that I cannot change the dimensions of the photo. The ...
4
votes
1answer
3k views

Is there an Automator action to create Keynote presentation from text file?

I need to import a text file (consisting of subtitles) into a Keynote presentation. I need to turn each subtitle into a single slide, interspersed with blank (black) slides. I'd like to create an ...