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
2answers
1k views

How to get Automator to treat text as RTF?

I am writing a book and trying to add a service to provide syntax highlighting to text selected in Pages with Automator. I have a service accepts selected text and runs it through a shell command ...
0
votes
1answer
109 views

In applescript how do i get two different things to repeat at the same time

I am trying to get two different actions to repeat at different intervals but right now only the first action will repeat. repeat keystroke "i" delay 44 end repeat repeat ...
0
votes
2answers
359 views

Writing an e-Mail app in applescript

I'm using a webmail account(NOT Gmail: hate its interface), and I DON'T want to use the mac's Mail app(must maintain double contacts lists for one thing). I use Google Chrome and have set the ...
0
votes
4answers
858 views

How do I generate a random even number with Applescript?

I'm trying to create an Applescript that will change the MAC address of my router automatically. Some fields need to be even numbers but I can't figure out how to generate even numbers only. Heres ...
0
votes
2answers
112 views

Process list with name and VPRVT

Is there any way to get just name and VPRVT of running processes?
0
votes
1answer
1k views

Apple Script + VPN + Textbox

I have an applescript : tell application "System Events" tell current location of network preferences set VPNService to service "VPN (Cisco IPSec)" if exists VPNService then ...
0
votes
2answers
556 views

Applescript to update year tag for audio files

I have a lot of tracks in iTunes where the files are named "music-NNNN.mp3" with NNNN being the year the track was recorded. How can I use Applescript to automatically set the year tag for these files ...
0
votes
2answers
1k views

Automator & AppleScript: How do I import the texts of Notes and Reminders as PDFs and RTFs?

I would like to export and save the Notes and Reminders documents or texts as PDFs and RTFs, keeping or preserving the formatting and the background of Notes or Reminders, but the Notes doesn't have ...
0
votes
2answers
3k views

Applescript to add sender of message to specific group in Contacts

I'm trying to set up an Applescript to add the sender of a selected message in Apple Mail to a specific group in the Contacts app. By reconfiguring the code provided in this answer, I worked up the ...
0
votes
1answer
6k views

Automatically Save Attachments in Mail.app in 10.8 Mountain Lion

I am trying to automatically save all email sent to one address (let's call it test@example.com) to this folder /Users/luomat/Dropbox/Incoming/e2w/ (where /Users/luomat = $HOME). Here is the rule ...
0
votes
2answers
338 views

How do I copy the location of a track to the “Comments” section in iTunes?

I dont understand why this is not working. If anybody knows how to resolve this issue: tell application "iTunes" copy location of track 1 of playlist "Test" to Comments end tell Applescript ...
0
votes
2answers
657 views

Display a notification with AppleScript

I would like to trigger a notification with AppleScript. I have seen How can I trigger a Notification Center notification from an AppleScript or shell script? but I would like to have a native ...
0
votes
1answer
1k views

Trying to use applescript to launch cmd line 3 scripts in new tabs

I'm trying to launch 3 tabs and run a script in each with applescript. So far I havent been able to get this done. Currently I have: tell application "Terminal" activate do script "ping ...
0
votes
1answer
185 views

Applescript to monitor terminal changes

I want to be able to check if a word appears in a terminal window running a java application and then display a notification. Any ideas?
0
votes
2answers
2k views

Setting a automator action to run everyday

I have an automator action that downloads file from our server. Easy enough to setup but can't quite sort out how to set it so it will operate automatically at a certain time everyday. Tried hooking ...
0
votes
2answers
1k views

How do I display a hyperlink with an AppleScript?

I am trying to get a URL via AppleScript, then displaying it as a clickable link via a window. How do I do this? (if I need to use Xcode for this, please add the answer, but provide detailed ...
0
votes
1answer
459 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
12 views

type of emails from Contacts.app in AppleScript (on El Capitan)

I want to work with a list of all email addresses that appear in my address book. I thought I could simply set such a list with AppleScript, and use the elements, maybe after casting the references to ...
0
votes
2answers
26 views

Use Applescript/Automator to select a window highlighted in the Finder

I have an applescript which extracts the name, associated process and and other information about a target window. As of now, the script selects the target window via a "choose from list" dialog that ...
0
votes
2answers
54 views

Applescript “expected then but found identifier”

At present, I have a very simple bash script which calls osascript -e a bunch of times; it looks like this (newlines added for readability): #!/bin/sh osascript \ -e 'tell application "Terminal" to ...
0
votes
1answer
78 views

Need assistance with AppleScriptObjC conversion from AppleScript

I need to preface this with the statement that I am not a programmer, so I need to be talked down to. I have done what I described below using guides and lots of trial and error I have a functioning ...
0
votes
1answer
39 views

How to make automator run an applescript that turns of mac?

I want to make an applescript that taps the apple in the corner, taps shut down, and then taps shut down. I can't record it, since it actually involves shutting down the computer, making the script ...
0
votes
1answer
42 views

Applescript variable not being passed

I have a basic applescript to request a user's input, then pass the variable into a path for mounting a volume: display dialog "What is the first letter of your last name?" default answer "" set ...
0
votes
1answer
32 views

Need help with applescript and wolfram alpha interface

Okay so here's my code... My question is, can I determine what type of data it is before grabbing the text, because if I search something like "how many tablespoons in an ounce, it just gives me a ...
0
votes
1answer
46 views

Applescript or Automator service that automatically trusts certificates

I would like to know, if there is a way to make an Automator service or an Applescript that automatically trusts a root certificate. If possible without a prompt for password or Admin privileges. ...
0
votes
1answer
53 views

Applescript for multiple find/replace using separate masterlist

I am trying to create a script to extract a list of data from column A on document 1, and then use columns A & B on document 2 as multiple find/replace data. Everything works in so far as ...
0
votes
1answer
130 views

Filling the inputs of SecurityAgent if they exist?

I am trying to automate the export of my keychains (system and user), and while my script works if I remove the set values, it does not after adding them. The error I am receiving is System Events ...
0
votes
1answer
127 views

How can I use Applescript or any other utility to send a daily text message to my bank?

I have searched and I find a lot of results for specific methods of sending an iMessage with Applescript, but they all seem to contain extraneous code for specific needs that I don't need. I'm ...
0
votes
2answers
74 views

How to check if invisible items are visible?

How do I check in AppleScript, if invisible objects are visible? If visible, do: defaults write com.apple.finder AppleShowAllFiles 0 in invisible, do: defaults write com.apple.finder AppleShowAllFiles ...
0
votes
1answer
34 views

“activate application” for Hidden Application

How might I activate an application that is hidden from the OS X Dock? The following only works for applications that are displayed in the Dock. activate application "Firefox"
0
votes
1answer
78 views

Applescript and Shell: how do I insert a variable?

I'm using the following code to set a Philips Hue bulb with specific hue, saturation and brightness using Applescript. It works perfectly. set TurnOnBulbA to the quoted form of "{\"on\": ...
0
votes
2answers
287 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 ...
0
votes
1answer
34 views

Global keyboard shortcut to switch to an application (to use with Emacs/Aquamacs)

Like in iTerm, I'd like to be able to set a keyboard shortcut to switch to an application, which in this case would be Aquamacs. This would be really useful to know in general. Would an Applescript or ...
0
votes
1answer
315 views

How to set a custom icon inside a signed Apple Script application?

I'm using Apple Script to distribute a signed applet, and would like to use a custom icon. However, as soon as I export it from Script Editor, the bundle loses the custom applet.icns file I put in it. ...
0
votes
1answer
171 views

How can Apple Script open a shell script with options in a Terminal window?

I’m trying to use Apple Script to execute a shell script file in a new Terminal window, while sending it options. How do I do that? It seems as if Terminal only interprets the path to the script, and ...
0
votes
1answer
176 views

Can launching an app trigger the launch of another app?

When I launch a specific application in Mavericks I'd also like to automatically launch and execute another one. Is it possible/how?
0
votes
1answer
149 views

how to re-enable services in an app (Microsoft Remote Desktop in particular)

I am fairly confident I could use the service below in MRD before. I am not sure when I lost them, maybe it is related to the Yosemite upgrade (I noticed this on 10.10.0) or some recent MRD update ...
0
votes
1answer
281 views

iTunes 12: How to cycle through View Options with script/shortcut?

I'm trying to writing an applescript that cycles through Songs, Albums, Artists, Composers, Genres, and back to Songs. There is nothing in applescript Dictionary with regards to this, so I have to ...
0
votes
1answer
116 views

How to periodically run a script/command when a specific application is being used?

I would like a certain applescript to run every 10 seconds but only when a specific application is being used (i.e. both being the front application AND the mouse or keyboard being used in the last ...
0
votes
1answer
29 views

AppleScript to Delete Folder

I was wondering if anyone can give me some advice on how I can use apple script to delete this folder? Users/user1/Library/Application Support/Skype/tankitan
0
votes
1answer
214 views

Focus most recent window of pid without requiring accessibility approval

I currently use this AppleScript to try to set focus to the most recent window of a PID, in example here my pid is 450. tell application "System Events" set frontmost of the first process whose ...
0
votes
1answer
532 views

Get the process id of the app, which called the service

I have an service in automator, which is binded to the Safari ,no input option. Now is there any way for the service in automator to get the process id of the Safari, which called it ? New to ...
0
votes
1answer
340 views

Automator: How to send an email to multiple recipients with Font colour and attachment image?

I have done a program of 'Send-Email-To-Multiple-Recipients' in Automator as see an attachment image below. But, it does not work to retain font colour of texts in a message body within this ...
0
votes
1answer
261 views

Problem With the Click Command - AppleScript

I'm trying to do some GUI scripting with AppleScript but every time I try to use the click command, it will work but cause an error. If I use a try statement it works fine, but I shouldn't have to do ...
0
votes
1answer
531 views

Applescript to change desktop image on all monitors?

I have the following code to change the desktop image of my Macbook tell application "System Events" tell current desktop set picture to "/Library/Desktop Pictures/Beach.jpg" end tell end tell How ...
0
votes
1answer
825 views

Grab the “Active” Window in Applescript

I have a script which perform the following: Load a file into a program (Subler — done separately, not in this script) Confirm the loading of the file (this is where the script begins) Saves the ...
0
votes
1answer
566 views

Where does Applescript Event Log go when run under Launchd?

Or, how to log from an AppleScript (saved as application) and/or view the Event Log? None of the AppleScript's log statements can be found. I have tried adding the following to the launchd plist: ...
0
votes
1answer
51 views

Banning domains temporarily from local access

I need to control myself. So far, I was using a Windows device for work, where I would simply reroute Facebook, news sites and similar to 127.0.0.1. In near future, I will have to use the same device ...
0
votes
1answer
599 views

How do I get system_profiler output from a lot of machines in a network?

I need to have a script that will execute "system_profiler -detailLevel full" command in a remote mac machine. While this is going on, the user on the remote machine should not know that there is ...
0
votes
1answer
151 views

Search for a folder using applescript

I am trying to make a folder to go on a server, that people can add photos to and then the script sends them to the correct place, however I'm having trouble with the search part. As you can see ...