AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

1
vote
1answer
12 views

automatic new mac setup (dotfiles, scripts, etc)

I'm looking for a way to automate the setup of a new macbook I'm about to purchase. I've done through quite a few during the years and it always takes forever to get everything up properly. I don't ...
0
votes
0answers
7 views

Missing file alert - OS X 10.9

A local folder receives one file per hour (via ftp). I would like a notification if the expected file does not arrive. I've thought about using hourly Calendar events to trigger a check but do not ...
0
votes
0answers
7 views

Applescript - how to tell which window is topmost on second screen?

I need to find topmost window on a given screen. I thought I could calculate the screen using position or bounds so this is not a problem, however I am struggling with the index property. I tried ...
1
vote
0answers
5 views

Applescript to create hyperlink at cursor location on MS Word

I want an applescript to create a hyperlink at the blinking cursor. I can't change the range so that it matches the cursor. Any help on this? Thanks! tell application "Microsoft Word" tell ...
0
votes
0answers
6 views

Send click event to dialog shown through display dialog command in OS X Terminal

I have an sh script that displays a dialog; this dialog can be closed by the user but I am looking at a gracious way to close it, from within another similar script, run at a particular moment, if ...
0
votes
0answers
16 views

Applescript to create link in specific place of MS Word document

I'm trying to make an applescript to work like this: 1) I let the flashing cursor at the precise place where I want the link to appear in the MS Word (v. 15) document. 2) I press a keyboard command ...
0
votes
2answers
29 views

Click Every Word that ends with “.log.gz” in Any Language Compatible with Google Chrome

I have looked up the answer to this already and cannot do this with the programming languages I know, so I'd like the code for this and an explanation as to how it works so I can use this in future ...
0
votes
0answers
27 views

Shell script, applescript MAC OSX

I'm trying to copy embedded metadata from image files and write to a .txt file, as well as generate MD5 and SHA1 checksums for the same images to be added to the same .txt file. I can run this ...
1
vote
1answer
32 views

Write content to file with Automator

I'm building an Automator Service to create an .html file and write some text in it. I've managed to create my .html file by using the New Text File action, but how can I write text in it? I see no ...
0
votes
1answer
35 views

Sharing variables between applescript and bash script in same script

Is it possible, in a bash script, to have a variable, but also allow applescript (with osascript) to use that variable?
1
vote
0answers
30 views

Toggling Yosemite's Notification Center between “Today” and “Notifications” views (back and forth)

I want to create a keyboard shortcut/trackpad gesture to: - display Yosemite's Notification Center first - then toggle back and forth "Today" and "Notifications" panes every time the corresponding ...
0
votes
1answer
45 views

How to prevent AppleScript error while website is still loading?

This is a service that copies a text and execute an applescript to simplify my life. The applescript searches a website on Safari and then clicks on specific links in two pages. The problem is that ...
0
votes
1answer
70 views

script needed to Reset group permission to enclosed items in folder OS X Yosemite

Error with Excel document falling read only on server shared document. i'm looking for a script to apply "group" folder permission to all included files.Every day at a specific time 8pm.to fix ...
1
vote
2answers
69 views

Open “About This Mac” from Terminal?

This probably seems totally useless to most, but i've got a specific need to open the "About This Mac" dialog from within Terminal. Any idea if its possible? I suppose AppleScript might be the way to ...
1
vote
0answers
15 views

How do I close a window from an application but not quit the application

I'm trying to have a shell script run and then close itself but not quit Terminal all together. Here's what I have: #!/bin/sh while [ "$JOB_NUMBER" = '' ]; do echo -n "++++++++++++++++++++Job ...
1
vote
2answers
25 views

How do I to modify Automator Service ditto command?

Using and Automator Service and an AppleScript that is redly available and exists on this thread of but a "GUI" around ditto. The solution works well, however, I am not getting the behavior I ...
0
votes
0answers
27 views

Is there a way to have two or more clipboards via keyboard shortcuts for storing & using multiple text items simultaneously? (OSX)

I would like to be able to have multiple clipboards on Mac OSX (happen to be using Mavericks currently). The end-solution would look something like this: Let's say I copied one piece of text using... ...
1
vote
1answer
42 views

How to periodically show alert message *in foreground* on Mac OS X?

I want to have an alert / dialog box to fire up periodically in foreground on my Mac. I tried a combination of AppleScript and launchd and managed to have the script (actually converted to a app) ...
0
votes
1answer
30 views

How can I stop Drobox sync during the day and automatically start at night

I'm trying to stop the Dropbox daemon from running during the day. I'd like to start it and perform a sync around 6 pm daily. I'm running Mac OS X Yosemite 10.10 on an iMac 27'.
0
votes
1answer
33 views

Applescript Ext Loop early

I've created an applescript loop that automates a repetitive task. It prompts for the amount of times to loop, and then does it's thing. However I've been asked for a way to exit the loop, if for ...
0
votes
0answers
43 views

How to launch an AppleScript via URL handler?

Here's my workflow, I want to create clickable links in various places that run scripts with inputs. For example, I might have a link ...
0
votes
0answers
15 views

Applescript Google Search results [duplicate]

Does anybody have an idea on how i could start a script that extracts google's quick answers to applescript. Like when you google the time in a certain place google will give you a direct answer in a ...
1
vote
1answer
120 views

Extract text from HTML using Applescript

I am looking to extract text from an html using Applescript, here is the code: <div class="vk_bk vk_ans">3:27 PM</div> I want to extract "3:27 PM" which is the result google gives you ...
0
votes
1answer
72 views

Applescript can't get process “…”

I am getting an error in applescript In the first script i created a search engine and the script is as follows on dialogBox(theMessage) display dialog theMessage default answer "" buttons ...
0
votes
0answers
20 views

Conditionally change colors of events in calendar on mac?

Is it possible to conditionally change colors of particular events in calendar for mac ? the same way week cal on iOS works? Maybe with applescript? I havent found any apps for mac that can do that. ...
0
votes
0answers
37 views

NSUserAppleScriptTask and Script Monitor

I am wondering why some users of our app ghostnoteapp.com see the Script Monitor icon in their menu bar and others, including myself do not. According to the AppleScript release notes " (Script ...
0
votes
1answer
56 views

Applescript exec shell script with space in path

The problem I'm trying to solve is to simply run Google Chrome with the --disable-web-security switch in OSX. Since it appears that I cannot add a switch (argument) to an alias I started looking for ...
0
votes
0answers
40 views

Speech Recognition in Yosemite blocks sound from other sources

I have found the answer to this one before, it is somewhere on this site. However, I couldn't find it, and I searched for quite a while. When I start the Speech Recognition Server (I use it with my ...
0
votes
0answers
42 views

Apple script or automator to process list of names

So I have an automator or apple script job and I have never done this kind of process before. I need to use a list of about 5000 names as input, open an application called LINE messenger, use that ...
0
votes
0answers
74 views

Mac OS X Mail messages moving back to inbox after Applescript moves them to another folder

I used Automator with an Applescript to move messages from my inbox to designated folders. When I check, they are all there. If I get another message with a related topic, it seems that both messages ...
0
votes
1answer
37 views

How do I create a new database?

Since upgrading to Yosemite 10.10.1, I can't create a new database set theOutputFolder to choose folder with prompt "Please select an output folder:" tell application "Database Events" make new ...
0
votes
0answers
79 views

Yosemite run “mount volumes” is not same as Mountain Lion

This content has posted in Apple support community but I need the solution urgently so I copied to here. I have a script to mount the shared folder from Windows server (named: servicedesk) as a ...
0
votes
1answer
314 views

Make Applescript wait for an application to be closed before running a shell script

I have an applet i made using Applescript which opens an Application and then once it's loaded runs a shell script which unload's Spotlight. I need to make it then wait for me to finish using relevant ...
0
votes
0answers
52 views

Applescript command to make window unclosable

I have an applescript program that auto opens whenever I wake my computer. I would like it to be unclosable until I input a password into it. Tried searching but found absolutely no sources that ...
0
votes
0answers
27 views

Why would this tell command start a program?

The following applescript is run as part of a larger program that I regularly use: on run {viewer, path_to_pdf} if viewer is "Skim" then display notification "Skim opened: " & viewer ...
0
votes
1answer
111 views

iMac G4: auto playing iTunes music using Automator

I have used Automator and I have successfully set up events using it and iCal before. I would like to play a playlist from my iTunes using Automator, the problem is that there is no "Play Playlist / ...
0
votes
3answers
190 views

How do I automatically print only part of a PDF page in OS X?

I frequently have to crop out the top half of a PDF (it's a shipping label) and only print that on A4 paper, instead of the whole label. I can do this very easily with Adobe Acrobat Pro, by opening ...
0
votes
0answers
112 views

PHP - Exec on user's GUI session

I am trying to get a PHP script to execute an Applescript which opens an application.* PHP is running under the _www user. And while it can execute Applescripts with the osascript command, it can't ...
0
votes
0answers
224 views

How to create a schedule for SelfControl app

I want to block my blacklist Mon-Fri 6am-12pm and 1pm-5pm (closely related to this post), but I don't know enough about Applescript to know how to set up a schedule. Any ideas for how to achieve ...
0
votes
1answer
36 views

How to move the first tab of Terminal to the end using AppleScript?

Given a Terminal window with multiple tabs, how can I move the first tab to the end? I have tried with this: tell application "Terminal" tell front window set current tab to first tab move ...
0
votes
0answers
56 views

Lync Contacts on Skype not found via AppleScript

When I run the following AppleScript my Lync contacts (added to Skype and visible in my contacts list) are not returned, only native Skype contacts: tell application "Skype" ...
1
vote
2answers
54 views

Saving result of applescript execution to text file

In my script, I get the UI element properties of an application and it is saved in the form of a list in a variable. I want to save this variable into a text file. How do I do this?
1
vote
1answer
64 views

OSX AppleScript fails to run as service

I would like to run a simple shell command via hotkeys. So far I've created a service via Automator wich runs the following AppleScript command: do shell script "/bin/bash -c ...
0
votes
0answers
29 views

Closing SugarSync Mac app window with AppleScript

I am trying to set up an AppleScript that will open some apps (including SugarSync) after startup so I don't need to have them as login items. It works, except that with SugarSync it also opens the ...
0
votes
0answers
164 views

MAC OS X - remote SCCM 2012 R2 client installation

I have came across a task to deploy CM client on couple MAC devices in order to manage them. I've watched several instruction videos about how to setup the site server and I'm pretty much clear on ...
0
votes
0answers
197 views

accessing mail attachments with AppleScript in Yosemite

I have an AppleScript to save the attachments of an e-mail message. It worked under OS X 10.9 (Mavericks). Now, with OS X 10.10 (Yosemite), it seems that every attempt to access "mail attachments" in ...
0
votes
0answers
47 views

AppleScript and MacOS X for launching App with credentials

Good day, I haven't done a lot of Scripting, and I need to find out how to make a shortcut for an App on the Desktop that will include the user name and password (so they don't have to type each ...
0
votes
0answers
45 views

applescript permissions for copied files

Using applescript, I'm copying PY files to a location in OSX. However, they don't compile when I load Python, it seems because the permissions havent been set on the files. When I look at "get info" ...
1
vote
1answer
786 views

How can I run an applescript from my Mac with a shortcut (without using 3rd party apps)?

Hi I have an applescript that sends Outlook emails to Omnifocus - and it works when I run it manually, by clicking on and running the script. Is there any way to do this with a shortcut without ...
0
votes
0answers
116 views

Read a notification from OS X Notification Center using AppleScript

Is there a way to gain access to OSX Notifications with an AppleScript? For example, a notification is displayed: Skype - John says: Do you have time? The AppleScript would detect the new ...