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

learn more… | top users | synonyms (3)

1
vote
1answer
43 views

Applescript Calculate Run Time of a Command

How would you calculate the time it took to run a command? Specifically, I want to know the time it takes to return a value in a Shell command. I wrote this up, would it work? (Psuedocode) ...
0
votes
0answers
20 views

Applescript to read unread notifications from Notification Centre on an arduino input

I am using applescript on Yosemite to read out (say) unread notifications from the notification centre. The action is triggered on an arduino input. While I can trigger the notification centre I am ...
2
votes
1answer
93 views

How to capture mail.app message url that will remain persistent when message is moved?

So mail.app has this wonderful message:// URL scheme, which works great—until the message is moved. Then links created sometimes work—and sometimes don't. I can't figure out the difference. So my ...
0
votes
1answer
14 views

Re-numerate selected tracks in iTunes

I often do the same job: select each track in selected set of tracks, open Properties of track and set the number of the track. I am just wondring may be there is a script or plugin for iTunes to ...
1
vote
1answer
36 views

Need help with small AppleScript

I'm on Yosemite 10.10.4, Mac Mini. I have a small Bash shell script to start Quake3 Arena in Wine. It works fine. #¡/bin/bash cd Desktop/Quake3ISO hdiutil mount "Quake 3 Arena.iso" cd Quake3 wine ...
0
votes
0answers
22 views

Open Word Doc with Pages using Applescript

How can I get the following to work in Pages? I get an error message saying the file can't be opened but if I change the path to a .pages file it works fine. tell application "Pages" activate ...
0
votes
0answers
59 views

Automator/AppleScript: Sync 3 folders when an item is added to one

Background I'm fairly new to the Automator/AppleScript tools. There are 3 folders on the Mac and external hard drives that should sync when a file is added to one. So, for example, when I add a ...
1
vote
1answer
35 views

Launching Character Viewer (aka CharacterPalette) from command line

So, recently I have being using the Character and Keyboard Viewer a fair bit and set up simple Alfred keywords that toggle the launch/quitting of these apps so as not to have to leave the keyboard. ...
0
votes
0answers
48 views

AppleScript choose file dialog box with default location not working

So there goes four hours of my life that I will never get back. I'm trying to do something seemingly simple... I want to open a file select dialog box and specify the default location. I actually ...
0
votes
1answer
31 views

Applescript to read facebook notifications

I am very new to applescript as well as programming. I am trying to find a way for applescript to access my facebook unread notifications and whatsapp web unread chats and read it out to me. I can ...
0
votes
2answers
44 views

Dock shortcut for an interactive bash script

I'm new to OSX and all I want it an application shortcut in Dock that opens the terminal and types the first command and waits for me to provide the password. Here is the script I want to run: ...
0
votes
1answer
54 views

osascript Expected end of line but found class name?

Not really sure what its expecting here, I assume its around click button though. This used to work on 10.10.3, but seems to have stopped on 10.10.4? Script function AcceptSecurity () { osascript ...
0
votes
0answers
47 views

Automator action to Search with YouTube (Safari)

There is a contextual menu that allows user to search highlighted items with Google. I'd like to create a process that searches with YouTube with applesccript(automator). I tried doing something on ...
0
votes
1answer
30 views

Applescript: Duplicate selection (folder) to desktop and moving the folder to a different location

First of, i'm an applescript noob;-) What I'm asking for is simple but nearly impossible for me to execute. See the script below. tell application "Finder" set selected_items to selection ...
0
votes
0answers
32 views

Toggle Show Date and Time via AppleScript

How can I toggle the "Show date and time in menu bar" option via AppleScript. I'm using OSX 10.10.4. I am looking for a working example in AppleScript.
2
votes
1answer
33 views

Adding content from mail to Excel using Applescript

I have gone through and used some great code form the these forms for Adding content from mail to Excel using Applescript. I am nearly there but have one more question. I have the following layout of ...
0
votes
0answers
14 views

Create directory inventory when ejecting

I use UnDock Now! to eject external hard drives, which allows running AppleScripts before ejecting. I would like to have a running inventory in a text file of all of the folders and filenames that ...
0
votes
1answer
35 views

Applescript - Get information from terminal command

I'm creating a little script to allow quick changes to the network settings of my Mac. I have got it all working, but I wanted to be able to see what the settings are before I change them in the first ...
0
votes
0answers
88 views

Replace iTunes playcount with previous library using Applescript loop

After updating my iTunes library to iCloud, the play count of some has been messed up. I was thinking of fixing the missing data by using an Apple Script loop. The loop should scan the playcount of ...
1
vote
1answer
65 views

Applescript - AppleEvent handler failed on set properties {visible messages: }

I have the following applescript working under Lion, but it returns this Error: -10000. Mail got an error: AppleEvent handler failed. error under Yosemite. try tell application "Mail" set ...
0
votes
0answers
20 views

Use Automator to select camera in Quick Time Movie Recording

I'd like to create an application shortcut to directly show the screen of my connected iOS device using Quick Time's "New Moview Recording" function. I am already able to create an Automator script ...
0
votes
1answer
78 views

Need assistance with AppleScriptObjC conversion from AppleScript

I need to preface this with the statement that I am not a programmer, so I need to be talked down to. I have done what I described below using guides and lots of trial and error I have a functioning ...
0
votes
1answer
29 views

Applescript to emulate key strokes [duplicate]

I want applescript to input into microsoft excel "No, (tab, tab again), Yes". I can't seem to make this work. I would preferably like it to start whenever I press a hotkey or something, but having to ...
1
vote
1answer
43 views

How do I use a numerical variable and a loop in automator?

Since scripting is not that powerful in case of Preview.app, I am trying to find the solution with Automator. Here's the problem: I've got a protected pdf file of 130 pages. It happens that I can't ...
0
votes
1answer
85 views

How to strip file extension in applescript (In Automator)?

EDIT: This is the working code for an AppleScript Automator service to encode (ffmpeg) a user selected file to a user selected directory, keeping the the original file name with a new extension.: on ...
0
votes
2answers
53 views

How to mount and name a volume if it's not already mounted with a startup script

I'm trying to do something I thought would be simple, but after researching it I feel like I'm half way towards shaving a yak, so I'm asking for advice. I want to create a script that lets me and my ...
0
votes
1answer
24 views

how can I use applescript to type?

how can I use applescript to type in a specified area on the screen? I've tried the 'keystroke' command, but it doesn't seem to work. also, how can I use applescript to display an image? thanks a lot ...
0
votes
0answers
22 views

Applescript - How to Create a Contact IN a specific Account?

I am using Applescript on Yosemite 10.10.4 to create contacts in the contacts app. I have two iCloud accounts configured on my Mac. One personal (The "main" iCloud account) and one business. ...
2
votes
1answer
45 views

AppleScript: 'exists' returns true every time

On every exists in AppleScript the result is true. For example: set a to (POSIX path of (((path to home folder from user domain) as text) & "skfhshfkh:" & "hfjhsfhsj:")) if exists a then ...
1
vote
1answer
76 views

Turn Wifi off/on with a single key?

Is there a way to assign the WiFi on/off function to one of the function keys like F4 that I otherwise never use? I assume Applescript would be required. However I may want to use a BASH script ...
0
votes
2answers
44 views

Open iMovie with alt down from AppleScript

How to open iMovie with alt from keyboard with AppleScript?
1
vote
2answers
59 views

Get part of result of command line in OS X

I would like to use the following command line to get the current Wi-Fi channel. /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I I would like to use ...
0
votes
1answer
233 views

AppleScript - GUI Scripting and setting checkbox, radio button and field values

I'm working on an GUI scripting AppleScript that will, for the open FileMaker Pro Advanced document, go to the File menu and select the File Options dialog box, then set some checkbox/radio button and ...
0
votes
0answers
20 views

AppleScript and Configurator

I have written a bash script to modify a mobileconfig file (iOS profile in a xml-plist format) as per this link and I am now in the process where I would like to interact with Configurator via ...
0
votes
1answer
49 views

Get terminal application name from shell

I am used to my osascript aliases. In particular, I have nx for opening new tab and closing the old one. However, my scripts use application name to send keyboard signals to it. Instead of writing it ...
1
vote
1answer
46 views

AppleScript to audio

I want to save the following spoken text to an audiofile that I can play on my iPod (so .mp3 or something). say "the company [[slnc 1200]]" using "Alex" say "une entreprise [[slnc 1200]]" using ...
0
votes
0answers
44 views

Organizing TV Show with automator & tvnamer

Previously I used Hazel (http://www.noodlesoft.com/hazel.php) and tvnamer (https://github.com/dbr/tvnamer/) to sort and rename my TV Shows Collection. I'm trying to simplify the process by using ...
0
votes
1answer
26 views

Setting a clipboard kind without setting “styled Clipboard text”

I am developing a tool to add a HTML-ized version of a text to the clipboard. Currently, I'm using applescript to manipulate the clipboard. Unfortunately, I realized that in addition to the entries I ...
0
votes
0answers
21 views

How to open application through notification in terminal shell

I have the following command to run in a terminal shell script: osascript -e 'display notification "This is a Text" with title "This is a Title"' This is a shell code running in applescript to open ...
0
votes
1answer
114 views

How can I use Automator to open a website & log in everyday at a certain time?

I need to set up an auto log in for an Intranet web site so I can get right to work with no delays. I want Automator to open safari, go to the page, input log in and password credentials and hit log ...
5
votes
1answer
122 views

How to register AppleScript as default web browser in Yosemite?

This is essentially the same question as How to register an AppleScript as a potential default web browser?, but the solution there doesn't seem to work on Yosemite (LSIsAppleDefaultForScheme no ...
0
votes
0answers
33 views

automatically share photos to Photos iCloud Shared Albums

I'd like to script the Yosemite Photos app so that every time I place images to a folder on my desktop, it automatically is imported into the Photos app and uploaded to a shared album. Is this ...
0
votes
0answers
25 views

AppleScript and Microsoft Outlook

I would like to use Applescript (I'm only recently starting to use it) with Outlook to select all messages in the Inbox and apply a rule. It should be so simple! Any help gratefully received. ...
1
vote
0answers
38 views

I need to batch move files from one location to another, and put them in pre-existing folders with the same first 7 characters

I am looking to automate moving large amounts of files. Basically I have one location on our network full of .zip files. They are all named like "12-3456.zip" etc. I need to move each of these .zip ...
1
vote
2answers
36 views

AppleScript for Dropbox on External HD

Disclaimer: I don't know much AppleScript, but I am a bit of a programmer, so you can go a little technical on me. I am looking for a solution to the issue of putting Dropbox on an external HD. ...
2
votes
2answers
141 views

How to run custom AppleScript in the background at all times?

Given an AppleScript file designed to poll for an application dialog box every 30 seconds, how can I easily setup my Mac OS so that this AppleScript file starts every time I login silently in the ...
2
votes
2answers
94 views

Way to manually(!) sort files into folders

I'm looking for an easy way to quickly go through a bunch of files, mostly videos and images and sort them in a set of standard folders. Currently I open the videos/images in VLC see what they're ...
0
votes
2answers
47 views

In AppleScript when entering password, is a click required

I'm writing an AppleScript to toggle on/off a VPN connection for a computer. I have things more or less working, however, I have to click on the password prompt dialog in order for the script to ...
0
votes
0answers
25 views

OSX Flush DNS without sudo

I have a Mac that keeps messing up its DNS (this may be a wider network issue, we have windows clients that are having problems too). Whilst I try to understand the DNS issue I'd like to set an 'icon' ...
0
votes
1answer
39 views

How to make automator run an applescript that turns of mac?

I want to make an applescript that taps the apple in the corner, taps shut down, and then taps shut down. I can't record it, since it actually involves shutting down the computer, making the script ...