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
8 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 ...
-1
votes
0answers
12 views

Applescript Keystroke [on hold]

I was making an applescript ''virus'' when this happened Help plz I was trying to make it read out all the files, like the tree command for PC
0
votes
0answers
15 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
20 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 ...
0
votes
1answer
77 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
20 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
18 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 ...
1
vote
2answers
47 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
19 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 ...
-1
votes
0answers
21 views

How to find a file on a remote computer and delete it?

I gave this AppleScript to a person, and he gave it to a lot of people. However, the AppleScript could potentially get them suspended, but they are reluctant to give it up. The file is called "MASTER ...
0
votes
0answers
13 views

Applescript app to open but not run a script file? [on hold]

I have applescript applications in my menu bar. I'm creating a new one which contains a part which has an endless repeat loop. The problem is, if I run it as an application, there's no way for me to ...
0
votes
0answers
19 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
36 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
30 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
16 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
25 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
713 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
17 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 ...
-1
votes
0answers
15 views

Apple Script for automation task in Mail

I am looking for a genius to help me develop a script that: Extracts attachments from my emails on receipt Files them in my local drive in a folder named after the sender Put the date and time stamp ...
0
votes
0answers
17 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
32 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
47 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
28 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
14 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. ...
0
votes
1answer
62 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
18 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
28 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
80 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
28 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
21 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
44 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
15 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
2answers
125 views

Need script to automatically export Skim PDFs with embedded notes

I have a folder with a few thousand PDF files, most of which have Skim annotations (e.g., highlights and notes). If I had fewer files, I'd just go through each one, export the PDF with embedded notes, ...
0
votes
1answer
5k views

How to locate UI Button for AppleScript using Accessibility Inspector

There are several articles here that address this question, but none offer the help to connect-the-dots. The attached screen shot shot shows Accessibility Inspector for the button in question, which ...
0
votes
1answer
44 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
45 views

loop thorough every file in file system with AppleScript

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
28 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
46 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
30 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
45 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
18 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
22 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
27 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
28 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
21 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
26 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
42 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 ...