AppleScript is a proprietary programming language in Mac OS X to control and exchange data with applications.

learn more… | top users | synonyms (2)

0
votes
1answer
18 views

How to “archive” iTunes files with all metadata?

I recently decided to do a big cleanup of my iTunes library. I am low on disk space and have quite a bit of music that I haven't listened to since I was a much younger man, but I can't bring myself to ...
1
vote
0answers
17 views

Click in finder vs “open -a” on command line

I have a file type (.mxl -- compressed MusicXML) which if I double click in Finder opens properly in my .mxl reader (Finale 2014.app) but which if I call "open file.mxl" or "open -a ...
1
vote
0answers
28 views

Rename iMessage group with AppleScript

While the new iOS 8 group naming can be great, if the people in the group aren't very mature it can be...very not great. How would I go about renaming a group in Messages.app with AppleScript? I ...
0
votes
0answers
7 views

How to react to click on a notification?

So I've got my applescript script throwing up notifications. And that's awesome. Now can I control what happens when the user clicks on it? Ideally I want it to just open a file, but can't surmise ...
0
votes
0answers
2 views

Run kinit as AppleScript promting for network username and password

I need to develop a small app (currently using AppleScript to do it) that I can send to users to run a "kinit" shell script command. This is on machines that are not bound to the domain, but needs to ...
0
votes
1answer
11 views

How to run a script on login whilst being hidden

I have an applescript (scpt) script that I would like to run on login of a user. I would like the script not be visible in the dock, menu bar, etc. (This would probably mean running it in the ...
0
votes
1answer
19 views

How to trigger Notification Centre notification from JavaScript? [on hold]

The other question asks the same but using AppleScript. Apple introduced JavaScript as a new language for Automation in OS X 10.10.
0
votes
0answers
18 views

Applescript automate to click button on Safari webpage

Trying to do some automation in safari here using applescript, keep getting error, please help! Here's the DOM Tree codes <div id="sc1789" class="tvb4 sc-view" style="left: 0px; right: 0px; top: ...
0
votes
0answers
15 views

Running an apple script repeatedly and stopping if the application unexpectedly quits

I've been searching for hours for a solution to this but have been unable to find anything. Currently I have the following applescript: repeat set core_is_running to is_running("MyApp") if ...
0
votes
0answers
18 views

apple script to copy Items to usb

i REALLY need a apple script that would copy items(files,folders everything so whatever is in this folder must be copied) of a folder in my documents to a usb folder but only when the usb is mounted ...
0
votes
0answers
22 views

transfer label from afp to smb

Is a possibility known to transfer label from afp to smb (Server files/directorys)? When changing from afp to smb all tags are disabled. Does anyone have a script? I've found on the subject: ...
0
votes
0answers
13 views

What is required to make a bookmark that creates calendar events from values on a web page?

So I have a page that has days and times on it, and I want to know how to make a script or bookmarked script that will find these values and put them into my calendar. Any idea?
-4
votes
0answers
34 views

Applescript Level 3 [closed]

set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?") if button returned of buttonChoice = "No" then return "No" end if repeat set levelnum to text returned of ...
-2
votes
1answer
21 views

error “Can’t get button returned of \”C\“.” number -1728 from button returned of “C”

set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?") if button returned of buttonChoice = "No" then return "No" end if repeat set levelnum to text returned of ...
1
vote
0answers
26 views

Automatically saving message attachments to a mailbox

I subscribe to a rather odd mailing list, through which I receive emails to which further emails are attached (in eml format). I want to archive those attachments into a dedicated mailbox, all within ...
0
votes
1answer
21 views

iTunes: get selected mobile apps with AppleScript

I fear I already know the answer to this one, but is there any way to access the locally-stored Mobile Applications in an iTunes library using AppleScript? The selection property appears to not ...
2
votes
0answers
16 views

Applescript Editor's compiler erratic behaviour

I've just come across some bizarre behaviour in the Applescript Editor (Snow Leopard - 10.6.8) that I was wondering if anyone knows how to get around it. Basically, one second a statement will ...
0
votes
3answers
72 views

How do I determine which application launched automator service?

Is there a way to determine which application launched a Automator Service? The idea is to check the app that launched the service, with a shell/apple script and react differently depending which ...
0
votes
1answer
30 views

How to change filepath structure using automator (windows to mac)?

I use a mac at work and people send me windows file paths all day. Does anyone know how to convert the filepath using applescript in an automator so I can right click in an email and then open it? ...
-2
votes
0answers
12 views

How do you launch Firefox in Fullscreen via Applescript? [duplicate]

looking for an applescript to launch firefox in fullscreen.
0
votes
1answer
52 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
3answers
83 views

How can I set the default browser depending on time of day?

I have a MacBook Pro from work. To keep my browsing history separate, I use 2 different browsers. (Chrome = Work, Safari = Fun) I want to make my default browswer Chrome while at work (9 am to 6pm), ...
1
vote
0answers
26 views

Sync applescript calls.

I'm very new to applescripting and I have the following code: tell application "Safari" tell document 1 do JavaScript "document.getElementById(\"binaryFilePath\").click()" end tell ...
0
votes
1answer
38 views

Applescript date manipulation to get multiple formats

I need to get a date (month, day, year) in multiple different formats for each part. So, for January 2, 1999 I need: the month as January and Jan and 01 and 1 the day as 2 and 02 the year as 1999 ...
2
votes
1answer
47 views

Can only run AppleScript from Automator

I have the following AppleScript which toggles the scroll direction on the trackpad: tell application "System Preferences" activate set current pane to pane "com.apple.preference.trackpad" ...
2
votes
1answer
33 views

Applescript question for copying files

I wrote a script to copy files from an SD Card to a Thunderbolt Hard Drive. I wanted the action to automatically do all of this in a single shelled applescript under an automator action. When I ...
1
vote
0answers
18 views

How can I start a Hangouts phone call with Applescript/Terminal?

I want to initiate a Google Hangouts phone call with Applescript. Hangouts has an AS dictionary, but with only the default suites. I want to emulate opening the Hangouts popup, typing in a phone ...
1
vote
0answers
36 views

Set iMessage sender in applescript for a new message

Applescript allows you to send messages via iMessage and the command line, ie) http://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service Is ...
3
votes
1answer
31 views

Variable not defined not sure why

For some reason "the name of thePath" comes up as not defined by my automator workflow. on run {input, parameters} tell application "Finder" set thePath to the (first item of the input) ...
0
votes
1answer
27 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
51 views

Applescript Invoke Specific User and Password

I have a do shell script that I need to run in Applescript, but it needs to run as a different user. It is to be deployed into the student's network drive as a standalone application that the students ...
0
votes
0answers
22 views

Why is my test for folder under /tmp existence fails?

I'm trying to create a "flag file" under /tmp using AppleScript but the check for whether it exists keeps failing. Following the answer Why is my applescript for checking if a file exists failing?, ...
0
votes
1answer
26 views

Display message box only if “filter finder items” finds an item (Automator)

Currently, I have a workflow going like this: When files and folders added to downloads Filter finder items where kind = music Open finder items with ID3 tag editor Ask for confirmation "Click OK ...
0
votes
2answers
35 views

AppleScript prints out keypresses, doesn't execute them

I expect this script to switch applications (command tab): $ cat hello.applescript tell application "System Events" key code 48 using command down end tell But it just prints out a tab: $ ...
1
vote
1answer
64 views

Is there a way to use automator/write an apple script to change the font in several powerpoint documents?

A recurring issue at work: A powerpoint file needs to be moved in to illustrator and saved as an .eps file. The files are almost always submitted with the font set to Calibri which Illustrator ...
1
vote
0answers
21 views

Creating an Automator/Applescript to compare two versions of an MS Word document

I'm storing MS Word documents in GIT and would like to have an rudimentary document compare system on the rare occasion that I need to diff them. I've seen: ...
0
votes
1answer
24 views

Applescript automate double keystroke

I need to emulate a keystroke using applescript for double time shift press. Adding Part of snippet.. tell application "System Events" keystroke shift keystroke shift end tell Even tried ...
1
vote
1answer
30 views

AppleScript keystroke ignoring numbers

A very simple AppleScript like this: tell application "System Events" keystroke "abc 123" end tell results in just “abc” being typed. Online resources suggest this should not be the case. ...
0
votes
1answer
42 views

Run an applescript on mouse down

How can I trigger an applescript on mousedown? I want this applescript to run when a user doubleclicks on empty space in the desktop (i.e. not clicking on the icons present on desktop). This is my ...
2
votes
2answers
51 views

Run an AppleScript that requires keystrokes while the screen is locked?

I've got a very simple AppleScript whose job it is to type some words into a text box. tell application "TextEdit" activate end tell delay 0.2 tell application "System Events" keystroke "Hello ...
1
vote
1answer
53 views

Difference between variable and pipe to shell in applescript

In answering this question I wrote this script: global presenterNotes tell application "Keynote" activate open (choose file) tell front document set presenterNotes to presenter ...
0
votes
2answers
25 views

Create an automator/applescript service that opens a file in an external program

Just wondering about some automator/applescript help. Basically: I download a MP3 file from an artist (for example) It is saved to my Downloads folder. From there, I want to open it automatically ...
1
vote
1answer
29 views

Get the Sound Output Device Name with AppleScript

How can I get the current sound output device name with AppleScript? For example, in my System Preferences: Sound pane "Internal Speakers" is currently selected. All I need to do is retrieve that ...
1
vote
1answer
46 views

Apps Stuck in Security & Privacy > Accessibility

I was messing around with using AppleScript for GUI manipulation so the apps I was making had to be granted access. The very first one I did showed up in Security & Privacy > Accessibility as ...
0
votes
1answer
26 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 ...
1
vote
0answers
37 views

Can I use AppleScript to upload a file to a webpage open in Safari using drag and drop?

I would like to create an AppleScript to open a specified URL in Safari, login automatically if that would be possible and then upload a file to a form that accepts drag and drop file upload. Would ...
0
votes
1answer
35 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 ...
1
vote
2answers
74 views

Open an new Safari window on the current space from the Termial shell with multiple tabs (URLs)

How to open an new Safari window from the Termial shell on the current space? Now when using the open http://example.com it got opened the URL as last TAB on my 1st safari window. I'm looking for ...
0
votes
1answer
20 views

Automator Service that works with and without selection

I have an AppleScript that I want to run with a keyboard shortcut. The script uses the current selection of text if it is available, but will also work without it. I have created an Automator Service ...
4
votes
1answer
53 views

How can I restart from an Apple script without warnings?

I wrote this Apple Script to bless my Windows partition and boot to Windows only once: do shell script "/usr/sbin/bless --device /dev/disk0s3 --setBoot --legacy --nextonly " with administrator ...