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

learn more… | top users | synonyms (3)

0
votes
1answer
42 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 ...
1
vote
1answer
58 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
2answers
143 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, ...
1
vote
0answers
30 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
123 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 ...
2
votes
0answers
40 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!
2
votes
1answer
157 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?
1
vote
0answers
49 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 ...
0
votes
1answer
55 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 ...
1
vote
3answers
122 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
1answer
47 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 ...
2
votes
1answer
235 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 ...
0
votes
1answer
138 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 - ...
0
votes
0answers
69 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 ...
1
vote
1answer
140 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 ...
0
votes
2answers
93 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 ...
1
vote
1answer
140 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
84 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 ...
0
votes
1answer
122 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
46 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
111 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 ...
0
votes
1answer
68 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 ...
3
votes
0answers
138 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
88 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 ...
0
votes
0answers
141 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
2answers
40 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, ...
0
votes
1answer
184 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
2answers
55 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 ...
0
votes
1answer
247 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
29 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 ...
0
votes
0answers
82 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 ...
1
vote
1answer
67 views

Why is my script editor coming up with connection invalid after running it for a while?

This is the script I've found on the web I'm trying to just have the script drop items for me by pressing 1, but it works only for a little while before script comes up with an error "error "System ...
1
vote
1answer
121 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 ...
0
votes
1answer
73 views

Script Editor crashing when running Applescript

I need to extract the phone number of all the contacts in a particular group and for that I am using the following code - on run {input, parameters} tell application "Contacts" set ...
6
votes
2answers
153 views

Why are Script Editor .scpt files not saved as plain text files?

The Script Editor (formerly ApplerScript Editor pre-Yosemite) saves .scpt files as binary files, not plain text files. It makes working with them in source code control systems somewhat cumbersome. ...
1
vote
0answers
69 views

Extract links from email based on the anchor text, not the href

I am putting together an Automator workflow that will allow me to bind a hotkey to a Smart Mailbox listing and effectively automate the task of clicking "Unsubscribe" in emails which have that text ...
0
votes
3answers
98 views

Can I set the primary Language of OS X by using shell script or AppleScript?

My computer is mac mini (late 2012) with Yosemite 10.10.1 installed. The primary language of the system is English, with Chinese being the second language. Sometimes I need to use the Maps.app, and ...
2
votes
0answers
134 views

Tell application “Microsoft Outlook” not working after Yosemite upgrade

I have two Macs. The AppleScript code below runs on one Mac ("Mac 1"), but not on the other ("Mac 2"). Mac 1 is running Snow Leopard, where Mac 2 was upgraded to Yosemite, and the AppleScript below ...
0
votes
0answers
31 views

Automator: Delete source images after importing them is not working

I have an automator script that takes photos from a particular folder and adds it to a particular album in iphotos. One of the function block used is Import Files into iPhotos. with the option ...
2
votes
2answers
183 views

Help with a simple email script for OSX

I would be so happy if someone could assist me in creating an Applescript to send some emails. I have seen a few examples but I am not confident that I can adapt them to my own needs. I need to send ...
4
votes
1answer
69 views

What are the differences between Applescripts saved as *.scpt and *.applescript?

It seems to me that those scripts that are saved as *.applescript are always meant to be the raw, uncompiled text while those that are saved as *.scpt can be either the raw text or the compiled ...
1
vote
2answers
1k views

Applescript Delay not working since switch to Yosemite

Ever since I upgraded to Yosemite, Applescripts that use delays have stopped working. How can I fix this? Here's the world's simplest Applescript, for the sake of an easy example: set volume output ...
0
votes
0answers
13 views

imagesnap code not doing what it should

I edited most of this code from the website below (not a hyperlink because I'm just giving credit. http://hints.macworld.com/article.php?story=20100117064356428 So fairly simple script just build a ...
0
votes
0answers
58 views

Can I configure calendar alarms from automator before they are created?

In automator you can make calendar alarms that are ridiculously useful. One that I often use is a little automation that will create and send an email whenever the calendar alarm is triggered by the ...
1
vote
1answer
39 views

Can I add actions to control automator to automator?

Is there any way that I can add automator itself to the list of services I can automate? For example right now I can go and add a launch application action to the workflow and within that action ...
0
votes
0answers
42 views

Hooking into establishing Wi-Fi connection on Yosemite

Is there a way to hook into the process of establishing a Wi-Fi connection for executing some arbitrary actions (i.e. scripts or something) on certain events like connection established, connection ...
1
vote
1answer
50 views

Applescript to open Get Info box for the previous iTunes track?

I like having a hotkey to bring up the get info box for the current iTunes track so that if I'm using another app and a song comes up, I can quickly edit it. This works (though if it's not the best ...
1
vote
0answers
15 views

Toggle notification center's DoNotDisturb from terminal [duplicate]

Is there any way to toggle it with i.e. osascript? I'm on Yosemite.
1
vote
4answers
106 views

AppleScript executes itself again after a reboot it initiated. How to avoid that?

I have a shell script that is run by an AppleScript app. That shell script restarts the machine at some point with shutdown -r now. How can I avoid having the AppleScript application automatically ...
1
vote
1answer
42 views

CD-ing a file to itself

I wrote an application in Applescript to open a black picture and fullscreen it in preview. I need the app to "cd" to itself, no matter where it is. That means if it is on the desktop it can pull up ...