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

Need to automate copy / paste graphic selection from Preview to Google Doc

I need to paste sequential rectangular selections from a PNG opened in Preview into a designated Google Doc. I suspect AppleScript is the best candidate for this, but I'm open to using a more ...
0
votes
0answers
46 views

How can I query repeating items in Calendar with AppleScript?

I want to run an AppleScript to check my calendar every sunday for the next week, and if there is a repeating all-day event, put it as a note into Evernote. I successfully wrote the script that can ...
1
vote
0answers
69 views

AppleScript to extract email address from body of email and send auto response?

Is there a way with AppleScript to extract a contact link in the body of an email and send an auto response with apple mail? (I'm running Yosemite) I would like to auto respond to leads I receive ...
0
votes
1answer
66 views

Convert image type and save to relative folder with automator

I found a question and working answer here How to create an Automator service to convert images from one file type into another file type using the right-click contextual menu? but it is saving the ...
1
vote
3answers
48 views

How can I monitor the size of a file?

I run a particular abandoned open source project (StreamBaby) on my home media server, a Mac Mini. It's awesome but has one unfortunate issue which occasionally causes the app to generate an ...
0
votes
1answer
36 views

Need an Applescript to handle specific incoming mail.

Here's what I'd like the Applescript to do: upon receiving an email (I'm using Apple Mail) from a specific address, I'd like, firstly, that email to be deleted (not just moved to trash), and secondly, ...
2
votes
1answer
48 views

Script OSX Color Picker to choose a specific color and exit

Looking for a way to AppleScript the native (?) OSX Color Picker displayed in Evernote so that I can set a specific color and exit. Use case: Would like to create scripts to mark selected text red, ...
2
votes
1answer
36 views

How to get Apple Mail badge (n. of unread messages) from script?

I'd like to know in a (applescript|bash|python|whatever) script, running on my Yosemite OS X, the sum of unread messages in all accounts of the Apple Mail application - in other words, the same number ...
0
votes
0answers
20 views

Unable to adjust height of MoneyWell app after using full-screen mode

After I use full-screen mode, I cannot adjust the size of MoneyWell's window with AppleScript. It will change location, though. This is one of a few scripts I tried. Any suggestions? tell ...
0
votes
0answers
35 views

How to use osascript to tell the Microsoft Excel to open a specified xlsx file?

I want to use osascript to open a data.xlsx file and switch to its sheet with a name of sheet2. What should I do? Is there something like this? osascript -e 'tell application "Microsoft Excel" to ...
0
votes
1answer
152 views

How to use osascript to open the Terminal App in a new window and make sure it's on the top of all other windows?

I found a way to open Terminal.app very usefully as: osascript -e \'tell application "Terminal" to do script "cd myfolder && ./something.sh param1"\' If it were executed from a terminal ...
0
votes
0answers
18 views

Last sent e-mail from Mail.app

Is there any way to get the last sent e-mail from Mail? It can only access the top level sent mailbox. tell application "Mail" set mabo to the sent mailbox set selected to messages of mabo ...
1
vote
0answers
89 views

How to restart Safari (also clearing history and cookies) after being inactive (time based)?

I'm working on a Mac with parental control and it's supposed to be a kiosk Mac. I'm wondering if there is a similar Applescript that can tell Safari to restart after given for example 45 minutes? Is ...
0
votes
1answer
43 views

Applescript to keep a button pressed until I press it again?

I need an extra modifier key which acts kinda like Capslock by using AppleScript - or maybe you've got another proposition? I would bind it to some key combination in BetterTouchTool.
0
votes
1answer
68 views

Why is bash echoing instead of running Apple Script

I have a function in my .bash_profile that should allow me to add startup items. The only issue is this echo's a string instead of running the Apple Script. This is my function function ...
1
vote
1answer
66 views

How to pass user input to Apple Script then execute?

How do I configure Automator to ask for a text input (example: enter website url) and pass the answer to an AppleScript that executes this command: video-dl (user input) So, this would be executed ...
-1
votes
2answers
61 views

How to list files of any installed app in the MAC programmetically?

I am making MAC app in which I want to list of files / folders related to any installed app in the mac. For example; I want to get list of all the files and folders of Skype app installed in my MAC ...
1
vote
1answer
186 views

Volume Overlay Displaying Incorrectly/Not Centered

So basically my macbook pro (mid 2010) was acting funny (shutting off when left corner was tapped/bumped, high fan when no activity, etc.), nothing helped so I reset the SMC (I think that's what it's ...
0
votes
0answers
30 views

How to detect if a program executes correctly or with errors using applescript

I am using Hazel and Abbyy Finereader to automate OCR of PDFs. I am using the following AppleScript (found on the NoodleSoft Forums) to run Finereader. I'd like to know if it is possible to enhance ...
1
vote
0answers
16 views

Dragon Dictate pressing space bar when not recognizing command

I'm using yosemite 10.10.5 with Dragon Dictate 4 and 5 I had this problem. Whenever I say a word that is not a command the what appears to be space bar is pressed. In turn, paging down or opening ...
0
votes
0answers
31 views

Manipulating messages in Outlook 2011 from on IMAP account with applescript

I am currently using a great applescript that deletes duplicate messages from whatever currently selected folder. I use it mostly on IMAP folders to avoid downloading duplicate messages to POP ...
1
vote
2answers
268 views

How to click the OK button in Google Chrome alert, using AppleScript

I am using AppleScript with Google Chrome to automate a tedious process on a website. In certain conditions, the website has an alert popup to notify the user of an issue. This prevents the rest of ...
0
votes
0answers
86 views

Launchd Applescript Timeout Error

On Yosemite 10.10.5, I have an Apples Script application that runs and completes as desired under 2 of 3 conditions. The application is set to launch, by launchd plist 3 times per day at 7:05am, ...
0
votes
1answer
104 views

Applescript to change subject line

I have been looking up for the last two days and found a few applescripts that claimed to change the subject lines. But none of them seem to be able to change/set the subject line. What do you guys ...
0
votes
1answer
37 views

Is there a way to see the automator script in text?

If i create some type of workflow on Automator, can I see the script in plain text? For example, maybe get the script and push it out through Apple Remote Desktop to a remote computer?
0
votes
1answer
19 views

Move Certificates from Server to Remote Computer (MACS)

So I am trying to push a certificate from a location (server) onto a remote mac computer so that then I can run a script that installs the certificates onto keychain and installs the application. Do ...
0
votes
0answers
38 views

Apple Mail script/plugin for moving mail between accounts

I need a script/plugin for moving mail, in the Apple Mail app, between accounts (online ↔︎ online and/or online ↔︎ local). The standard build-in move option isn't reliable enough, at least from my ...
0
votes
1answer
48 views

Searching iTunes Library for file location?

For any given track in my iTunes library, I can easily ask for the physical location of the file like this, tell application "iTunes" set ilib to library playlist named "Library" set z to ...
1
vote
0answers
170 views

SecurityAgent Password not getting filled via AppleScript 10.11 El Capitan

My AppleScript no longer seems to work in 10.11. I put quite a few debug statements in my script and it doesn't seem like the script continues to run after the dialog appears. Does anyone have a ...
0
votes
0answers
48 views

Keep screen off while moving mouse/clicking etc. (iMac)

Usually, with my macbook pro i can turn off the screen by setting the brightness to 0 and keep it off even if i move the mouse or do anything else (usually doing something with applescript). Now that ...
1
vote
1answer
124 views

How to run AppleScript (.scpt) as LaucnDaemon by root

I have an AppleScript or set of Applescripts that I am trying to run as a LaunchDaemon. I have no problem running the LaunchDaemon with my user. The problem comes in where I have the need to read a ...
0
votes
1answer
182 views

How to get and set metadata of a m4a file?

I am trying to automate some changes in m4a metadata and would prefer doing it through AppleScript other than popular solutions like mutagen. How can I address m4a files metadata? I need not only ...
0
votes
2answers
98 views

Make script run without interrupting GUI experience

I have an AppleScript that automatically opens SelfControl.app to help avoid distractions when I want to be working. The script is very similar to automate an Internet content filter, and it is ...
0
votes
1answer
127 views

type of emails from Contacts.app in AppleScript (on El Capitan)

I want to work with a list of all email addresses that appear in my address book. I thought I could simply set such a list with AppleScript, and use the elements, maybe after casting the references to ...
0
votes
2answers
83 views

applescript will not stop running

I have an applescript that utilizes a named pipe and pipes data over to it. I have my script passing said data in a while loop, which is working, but I find that I am unable to stop the script ...
0
votes
1answer
97 views

Smart Playlist in Itunes based on file location

I'd like to create a smart playlist in iTunes based on a specific folder (I manage my media library manually). Is that somehow still possible in ITunes 12 (even if it involves scripting)?
0
votes
1answer
53 views

Can a custom label be applied to a contact field using partial text from the field value?

In the Contacts app in OS X Yosemite it is currently impossible to import custom field labels when importing from a CSV file. I use a 3rd party app to manage my contacts and I would like to import the ...
1
vote
2answers
134 views

Can I replace characters in AppleScript?

I'm working on an AppleScript to mount our Active Directory Home Shares and I've come up with the following part that looks at the logged in users "SMBHome:" and it gives me the users home share but ...
0
votes
1answer
407 views

How does one Copy, Paste and Tab using AppleScript?

I am looking to automate Copy, Paste, Tab and Left in Microsoft Excel and either Safari or Firefox using Applescript. I have limited experience in coding, and have recently complied a code, but ...
0
votes
2answers
140 views

multiple dropbox instances hangs in starting loop

So I have recently installed two separate concurrent instances of dropbox on Mavericks. There are plenty of scripts on the web (all roughly the same) that seem to lead to a common issue, specifically ...
1
vote
1answer
33 views

Using osacript to access Finder from crontab (or from non-interactive session)

I have a script that generates a dmg file from my application bundle. This is generated every night from our subversion repository. If would be interesting to set up things like the DMG's window ...
1
vote
1answer
90 views

How to get the PID of every window of every process?

I'm using the following simple script: tell application "System Events" to get the title of every window of every process Which works by printing titles of every window (the same with position). Is ...
0
votes
1answer
144 views

How to activate and run JavaScript in AppleScript?

I'm trying to run simple script in AppleScript Editor on OS X 10.9.5, but using JavaScript, e.g.: var SE = new Application("System Events"); SE.processes.windows.name() However my dropdown only ...
0
votes
1answer
166 views

AppleEvent Handler failed (-10000)

I'm having issues with a simple part of script, where I wanna get the property dock preferences of System Events. I have the following: tell application "System Events" tell appearance ...
1
vote
1answer
51 views

Why is my AppleScript not working?

Making an AppleScript but for some reason it isn't working. Any ideas why not? delay 1 set volume 1 say "Hello " & (do shell script "whoami") using "Whisper" say "Do you want to play a game?" ...
0
votes
2answers
45 views

Gaining access to data acquired by AppleScript outside of the script

I'd be interested in using the data that I acquire with an AppleScript in another Framework, or even to write it to disk (the former is preferable). For example, I have an AppleScript where I ask ...
0
votes
1answer
225 views

Send Command to Add remote users through ARD

so I'm trying to create an extra admin account on all Macs on the network. There are quite a few so I'm trying to do it through Apple Remote Desktop. Do you guys know how to do this? This is all I ...
8
votes
5answers
1k views

How to create an OSX Application to wrap a call to a shell script?

My goal is to include in a zip file what amounts to a shortcut, instead of telling my customer(s) to open up Terminal and run a shell script. My deployable essentially looks like this: $ unzip ...
2
votes
2answers
182 views

AppleScript to create spacing format like “S P A C I N G”?

In order to format text documents in a more readable way it would be nice to format selected texts by an apple script executed via the context menu services in the following way: select "text" with ...
0
votes
0answers
75 views

Automator shell script - change file extension

I currently have a task that is working. It takes whatever files are added to particular folder and compresses them via Handbrake to another folder: for f in "$@" do HandBrakeCLI --preset="iPhone ...