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

learn more… | top users | synonyms (2)

1
vote
1answer
115 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 ...
0
votes
1answer
41 views

How can I locate in iPhoto an image selected in the Finder?

This is essentially the reverse of this question: given that I have selected an image in the Finder, is there an applescript or similar tool which will open iPhoto and highlight this file in the ...
1
vote
0answers
21 views

Different results of running the same AppleScript

The script is: tell application "DEVONthink Pro" activate end tell tell application "System Events" tell process "DEVONthink Pro Office" tell menu bar 1 tell menu bar ...
1
vote
2answers
78 views

Applescript to forward email but preserve sender

How can I make an Applescript that Mail.app on my Mac can run? When it encounters a message that is being sent to mac@email.com, I'd like it to redirect it to email@gmail.com, where the "From" field ...
2
votes
2answers
126 views

How to reset OS X volume after sleep using launchd?

I'm been trying to write a plist file on which when I return from sleep mode, I always want to make my Mac volume to the minimum amount. However, it looks like the following plist doesn't work, with ...
2
votes
3answers
550 views

Create a command to focus a specific window from anywhere in OS

While developing for the web I tend to jump back and forth between my text editor and the browser a lot. I'd like to set a keyboard shortcut at the OS level that allows me to jump to a specific, ...
1
vote
3answers
94 views

Trim first 6 characters from Folder Names [AppleScript]

I've found an AppleScript online which trims the first characters from a FILENAME, however, it does not seem to work on FOLDERS. How could this be modified to rename folder names? set whichFile to ...
13
votes
7answers
2k views

Is there a bash command to check to see if Time Machine has finished backing up?

I'm writing a script that will rsycnc my Time Machine directory to a remote server using ssh. I've switched from a shell script to an AppleScript and then back to an Apple script and I don't really ...
0
votes
1answer
71 views

I am trying to make an Applescript that launches a different set of apps depending on user input. However, it won't compile. What is wrong with it?

I made a simple AppleScript that launches a different set of apps depending on user input. I am new to AppleScript and it is tweaked from a bunch I found on the internet, modified for my usage. It is ...
4
votes
3answers
1k views

look up a word in Dictionary.app in Terminal

Is there a bash or applescript to look up a word in /Applications/Dictionary.app from a Terminal window ? open -a /Applications/Dictionary.app/ --args word ignores --args, says "type a word to look ...
5
votes
3answers
508 views

“drag n drop” application to convert images to base64 string (for web development)

I'm after an osx program that will convert an image into a base64 string (for web development). Basically replicates this: http://webcodertools.com/imagetobase64converter/Create I suspect there is ...
1
vote
2answers
107 views

How can you set up a free, universal OS X-wide ‘autosave’ script?

I want to set up a free solution in OS X for a universal ‘autosave’ function (given Apple’s own solution is limited to only a few apps - at least for now), and let Dropbox do my file versioning and ...
1
vote
1answer
362 views

How to create an apple script that forwards a flagged email

I want to create an apple script that will forward a flagged email to x@mail.asana.com I have tried this script: on run tell application "Mail" repeat with _acct in imap accounts ...
2
votes
1answer
198 views

Trim filenames in automator w. shell or applescript

Why doesn't this work? (The automator is in swedish but the parts are: get selected finder objects - get folder contents - run shell script) I want to trim the first three characters of the ...
0
votes
0answers
55 views

How to click on an exact element in chrome using apple script?

I know it's website specific, but i'm just having a hard time understanding exactly how the do Javascript function works. For example, say I have this site to vote on and i wanted to run an apple ...
1
vote
1answer
152 views

SpeechRecognitionServer not found in Mavericks with applescript?

I am trying to use an applescript to get speech input from a user and then perform and action. However, the code i'm using was made for osx lion. When I put it into applescript editor, the editor ...
1
vote
1answer
389 views

AppleScript To Manipulate VLC

I want to do a script, that it can launch VLC player, and in VLC player "Open a file", then "Select a folder", then click on "add" then "play" it. I think that Automator can't do this. But ...
3
votes
1answer
1k views

Toggling screensaver password with script

I am using a rather old application called Proximity to trigger applescripts when my phone goes in and out of bluetooth range of my mac. Along with other tasks, I want to secure my laptop when the ...
1
vote
1answer
44 views

Can I give Automator apps a window?

Can I create a window / UI for applications created using Automator? Or is this just not possible with Automator apps? Background: I created an "application" through Automator, and dragged the app ...
3
votes
2answers
163 views

LaunchBar script that returns the path of a folder “dropped” on it

I want to make a LaunchBar script that displays in a dialog the path of a file or folder that's chosen in the first pane and then "dropped" on a script. But I can't make it work. I've got a couple of ...
0
votes
0answers
54 views

Authomatically press a keystroke with Automator/Applescript when a specific application is active

Background to problem: Spotify rolled out a new update, with new dark, high contrast color scheme, which is very tiring for eyes and difficult to read for people with various health issues. Inverting ...
2
votes
1answer
53 views

Running script through launchd with no annoying prompts

I have an applescript that checks my macbook battery and forces hibernation when it reaches a certain level, after displaying a 60 sec countdown. I've successfully set it up to run in the background ...
4
votes
2answers
10k views

How can I configure my computer to run an AppleScript at a specific time? Caveat: without using iCal

Since upgrading to Lion, I have seen a sleight decrease of productivity when it comes to using iCal. As a result, I am trying alternatives such as BusyCal. The application seems great, however I cant ...
1
vote
1answer
359 views

Applescript to import mail with attachments into devonthink that would expand archived files

My workflow is to tag and put all incoming docs from Mail.app into Devonthink. I do this with Applescript. Script is working fine for me with one exception - I do not know how to make it expand .zip ...
1
vote
4answers
4k views

method for using F4 key without press function button in one macbookpro

i'm using a program that uses the F4 key for a shurtcut. it is an important shortcut and i'm heavily using it. every time in my mac book pro for press F4 i have to press also the fn button. is there ...
2
votes
1answer
85 views

Send mail after found new items inside the folder

I am running an applescript application using stay open option. Function of the script is: the applescript will ask for "javascript" to run the below is my code. the functions of the javascript is ...
1
vote
1answer
118 views

Facetime Applescript Edit

Does anyone know a quick way that I could modify the following script (from CornDoggyRob) to automatically maximize the incoming call window and to adjust the orientation? I would love to try this ...
0
votes
1answer
197 views

How to batch combine mkv and srt files to mp4 with ffmpeg

I'm trying to get an applescript to combine .mkv's with .srt's after i added those files to a folder. I've managed to do the automatic conversion from mkv to mp4 and add them to itunes. The only ...
2
votes
1answer
74 views

Is there a way to create a notification in the Notification Center with a clickable link?

I can create a notification in Applescript via display notification "Notification Text" with title "Title goes here" subtitle "subtitle goes here However is there a way when I click on the ...
5
votes
3answers
122 views

AppleScript to show package contents of hidden original of alias

I'm writing an AppleScript that will be run from within Automator, because ultimately I will define a keyboard shortcut to call it as a Service. I don't know any way to have a Service appear in an ...
1
vote
1answer
163 views

How do I get osascript to parse backslashes and run this command in a new Terminal window?

Here's a command that works fine when I paste it into the Mac Terminal window: echo -n -e \\033]0\;My Custom Window Title Here\\007 ; ping www.google.com In particular, it sets the Terminal's title ...
0
votes
0answers
59 views

Get iTerm session by tty name

I want to run a command within an iTerm2 session like this: tell application "iTerm" tell session id "/dev/ttys020" exec command "ls" end end But I get the following error (with and without ...
1
vote
1answer
26 views

Droplet Applescript Touch

i was trying the last days to get a droplet working, which is changing the time stamp of every dropped .jpg / .tif / .dsc / .cr2 to the actual time or even a few secs earlier in Terminal. Would ...
0
votes
0answers
55 views

automator script to import last image in iphone to the mac's desktop and delete it from the iphone

I need a way to easily perform the following: import the last image saved on the camera roll on the iphone (it will always be the same iphone, can be hardcoded on the script) into the desktop ...
0
votes
0answers
31 views

How can I share subroutines between different applescript services

I use applescript to make a bunch of services for advanced hotkeys, like activate Finder, open Go to Folder…, and paste clipboard. There are plenty of usable subroutines available for applescript, ...
0
votes
2answers
123 views

Quick Look a URL via a script (Applescript, Automator, Shell…)?

Lion added the ability to Quick Look a URL in an application (like Mail.app). I would like to use that functionality from a script. Is that possible?
1
vote
1answer
78 views

Adding content via Siri to text files in Dropbox?

Recently, I decided to move a series of lists I keep in the Notes app (Groceries, Shopping, Movies to Watch, Local Bands we follow, Local Restaurants we like, etc.) to a Dropbox folder that I share ...
0
votes
1answer
79 views

Change the current iTunes song's rating after it finishes playing?

I use smart playlists in iTunes. For example: Play only songs rated 4 stars or higher with comments containing "mellow" (I use comments as tags, more or less, so that would be a mellow best-of ...
0
votes
1answer
166 views

How to get a list of application windows only from the current desktop with applescript?

Need to do something like the next tell application "Safari" activate set AllWindows to every window set WinCount to number of items in AllWindows repeat with i from 1 to WinCount ...
0
votes
0answers
36 views

Numbers 3.1: Maintain Link to CSV

Is there a mechanism to maintain a link between a CSV that may change and a Numbers file? I would like to maintain a Numbers file that uses table data from a CSV whose contents will be updated every ...
0
votes
2answers
734 views

Compress files with the output name same as Parent Folder with Automator

I've been searching the internet for a solution to this. I would like to create an Automator workflow that will zip the selected files, name the zip the name of the Parent directory and save that zip ...
9
votes
4answers
16k views

How do I open Google Chrome in Incognito mode by default

Is there any way (using apple script or by using settings on chrome) to open Google Chrome in incognito mode.
0
votes
2answers
45 views

Automate Receipt Filing from Emil

I currently have a workflow setup that when I get a paper receipt I highlight the company name and price in green then scan with my ScanSnap which it then OCR's. Then using Hazel I automate the ...
1
vote
0answers
61 views

Get posix path of .webloc in applescript droplet

If a .webloc is dropped onto the following script, the dialog won't be displayed; instead the url of the webloc is opened in the default browser. on open dropped_webloc display dialog "hey" end ...
4
votes
1answer
142 views

osascript to set secondary desktop background?

I have been using this: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd> <plist ...
1
vote
1answer
137 views

Is it possible to create shortcuts for VLC using Automator?

I see here that Automator can be used to create commands that then can be triggered globally. I have no idea how to use Automator but see that it has some options for involving applications... Can a ...
1
vote
1answer
67 views

How can I convert a text selection to upper case in Apple Mail with a keyboard shortcut

Apple Mail version Version 6.6 (1510) OS 10.8.5 Is there a keyboard shortcut for converting the case for a text selection in the message editor? I know I can right-click and access this from the ...
1
vote
2answers
872 views

What is the Mac equivalent of Windows “start” command?

I'm creating a script that runs several other scripts. I need them to all start up in their own process (read window) so I can review the output of each, but I also need them to run in parallel, so ...
0
votes
1answer
269 views

How Can I Copy files to a Mounted Drive using AppleScript?

In what way can I copy home folders (Documents, Pictures, Movies, etc...) to a mounted drive without using the POSIX function in AppleScript?
1
vote
1answer
336 views

Apple script to lock computer using knock

There is a great app called knock which lets you unlock your mac by tapping on your phone twice while in proximity. http://www.knocktounlock.com Unfortunately in order for the app on your phone to ...