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

learn more… | top users | synonyms (2)

2
votes
1answer
161 views

Moving finder window from one display to another

Would it be possible to create an AppleScript to instantly drag one screen from one screen to another (say, center of the second screen)?
0
votes
1answer
152 views

Export Folders as MBOX Files Using a Script

You can manually drag your folders to desktop to create an MBOX file, but need to create using AppleScript. please help me. thanks
1
vote
1answer
44 views

Where is addressbook:// stored

I wrote an applescript that finds a person in my contact list. tell application "Contacts" set thePeople to first person whose first name is equal to "John" and last name is equal to "Doe" end ...
1
vote
0answers
111 views

Add local file URL handling to Applescript Application

I am using a simple applescript application to open different URL schemes in different Fluid Apps. By setting this app as the default browser, I can effectively parse out the URL scheme and open the ...
1
vote
1answer
37 views

How to automate audio editing?

I want to make audio editing workflows in Automator. My current goal: to cut out exactly the same length from a group of audio files. I haven't found any audio editors supporting AppleScript yet. ...
1
vote
2answers
57 views

automate app launch at midnight ?

How might I use Automator or Applescript to launch iTunes at midnight, and kill it at 5am ? (This is the only time when I have unlimited bandwidth.. rural sat-based ISP.. ugg.) Thanks.
0
votes
2answers
579 views

Using applescript to lock screen

I need an applescript which locks my Mac in the same way pressing "shift"+"ctrl"+"eject" would. I tried two different approaches, but both failed. The first one was to search the internet for a ...
1
vote
0answers
281 views

AppleScript auto Email attachment save

I am looking for an AppleScript, that simply uses an email defined by the "Mail Rules" and extracts the attachment to a specific folder. I found different codes, but they all didn’t do want I want. I ...
1
vote
2answers
104 views

OS X: Specifying custom command line invocation of program as application for opening files on double click

I'm primarily a Linux user who recently acquired a MacBook Air and I'm currently desperately trying to find out whether there's an equivalent for Linux's desktop definition files, where you can define ...
1
vote
2answers
166 views

Take a screenshot of the top-most window

I want to have an AppleScript that takes a screenshot of the front most application. I have used this AppleScript: tell application "System Events" -- get frontmost process set frontmostProcess to ...
0
votes
1answer
128 views

Validating AppleScript input text

How would I validate this pattern: 2 digits followed by last name, basically any length of letters. Apple script does not use regular expressions, correct? I need to validate user input and all ...
1
vote
1answer
69 views

AppleScript to find and delete a folder inside an FCPX library

I need to write or find a simple script to find, select and move to trash, folders within a Final Cut Pro X library. Because these libraries are bundles you can't search them in the normal way. What ...
2
votes
1answer
40 views

In an AppleScript, how do I call/reuse a subroutine from another AppleScript?

snippet 1a on removeText(searchText, sourceText) set prevTIDs to text item delimiters of AppleScript set text item delimiters of AppleScript to searchText set sourceText to text items of sourceText ...
0
votes
1answer
17 views

Applescript mail errorhandler

I have a script to send an email, but I'd like to detect if no email account is setup, and to do something else. Is there a way to detect or trap for this condition? Thanks. tell application ...
3
votes
2answers
132 views

Mirror number of unread mails in title bar

Is there a way to show the exact number of unread mails from the Mail.app icon also in the title bar? Note that this is not the same as showing the number of unread mails in inbox, since I can change ...
0
votes
0answers
33 views

Is it possible to automate the key press of a key (such as the function key) with AppleScript Editor

Is it possible to automate the key press of a key (such as the function key) I'd like to automate the function key so it stays depressed. My MacBook randomly shuts down unless I keep the key ...
0
votes
1answer
229 views

Access application submenus with AppleScript

I am trying to learn to access any menu item within an application with AppleScript. I can orient to the actual menu tab, and then access clickable menu items, but I can't access menu items within ...
0
votes
1answer
124 views

AppleScript to click buttons and close tabs

Im not really familiar with applescript (using C/Python/Pacsal atm). So far did the autoclicker for my WoW ore prospection. I would like to use the script on safari to click the link with name "1st ...
0
votes
2answers
127 views

Script to click app on Menu Bar on Mavericks

I use an application called NoSleep. Technically it is a Kernel Extension. It is used to prevent a Mac (OSX Mavericks) from going to sleep when you close the lid. ...
0
votes
1answer
41 views

Search for a folder using applescript

I am trying to make a folder to go on a server, that people can add photos to and then the script sends them to the correct place, however I'm having trouble with the search part. As you can see ...
0
votes
1answer
63 views

Is it possible to “shut off” battery charging in OSX [duplicate]

Is it possible to "shut off" battery charging in OSX with an application rather then physically. Could this be done with AppleScript (I doubt it) or will need to be obj-c cocoa application? ...
4
votes
2answers
57 views

How to disable shortcut for an Automator script?

A few weeks ago I wrote a short script with the Automator to get familiar with it. I found a website which explained how to set up a primitive script to start the screensaver and define a shortcut to ...
3
votes
1answer
792 views

How can I get my AppleScript code to move files?

Having used Automator to organise files by file extension successfully before, I decided to create an AppleScript application that will save me having to change parameters manually, as Automator ...
1
vote
1answer
71 views

Applescript to fill in Keychain dialog box

I'd like to fill in the Keychain Dialog box with the Name: and Password fields (printer is windows print queue), but after the Print command, the Keychain dialog box opens up, but never responds to ...
1
vote
1answer
327 views

Double click in AppleScript

How do you write the command to carry out a double click with a mouse at a specific location in AppleScript?
0
votes
2answers
90 views

Is there a way to extract contents from AppleScript file without using AppleScript editor?

I have a bunch of applescript files I need to run but some that were running yesterday are not running today. Applescript is showing me this beautiful message. When this message is shown, console ...
3
votes
1answer
88 views

Tell application screen is not zoomed

When using OS X's native zoom, is there any way (perhaps using AppleScript) to fool an application into thinking the screen is not being zoomed? Something like tell application "System Events" to ...
1
vote
0answers
180 views

Automator or Applescript for custom script to download bank statements?

What's the best tool to script to automate downloading statements from my bank and credit card companies' website in each of their statement download area? All banks, credit card companies, and ...
3
votes
2answers
125 views

Use one AppleScript to toggle on and off (1 or 0)

I'm wondering if there's a simple way to use one AppleScript program to turn something on and off. Basically I want it to do this. Check current pmset sms if sms = 0 then do shell script sudo ...
3
votes
3answers
917 views

Mavericks - Tell application “Preview” open PDF - strange permission issue

I have recently moved a large research collection of PDF files, from a Snow Leopard 10.6.8 TimeMachine disk, to my new rMBP (to the internal flash storage). I did this manually, not through the ...
1
vote
1answer
29 views

Pausing workflow until action complete

I have Hazel set up on a media server to automatically add files to specific iTunes playlists based on a text tag in the directory name. Several users will send us individual files or directories ...
2
votes
2answers
123 views

AppleScript - Get the path to an application without opening it

I need to store the path to Chromium to use later in the script, however running set chromium to (POSIX path of (path to application "Chromium")) in AppleScript Editor opens the application. How can I ...
2
votes
1answer
87 views

Binding DualShock 4 button to AppleScript?

I setup a dualshock 4 (PS4) controller to work with my Mac Mini for XBMC, which can play games on emulators like SNES9x. The issue I'm having though, is that when I want to quit the game/emulator that ...
0
votes
1answer
103 views

AppleScript to save active Microsoft Word document IFF there is one

I use this with Keyboard Maestro to automatically save the front-most document in Microsoft Word whenever Word deactivates: tell application "Microsoft Word" if it is running then save ...
0
votes
0answers
22 views

Apple script on network share not working

Hi I would like my apple mini server (mavericks) monitoring a folder on another NAS (running linux). If other users add files I would like it to send an iMessage or email to notify me that a folder is ...
2
votes
0answers
140 views

AppleScript for enabling VPN broken after update to 10.9.3

I've been using an AppleScript for connecting to my office VPN. After updating my macbook to 10.9.3, it fails to execute, and throws an exception Unable to get network preferences (honestly, it is ...
0
votes
1answer
49 views

For each press of spacebar, pass keystroke to app and increment input counter

I would like for each time user press spacebar, for the script to pass keystroke space to a browser (Firefox) to play a game while counting the number of times spacebar was hit. How do you do that ...
0
votes
0answers
81 views

Need Apple Script to redirect work mail - Mail rules don't work

I have to use MS Exchange at work for email, so I have Outlook and Apple Mail set up. I want to use Gmail but POP is disabled for us, so I can't just pop it to gmail. So, I tried setting up a rule in ...
1
vote
0answers
134 views

AppleScript editor cannot save .scpt file

I've created a simple AppleScript .scpt file, using TextEdit. If I now open it with AppleScript editor, I can run it. But when I try to modify and save it, I get the following error: It's ...
0
votes
0answers
45 views

Why don't my volume-control AppleScripts run when called as Services?

I've got three AppleScripts that respectively toggle system mute, increase volume, and decrease volume. (For use with an old keyboard). They work fine when I run them as a workflow in Automator and ...
1
vote
1answer
83 views

How do I add a script to the Service menu?

See "How do I automate this repetitive task?" I'm posting here so I can show some screenshots of the work in progress. I'm very new to both StackExchange and also Automator. Don't yet know my way ...
-1
votes
1answer
89 views

Get (tell) AXScrollArea in Applescript (Or, classes not appearing)

In my AppleScript I need to get the AXScrollArea on the left of Accessibility preferences. My first thought was to try using the AXRoleDescription, "scroll area", but it wouldn't compile. syntax ...
1
vote
1answer
322 views

ffmpeg working from command line in Terminal but not in an Automator shell script!

I have just compiled my own copy of ffmpeg on my system and it's located in the following path: /opt/local/bin/ffmpeg When I run the following command in Terminal.app, it runs smooth: ffmpeg -i ...
1
vote
1answer
97 views

Check FTP status using AppleScript

I have an AppleScript Automator application that, when double-clicked, opens FTP and displays an alert confirming the same. It is working perfectly as expected. However, I am looking to make it a tad ...
3
votes
1answer
168 views

Display IP address in an Automator alert

I am running an Automator script to launch SFTP on my Mac when double-clicked. Here’s the script: do shell script "sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist" with ...
3
votes
2answers
2k views

Passing a password to an Automator application

I have written an Automator application with the following shell script to open an FTP connection on my system: sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist osascript -e 'tell ...
0
votes
1answer
506 views

Running second Google Drive Crashes constantly on OSX Mavericks

I have been trying to get a second instance of Google Drive to run under another user on my MBP running Mavericks. I have been following the instructions here ...
1
vote
0answers
115 views

Get Finder tab-locations with applescript

I know how to get the location of the current finder window, but I would like to be able to also get all locations of open tabs in the current finder window. How do I do this with applescript?
4
votes
2answers
772 views

Automating ffmpeg using Automator Service

I often use ffmpeg off the command line to convert video files into mp4 on my Mac (running Mavericks). Do note, however, that I am NOT re-encoding my videos; am just changing the container from an avi ...
3
votes
1answer
144 views

Is it possible to submit not sandboxed app to the Mac App Store

I have an AppleScript Cocoa application that does a lot of shell scripts like kill or chflags. Is there any way I can try to send it on review to MAS and get it approved? According to Wikipedia: ...