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

Run AppleScript Applet at boot

I am a complete amateur at this. How would I get this AppleScript to work on my Macbook Pro on boot? What steps do I need to take? What does the script do?
0
votes
0answers
19 views

Rogue Applescript

I am experimenting with automation, particularly the auto typing on other applications. I have followed this site's script and changed the delay between each entry to 0.5 – which is enough to type ...
1
vote
2answers
35 views

Where's my Applescript application?

In the Applications folder (El Capitan iMac) there is no Applescript editor. I've also checked the Utilities folder, but didn't find it. I don't think I would have mistakenly trashed it. Should I ...
1
vote
2answers
117 views

AppleScript set focus on terminal window

I have a AppleScript, which changes the position and the size of the application Terminal: Like here: tell application "Terminal" set position of front window to {1, 1} set size of front ...
2
votes
2answers
44 views

How to enable/disable grayscale mode in Accessibility via Terminal/App?

I'm wondering what would be the process of enabling/disabling the grayscale mode in the Accessibility panel in System Preferences? I would like to run a simple script, either by clicking on an app in ...
2
votes
0answers
44 views

Close Dock and top bar

Is there a way to keep the application Dock closed. Every time I do: killall dock It closes for a bit then automatically reopens. I want to be able to make an AppleScript program that keeps it ...
1
vote
0answers
34 views

'Add notes' to a Calendar event using Automator

I would like to build a 'Service' for selected text which: Get the currently selected text Creates an Calendar event adds the selected text as a 'note' for that Calendar event I prefer Automator ...
1
vote
1answer
38 views

How do I get AppleScript to open another script file

So I'm working on a script and I want one of the buttons to open another script file. I have: tell application "AppleScript Editor" to open "Fallen_Order_Intro.sctp" When I do this, it says ...
2
votes
1answer
53 views

Sharing multiple files on iCloud by using System Events in Applescript: How to intercept an option?

I am trying to share a folder with many Numbers files with iCloud, by sharing each file with an AppleScript and saving the path of each shared file so that I can send it to my collaborators. To do ...
4
votes
2answers
188 views

How can I run a shell script that prompts for user input from within Applescript

I have two pieces of code. One is Applescript and the other a Bash shell script. The shell script needs to run concurrently with the applescript, return some values and then exit. The problem is the ...
3
votes
2answers
40 views

Applescript string matching failed

I want it so that if the current date matches the string, it will log "works!". However it doesn't seem to work. set datesubmit to "27, May, 2016" set trydate to {day, month, year} of (current date) ...
0
votes
1answer
23 views

Applescript email

I have been messing around with applescript for the last week or so and i'm wondering if its possible to attach applescript to an email somehow so that it runs when the email is opened. It might not ...
0
votes
2answers
69 views

Applescript with get every file loop fails

I want to run a script on all files with two specific extensions on a disk with a hierarchy of multiple nested folders. My script works fine when I choose a folder further down the line with fewer ...
0
votes
0answers
13 views

Applescript remote keypress syntax

What is the correct syntax for this? I am trying to mess with my brother by taking a photo of him playing his games. However the syntax for the keystroke line doesnt seem to be working on remote ...
0
votes
1answer
84 views

AppleScript URL from open safari window

I have a Safari window displaying a webpage. I want to be able to retrieve the open URL into AppleScript. However when I do this: if URL of window 1 is "www.google.com" then --do something end if ...
0
votes
0answers
17 views

programatically mimic events on a Mac [duplicate]

How can I listen for an event on my Mac, record the event and than execute it programatically. For example, I want to reload extension I made programatically. For that I need to go to Extension ...
0
votes
0answers
42 views

programatically reload Safari extension

How can I programatically reload extension I created in Safari? This image shows the reload button that I manually have to click every time I update my extension: Any way to this is programatically?...
0
votes
1answer
38 views

OS X Automator: Using custom command in AppleScript's “do shell script”

I have recently asked a question about automatically inserting a value produced by a custom executable into a prompt field. Please look over this post to know exactly what I am talking about. The ...
0
votes
1answer
34 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
2
votes
1answer
30 views

Automator task to open screenshots in Preview automatically

I'm pretty new to Automator but it seems like it's possible - I just can't seem to get it to work. I'd like to be able to take a screenshot and then open it up in Preview for easy annotation. If it's ...
0
votes
0answers
27 views

Extension : Multi-highlight on safari

I'm not sure this topic is appropriate for this forum but I'm looking for a Multi-highlight extension or AppleScript for Safari. I using Multi-highlight for Google Chrome at the moment but I would ...
0
votes
0answers
80 views

Apple Script to Apply Rules in Mail.app

I've created some rules in my Mail.app to change background color of specific messages And also I've created rules in the mail server to move specific messages to some folder For messages in the ...
0
votes
1answer
37 views

How do I find the application name to open a file using AppleScript?

I find the AppleScript method of opening a file convenient but often cannot guess at the application name to use when I do not want the default options. As an example, I have installed Foxit PDF ...
2
votes
0answers
19 views

How to fix «event coreslct» error?

I have an AppleScript source with this code: tell "Microsoft Word" «event coreslct» (last row of table X of document Y) insert rows selection position below number of rows Z end tell After ...
0
votes
0answers
45 views

Changing the font of selected text with AppleScript/Automator

I'd like to set up an Automator service to set the font face, size, color, and background color of the currently highlighted text in Microsoft OneNote, e.g. Consolas 11pt, black text, white background ...
0
votes
2answers
36 views

Applescript remote control volume

Wondering how to turn up the volume on my computer from another computer. set volume 4 of machine remMachine doesn't work Any suggestions?
0
votes
0answers
23 views

Preview.app and creating PDFs - Three methods - How do they differ?

Preview.app has three options for turning an image into a PDF: File > Export..., Format = PDF File > Export as PDF... File > Print..., Save as PDF The first method yields a PDF that looks exactly ...
0
votes
0answers
44 views

-p: command not found - Automator help needed

I'm using Automator to run a shell script for taking an interactive screencapture and opening it in Preview for easy annotation. When running the script it fails and states -: -p: command not found. ...
0
votes
0answers
85 views

Can I programmatically control the sound volume on a application level?

SoundBunny does exactly what I need, the ability to mute/unmute and change the volume of the audio, on demand, at an individual application level. Unfortunately I can't control it via AppleScript as ...
1
vote
1answer
39 views

How do I address an object value in a whose clause in AppleScript

I am trying to test a object property of elements in a whose clause. For example, let's use the common elements "document" and "window" that almost every Mac app has: tell application "TextEdit" ...
0
votes
1answer
45 views

Apple Script for copying path and name and pasting it in Spotlight Comment box Mac OS X 10.9.5 (and 10.11.4)

I have a bunch of files to rename from someone else that sit inside folders and subfolders, and would like to copy the path and file name to the Spotlight comment of each file before I do anything ...
1
vote
2answers
66 views

How to pass an AppleScript variable to Perl script?

I have a Perl script that does some text transformation on a given file. Now I would like to call this script from an AppleScript which in turn I could execute from the script menu in order to run ...
0
votes
1answer
73 views

Extract text between two unicode symbols using AppleScript or bash?

My goal is to take text from a standard .txt document, and use (preferably) Terminal or Applescript to extract text between the symbols ▶ and •. While there is only one ▶ symbol there are multiple ...
0
votes
1answer
34 views

In Applescript, search the web

How would I have Applescript display the first one or two options in a google search in a display dialog window? Is there a way to create a functional browser through applescript?
0
votes
0answers
17 views

How can I run a project that I made(within another script), without having to click the icon on the dock?

I made a script that will take user input, and if that input is an application, run the application. This works for all of the preset applications, they all open, and run. For my programs, it only ...
0
votes
0answers
19 views

Applescript applets - can I make an applet immediately if it is already running?

If I make Applet Zed, I can open it again and again with multiple copies running. Can I change this behavior before saving the applet? If not, is there script that can detect the first occurrence and ...
1
vote
0answers
50 views

loop thorough every file in file system with AppleScript [duplicate]

How can I loop through every file in my file system with AppleScrip? And by every file I literally mean every single file, including hidden ones. Can it be done with AppleScript and how? I will ...
0
votes
1answer
76 views

Improve applescript to open New Private Window with Safari

I made this AppleScript to use with the script tool. It can be saved as the application to launch from a click. I have to approve the application though in the Security edit tool. This open the ...
0
votes
0answers
34 views

How to add all *.m4v files from certain folder to playlist in iTunes with automator/applescript?

There is a folder on Mac. There are a lot of files in it, but i want to make an automator/applescript script, which will watch this folder and if it will see any new *.m4v file in it, it will add it ...
0
votes
0answers
87 views

Attach file to Outlook 2016 email using AppleScript

I am attempting to attach a tar.gz archive of system logs to an Outlook 2016 email that gets created from another shell script. The script was modified from this one at JAMF Nation. Because the file ...
0
votes
1answer
15 views

Applescript character count in words with combining diacritics

If I combine an acute accent with, say "x", with a w before it and a y following, like this: "wx̀y", this will look good in BBEdit and Word, and both programs will give a character count of 4. However,...
0
votes
0answers
19 views

How to make an AppleScript app open another one?

The title says it all. What would be the line of code to open a specific app created in AppleScript? tell application "userappname" to open/launch/what? What would be the last piece of the code? ...
0
votes
1answer
27 views

How to remove the last character of a string if I know what the character is in AppleScript?

So basically I was messing around with AppleScript and created a variable based on the app's path and it always has a forward slash at the end that I don't want. See my other question for more info. ...
0
votes
1answer
27 views

AppleScript without showing what program it opened and edited

I wrote an AppleScript that goes into System Preferences and clicks on some of the buttons. I does that by literally opening System Preferences and clicking UI Elements. I'm wondering, is it possible ...
1
vote
2answers
78 views

How can I switch to an open tab in Safari using osascript?

Trying to switch tabs in Safari with osascript. I have tried multiple versions of the following: osascript -e 'tell Application "Safari"' -e 'keystroke "2" using command down' -e 'end tell Tried ...
1
vote
1answer
60 views

Paste text with AppleScript without simulating cmd-v with System Events

I would like to be able to use AppleScript to paste the clipboard's text into the foreground application. Every solution I can find online uses tell app "System Events" to keystroke "v" using command ...
0
votes
1answer
36 views

get radio buttons in System Preferences

I am trying to click at radio buttons in Displays panel of System Prefernces. This is the code I use to identify radio buttons: tell application "System Preferences" activate reveal anchor "...
1
vote
1answer
31 views

How to make an AppleScript app locate itself?

I've been messing around with this cool AppleScript scripting language and I have yet another question. How to make an AppleScript app locate itself?Like something like this (that obviously doesn't ...
0
votes
1answer
77 views

change screen resolution with AppleScript

How can I change change screen resolution using AppleScript? If AppleScript can't do it, what about Terminal? I tried with examples at How to set screen resolution with a keyboard shortcut on Retina ...
0
votes
0answers
42 views

Automator Services to transform text to Upper, Lower, and Sentence Case

What's the appropriate code to create Automator Services to transform the selected text to: Lower case Upper case Sentence case For Upper case this answer doesn't seem to work. I get this error: ...