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
20 views

Applescript: Choosing Sound Output

I want an applescript which allows me to choose sound output. Using this link, I created the following applescript. set theSource to (choose from list {"A", "B"} with title "Sound Picker" default ...
0
votes
1answer
23 views

Zip email with con AppleScript

I need to zip all email that have in the body this words "Identificativo messaggio: CA3DA789.008822A5.C33F80AE". I have many email in AppleMail so i think if it's possible to create an AppleScript ...
3
votes
1answer
47 views

Need my automator script to display the regular shutdown prompt before shutting down

I'm using the script below to trigger a shutdown but I would like it to give me the normal warning menu with the 60 sec. countdown, I can't figure out the warning menu. tell application "finder" to ...
2
votes
2answers
118 views

Wanted: Apple Script for copying file name and pasting it in Spotlight Comment box Mac OS X 10.8.5

Global Peace Mission Project looking for automating pre sorting movie file routines. Due to the instant impact inflow of third party YouTube contributions triggered by a blog launched March 22 after ...
0
votes
1answer
61 views

Automator or AppleScript to Remove Multiple Strings from File Names?

I deal with a lot of files (mostly images and video) with quite a few different words and phrases that I want to remove from the filenames. I keep finding Automator tutorials or AppleScripts to ...
0
votes
2answers
88 views

How to write a script that runs whenever a new file is added to a specific directory?

I've never written a script for OS X, and I don't really know which scripting tool i'll use for this task. Here's a pseudo code for the script I want to build : whenever a new file X is added to ...
1
vote
0answers
214 views

Curl terminal command syntax from Applescript

I want to execute a curl command in Applescript that does the following (per this SE question/answer): http://superuser.com/a/1054803/471181 ...Do an HTTP POST of the contents (as a string) of a ...
1
vote
0answers
37 views

Why would a codesigned app suddenly start triggering “… not allowed assistive access.” error?

Environment: OS X 10.10.5 Background: I have an applescript I've been using for past year or so. I use it for copying a password from my password manager (1Password, in my case), and it then pastes ...
1
vote
0answers
30 views

Change Notification Style from Banner to Alert via AppleScript

does anybody know an easy way to make an apple script that changes the notification style for a specific app from "banners" to "alerts"? I've been trying for hours but I'm finding it hard to use the ...
1
vote
1answer
41 views

applescript - extract filename from posix path

set p to "/Users/myAccount/Desktop/testfilename.txt" set a to POSIX file p I would like to extract "testfilename.txt" from the posix path above? Anyone know how to go about to do that?
0
votes
0answers
17 views

Apple Script for Mail Rule

Q regarding Apple Mail Version 9.2 (3112): Can Apple Script be written to open message(s) upon receipt in the “VIP” mailbox? I already have a rule that sends messages with a certain sender to the VIP ...
0
votes
0answers
29 views

Applescript. Create new, separate variables in a repeat loop

So I've made a script and at one point in it, it does this. set x to 0 repeat numberOfFiles times set x to x + 1 set {Frame, x} to {destination,x} as text end repeat What I ...
1
vote
1answer
81 views

Applescript code to find path to Desktop picture in Desktop 2

I need an applescript that will find the path to the desktop picture used in Desktop 2. As this isn't the current desktop the code below doesn't work. tell application "Finder" set DesktopPath to ...
1
vote
0answers
49 views

How to get the fps of a video from QuickTime Player's inspector using applescript

I need a quick and easy way to find the frame rate of a video in applescript. So far grabbing it through QuickTime Player's inspector seems like the easiest option. tell application "QuickTime Player"...
3
votes
1answer
150 views

Problems reconnecting to WiFi if connection is lost

In the area where I live there are frequent power outages for a few seconds. I am connected via a router, which (of course) restarts each time. Unfortunately my Mac (2011 MB Pro) does not ...
0
votes
0answers
38 views

Applescript, CSV, Text to Speech

I've now a script which reads a comma separated CSV-file with two columns, one for language 1 words and another for language 2 words. The script makes from each word an aiff-audiofile which is spoken ...
1
vote
1answer
34 views

How to get an applescript to play a song file

Okay so I want an applescript app that plays a song. The song isn't already on the computer and it's contained inside contents/resources of the app's package contents. This is my current code tell ...
0
votes
1answer
60 views

Getting the First Cell NOT Containing Certain Text in Numbers

I have a table in Numbers, and I'm trying to get the value of the first cell that contains the character …. In order to do so, I wanted to use MATCH(), but had no luck after I realized it could only ...
1
vote
1answer
112 views

Open the same terminal without switching spaces

I'm looking for an AppleScript (or anything, really) that will do the following: If a Terminal window is open in the current space, bring it to the front. If not, open a new one in the current space....
0
votes
0answers
9 views

Calendar id which doesn't change

I am trying to write some scripts for calendar on Mac. I learned that the uid changes as the calendar event is moved from one day to another. Is there way to recognize the same event uniquely even ...
2
votes
2answers
58 views

Can Someone Explain Why These Scripts Work?

I'm a brand new AppleScript initiate. I was at a Developer Summit and needed to stop messing with my windows so much. So I looked up scripting the window sizing and positioning. I was on my MacBook ...
1
vote
1answer
53 views

Hide a Fluid app toolbar using applescript

I've been trying to hide the toolbar from a Fluid app application using applescript, but it doesn't seems to be working at all. I've also tried on Safari (fluid apps are built on top of safari web ...
0
votes
2answers
83 views

How to send an email to myself with Applescript or Terminal automatically when my Mac reboots?

I wonder if there is a way to send an email to myself with Command Line or AppleScript service automatically when my Mac reboots? Thanks for your suggestions.
0
votes
0answers
18 views

How to generate pdf with MS WORD 2011 from Command line?

Is there a way to call MS Word 2011 from the command line to generate pdf from DOCX or PPTX?
1
vote
1answer
57 views

How do I script the forced logging out another desktop user from OS X?

We're running tests that require multiple desktops on a Mac Mini. We're successfully using an ssh TCP tunnel to localhost, 5900 to 6900, to make Screen Sharing let us log into other users on this ...
0
votes
0answers
83 views

Remove All Illegal Characters from All Filenames in a Given Folder and subfolders

I Know this was was basically answered on the net and using automator with the shell script (Sanitize Filenames) works great, but I need it to also do all subfolders as well. And if possible trim the ...
2
votes
1answer
49 views

Problems creating OS X installer with AppleScript

I’m trying to create a bootable OS X Installer (Including Mavericks, Yosemite and El Capitan) on an external disk with AppleScript. But now I have some trouble. Here is the code: display dialog "...
0
votes
0answers
29 views

Make an applescript that ticks the reopen windows at login box automatically

I'm currently making a script that will logout the user while reopening the windows at login. The problem is a can't find a way to tick the checkbox or specifically, find what process the login ...
1
vote
0answers
40 views

trim Mac files to move to Windows

I have a large number of Mac files that I need to remove illegal characters that Windows will not like and to shorten the file names while preserving the extension. I have found a Bash script that ...
1
vote
1answer
35 views

osascript dialog box is blocking.

I'm using osascript to display dialog box from bash script, but it's blocking the script, until i press the 'ok' button. I wonder if there's a way to make this display window asynchronous. osascript ...
0
votes
1answer
53 views

How can get an applescript to add itself to the open at login menu automatically

In El Capitan how can I get an applescript to make itself open at login? Such as adding it to the login items automatically? I want to be able to send people the applescript and the first time they ...
1
vote
1answer
54 views

AppleScript: Display alert or restart when application terminates/crashes?

I rely on Dropbox for syncing work files between two computes that are powered on 24/7. For some reason, Dropbox terminates (crashes or quits) after long periods of time, with no explanation. I just ...
0
votes
0answers
26 views

How to make the “Page Down” key on the keyboard move only half the distance as usual

I'm a computer programmer and use Xcode so I am constantly scrolling up and down. Often times I would like to move the page down but not as much as the "Page Down" keyboard key moves it. I would like ...
0
votes
0answers
42 views

How do I delete all attendees from a calendar event using applescript?

I have a script that copies all the events from my work calendar to a calendar I can see at home. Before adding the event to my home calendar, I want to remove its attendees. Can someone tell how to ...
0
votes
0answers
16 views

“Display Notification” stuck in loop in Bash script

Is there any way I can fire a banner notification once through a bash script? I'm trying to modify this BitBar plugin to be a little fancier: #!/bin/sh # <bitbar.title>Gmail Checker</bitbar....
1
vote
0answers
19 views

Error when I try to put my computer to sleep

I'm trying to use this script: on run delay 5 set lidState to do shell script "ioreg -r -k AppleClamshellState | awk -F \" = \" '/AppleClamshellState/ {print $2}'" if lidState = "Yes" ...
2
votes
0answers
42 views

Getting all windows returns inaccurate items

I noticed when getting all windows that there are extra window items returned than there are. For example for Safari, it returns 9 windows but there are only 3 windows open; all the others are ...
0
votes
0answers
55 views

AppleScript not putting Mac to sleep

I have this chunk of code: on run delay 10 set lidState to do shell script "ioreg -r -k AppleClamshellState | awk -F \" = \" '/AppleClamshellState/ {print $2}'" if lidState = "Yes" then ...
1
vote
1answer
61 views

Error when using “do shell script”

I'm using a MacBook Pro (Retina, Mid-2014) running El Capitan. I'm trying to create a script that checks if my computer is open or not, and I'm using this: ioreg -r -k AppleClamshellState | grep '"...
0
votes
0answers
15 views

Run AppleScript on lid close? [duplicate]

I'm using a MacBook Pro (Retina, Mid-2014) running OS X El Capitan and I'm curious if I can run a script when I close my computer (without installing anything). Note: I don't want to install anything....
1
vote
0answers
79 views

Save pdf from sender in Mail.app to folder with applescript

Trying to find out how to save email attachments like a pdf to a folder and can't figure out what I'm missing using the following. Any ideas? using terms from application "Mail" on perform mail ...
1
vote
0answers
16 views

Applescript claims to run shell script, but script has no effect [duplicate]

So I have a bash script like this: #!/bin/sh FILE='some_file.js' gsed -i -E 's/something/somethingelse/' "$FILE" echo "Modified File" When I run this from command line, it echoes the last line, so ...
4
votes
1answer
80 views

Change font of Terminal programmatically w/o restarting

At home I've got a nice big display that unfortunately does not have the same resolution as my retina macbook does. I'd like to use a pixel-font on the low-res screen and a nice smooth one on the ...
3
votes
1answer
107 views

Automator Service to insert text only available when text is selected

I'm trying to make an Automator Service to insert the current date. I have one that works but it is only available in the Services menu when text is selected. I need it to be available when there is ...
2
votes
0answers
43 views

Applescript Printer Alerts via iMessage

Is there a way to send an SMS via Applescript/Automator in either of these scenarios: When a low printer ink alert occurs ("Cyan is at or below 10%) With the periodic status of ink levels ("Cyan=10%,...
0
votes
1answer
46 views

Applescript: automated key press of spacebar/left click at defined intervals

I'm new to apple scripts and was wondering if there is a way the program the computer to press spacebar or left-click at defined times upon running of the script. For instance I will be able to same ...
1
vote
0answers
40 views

AD network drives and or apple script editor

I have a new Mac laptop. I have it on a Windows domain and I get my drive mapping in the sidebar when I login with my AD account. When I change my account to a mobile account I loose the mapping in ...
1
vote
1answer
78 views

Control haptic engine and force touch from terminal

Is there any way that I can create haptic feedback with the integrated force touch trackpad on my rMBP using a terminal command (preferably without AppleScript, but if that's the only way, then sure.)?...
0
votes
0answers
42 views

Change modified date in Finder for date added

I've been trying to do this for a while. For backup purposes, I'm looking for an applescript that replaces the modified date of folders and content (files and folders) with the date added. It would ...
0
votes
0answers
32 views

applescript to create keynote chart with floating point values

I am trying to create an applescript which can generate plots in Keynote. When I try this, it seems that any floating point values are being converted to integers. Here is a short applescript which ...