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

learn more… | top users | synonyms (2)

4
votes
2answers
7k views

How do I use AppleScript to reveal a file in Finder from its POSIX path?

I'm trying to create an AppleScript snippet that locates the current random wallpaper and reveals it in Finder. I have the following snippet which finds the current wallpaper's POSIX path as a string: ...
1
vote
1answer
469 views

Why doesn't Automator service appear in iTunes?

I'm trying to write an Automator service for iTunes so that I can immediately open a file from iTunes in VLC, so I don't have to do (show in finder, launch with other application, vlc). I go to ...
6
votes
2answers
542 views

What's the easiest way to automate logging into a website?

There's this website I need to access about every ten minutes. And apparently it was designed in 1993, by sadists. There is no "remember me on this computer" checkbox. And if you don't interact with ...
0
votes
1answer
626 views

Fastest way to migrate an application between Mac's?

after using the Migration Assistant each time arrives a new OSX or i buy a new MacBookPro, its time to tidy up my work machine, Since upgrading my current MBP(mid2009 2.8GHz 4GB DDR3) to Lion many ...
1
vote
2answers
657 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 ...
3
votes
2answers
2k views

Osascript error

I was messing around with some external libraries, and for some reason when I enter any Osascript command, I now get this error (before it did work): 2011-09-07 19:13:43.306 osascript[1083:707] ...
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 ...
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 ...
2
votes
1answer
751 views

Problem setting terminal window bounds with AppleScript

Problem trying to solve I use multiple terminal windows to develop web applications. I'll have a terminal open for vim, a terminal open for git and a terminal open for basic file/directory commands. ...
5
votes
1answer
469 views

How can I find the intersection of two lists in AppleScript?

Let's say I have two lists in AppleScript: set listA to {"red", "green", "blue"} set listB to {"green", "blue"} I'd like to create a third list that has only the items present in both lists: set ...
0
votes
1answer
179 views

I want a pop up notification when a file has certain info written to it

I have a server that my machine is connected to via AFP. On this server there is a file called 'TransferLog.txt'. While the server is doing it's work it adds to this file. When it finally writes ...
2
votes
2answers
320 views

I'm using git+notational velocity and want to know how to commit after I exit the program

What I'm looking to accomplish is have something trigger a git add *.txt and git commit -m "Automated Commit `date`' when I close Notational Velocity. I'm guessing I could probably accomplish this ...
1
vote
1answer
160 views

Automater/Applescript page viewer/downloader loop

I have some 9500 individual audio files I am trying to download which: a) require a login to a website b) are located at subdirectories which ?redirects? to a download link (eg. ...
0
votes
0answers
225 views

How does Snow Leopard arrange files by “Date Added” for folders on the dock?

I would like to know the underlying mechanism that Snow Leopard uses to arrange files, within folders that are placed on the dock, by "Date Added." I would like to know this in order to retrieve the ...
1
vote
1answer
816 views

Creating a quick event in iCal using LaunchBar & AppleScript

what i want to figure out is how to send a String to iCal 5 on 10.7 which is interpreted the same way as creating a quick event, as if you press CMD+N with iCal in focus and then just type "tea at 5" ...
0
votes
1answer
799 views

Applescript to open javascript bookmark

i have the following javascript that searches the current site (very handy) ...
1
vote
2answers
301 views

Is there a way to execute on applescript when a server becomes available?

I am trying to execute a script when a server becomes available (a bit like when the OS detect the presence of a time capsule device and it starts the backup.) I didn't find a simple way to attach an ...
3
votes
5answers
710 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 ...
2
votes
1answer
978 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 ...
3
votes
2answers
12k 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 ...
1
vote
3answers
854 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 ...
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 ...
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
840 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 ...
2
votes
2answers
302 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 ...
6
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
118 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 ...
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 + ...
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 ...
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
1k 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 ...
2
votes
1answer
367 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: ...
1
vote
1answer
679 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 ...
1
vote
1answer
167 views

Toggle Ink's WriteAnywhere with AppleScript

How can you easily toggle the Ink preference pane setting "Write Anywhere"?
2
votes
1answer
257 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 ...
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 ...
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, ...
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 ...
1
vote
3answers
353 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 ...
2
votes
1answer
334 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 ...
0
votes
3answers
732 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 ...
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
626 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
414 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
2k 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 ...
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). ...
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.
1
vote
2answers
753 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 ...