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

Automator workflow / app to refresh a given tab in Safari (or even Crome)

When I am coding my Rails app I am switching back to Safari quite often to refresh my local version of the site to see if my changes are correct. It would be awesome to just hit one of the function ...
0
votes
1answer
113 views

AppleScript Save As Dialog in Safari Reader Save As PDF

I have an AppleScript to open move a Safari webpage into Reader view and then to Save As a PDF. I would like it to Save As the PDF with default filename, but always in the same specific location. I'm ...
1
vote
2answers
76 views

How to put a Mac to sleep after display disconnect using AppleScript?

I would like to solve the issue from this question, namely, after disconnecting a Cinema display from a clamshell MacBook I would like to let the MacBook go to sleep without opening and closing the ...
0
votes
0answers
19 views

AppleScript to Like a SoundCloud Track using System Events

I'd like to create an AppleScript to like a SoundCloud track. Since SoundCloud supports keyboard shortcuts, I tried to use System Events. (l "ell" is the shortcut.) This is what I have so far, but ...
1
vote
1answer
46 views

AppleScript : Download to a AFP drive

I try to download files to a AFP drive but always have "Warning: Failed to create the file /Volumes/home/Downloads: Is a directory " But the last command work fine tell application "Finder" to ...
0
votes
0answers
31 views

How to make an AppleScript typer

I need an AppleScript that will type a certain text when I press "4" This script I made does the typing I need but it needs to be activated with a keystroke "4" and that is where I am stuck: or as ...
0
votes
1answer
57 views

Applescript insert images into .Pages document

I've tried numerous examples online, but all don't seem to work. The image is received via Automator and each file is dispensed incrementally and ran through the following Applescript: on run ...
1
vote
1answer
80 views

Automator: extract PDF text and save in current directory

I've made an Automator service for extracting PDF text and saving it in the current directory, and it works reasonably well. It takes one or several PDF files, extracts the text, and saves it as ...
1
vote
2answers
64 views

How do I create an automator to forward mail?

My parents both have GMAIL accounts. We were wondering if there was a way to forward email so when my dad's account receives email from a certain sender it would be forwarded to my mom's account. ...
0
votes
0answers
30 views

How to define keyboard shortcut for “Save to your Music” Functionality for Spotify

I really love the Spotify app. When I like some songs on Spotify, I'm using "Save to Your Music" to add songs to my Spotify library. But this requires switching applications and using the mouse, so I ...
0
votes
0answers
38 views

Replaceing Folder Action Dispatcher with LaunchAgent on Yosemite

The fact that Yosemite's Folder Action Dispatcher (the thing that watches folders for changes and then performs some action) is broken (High CPU/mem) is well documented. However, what to do about it ...
5
votes
1answer
74 views

AppleScript : Set do script result as variable

I would like to get the result of this search and display the result in a notification or safari popup. " set result to do shell script "curl https://www.binlist.net/json/" & cc without altering ...
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
32 views

Start Terminal in AppleScript

At work I'm overseeing several users who use MacBooks to connect to our enterprise environment. One of our vendors has an old server which users access via ssh. I've created an Automator workflow to ...
0
votes
0answers
49 views

How to repair a corrupt Applescript Editor

I have an applescript that I've been working on the past week or so. I've been running & rerunning a script, fixing bugs, etc. that are deep in the code. Sometimes, the script would take a ...
2
votes
1answer
77 views

How to ensure that windows opened from the Dock open in the current Space/Desktop

A Mail window was in the Dock, and I clicked on it to restore it to my current Desktop. Instead of opening where I can see it, it went to some other Desktop, presumably the one it was in when it was ...
3
votes
1answer
89 views

Can't Set Desktop Background in Fullscreen App

I have an 11" Air so I usually run all of my open applications in fullscreen mode. I have a launchd job for my user that runs a script every hour and every login to set the desktop background ...
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 ...
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 ...
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 ...
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
244 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
99 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 ...
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
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] ...
0
votes
0answers
68 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!
4
votes
1answer
73 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 ...
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 ...
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
68 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 ...
0
votes
3answers
169 views

How to use Applescript to find duplicate files and .mp3 files in my iTunes “Music” folder and subfolders?

I recently moved my iTunes music library onto a new computer set-up by copying the "iTunes Media" folder onto an external HD and then onto my local disk. When I opened iTunes for the first time, it ...
2
votes
2answers
155 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 ...
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
0answers
29 views

Interact WITH a running Applescript script/program without leaving the current program (Hotkey, sent keystroke etc)

(I asked this on Stacksoverflow before discovering this Apple specific sub-forum. I hope cross posting is accepted when done in a more relevant forum) The general question from my specific problem is ...
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
0answers
42 views

Look Up - AppleScript command

Is there an apple script command for the "Look Up" action/service? If not, what would be a decent way to mimic it? If you don't know what I'm talking about it's the popover when you three-finger ...
1
vote
0answers
134 views

Script to start my VPN if I'm connected to a specific Network / SSID [El Capitan update]

I'm searching an AppleScript to automatically start my University VPN if I'm connected to the University network. I already found some solutions for older OS X Versions, but they're not working ...
0
votes
0answers
29 views

AppleScript - extract a string of characters from similar filenames and group into a folder with that string as the name

I have a folder full of files like this: SA-2A05_3.psd SA-2A05_4.psd SA-2A05_5.psd SA-2A05_6.psd SA-2A05.psd SA-2A06_3.psd SA-2A06_4.psd SA-2A06_5.psd SA-2A06_6.psd SA-2A06.psd and I want to create ...
1
vote
2answers
153 views

Applescript - how can I select all *non*-folders in an expanded list view window?

I am trying to write a script which will select all non-folders in a given Finder window which is in List View and has revealed/expanded all sub-folders (see image). As there tend to be many more ...
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 ...
2
votes
2answers
126 views

Make an XML iTunes Library working in a NAS server

I recently bought a QNAP NAS (TS-251) and everything is working fine. I'm now on the iTunes part of my setup and here is my tricky situation. I have a personal library I'm backuping that I would like ...
0
votes
1answer
29 views

Using the option key in Apple Script.

I am working on a script that puts in strings of text into a document, and I was wondering how you would have apple script input the keystroke "Option-Return"
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 ...
1
vote
1answer
117 views

AppleScript “can't get menu item” error

I am looking for some help on correcting this error: error "System Events got an error: Can’t get menu item \"Clear History...\" of menu \"Safari\" of menu bar 1 of process \"Safari\"." number ...