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

learn more… | top users | synonyms (3)

2
votes
1answer
32 views

Using Launchbar to make Popclip appear

PopClip is a Mac app that adds the iOS functionality of a bunch of options showing up above selected text. PopClip automatically appears every time I select text, and that's annoying, so I want to ...
0
votes
0answers
47 views

Using automator, sort objects by type into type folders, inside subfolders

long time no ask! Anyway, I've been tasked with a project that involves sorting folders into new folders based on type. I've been working on an Automator action, but I haven't had much success. What ...
3
votes
1answer
99 views

Osascript Compile Application

Is there a way to compile an an applescript from the command line similar to the following.
2
votes
1answer
57 views

How to embedded apple script in a link in HTML?

I tried to embedded apple script in a link in HTML, but all it does is brought up the Apple Script Editor Application with profiled script in it. I want it to execute after I click on the link - so ...
0
votes
1answer
33 views

“activate application” for Hidden Application

How might I activate an application that is hidden from the OS X Dock? The following only works for applications that are displayed in the Dock. activate application "Firefox"
1
vote
1answer
43 views

How to programmatically construct the name of application used to open directories?

This Emacs LISP script reveal-in-finder.el allows one to quickly open a directory in Finder from an Emacs buffer which has the directory opened in it in dired mode. But on my computer, I uses Path ...
1
vote
1answer
240 views

AppleScript in OS X 10.10 to Resize Safari window and take Screen Shot of that window and repeat with multiple sizes

I would like to build an AppleScript Application that when run will do the following: Open up Safari and navigate to a specific URL, or a line delimited file, or CSV. This is not required but would ...
2
votes
0answers
367 views

batch convert iWork 08 files to new version on Yosemite

TL;DR Short version: I have a bunch of files that were created with iWork 08. Is there a way, maybe using AppleScript or Automator, to convert them to the new format (Pages 5.5, Numbers 3.5) without ...
0
votes
0answers
45 views

AppleScript: Force Google Chrome to open just one tab

on run {input, parameters} do shell script "open -n -a /Applications/Google\\ Chrome.app 'http://website.com' --args" return input end run This is the script that I'm using, but I don't know ...
3
votes
1answer
69 views

Error on simple script to open new tab

I am trying to run a simple script which simply opens a new tab, but am getting execution error: An error of type -10810 has occurred. (-10810) I am running on Yosemite. This is the script: ...
4
votes
1answer
316 views

On OSX what is the opposite command to “say”, i.e. what command is there for speech recognition?

I'd like to be able to enter a command that registers a speakable word that OS/X can listen for all the time. When the user speaks that word, it should launch an app. Similar to the "OK google" idea. ...
0
votes
1answer
68 views

Applescript and Shell: how do I insert a variable?

I'm using the following code to set a Philips Hue bulb with specific hue, saturation and brightness using Applescript. It works perfectly. set TurnOnBulbA to the quoted form of "{\"on\": ...
0
votes
2answers
418 views

Open terminal via AppleScript

I'm tring to write a shortcut script in spark for opening the terminal. on run {input, parameters} tell application "Utilities/Terminal" // tried Utilities:Terminal and Terminal too reopen ...
0
votes
2answers
57 views

Using 'kMDItemContentModificationDate' in 'do Shell Script'

I want to find files modified on a specific date. It is not important what time of day they were modified. I tried the following and got an empty list (no error): set theFolder to (choose folder) set ...
0
votes
1answer
61 views

AppleScript - mdfind kMDItemTextContent script to find specified content from display dialog query

I have this AppleScript find all documents whose content matches the text 'theMessage' and it works perfectly fine: set matchText to paragraphs of (do shell script "mdfind \"kMDItemTextContent == ...
0
votes
0answers
78 views

Applescript - Check if a specific window pops up, then do this

I'm building an Applescript that launch FileZilla, then import a queue from an xml file. The problem is, when a download was previously started and the file already exists on the disk, FileZilla pops ...
1
vote
0answers
169 views

Automount afp Volume with AppleScript

I know this is similar to other open questions about mounting network drives, but this one is slightly different. I have an AppleScript that runs at startup that looks like this: tell Application ...
1
vote
0answers
23 views

Filling areas of Json script with user prompts

I am wanting and Applescript to fill certain parts of a Json script via user input prompts, but not sure how to place the results in the correct areas? And to then have the result copied to the ...
0
votes
0answers
86 views

Applescript commands to move an app window to a specified space

I’m trying to write an applescript to launch all of the applications I typically have open, then move them to the desktop on which I typically put them (for example, my mail client is on desktop 4 and ...
1
vote
0answers
40 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
73 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
74 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
251 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
39 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
246 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
44 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
422 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
91 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
106 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
162 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
63 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
440 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
263 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
88 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
227 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
196 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
190 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
121 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
179 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
65 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
179 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
146 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
223 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
129 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
165 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
48 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
313 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
82 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
365 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
34 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 ...