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

learn more… | top users | synonyms (2)

0
votes
1answer
85 views

Automator rename finder item date and time

I want to use automator to create a project folder with a Automator service, but i like to add the month and year (with two decimals) not the day, month and whole year. want i can creatie is ...
0
votes
1answer
22 views

Naming Folders usin

Is there a script that allows one to insert text from the clipboard into the name field of a new folder? I would like to name a new folder or change the name of a folder using the last text clip.
2
votes
4answers
865 views

osascript “set bounds of window” not working after Mavericks upgrade

I have a number of bash functions I run at the beginning of each day to start work. They all look pretty much like this: mind() { osascript -e 'tell app "Terminal" do script "ssh -A ...
0
votes
0answers
57 views

Export reminders from osx Reminders app programmatically

I need to get reminders list in any form (could parse it later) from Reminders app in osx (10.9.1) I know that i could do it from menu, but i need it programmatically. Perfectly it would be some ...
4
votes
2answers
447 views

Applescript: Open current Safari tab in Chrome (Troubleshoot of working script)

So, I decided a while ago to run a Flash-free install of Safari. It's been really great, Safari seems much more stable overall and I barely miss it. But every once in a while I stumble upon a site ...
0
votes
0answers
23 views

Automatically copy PDF.plugin to Chromium.app

I'm using Chromatic.app to update my Chromium.app recently. I'd like to use Chrome.app's PDF.plugin in Chromium.app. Therefore I need to copy PDF.plugin to the following directory: ...
1
vote
0answers
33 views

Automatically reduce MacBook brightness on connecting to external display?

I would like my macbook to reduce its screen brightness to zero when I connect it to an external display. I know there's no such setting, but how would I go about writing a script that would do that? ...
3
votes
2answers
61 views

How to close applications on sleep?

I have a password management application (KeePassX) of which backup I sync over Dropbox across several computers. However the password database can be open only on one computer at a time for file ...
1
vote
1answer
35 views

Randomize ical event start times

I have an event in ical that recurs every day. I would like to randomize the start time of this event (which schedules an applescript) so that the start times are random but within 30 min of each ...
0
votes
1answer
63 views

Automator application needs to ignore all files that aren't EPS

I've made an application that I drop EPS files on and it makes two copies and renames them and transfers them to SMB shares. But sometimes when I have more than one file selected in other windows, ...
2
votes
1answer
388 views

Applescript to change Wacom Driver settings

Can an Applescript change the primary monitor option within the Wacom Driver, and do it near instantly?
0
votes
1answer
46 views

Using quotes in SublimeText build system command

I'd like to execute a simple AppleScript command as part of a Sublime Text build system. I created a sublime-build file where the command is "cmd": ["osascript", "-e", """tell application "Preview" ...
1
vote
1answer
51 views

toggle playPause for iPhoto, script problem, probably global variable

I need toggle playPause for iPhoto, so I wrote this script global isPaused try get isPaused on error set isPaused to false end try tell application "iPhoto" if slideshow running then ...
5
votes
1answer
752 views

How to click button with applescript using UI Element Inspector

I am new to applescript. I am trying to open a webpage, and click a button on that webpage. here is my script: tell application "Safari" to activate tell application "System Events" tell ...
2
votes
0answers
107 views

Moving full screen apps between monitors shortcut

Does anyone know if it is possible to move a full screen app to another monitor using a shortcut? Or if there is no existing shortcut would it be possible with Applescript? BetterTouchTool has "Move ...
1
vote
1answer
72 views

How to create an applescript for multiple dd terminal commands in sequence (for multiple USB Drives duplication)

I need to create an apple script to perform DD Commands in sequence, to replicate the same .img file to multiple USB flash drives The context: the computer is connected to a powered USB hub with 7 ...
0
votes
0answers
38 views

Change all birthday events to occur yearly in iCal?

I want to make all birthday events in my iCal repeat yearly(some of them were not added with "repeat yearly" set). I am doing them on a event by event basis but that is too painful. Is there a way to ...
6
votes
1answer
3k views

How do I find out the applescript commands available for a particular app?

I'm trying to find out if I can get iTunes to do something complex, but don't know what can be scripted. Is there a way to find out what applescript commands an app will respond to?
1
vote
2answers
1k views

Using Javascript | Applescript to click button in Safari

I realize there are several threads about this and they are all very specific to certain website . My background is in Python, not Javascript or Applescript, and I'm confused on exactly how to achieve ...
0
votes
2answers
65 views

Universal path in Terminal

I'm writing an AppleScript that will allow me to copy the Time Machine folder from an external drive and paste it onto the user's desktop of their Mac. The reason I'm doing this is because when a time ...
0
votes
1answer
69 views

Error with AppleScript - Integer?

I have been making a simple script for my sister, but it does not work. It calls for an integer? I did not specify it in my program, but it calls it anyway...? My Script: activate display dialog ...
0
votes
2answers
169 views

script copy sender(s) email address only to the clipboard

I am a blind voiceover user of mac. The new Mail.app makes it difficult to copy the sender's email. I would like to have a script which copies the sender email only, of one or more selected ...
1
vote
1answer
140 views

Converting videos in the background using automator and handbrake

I am trying to automate the process of video conversion using handbrake and automator. Here is the script that i am using in Run Shell Script action of Automator Folder Action: for f in "$@" do ...
1
vote
1answer
287 views

Create a New Space in Mavericks using Applescript

In Mavericks, is it possible to use Applescript to create a new Space in Mission Control? I also tried the following code to switch to another Space, but it does not seem to do anything... tell ...
1
vote
1answer
124 views

Automator for Saving Attachments

I save MANY attachments from one URL about 50 times a day from clients. I'd like to automate the process for when I click on the download attachment button it will save into 1 specific folder when ...
0
votes
0answers
76 views

move a file, replacing existing (if any), ideally by putting existing in the trash

I am trying to find a way to automatically (without user intervention) move a file from A to B, replacing B if it exists, ideally by putting the existing copy of B into the appropriate Trash folder. ...
0
votes
1answer
2k views

Select a menu item in AppleScript without using “System Events” in 10.9 Mavericks

I was just answering another question and was reminded of a new "feature" in Mavericks. I used to have a number of small Automator Services that took no input but did something useful when tied to a ...
8
votes
4answers
2k views

OS X right click/context menu via keyboard

Is it possible to access the right click/context menu of the currently selected item (not the item under the mouse) by way of using a keyboard shortcut? If not, is there any way to achieve this, ...
3
votes
2answers
638 views

Automator app with a menubar icon

I've created an application with Automator. I want to have a new icon in the menubar like this: Which starts the app when I click on it. Is it possible? (without using Xcode) PS: I don't ...
2
votes
1answer
865 views

How do I focus a specific window with applescript without doing an activate and bringing other windows to the front?

I'm looking for a method w/ AppleScript to select/focus a specific window of an application without actually doing an "activate" which brings all windows to the front. Here's what I have so far: ...
3
votes
1answer
105 views

Apps using significant energy terminal/applescript

Does anyone know how to access the "Energy Impact" data used to determine "Apps Using Significant Energy" displayed in the battery menu bar? I'd like to use it in a shell-script/applescript.
0
votes
1answer
171 views

How do I correctly use applescript 2.3 script library “use” rather than “tell”

When I use my library this way applescript will not parse the display dialog line, treating dialog as an identifier! Can anyone explain why this is not being understood in the way I want it to be? ...
1
vote
2answers
54 views

Perform two keystrokes successively in AppleScript

I want to perform two keystrokes in AppleScript, successively. The script should perform Command+Shift+J and after that Command+W in the application Google Chrome. Can this be done with AppleScript? ...
2
votes
2answers
188 views

Terminal.app equivalent of `xterm -e 'cmd'`

With xterm (and gnome-terminal, terminator, etc), you can run the following command: $ xterm -e 'vim somefile.txt' xterm will open and run the specified program (in this case, Vim). When the ...
2
votes
0answers
640 views

With Lion, Problems Accessing Shared NTFS Folders with SMB://

We are testing a local login script that we created for our Macintosh users on Lion. It has worked fine on all OS X versions prior to 10.7. Listed below is the script that we are using. When we run ...
0
votes
0answers
39 views

Change Text to speech voice automatically in one document

I am trying to use Automator and Text to Speech to do the following: Imagine that I have a text document (pages), this document has the 1st line in spanish, 2nd line in English, 3rd in Spanish, 4th in ...
3
votes
1answer
944 views

Show Results of Automator-Terminal command

TL;DR If I create a .app via Automator, how can I show results of a shell script in a dialog or terminal window? I am using Automator to run a shell script adb install /Directory/$1.apk and if I ...
0
votes
1answer
69 views

Turn on iTunes EQ via AppleScript

Can I turn the iTunes EQ on/off using AppleScript? I found a way to change the preset, but not turn the EQ on or off.
3
votes
2answers
382 views

Copy message_id from selected message

In Mail, when I've selected a message, I would like to have a shortcut to copy the message_id (see my previous question) to the clipboard. How do I manage that? Applescript, I presume?
1
vote
1answer
135 views

How to create Mac OS X global hot key to open .txt file in MacVim.app at vim 'mark'?

Can and how can I create Mac OS X global hot key (possibly mapped to an OS X service, like what OmniFocus and Fantastical offer to make new entries in their inbox/calendar, respectively) to open a ...
0
votes
0answers
52 views

Making an Auto-Transfer app or script for Android

This question may be super broad so bear with me. In a nutshell I want to be able to connect an Android device to my Mac and then have a script go through, find the DCIM folder and then copy that ...
2
votes
0answers
152 views

Detecting typing in Messeges app using applescript?

In the new Messages app, which replaced iChat, you can see when another person is typing: And i've been scripting around the messages app and was wondering if there was any way to detect when the ...
1
vote
0answers
70 views

How to set Photoshop CC window size to 1280x720 via AppleScript?

I'm trying to resize the Photosshop CC window to 1280x720 to record it in 720p. I tried multiple ways, including AppleScript, SizeUP! app, terminal etc but none work. Here's an example of AppleScript ...
6
votes
3answers
3k views

Change the default application (for a file extension) via script/command line?

Is there a way to define the default application for a file extension via an Apple script, command line command (like defaults write [...]). I know that you can change it manually via the information ...
0
votes
1answer
99 views

Set service keyboard shortcut and have change take effect programtically

I have the following script to set a services shortcut: set serviceName to "(null) - VimAnywhere - runWorkflowAsService" set libPrefPath to POSIX path of (path to preferences folder from user domain ...
0
votes
0answers
192 views

How to export a movie from Keynote via AppleScript at greater than 540p?

I want to create a tool that will automatically convert Keynote presentations to movie files. I have discovered that the current version of Keynote has an export command in its AppleScript dictionary: ...
2
votes
5answers
340 views

Set Services keyboard shortcut via script OSX

I need a way to set the following programmatically: Specifically for shortcuts under Services, if that makes a difference. I'm wondering if this is possible via shell or AppleScript? EDIT: I've ...
1
vote
1answer
262 views

how to add button to Finder toolbar to call python script with current folder as argument?

Recently I added context menu under services to execute python script but I think it would be convenient if I add a button on the Finder toolbar, like next to New Folder Button in below image. Is ...
0
votes
0answers
70 views

Script that outputs number of emails in Mail.app inbox (again)

(I would request a clarification to the nice answer at Script that outputs number of emails in Mail.app inbox if I had the privileges to do so, but I'm new here) I am finding that on Mavericks (OS ...
1
vote
2answers
110 views

Deleting files with applescript messes up Finder's CoverFlow

I wrote myself a little script to delete JPG+RAW files by just reviewing my JPG (who loads faster thant CR2). I've put the following code in an Automator service bound to a keyboard shortcut. on ...