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

Automatically convert a file whenever it is saved?

Is it possible to automatically convert a file to another format every time it is saved? Some context: I have a Numbers file which needs to be converted to csv for processing by various shell ...
0
votes
0answers
63 views

How to map buttons on my mouse with AppleScript?

Since BetterTouchTool is becoming paid, I was looking for an alternative solutions to map my navigation buttons (prev. page, next page) on my mouse (Logitech MX518) that I enjoy using for browsing ...
0
votes
1answer
64 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
964 views

AppleScript editor cannot save .scpt file

I've created a simple AppleScript .scpt file, using TextEdit. If I now open it with AppleScript editor, I can run it. But when I try to modify and save it, I get the following error: It's ...
3
votes
3answers
94 views

How preserve JPEG date stamps during Automator scaling?

Automator services embedded as a context menu are a great way to quickly scale down JPEGs in the finder. Right click the file, choose your scaling script, done in seconds. The problem is it ...
1
vote
0answers
34 views

How can I use turn on/off application in AppleScript?

Can I use to turn on/off application by 'keyboard' in AppleScript? I make simple macro program, for example auto mouse click or keyboard. But if idle start, I can't pause or stop it. So I need ...
0
votes
0answers
94 views

Query Status of Path Finder.app

I use Path Finder as a replacement to Finder.app (but still leave Finder running). One of the main reasons I use Path Finder, is that it lets me queue file transfers. However, it seems that Path ...
1
vote
0answers
126 views

AppleScript to automatically update IP-adress in Remote Desktop (ARD) on computers with DDNS

I've been searching for hours but couldn't find an answer yet hence my question here. I frequently use Apple Remote Desktop (ARD) and I have setup a DDNS for every computer. The only problem I have ...
2
votes
2answers
2k views

How do I get Automator actions for Microsoft Powerpoint and Word?

I'm trying to set up Automator with a folder action to convert any Powerpoint or Word documents I drag into it to PDFs. I found this question: How do I script Powerpoint to save a directory of PPTX ...
1
vote
1answer
143 views

Auto Delete Hidden File when USB Connected?

I have a MacAir running El Capitan with all updates. I use a USB stick to move movies from Mac to Samsung Smart TV. The TV writes a hidden file " .device_info_*** " (long abstract filename). This file ...
4
votes
1answer
71 views

Duplicating and renaming Finder selection to the same folder in one clean step?

Is such a thing possible? I have this code which can do the above: set now to do shell script "date +%Y-%m-%d' '%H.%M.%S" tell application "Finder" set finderSelList to selection as alias list ...
1
vote
0answers
26 views

Manage Finder favourites with defaults write or similar?

I've been unable to find any preferences list file with the locations for the 'Favorites' list shown in the Finder sidebar. No luck from likely candidates com.apple.finder and com.apple.sidebarlists. ...
0
votes
0answers
42 views

Set firmware password with AppleScript

I'm try to set a firmware password on a MacBook Air running El Capitan using the following one line script: do shell script "sudo firmwarepasswd -setpasswd 123456" The command completes ...
3
votes
1answer
63 views

Get notified by notification centre when someone ssh's into my computer?

I know that if I open Terminal and I type inwho, it shows who is logged in and at what time, etc. However, I am not going to be at Terminal all day and keep typing who. So, I would like a notification ...
0
votes
0answers
31 views

Execute macros or scripts based on Magic Trackpad 2 Force Touch

I’m looking at getting a Magic Trackpad 2 with Force Touch, but want to know if I can create macros for the Force Touch actions? I’m not taking about the the built in basic Apple support, but full on ...
0
votes
1answer
242 views

AppleScript sending Mail messages before file attachments are attached in El Capitan

I have a Workflow that runs an AppleScript which attaches spam emails as file attachments and sends them to ASSP for processing. It's been working fine, but apparently something has changed in El ...
1
vote
2answers
97 views

Date calculation in AppleScript. Week numbers and their start date

I want to write an AppleScript that creates projects in OmniFocus where their defer date and due date is set to any weeks' start and end day. The result should look like this: weeknumber: day1. ...
1
vote
0answers
11 views

Find Contacts by address type

I just mass-added and edited about 500 contacts from my archives, and I would like to set the address type for some of them from other to home. I'd like to search by address type for all contacts ...
162
votes
8answers
85k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
0
votes
2answers
237 views

Text-to-speech with 2 languages

I am studying French and to practice my pronunciation and to learn the words, I want to have my mac speak the words out loud. My mac should say the word in English, and after that, he should say the ...
0
votes
2answers
48 views

Reformat URLs using Applescript or Automator

Currently I have a process that downloads image URL from a website. Then I filter out URLs I don't need and am left with a list of good image URLs. I want to reformat these URLs by adding [IMG] ...
3
votes
2answers
853 views

Can only run AppleScript from Automator

I have the following AppleScript which toggles the scroll direction on the trackpad: tell application "System Preferences" activate set current pane to pane "com.apple.preference.trackpad" ...
1
vote
2answers
128 views

Activate desktop using Applescript

Basically, I have this short script to "clean up" the desktop. This is the code: tell application "System Events" tell application "Finder" to activate desktop delay 0.1 tell process ...
0
votes
2answers
264 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
27 views

Can softwareupdate be used to automatically download (but not install) on the terminal?

Could the Terminal command softwareupdate be used to download (but not install) any MacAppStore updates, say with a scheduled Calendar running an Automator/AppleScript script?
0
votes
1answer
52 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.
3
votes
3answers
243 views

Can Safari's download popover window be made wider?

How can the max. width (fixed width≈425) of Safari's download-popover-window be made wider? Is there a way to get at Safari's "download pop over window" in any way so its max-size is larger than 425 ...
1
vote
1answer
132 views

select a menu item of a window instead of a process using Applescript

I'm quite new to applescript (and a beginner programmer) and I've hit a dead end. I figured out how to access a menu item of a process but I do not know how to do it once I have multiple windows. ...
0
votes
1answer
42 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 ...
8
votes
6answers
11k views

How to run Applescript on Disk mount

I want to run an Applescript when I mount a specific disk. It isn't if the script is located on the disk or not, it should just run when OS X mounts the disk. I tried to accomplish this with folder ...
0
votes
1answer
48 views

Is there a shortcut or way to use code, to do anything at all with the item currently highlighted by Command+F?

Title pretty much says it all. Also if anyone knows how to drag and drop something into a browser using any language or command(s), please share. To be clear i'm talking about something like this: ...
0
votes
1answer
435 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 ...
3
votes
1answer
310 views

Applescript to click green (zoom) button with Option down

Based on Applescript - the activate command makes application "half-active", I wrote the following Applescript which would allow me to click the green (zoom) button at the top-left corner of ...
0
votes
0answers
67 views

How to use Automator & AppleScipt to ask Pages to export as PDF?

Here is my workflow: (it's a service) However the workflow keeps giving me error: Can't continue input. I would appreciate it if anyone could tell me what's wrong, thanks!
8
votes
1answer
11k views

How do I focus a specific window with applescript without doing an activate and bringing other windows to the front?

I'm looking for a method w/ AppleScript to select/focus a specific window of an application without actually doing an "activate" which brings all windows to the front. Here's what I have so far: ...
1
vote
1answer
1k views

AppleScript to compare contacts in two groups and remove duplicate from one group

I want to create an AppleScript for Apple's Address Book (Contacts) app that will look at two Groups, and if a contact is in one Group, it will remove it from the other Group. Specifically, I add ...
0
votes
2answers
941 views

Where does Applescript Event Log go when run under Launchd?

Or, how to log from an AppleScript (saved as application) and/or view the Event Log? None of the AppleScript's log statements can be found. I have tried adding the following to the launchd plist: ...
1
vote
1answer
38 views

How can I get the window bounds for “Adobe Illustrator” in AppleScript?

Apparently, Adobe doesn't have a single mechanism in place for people using a laptop and additional monitors with their products. As an Adobe CC user who primarily works from a laptop that connects to ...
1
vote
1answer
58 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.
0
votes
1answer
69 views

List all programs without any window and kill them

has anyone an idea for an AppleScript that checks the number of windows of all applications and kills programs with window count 0? Thanks a lot!
2
votes
1answer
264 views

How to set Photoshop CC window size to 1280x720 via AppleScript?

I'm trying to resize the Photosshop CC window to 1280x720 to record it in 720p. I tried multiple ways, including AppleScript, SizeUP! app, terminal etc but none work. Here's an example of AppleScript ...
0
votes
1answer
57 views

set position {0,0} of element accessibillityTitle via Applescript

I have a UI element called accessibillityTitle with value Layers and I want to position this element in the top right corner, but I don't know how to acces it via Applescript. I have found the element ...
7
votes
1answer
781 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 ...
0
votes
1answer
34 views

Applescript toggle to do This, this time, and That, next time?

Let's say I have an Applescript that does THISCODE. And I have another Applescript that does THATCODE. I always run them in sequence, but never at regular intervals. In other words, whichever one I ...
0
votes
2answers
132 views

How to check if invisible items are visible?

How do I check in AppleScript, if invisible objects are visible? If visible, do: defaults write com.apple.finder AppleShowAllFiles 0 in invisible, do: defaults write com.apple.finder AppleShowAllFiles ...
1
vote
1answer
23 views

Is it possible to modify the behavior of Finder UI elements with AppleScript?

I wrote an AppleScript that scans my entire iTunes library and tags those files with their Genre (so I can easily access them in Finder by just clicking the right tag). The next step on my list would ...
2
votes
2answers
154 views

Wrapping youtube-dl into automator via applescript

I am hoping to make an automator application that prompts the user for input (i.e. youtube url), and downloads it using youtube-dl (already installed via Homebrew). After this, I am trying to use the ...
0
votes
0answers
67 views

Trigger an action when a specific video file plays? (VLC)

Objective: I have a VLC playlist. Whenever a new video begins, I'd want it to trigger my Philips Hue lamps to change lighting settings. The lighting settings are pre-made, with specific names, and ...
2
votes
2answers
117 views

Automator service script ALWAYS launches application, disregarding conditional

I wrote a little service script to open an iTerm terminal window on an arbitrary folder on Finder. I want it to check if iTerm is running, and if it is to open the terminal session in a new tab ...
1
vote
1answer
193 views

Applescript for specific System Preferences pane

I'm trying to write an applescript to get me to a specific section of the system preferences - Keyboard > Shortcuts > Services and hopefully to a specific service as well. I've gotten a part of the ...