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

Apple Script to Export from application

I'm new to AppleScript and wanted to export my citations using AppleScript. I found the following but am not sure the structure to change the following to my path folders, can you please provide an ...
1
vote
1answer
29 views

Applescript change folder and terminal commands

I have tried the following but cannot seem to get this to work: do script "cd ~/desktop/test; for x in ls -1 | sed -e 's/^\(.\).*/\1/' | sort -u; do mv -i ${x}?* $x done" I'm wanting to perform ...
0
votes
1answer
83 views

Terminal Command into Applescript

I have the following terminal command that I want to automate using applescript. I also would like to have a command to cd directories to the folder where I want to apply the command first. After cd ...
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
11 views

Controlling Scroll Bars

On our company page in LinkedIn, under the analytics tab, there is scrollbar. I want a script which will scroll down to the bottom, hit "see more", and recursively continue until the data is ...
1
vote
1answer
230 views

Extract links from email based on the anchor text, not the href

I am putting together an Automator workflow that will allow me to bind a hotkey to a Smart Mailbox listing and effectively automate the task of clicking "Unsubscribe" in emails which have that text ...
0
votes
1answer
30 views

Temporary Folder Difference for Apple Script

This seems to work as a temporary folder in Apple Script path to temporary items but path to temporary items from user domain is also recommended to use. Which one is correct and safe to use? ...
1
vote
1answer
59 views

Temporary Folder Path for Apple Script

set targetFile to (path to temporary items as string) & fileName I am trying to download a web image to temporary folder by curl in a Apple Script. According to the above code, the curl ...
0
votes
1answer
30 views

Notes script to access notes in specific folder?

I have tested this Notes export script (https://github.com/alexwlchan/notes-export/blob/master/notes-export.scpt). It seems to work, but the issue is that I want to specify a specific Notes folder to ...
0
votes
1answer
42 views

How can you access Apple Mail from Apple script?

I want to archive old emails ( say, older then 7 days ) from my inbox automatically with an applescript scheduled via cron. To be honest, I am open to other Apple-friendly languages such as Swift or ...
1
vote
2answers
48 views

Disable Screen Sleep AppleScript

Is there a way to turn screen sleeping on and off temporarily through AppleScript? I'm making a script at the moment that will run for a few minutes when I'm away, so I don't want it to sleep, but ...
2
votes
1answer
357 views

Batch compress multiple folders into individual zip files

I have dozens of folders that I need to compress into individual zip files. If I select all of these folders in the Finder and do "Compress [X] Items," I get one zip file containing all of the ...
3
votes
2answers
314 views

VPN Auto connect Notification

I have implemented a VPN auto connect option via Applescript [see code]. It works like a charme there's only one problem. Every time when i open my MacBook I get this [see printscreen] notification. A ...
0
votes
2answers
499 views

Auto vpn connection dependent on Wifiname

I recently asked a question Auto connect vpn upon login/boot which got answered well using apple script . I want to extend this question to the following problem: The vpn connection should be ...
0
votes
1answer
24 views

App made in Applescript Icon wont change

The app's Icon wont change for me I tried copying in contents as "applet.icns" I tried Copy + Paste in get info nothing will work I found a article on the internet about this problem they say that you ...
0
votes
2answers
21 views

Change installed AppleScript version

Is there any way to change the installed version of AppleScript? After mistakenly identifying my version of AppleScript as 1.0 by using a 15 year old script (turns out that just checks the version of ...
0
votes
1answer
25 views

Applescript : Only run the script if specific input is entered

Is it possible to run an applescript ONLY if a specific input is inserted If I put in my attempts at the code i might be clearer at what Im getting at set x to display dialog "What is your password?" ...
0
votes
0answers
53 views

Is it possible to simulate a continuos press in AppleScript?

The closest solution to a continuous key press that I know is just repeating a key press a certain number of times: repeat 1000 times tell application "System Events" to keystroke "c" using ...
1
vote
1answer
35 views

If “STOP” Is typed do this

Would it be possible For example would it be possible for me to code a very simple repeat code but say If I just typed STOP that it would end the program here is my beginning code for the repeat. set ...
0
votes
0answers
47 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 ...
0
votes
1answer
30 views

Script opens two terminal windows

I coded this little AppleScript using Automator: tell application "Terminal" do script "myscript" end tell This perfectly works but has a side effect: when I close the window, there's always the ...
1
vote
1answer
55 views

How can I run a shell script with admin privileges from Applescript?

I am writing an Applescript that aims to automate the install (add to root keychain) and 'Always Trust' setting by simply launching the Applescript. I'm stuck with how to get the admin user ...
1
vote
1answer
112 views

Get AppleScript Path of Parent Folder

I am writing an AppleScript that will be run from a USB drive, but the dive name may change often so I need to figure out how to get the directory path of the parent folder that contains the script. ...
0
votes
1answer
35 views

Swaping spaces between monitors

Given that I have 'mission control/displays have separate spaces' unchecked: is there a way to swap spaces between displays (and assign a shortcut to it)? For example: if I have 'Desktop 4' on the ...
0
votes
1answer
112 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 ...
0
votes
0answers
20 views

AppleScript Automator back-compatibility

I made a little, easy AppleScript and used Automator to launch it on click: tell application "Terminal" do script "myScript" end tell What about back-compatibility? Can I run it on every previous ...
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 ...
1
vote
2answers
74 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
1answer
70 views

Help converting Apple Script to Shell Script

This Apple Script works great to mount the logged in Active Directory users network homedrive as a mounted network drive but we currently have it running as an App at login via "Login Items". ...
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
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 ...
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 ...
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
70 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 ...
2
votes
2answers
1k views

Deleting all songs in a given iTunes playlist using Applescript

I'm working on a script to manage my "queue" playlist in iTunes and wanted an easy and fast way to quickly delete all songs in that playlist. Applescript seemed the best option and I created a little ...
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
62 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
963 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
91 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
125 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
141 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
70 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. ...