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

Can I generate a clickable link to local file using relative path like “file:///~”

This is the background: in my company, we use Google Drive and often have to tell each other the path to a particular file. Paths are long as we use a lot of nested folders, so it's pretty boring and ...
1
vote
2answers
27 views

Assistive Access when script is launched by agent

Problem Applescript run by osascript is not allowed Assistive Access when launched by agent (~/Library/LaunchAgents). Although it works when run from Applescript editor or commandline directly (using ...
0
votes
0answers
16 views

Unable to run 'display notification' using osascript in a tmux session

If I run the following command in Apple Script Editor directly, display notification "Hello, world" I can see a notification as expected However if I tried to invoke it via command line: ...
0
votes
1answer
11 views

How do I run a binary program without showing the gear icon?

I created a automator workflow, add a Run Shell Script part and put these lines in: /Users/xxx/Library/Android/sdk/tools/android avd I saved it as an app and it works. But I will always see a ...
2
votes
2answers
54 views

Insert Character on batch folder rename

I have a folder that has several hundreds of thousands of files named like "ABC 123456". I need to add a dash after between the two blocks of text like this "ABC - 123456". Leaving the trailing space. ...
0
votes
1answer
31 views

Is there a way to get a list of all currently running program's window titles with AppleScript?

I'm looking to write a script which outputs a list of all the window titles of all the currently running programs. Is there any way to do this with AppleScript? I tried running the following code: ...
0
votes
0answers
14 views

AppleScript: Select a specific drop down menu item?

folks. I'm incredibly new to AppleScript...just starting to open up my world to coding, and thought I'd start here. (I did BASIC back in high school. haha) All I'm trying to do is set a font type ...
0
votes
0answers
16 views

Activate the frontmost Safari and run Javascript

I'm trying to run Javascript on the Safari, whose frontmost is true. tell (application "Safari" whose frontmost is true) to do JavaScript theScript in current tab of first window But I get an ...
0
votes
0answers
34 views

Run Javascript on specific Safari using Applescript

There will be many Safari browsers running in my machine. I want to execute the some javascript commands on specific Safari using the PID's. I have the code in applescript for it here: tell ...
0
votes
0answers
15 views

Yosemite Mail “Load Remote Content” from senders in my contacts

I would like Mail on Yosemite to load remote content from senders in my contacts and not for everyone else. I have remote content disabled now and I have pieced together an AppleScript to click the ...
1
vote
1answer
31 views

Mac Automator App: How to Set Folder

This is probably something simple but its driving me crazy... I was just able to build my first automator workflow, which is quite basic and uses the Subtitles application to download subtitles for ...
0
votes
0answers
27 views

Is there a tool or scripting approach to change the arrangement of displays?

I move my monitors around a bit during the day. Specifically I rotate them or move my laptop to different positions. Each time I have to open up System Preferences > Displays > Arrangement and make ...
0
votes
1answer
33 views

Color picker as app in Yosemite

As of upgrading to yosemite the apple script choose color no longer works. The color picker app launches but the eyedropper doesn't function. Does anyone know a work-around for this?
0
votes
1answer
27 views

Add a word count feature that determines pay (for freelancer paid per word)

I am a freelance writer and I frequently use Pages to draft my articles. I appreciate having the word count on the bottom of the document because I am often paid by the word. Periodically, I'll see ...
1
vote
0answers
11 views

Create intelligently parsed reminders from applescript or automator

I have found that I can programmaticly create reminders in Reminders.app from applescript or using automator on the command line, but I'd like to be able to do so while taking advantage of the ...
0
votes
1answer
15 views

Applescript to update MP3 Spotlight tag from iTunes tag

Here is my situation. I have a large iTunes library that has songs tagged with the "Year" in iTunes. I have a Hazel Rule for the noodlesoft hazel software which reads from Finder's "Year Recorded" ...
2
votes
0answers
23 views

Is it possible to disable Safari extensions when using Private browsing?

I recently switched from Chrome to Safari for a few choice web applications, and I found that I couldn't disable extensions like Lastpass when browsing privately, at least not apparently, like I could ...
1
vote
1answer
43 views

How to simulate multiple mouse clicks while holding the mouse button?

I want my mouse to rapidly auto-click when I hold the left mouse button and to stop as soon as I release the left button. How can I do this? I have searched for hours, I didn't find anything! Is ...
1
vote
0answers
11 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
20 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
38 views

Osascript Compile Application

Is there a way to compile an an applescript from the command line similar to the following.
2
votes
1answer
26 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
27 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
0answers
13 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
68 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
70 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
24 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
49 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
258 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
27 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
34 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
38 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 ...
-1
votes
0answers
13 views

Need script to change multiple Outlook 2011 Appointment dates

How can you automate changing multiple Appointment dates? I would like to select 1 or more Appointments and add 7 days so they are moved back 1 week. I'm a Mac noob with little knowledge of ...
0
votes
1answer
13 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
30 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
votes
0answers
33 views

Remote Copy File to User Library

I what to copy a plist file via Kaseya on a Mac. I try ~/Library/Preferences. When I set this as the file location from Kaseya but it just creates a folder in the Root of Mac HD. I looked at this ...
1
vote
0answers
81 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
19 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 ...
1
vote
0answers
20 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
18 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
17 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, ...
1
vote
1answer
53 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
93 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
21 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
67 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
33 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
61 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
31 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
18 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
96 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 ...