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

learn more… | top users | synonyms (2)

1
vote
0answers
13 views

Applescript, OS X : How to Get a list of phone numbers from Contacts, and send an iMessage with Messages App? Halfway there I think..?

I am trying to create an applescript that will grab all of the labeled phone numbers of 'mobile' and 'iPhone' from the every contact in Contacts App (specifically the phone numbers from the iCloud ...
0
votes
1answer
11 views

Apple Script help - how do I tell OS X to not launch a specific app during a specific time period?

How do I make an Apple Script (or something similar) that will tell OS X "do not launch/run (n) app from (x1) time to (x2) time?" Thank you.
6
votes
1answer
7k views

Where did “URL Access Scripting.app” go in Lion?

I have AppleScripts that run on a schedule to download files from URLs. They had been using URL Access Scripting.app's download event, which now looks to have disappeared from Lion. I can't find any ...
1
vote
1answer
18 views

Script Editor.app: newlines are formatted as CR rather than LF

I often use the builtin Script Editor.app to write, compile, and debug AppleScripts before I copy/paste the polished code into a shell script (with #!/usr/bin/osascript). That said, one really ...
4
votes
6answers
2k views

How to make an existing AppleScript file to work as a service?

I made an AppleScript, saved it as a file in a specific folder on my hard drive. Now I want to assign a shortcut to it and looks like I have to make a Service via Automator, but the Run AppleScript ...
0
votes
2answers
36 views

Applescript: path to files in application's Resources

I'm new to applescript and coding. I'm trying to make a little Applescript application that plays an audiofile contained in the .app, using: do shell script "afplay " & quoted form of ...
0
votes
2answers
187 views

How to add keyboard shortcut to toggle F1, F2, etc. as standard function keys?

I saw an AppleScript on Github to automate toggling F1, F2, etc. as standard function keys, but I don't know how to install it to my system and trigger it via a keyboard shortcut. Help? I am running ...
0
votes
2answers
66 views

How to create a record at the runtime in applescript?

I would like to create a variable of type record at the runtime, I found this could work: set bcd to run script ("{" & "abc" & ":" & "def" & "}") But it doesn't: error "The ...
1
vote
0answers
20 views

Access OS X Yosemite “Share Menu” extension through Apple Script

I'd like to make an Alfred workflow that would send a file as an attachment through Airmail. I noticed that Airmail has a "Share Menu" extension to do just that. Is there a way to access this ...
0
votes
1answer
31 views

Error in applescript “Invalid index”

I have an automator workflow which works fine except for a part of it - applescript. This is how the workflow goes - Run applescript (this part works fine) - on run {input, parameters} tell ...
0
votes
0answers
12 views

Click a checkbox by knowing its position

I'm in the need of clicking a checkbox without knowing its name (it changes randomly, but its position remains the same). Is it possible to click it just by knowing its position? I've tried this ...
0
votes
0answers
20 views

How to move automator “Folder actions” workflow to desired folder?

Similar topics was discussed here. But the solution provided there was to right click on file name and select location (Automator 2.3), however that option was not present in Automator 2.3. ...
0
votes
3answers
949 views

creating script for ical events from properties of address book entries

I want to create a script that creates alarmed events in ical for birthdays of people that I have in my address book. Unfortunately, I am very bad working with applescript. Below is the outline of ...
0
votes
1answer
34 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
43 views

Can I script my mac to reboot and login at a specified time?

Can I use shell scripts, AppleScript, or some other form of scripting to get my mac to reboot and login at a specified time? If so, how?
1
vote
2answers
87 views

How to open a shell script in a new Terminal window and run it with administrator privileges

I need to programmatically open a shell script in a Terminal window and run it with administrator privileges. I'm using osascript as it displays a convenient prompt for an admin login/password. I'm ...
0
votes
0answers
27 views

Automator Apple script: expected end of line but found “”"

I'm trying to run a simple Apple script that opens iTerm2, cd to a terminal and launches a command. The script goes like this: on run {input, parameters} tell application "iTerm" activate ...
-1
votes
0answers
13 views

Mail Authentication Error

I've been trying to use applescript to connect my Hotmail account to Mail.app. So far, I've gotten as far as setting up the account successfully. However, when I try to automate sending a message, the ...
-1
votes
1answer
44 views

Creating an account and sending mail using applescript

I'm trying to use applescript to do two things: Create an account in Mail.app Using that account, send an email in Mail.app I'm having an issue with creating an account on Mail.app mainly because ...
0
votes
1answer
41 views

How to check is Chrome is running in incognito mode using Applescript?

Is it possible to find out if the Chrome is running in incognito mode? if application "Google Chrome" is running then tell application "Finder" to display dialog "Chrome is running" // ...
0
votes
1answer
48 views

How do I make an AppleScript use a Folder in the Contents of a Bundle for an alias on the Desktop?

I'm trying to write an AppleScript to make a temporary alias on the desktop from a folder that resides in the Bundle's Contents:Resources folder and then execute a terminal command that has an ...
0
votes
0answers
16 views

How do I accomplish the same task of a Bash script with an Apple script?

The following BASH script was written for a self-contained bundle, I would like to write an Apple script to accomplish the same thing, also in a self-contained bundle. How can I convert this BASH ...
1
vote
2answers
82 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 ...
0
votes
0answers
12 views

Automatically update Outlook details when password is changed

We've set up our Macs to use Mobile Accounts, so that the passwords get changed and these changes are reflected on our AD server. The problem we're having is that our clients use MS Outlook 2011, ...
2
votes
1answer
2k views

Waiting until a window exists in Applescript?

I'm trying to work with the script below and the repeat until exists window "Print"loop never returns true (I never hear the beep 3). Is this the correct way to wait for a window to appear? I am ...
1
vote
2answers
32 views

Applescript Searcher problem

The AppleScript code: on dialogBox(theMessage) display dialog theMessage default answer "" buttons {"Cancel", "Search"} default button 2 with title "Pick a search engine" end dialogBox ...
1
vote
0answers
71 views

AppleScript to read all notifications in the Notification Center OSX 10.10 Yosemite

It seems like the following AppleScript is no longer working in the latest version of the OS X 10.10 (Yosemite): on run tell application "System Events" tell process "Notification Center" ...
0
votes
3answers
408 views

Toggle Bluetooth AppleScript not Working in Yosemite

Prior to upgrading to Yosemite, I used Keyboard Maestro to invoke this Applescript with a shortcut: tell application "System Preferences" reveal pane "com.apple.preferences.Bluetooth" end tell ...
5
votes
2answers
2k views

“Fetching…” Behavior in Finder “Open With” Menu in Yosemite

I don't know if other people have notice this in Yosemite: With a file in Finder in focus, when you move the cursor to "Open With" entry, whether from context menu or menu bar -> File, a ...
0
votes
0answers
34 views

Finder Menu Services No Longer Working

In Pre-Yosemite, I had some finder menu services (i.e. Right-Click, see 'Services' in menu, hover over, and you'd see Services created in Automator) that I made. As a developer, these were very handy ...
0
votes
0answers
76 views

Embed or link or set reminders or alerts in OneNote pages

Currently running OS X Yosemite. I've come to rely upon OneNote for Mac (despite all my misgivings about Microsoft anything). I've started to use it as a Bullet Journal and it works great for this. ...
6
votes
5answers
136 views

Scriptable menu bar icons

Is there an easy way I can add custom icons to the menu bar status area? Ideally something like Growl (e.g., where you can just execute a command) but instead of notifications, just renders icons in ...
0
votes
1answer
907 views

copy calendar entries from one calendar to another via apple script throws error

i am trying to copy ical entries from one calendar to another using the following script: tell application "iCal" set localEvents to events of calendar "Privat" set remoteEvents to events of ...
0
votes
0answers
26 views

How do I collect all of my notes and highlights from iBooks?

I've got a lot of highlighting and notes in iBooks that I've read, and would like to be able to collect them in one easy to use and manipulate format (e.g for writing papers and citing quotes). For ...
3
votes
1answer
972 views

enabling/disabling internet sharing with terminal in mac osx 10.9.2

Very much on the line of already existing questions, but not having enough reputation to comment by following existing threads, I can only ask my own, at the risk of duplicating may be, certainly ...
1
vote
1answer
61 views

VPN Auto connect Notification

I have used the VPN auto connect option via Applescript [see code]. It works like a charme there's only one problem. Every time when i open my MacBook I get this [see printscreen] notification. A few ...
4
votes
1answer
148 views

Moving full screen apps between monitors shortcut

Does anyone know if it is possible to move a full screen app to another monitor using a shortcut? Or if there is no existing shortcut would it be possible with Applescript? BetterTouchTool has "Move ...
1
vote
2answers
591 views

Create a New Space in Mavericks using Applescript

In Mavericks, is it possible to use Applescript to create a new Space in Mission Control? I also tried the following code to switch to another Space, but it does not seem to do anything... tell ...
0
votes
1answer
36 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?
1
vote
1answer
147 views

Changing trackpad scroll direction with AppleScript in Yosemite

I prefer "natural" scroll direction when using my MBAir trackpad, but "unnatural" when using the mouse. I frequently switch back and forth depending on where I'm working, so I've been using a bit of ...
1
vote
3answers
1k views

Using automator and handbrake cli to convert videos automatically

I am trying to automate video conversion process using Automator and Handbrake CLI version. I am trying to implement the functionality that whenever a video is downloaded in my dropbox folder on my PC ...
1
vote
0answers
21 views

Change Managed, Mobile Account Password through script?

Wondering if anyone has worked with something similar before - we have a number of Mac laptops connected to an Active Directory server, and on first login users create a Managed, Mobile account. When ...
0
votes
2answers
71 views

Mission control: switch to desktop1 + show desktop

I'm bored of pressing 2 key shortcuts need to write a script that tells mission control the following: if not at desktop1, switch to desktop 1 perform "show desktop" (windows will be ...
1
vote
3answers
88 views

Hide/Show Battery Icon in Menu Bar with AppleScript

Is there any method to display the battery menu bar status item with AppleScript? I’ve tried to browse the script library but unable to find one that matches this capability. I simply want to toggle ...
1
vote
0answers
54 views

AppleScript-sent messages pop up as unsent drafts when trying to quit Mail

I have a spam processing script that I use to forward spam messages as attachments to my spam filter using the 'send' command in AppleScript. Everything processes and delivers fine, but later when I ...
0
votes
1answer
110 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
27 views

How to get the first name of the recipient to be auto-added to new messages in Mail.app?

I'd like new messages that I create, including replies to messages I receive, to automatically get a "Hi <name>," inserted in their first line. <name> should be the first name of the first ...
0
votes
1answer
36 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
0answers
190 views

Folder Action Script stop working after Yosemite install

I have an AppleScript that worked fine with Mavericks: on removing folder items from this_folder after losing lost_items repeat with i from 1 to number of items in lost_items set nameOfLostFile ...
0
votes
0answers
27 views

Apple Script not running as expected

The following is an applescript which is meant to take the body of the latest email and extract text out of it. As you can see the result is shown below. This result is show as the script was running ...