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
0answers
122 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
194 views

Mail.app Automator/Sript action for suspicious emails

I am getting fed up with the surprisingly professional looking SCAMS arriving in my Inbox. I wanted to create an Automator action which would tell me who is the actual sender by looking up the IP it ...
0
votes
0answers
44 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 ...
1
vote
1answer
75 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 ...
1
vote
2answers
2k 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
69 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
81 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 ...
1
vote
1answer
165 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 ...
0
votes
2answers
194 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
387 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
144 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
84 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. ...
1
vote
3answers
847 views

Using automator and handbrake cli to convert videos automatically

I am trying to automate video conversion process using Automator and Handbrake CLI version. I am trying to implement the functionality that whenever a video is downloaded in my dropbox folder on my PC ...
0
votes
1answer
146 views

Apple Script Calendar permissions with a locked screen

at my work machine I've written an AppleScript that writes an reminder email for our group meeting. It is triggered by an event in Calender through Open Application at time of event and then ...
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 ...
4
votes
2answers
839 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
1k 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: ...
0
votes
1answer
206 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
64 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? ...
3
votes
1answer
112 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
0answers
49 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
1k 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
2answers
62 views

AppleScript to get all tracks from albums with less then a certain number of tracks

How would I write an AppleScript to get all tracks from albums with less then n tracks in iTunes?
3
votes
1answer
77 views

Log software usage time on Mac OS 9 (Oct. 1999)

I'm needing to log the time a user spends inside of an application in Mac OS 9. I created a simple bash script "launcher" to do this, but then discovered OS 9 doesn't have bash installed. Here is the ...
1
vote
1answer
148 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
54 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
161 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
86 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 ...
2
votes
2answers
212 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 ...
0
votes
1answer
120 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
74 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
1answer
294 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 ...
2
votes
5answers
400 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
155 views

how to capture folder as input and pass it to python script as argument

How to capture folder as input and pass it to python script as argument? This is what I have so far, but this is always taking the user home directory as input no matter which folder i right click > ...
1
vote
1answer
102 views

Encrypting a PDF during Hazel processing

I've created an Automator Workflow which can take the selected Finder item (being a PDF) and encrypt it using the Apple-provided "Encrypt PDF Documents" action. The problem with this action is it ...
1
vote
1answer
63 views

How to search through online сhеss games using AppleScript or Automator?

I would like to search for specific online сhеss games. Each game has a single adress. Since there are millions of games on instant chess, it would take far too long to index all the games. So I will ...
0
votes
0answers
228 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: ...
0
votes
1answer
178 views

AppleScript counts multiple Mail messages

In this AppleScript on Mavericks: tell application "Mail" activate set viewer to the first message viewer set msgList to selected messages of viewer end tell set msgCount to 0 repeat ...
2
votes
3answers
112 views

Applescript for moving recently added files (not created or modified) to another folder?

I would like to get a recent downloaded pdf file ( !: it corresponds to the Finder sort method Date Added, not Date Created nor Date Modified) and either just moving to one another folder (if using ...
3
votes
2answers
510 views

Can AppleScript be used to downloading files from a web page?

I want to write a script that searches a web page for an updated file, then downloading it when detected. There is no command I have found that does this, accept Automator's download URL function, ...
2
votes
1answer
68 views

Simulate CTRL+F12 2 second keypress

Im trying to bring up the OS X shutdown dialogue box by simulating the key press Control+F12 for 2 seconds (using a logitech keyboard). No matter how much I try I just can not get it to work. My ...
1
vote
0answers
295 views

AppleScript for moving mail messages to OmniFocus is creating duplicates in OmniFocus

I'm trying to customize this script to import all flagged mail messages in Mail.app to Omnifocus, then unflag and archive the message. It works, but it creates many duplicates in the Omnifocus inbox ...
2
votes
1answer
502 views

Go to the Running Safari And Press Enter Using AppleScript

I'm very new to AppleScript and I'm trying to do this. I have an Safari process running on my machine. I wish I could go to the running safari and stimulate an enter key event. Is it possible to do ...
2
votes
1answer
735 views

Using Hazel or AppleScript to Convert Word to PDF

I use Hazel to sort and rename files. I would like to use Hazel to automatically convert Word docs to PDF. I think this best way to do this is with AppleScript. I have searched extensively online, but ...
0
votes
0answers
77 views

How to run an AppleScript whenever a VNC connection is established?

I want to run a script whenever any user connects remotely to my Mac. I've Googled a bit about it but no perfect tutorial is there. I am less comfortable working with OS X.
1
vote
2answers
1k views

automator to run AppleScript for a shell script

For a selected file in Finder, I like to run a perl script using Services. I created an Automator process that runs an AppleScript: on run {input, parameters} tell application "Terminal" ...
2
votes
1answer
122 views

How can I rename an ordered list of files with an ordered list of file names?

I have a series of files. I need to apply a series of file names. So, 001.jpg -> apple.jpg 002.jpg -> banana.jpg 003.jpg -> orange.jpg etc. I will have to repeat this for each of 16 folders with ...
1
vote
2answers
121 views

How to display the MiniPlayer in iTunes with AppleScript?

I use an Automator workflow to open iTunes at startup, etc. I'd like it to open the MiniPlayer window. I don't see a function to do that in Automator. How could I do this with an AppleScript script? ...
0
votes
0answers
35 views

Change destination mailbox of Command+Control+A in Mail

In my Mail.app, I have only one account set up, which is an Exchange account. When I click on a message on my Inbox (which is a server folder), and press Command+Control+A to archive it, Mail.app ...
1
vote
2answers
504 views

AppleScript and Finder - How to detect an “empty” selection when copying paths to the clipboard (Expanded Question)

I'm trying to build a Service that does the following: If some folder/files are selected in Finder, copy (all) the paths to the clipboard If nothing is selected, copy the "Path" of the window. ...