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
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 ...
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
28 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
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
47 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
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 ...
0
votes
2answers
798 views

How to use AppleScript application with “open file -a AppleScriptApp”?

Some information about what I am trying to achieve I am using emacs inside of terminal. I know about existence of cocoa versions of emacs (like GNU Emacs for OS X, Aquamacs and Emacs Mac Port). But I ...
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
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
86 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
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
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
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
48 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 ...
2
votes
2answers
118 views

Wanted: Apple Script for copying file name and pasting it in Spotlight Comment box Mac OS X 10.8.5

Global Peace Mission Project looking for automating pre sorting movie file routines. Due to the instant impact inflow of third party YouTube contributions triggered by a blog launched March 22 after ...
1
vote
1answer
1k views

Insert images into Pages document using AppleScript

I'm trying to automate the construction of a document, and am looking for a way to insert images into a Pages document with AppleScript. For example: tell application "Pages" make new document ...
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
33 views

AppleScript: Trouble controlling Spotify over eppc (Apple Remote Events)

I would like to know if it is possible to control Spotify remotely using AppleScript. Spotify has a nice AppleScript dictionary, and I can control the software successfully as long as I do it ...
0
votes
1answer
98 views

unlock external locked encrypted disk with applescript command by filling dialog box to cracking password by force brut

I make a terrible mistake. I totally lost my paper with the secret password for my encrypted external GUID hard drive. This external drive contains many pictures but also some works documents very ...
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 ...
0
votes
1answer
77 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 ...
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
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
47 views

getting a color value of a specific point on screen

How can I get a color of a specific point on screen with Apple Script? I would give the point in pixels such as {120,400}. Should I use an external app and "tell" it to find color value of some point ...
0
votes
0answers
89 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 ...
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 ...
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
1answer
62 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 ...
2
votes
2answers
3k views

Open a new Safari window in the current Space from Terminal with multiple tabs (URLs)

How to open an new Safari window from Terminal in the current Space? Now when using the open http://example.com command it opened the URL as last tab on my first Safari window. I'm looking for a way ...
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 "...
0
votes
1answer
83 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 ...
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
3answers
57 views

Easiest way to get path of currently-opened file in Adobe Acrobat?

When viewing a file in Adobe Acrobat Pro XI on OSX Yosemite, I sometimes want to send the file to another application. To create an action in KeyboardMaestro, I need to get the path of the currently-...
0
votes
0answers
43 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: ...
0
votes
1answer
27 views

Why is AppleScript not ejecting my volume?

I have a hard drive in my mac with multiple partitions, and I want to eject some of them with AppleScript. Simple: tell application "Finder" eject disk "Photos" end tell Except it does not ...
0
votes
1answer
103 views

How to quit “Force Quit Applications” using AppleScript?

I've been learning lots of different programming languages when I came across AppleScript. Since I'm technically new to it, this question may seem dumb.I need an AppleScript script to quit the "Force ...
0
votes
0answers
65 views

Get result of Terminal tab do script via commandline

I've seen similar questions like this but none seem to deal with getting the result from a specific Terminal tab? I'm writing a Chrome extension to do some awesome stuff. Right now I'm just trying to ...
1
vote
1answer
32 views

Can someone help me to translate this automator workflow to applescript?

What I want to do is select a bunch of images with varying dimensions and uniformly apply a percentage scale to resize them. The workflow comes very close to that. But I cant get more specific to the ...
1
vote
1answer
122 views

Automator: “Run Shell Script” throws error because of missing “on” command

OSX 10.11.4 here. I'm trying to create a workflow for use with a hotkey, to run a simple shell script. Created via: Automator -> New Service -> Utilities -> Run Shell Script, then set to 'no input' ...
4
votes
3answers
5k views

Using applescript to lock screen

I need an applescript which locks my Mac in the same way pressing "shift"+"ctrl"+"eject" would. I tried two different approaches, but both failed. The first one was to search the internet for a script,...
0
votes
1answer
89 views

make “fit to screen” default window size in Quicktime

How can I make Quicktime to always open in Fit to Screen option (available at View->Fit to Screen)? It doesn't seem to remember the last window size. Is it possible to attach a script to a program, ...
0
votes
0answers
27 views

I need help with an AppleScript!

So after I transitioned to Mac, I found myself in a need for a script. Something similar to what I used with AHK on Windows. I would need a script that would spam Space multiple times, but only when ...
0
votes
0answers
12 views

Notify me when someone joins messages

When one of my contacts is using the Messages app (OSX 10.9), a blue dot appears next to their icon to show that they are available. Is there a way (probably using applescript or automator) to make a ...
1
vote
1answer
37 views

get name of file from file path using AppleScript

I am trying to get the name of file using AppleScript with the following code: tell application "Finder" set filename to name of "/Users/mainuser/Desktop/Test/shot.png" // should return shot.png ...
0
votes
0answers
40 views

How to create a service which starts an app without opening a selected file?

I'm trying to create a service, that opens an app (Terminal app). I created it with Automator. I selected "folder and files" and "finder" in the right-side menu. Since there doesn't seem to be a ...