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
0answers
12 views

How do I simulate a random VPN disconnect?

I'm trying to write an applescript that reconnects a VPN that gets disconnected (sort of like this one) and I want to test it to see if it works. One of the key parts of the script is being able to ...
0
votes
1answer
11 views

Key stroking fn + f8

I need to make an applescript to press the keys fn + f8 at the same time. The only problem is those are both keys without names! tell application "System Events" key code 63 -- Will press the fn ...
-2
votes
0answers
11 views

How to set up auto responders for different times of the day in Outlook 2011 on Mac OS X 10.6.6

I’m using Outlook 2011 on a Mac OS X 10.6.6 system and I need to be able to set up multiple auto responders that send out at different time frames. For example, from 12pm to 1 pm with 1 message, ...
0
votes
2answers
64 views

Run AppleScript for Specific Monitor

I've enabled Dictation for command prompts via voice [got it from the OS shipped Chess application in Lion]. Decided to give it a go System Wide now in 2015 running Yosemite. I fancy it so far, ...
0
votes
1answer
24 views

iMessage speech (applescript) timing out after upgrade to yosemite

When I receive an iMessage, chat or Message on my desktop (iMac), it is read out loud. After the upgrade to Yosemite it does not work. I continue to receive the message that "AppleScript timed out." ...
1
vote
1answer
39 views

Sort Contacts Marked As Company

I found an Applescript at apple's support site to sort any contact with the "Company" checkmark checked into a "Business" group: property groupName : "Business" tell application "Contacts" if ...
0
votes
3answers
1k views

AppleScript for iCal events from Address Book entries

I want to create a script that creates alarmed events in iCal for birthdays of people that I have in my address book. Unfortunately, I am very bad working with AppleScript. Below is the outline of ...
1
vote
0answers
14 views

Apple Script notification bubble - quick reply style prompt

I know that you can trigger a notification using Apple Script: osascript -e 'display notification "Hello" with title "How are you feeling?"' However, I also want to be able to prompt for certain ...
0
votes
2answers
39 views

How to use AppleScript application with “open file -a AppleScriptApp”?

Some information about what I am trying to achieve I am using emacs inside of terminal. I know about existence of cocoa versions of emacs (like GNU Emacs for OS X, Aquamacs and Emacs Mac Port). But I ...
9
votes
2answers
3k views

Any way to set/add tags on a file with Applescript under Mavericks?

Trying to move some of my scripts over from labels to tags under Mavericks, but I can't seem to find a way to set/add tags with Applescript. Anybody that know how to do this? As far as I can figure ...
0
votes
0answers
67 views

Applescript not working anymore with Yosemite Mail Rules

Here is the script that use to work pre-Yosemite. Now it's doesn't work at all. Anybody have any suggestions on how i can get this to work? using terms from application "Mail" on ...
1
vote
0answers
18 views

How to execute javascript from an applescript (Yosemite)?

Since Yosemite, the Script Editor allows using javascript. What is the best way to execute javascript from an applescript? My use case is an existing applescript which needs to send some parameters ...
2
votes
1answer
39 views

What's the equivalent of “do shell script” with javascript automations? (Yosemite)

Support for javascript automations started with Yosemite. How could I run using javascript an external command? (i.e. the equivalent of do shell script of applescript?
2
votes
0answers
23 views

How do I make an applescript launch as soon as it exits screen saver

I would like my mac to to say 'Login Authorized' as soon as I exit screen saver mode. Where should I place the script? Thank you in advance!
0
votes
1answer
12 views

AppleScript referencing tabs suddently breaking on Chrome

I've been successfully using a script for a long time, which uses Chrome to calculate execute some javascript and return the result. tell application "Google Chrome" tell window 1 tell ...
5
votes
4answers
2k views

Automatically quit Terminal when typing exit

Scenario I use terminal to SSH a lot, however would like the Terminal App to quit when the last Tab closes using exit. I already have the terminal window itself set to close on successful exit, ...
1
vote
3answers
66 views

Using Applescript to fool key logger with keystrokes?

So I don't know much about how Mac processes keystrokes, but if I wrote a simple AppleScript that opened a TextEdit document and started typing a huge block of text, would this effectively mask my ...
0
votes
0answers
14 views

Applescript not sending email

I am using the following code to send an email. I am checking my email but I am not receiving it. The problem is not with my email as I am able to communicate with other normally. tell application ...
0
votes
1answer
22 views

AppleScript from Terminal unrar command

I would like to know if it's possible to make an AppleScript of the following terminal command(s). cd unrar e -r -o- *.rar && find ./ -name “*.r*” -delete Also, I would like to know if it's ...
0
votes
1answer
52 views

Applescript not returning string

I have a list called num. I have converted it into a string. I want to return that string so that the next action called "New text file" in my automator workflow can get the string. This is my code - ...
2
votes
1answer
38 views

Get current path of Automator app

I am trying to create an Automator application which I will be distributing to other users on the network. The automator app will be accompanied by a ZIP file and a PKG installer file. I need to run ...
1
vote
1answer
27 views

Selecting files for input Safari applescript

I am trying to automate using Applescript uploading of files to a website. I have gotten to nearly the last step, but can't seem to get a Finder (file chooser) window to respond to scripts. Here is ...
3
votes
3answers
3k views

Applescript click automation in Google Chrome browser?

Hello fellow programmers! I would like to save some applescript code as an application, so that when I open the application it will go to Google Chrome and answer an incoming call in Google Voice. I ...
0
votes
2answers
38 views

How do I mount a network drive based on my IP address or wifi network?

When I am at work, I mount a number of shared drives to use during the day. At home, I mount drives on my home network for home use. Is there a way that I can automatically mount the correct drives ...
0
votes
0answers
21 views

Changing app icon in order to change mini window icon

I have an app bundle on my desktop. I change its icon by changing the icon in its /Contents/Resources/ folder. This updates finder. However I am trying to update the dock. I have figured I can ...
0
votes
1answer
1k views

copy calendar entries from one calendar to another via apple script throws error

i am trying to copy ical entries from one calendar to another using the following script: tell application "iCal" set localEvents to events of calendar "Privat" set remoteEvents to events of ...
1
vote
1answer
61 views

Can't mount Volume via Applescript as a login time

So I have this script that I saved as an application and added it my login items. tell application "Finder" to mount volume "afp://Data_Cube.local/Scotts Stuff" delay 5 tell application "iTunes" to ...
0
votes
1answer
28 views

How to suspend a virtual machine using AppleScript (when hibernating the Mac)?

I need an application, which will: Activate Parallels Desktop While holding Opt, select 'Actions > Suspend' Activate SmartSleep Minimize SmartSleep Click 'Hibernate' of menu item 'QuickSleep' of ...
1
vote
1answer
22 views

Is there a way to kill an unresponsive applescript launched by an application without killing the application?

I've got an AppleScript that I usually launch out of Quicksilver, but occasionally, the script hangs, never exiting. (I think it's waiting on a non-existent window to appear). This results in ...
0
votes
1answer
23 views

Click on a button (that is not a button ?) with Applescript or Javascript

Okay, relative newbie here, but I have searched all the answers and tried most of the suggestions and cannot find a way to automate using Applescript or Javascript within Applescript to click a button ...
0
votes
1answer
26 views

Programmatically Change Screen Saver “Start after” time

I would like to change the time before my screen saver starts based on WiFi network. I am running Yosemite (10.10.1). I will use Keyboard Maestro to trigger the action. I need to find the correct ...
1
vote
3answers
2k 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 ...
1
vote
3answers
183 views

Get the Sound Output Device Name with AppleScript

How can I get the current sound output device name with AppleScript? For example, in my System Preferences: Sound pane "Internal Speakers" is currently selected. All I need to do is retrieve that ...
2
votes
0answers
60 views

Create Custom Drop Down Menus in the Finder Toolbar

Happy (belated-ish) new year! Hope it's been a great one. Any Dropbox users out there will recognize the drop down menu that one can add to their Finder toolbar. Upon discovering that this ...
2
votes
1answer
44 views

How to get file path of user selected .icns file in applescript?

I'm writing an applescript in which I need the POSIX path to an .icns file that the user selects. For some reason though, it refuses to accept .icns as a valid file type. This will work: set Icon to ...
1
vote
2answers
29 views

script to preview two .png s side by side?

I want to display A.png and B.png together, A left / B right or A top / B bottom. I can of course preview A.png preview B.png separately, then resize and move the two windows next to each other, ...
3
votes
1answer
1k views

enabling/disabling internet sharing with terminal in mac osx 10.9.2

Very much on the line of already existing questions, but not having enough reputation to comment by following existing threads, I can only ask my own, at the risk of duplicating may be, certainly ...
2
votes
2answers
1k views

Shortcut to eject all external hard drives but not MobileBackups

So far I've been using the following AppleScript to eject all external drives at once conveniently using a shortcut: tell application "Finder" eject (every disk) end tell This script is is ...
2
votes
6answers
1k views

Ejecting all network drives via Applescript/Automator/Shell?

I use the following script to attempt to eject all disks that aren't internal: tell application "Finder" eject (disks whose ejectable is true) end tell This has the advantage of skipping ...
3
votes
5answers
1k 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 ...
2
votes
3answers
462 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
50 views

Applescript read specific data out of iWork Numbers

I am trying to get data out of a table in Numbers. I have an index number, I need to get the name associated with it in applescript. (Eventually I need to set names of files with one of columns of ...
0
votes
1answer
279 views

AppleScript shows “Document could not be opened. You don’t have permission.” but file can be opened?

I am getting a "The document [filename] could not be opened. You don't have permission" when attempting to access several files in an AppleScript. However, I can open these files manually without ...
0
votes
2answers
41 views

How to get a value from a list with a string in AppleScript?

What I try to achieve is that the dialog should output the IP adres that is in the list. set ipList to {DNS1:"8.8.8.8", DNS2:"8.8.4.4"} set input to "DNS1" set output to input of ipList display ...
85
votes
5answers
38k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
0
votes
1answer
77 views

Trigger function key using applescript

I'm trying to trigger a function key using applescript. The increase volume 'key' for example. I wrote the following applescript but it isn't effective: tell application "System Events" key down ...
0
votes
1answer
24 views

Global keyboard shortcut to switch to an application (to use with Emacs/Aquamacs)

Like in iTerm, I'd like to be able to set a keyboard shortcut to switch to an application, which in this case would be Aquamacs. This would be really useful to know in general. Would an Applescript or ...
1
vote
1answer
61 views

screensaver causes error “share does not exist on the server” to endless loop

I've been trying to learn to automate my home Mac environment with Applescript. I've had some success, but am running into seemingly inconsistent and troublesome errors. In order to diagnose the ...
6
votes
3answers
6k views

Activating screen saver from AppleScript in Mountain Lion

I had a script that I used to use to activate my screen saver, and it no longer works in Mountain Lion. It was a shell script that called an AppleScript script: #!/bin/bash osascript ...
0
votes
0answers
30 views

Automator: Verify connectivity to server, if yes, then copy files to server. If no, wait until available

I also asked this question on the Apple Discussion forums, but have had no replies.. Details required: I'm already able to copy files to/from server.home (Windows 2008 r2) via SMB, both within the ...