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

learn more… | top users | synonyms (3)

3
votes
1answer
3k views

Set size of window to exact pixels, and place via x, y coordinates

I would like to create a tool that allows you to set windows to exact sizes on the pixel scale to be able to have more precise screen divisions. For example, if I had four Terminal windows (and I ...
1
vote
1answer
155 views

creating a resident workflow with automator

I currently have a simple workflow that gets the contents of the clipboard and creates a new text file from those contents on the desktop. problem is, i have to run the workflow everytime i need my ...
1
vote
0answers
21 views

Possible to Detect All the Podcasts in iTunes That Are Marked to Not Allow Auto Delete?

I'd like to, for my own nefarious reasons, be able to see which files iTunes currently thinks it can't auto delete. Applescript or summat would be fine, although a smart playlist would be even ...
2
votes
1answer
42 views

How can messages be scripted whenever I open a specific application?

Say I want to start Safari on my Mac. Can I create a pop up message that reads, "Use Chrome instead" or some other thing? I presume it may be possible with Applescript or something, but don't know ...
0
votes
2answers
1k views

Script or workflow to modify find and replace text in clipboard

I need give unique names to many, many files as part of my job. I download dozens of PDFs from a research database which all come with the same name (date of download). I have to open the file, select ...
1
vote
1answer
652 views

Copy and Paste files into the same directory using Terminal

I am currently trying to figure out how to Copy and Paste files (more than one file) into the same directory using Terminal. I am trying to create a script to create the same file. If there is a ...
1
vote
1answer
423 views

Applescript to delete iMessages from Messages app

I have an Applescript that sends myself and colleagues iMessages when certain events happen. Some times hundreds of iMessages are sent in a short space of time to lots of people and the Messages app ...
1
vote
0answers
93 views

Apple script that closes Apple Remote Desktop

First let me say that I have ZERO experience in Apple Scripting. That said, I need to build a Apple Script or whatever is more efficient for that case, that is going to close Apple Remote Desktop ...
1
vote
0answers
172 views

How does one execute scripts within script bundles?

I am trying to make my completely enormous script more comprehensible by splitting it into a main script with bundled scripts to run when called, but I don't seem to understand how to run a bundled ...
1
vote
1answer
509 views

Messages applescript not working under Mountain Lion?

Tried adding an AppleScript to run a specific command when I'm sending or receiving a message in Messages on my server, but for some reason it never seems to get called. Placed it first in ...
0
votes
1answer
385 views

Expand Sending Email with Applescript

I read with interest the article regarding sending an email based upon parsing through a csv file to pick up the name and email address. This looks like most of what I need to accomplish my objective ...
0
votes
1answer
686 views

How do I remove the Finder from the Dock automatically at login?

This is related to this question here, except that, in addition to removing the Finder, I want to do it automatically. There are several solutions on the web that suggest using this AppleScript: tell ...
0
votes
2answers
416 views

Mac OSX Apple Script, How do I make Apple Script push keys on an application

What I am trying to do is make my character run up 50 steps then down 50 steps repeatedly using the up key and the down key. I know how to utilize system events to push keys and I know how to tell ...
0
votes
1answer
122 views

Applescript, quit app if other app is quit

I have a (very basic) apple script that I use as a trigger to start and hijack Plex, using Audio Hijack Pro. tell application "Audio Hijack Pro" start hijacking session named "Plex" end tell tell ...
1
vote
2answers
255 views

How do I invoke a service using Applescript?

I'm using Circus Ponies NoteBook which doesn't support Applescript methods. It does support creating services that can clip the current selection into a NoteBook page. This allows me to select text ...
0
votes
2answers
100 views

Toggle Mail Classic View in Mountain Lion with

I found a script on this site which I edited to make work with Mountain Lion, I thought. It works fine from Automator, but when I save as a service and assign a keystroke to it, it does not. Any help ...
0
votes
1answer
177 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?
0
votes
1answer
84 views

How do I add a custom field to the login dialog?

When the screensaver has been disturbed, or the computer wakes from sleep, my system asks for a password. I would like to add to this dialog. Along with username and password, there would be a third ...
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
2answers
2k views

Why does my Automator service work in Automator but not when called from the OS?

I have made an Automator service that runs an Applescript with the Run Applescript module. This is the script: # Press ^F8 tell application "System Events" key code 100 using control down end ...
0
votes
2answers
1k views

How to get Automator to treat text as RTF?

I am writing a book and trying to add a service to provide syntax highlighting to text selected in Pages with Automator. I have a service accepts selected text and runs it through a shell command ...
0
votes
0answers
114 views

How can I use AppleScript to reshow the last OS X notification (in the notification banner)?

After the notification disappears, I want to be able to make it appear again through AppleScript.
1
vote
1answer
319 views

Using AppleScript to modify contacts not working

I'm trying to use applescript to clean up various problems a large address book, to large to fix by hand. I've been able to find and observe contacts and groups in AppleScript successfully. However, ...
0
votes
1answer
3k views

Permission denied for symbolic link

I'm creating a symbolic link with the following applescript: on run do shell script "rm /usr/bin/ant" with administrator privileges do shell script "ln -s ...
2
votes
4answers
389 views

How to get screenshot only external monitor?

I there any way to screenshot only external monitor screen? do shell script "screencapture -x " & shot_path
2
votes
1answer
49 views

How to test if video is local or stream?

If I watch a video in QuickTime Player, how I can test in my AppleScript, if this video file is on my Mac or is it streamed live from the net?
0
votes
0answers
10 views

How to test if video is local or streamed from net? [duplicate]

If i watch video in QuickTime Player, how i can test in my AppleScript, is this video file in my Mac or is it streamed live from net? Anybody know address of QuickTime live streams i could use when ...
6
votes
3answers
7k views

Script to raise a single window to the front

In a script I'm trying to find the Terminal.app window containing a specific tty device and raise that window to the top. Here's what I have in Applescript so far: tell application "System Events" ...
0
votes
1answer
49 views

script to cycle through multiple pdfs and want to close the windows

Hey everyone I am new to applescripting. I have a need for an applescript that will cycle through 3 PDFs, located out on a share drive. I have the script but the problem is that if a user overwrites ...
-2
votes
1answer
3k views

How to configure Automator to log into a website, each time generating a new random UID and email address?

I need to find a way to log into a company intranet site multiple times in quick succession on OS X 10.8.2, each time with a new completely random user ID and email address. The website only requires ...
4
votes
1answer
1k views

How to use environment variables in applescript

I'd like to use my environment variables, which were defined in my environment.plist file, in my applescript. How do I do that, for instance: log "Glassfish Home: " & AS_HOME Where AS_HOME is ...
2
votes
1answer
326 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 ...
4
votes
2answers
536 views

How can I change a file's creator code on vanilla Snow Leooard?

When Xcode is installed your best bet to change a file's creator is SetFile. I only found AppleScript. Unfortunately, while the type is set correctly, the second line silently fails on my 10.6: set ...
2
votes
1answer
803 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
1answer
465 views

Applescript to get Dropbox file direct/share link

Is it possible to retrieve the direct/share link of a file that is in my Dropbox folder, but not in its Public subfolder? I'd like to use that for an Alfred workflow. I saw many tutorials on how to ...
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 ...
0
votes
1answer
322 views

apple tv ssh script automation

I have a Apple TV 2nd generation that is jailbroken and I run xbmc on it. At times it gets hung or freezes up. At that point, I open up the terminal on my macbook and run this script. ssh ...
0
votes
1answer
261 views

make applescript close keynote after presentation is over

does anyone know how i would achieve the following? i want to make applescript close Keynote AFTER the slideshow is finished. any idea? mybe via the class "playing" in keynotes application properties? ...
2
votes
2answers
4k 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 ...
0
votes
0answers
288 views

AppleScript works fine in 10.8 but not in 10.7

I have a simple AppleScript that works perfectly on two ML machines (10.8.3), but when I try to run it on a 10.7.5 machine it doesn't work. To make matters more confusing, in 10.7.5 it runs in the ...
0
votes
1answer
110 views

In applescript how do i get two different things to repeat at the same time

I am trying to get two different actions to repeat at different intervals but right now only the first action will repeat. repeat keystroke "i" delay 44 end repeat repeat ...
1
vote
0answers
60 views

Ruby and osx, clipboard status detection

My question: is it possible to detect when clipboard was pasted into other app ? With use of RubyMotion, Macruby, or Apple Scripts maybe ?
-1
votes
1answer
65 views

Can Applescript ask for the names of the people you want to send to and fill this in send to

I’d like to be able to send to people from my address book where a dialogue would say who would you like to send the email to and I would write in like peter, john, George etc and that would populate ...
0
votes
4answers
863 views

How do I generate a random even number with Applescript?

I'm trying to create an Applescript that will change the MAC address of my router automatically. Some fields need to be even numbers but I can't figure out how to generate even numbers only. Heres ...
1
vote
2answers
406 views

Need Help with an Applescript / plist

This has been a learning experience for me. Everything checks out logically to me in this script/ plist but something isn't correct. Everything runs, but then the script runs every minute which is ...
1
vote
2answers
4k views

Can AppleScript automatically press a key for me in an application?

I'm trying to devices an AppleScript that will automatically press the right arrow key for 1 second, then the left arrow key for 1 second and repeat this in an endless loop until I interrupt it. Here ...
3
votes
1answer
302 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 ...
0
votes
1answer
474 views

how to auto download a certain attachment in mail

I have looked on stack exchange and other sites for a simple applescript. I have found more complex scripts that it's hard for me to understand (not knowing a lot about the applescript syntax). So, ...
0
votes
2answers
359 views

Writing an e-Mail app in applescript

I'm using a webmail account(NOT Gmail: hate its interface), and I DON'T want to use the mac's Mail app(must maintain double contacts lists for one thing). I use Google Chrome and have set the ...
0
votes
2answers
388 views

Running Applescript using cron jobs not working

I'm new to conjobs and applescript but I have the script done correctly i believe. (any critique is welcome) I don't want to bloat my calendar with events to do this because I use my calendar for ...