AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

0
votes
1answer
9 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
12 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
25 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
54 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
31 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
18 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" ...
0
votes
1answer
47 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
30 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 ...
0
votes
0answers
28 views

(osX) Applescript to run compile shortcut in TexShop not working while in Sublime Editor

I'm trying to write an script so that when I'm in Sublime I can use a keyboard shortcut to get it to: save in sublime compile in TeXShop (I'm using it with the external editor setting) then switch ...
0
votes
0answers
37 views

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

I want to initiate a Google Hangouts phone call with Applescript, or Terminal ... or python. (Hangouts.app has an AS dictionary, but with only the default suites.) Basically I want to emulate ...
0
votes
1answer
96 views

Target Display Mode not working when no keyboard present

When I try to use some kind of command + f2 command either via applescript or screen share, it never works when the keyboard is no longer present. Example, I have an iMac and a laptop where the ...
0
votes
1answer
19 views

Insert AppleScript variables without comma seperating them from text

I need to run a shell script in an applescript like this set key_status to (do shell script "defaults read " & path_to_plist & " PlistKey") But unix gives an error because this script seems ...
1
vote
1answer
86 views

Find path of button in browser for Applescript

I'm trying to click on a button in Safari with Applescript. I know the code must be something like: tell application "System Events" tell process "Safari" click button " ENTER " of ...
0
votes
1answer
53 views

AppleScript hangs when mounting notremovable encrypted image

I want to mount a dmg as nonremovable image using AppleScript as described here. The difference is that my dmg is encrypted. When I execute do shell script "hdiutil attach /path/to/my.dmg ...
0
votes
0answers
44 views

Batch format and convert word documents in mac OSX

I am looking for a way to format multiple word documents (in a same formatting) and then save them as PDF. Specifically: Format orientation, page margins, page columns, and font. Save the formatted ...
0
votes
2answers
54 views

Delete Directories that Contain Specified File in Mac OS X

How do I delete a folder that contains a file or folder with a specific name? E.g. I want to delete all folders that contain the file "things.txt": /dirA/ /dirB/things.txt /dirC/ /dirD/things.txt ...
0
votes
1answer
176 views

Why Does Clicking on Applescript Notifications Open the AppleScript Editor?

I'm experimenting with AppleScript and with Python. But the big issue i'm having now is not about Python specifically. The end goal is to be able to write Python scripts that use AppleScript features. ...
0
votes
1answer
68 views

save multiple tabs to chrome Pocket extenson

I use the Pocket extension to read pages offine on an Ipad, but it's tedious to click the icon for every page. Most of the time I open multiple tabs on one subject. Does anyone have a piece of ...
0
votes
0answers
65 views

Applescript to run when connection to specific network on OSx

I have an apple script that I can manually run that will connect to a couple network drives. I would like it to have that script run when my mac connects to a specific wireless network connection ...
0
votes
0answers
40 views

Applescript for Hotspot Shield

I'm trying to build a simple Applescript to control the 'Connect' and 'Pause Protection' buttons in Hotspot shield VPN, but there is no applescript dictionary or menu bars for the programme. Does this ...
0
votes
1answer
65 views

In an AppleScript, how do I call/reuse a subroutine from another AppleScript?

snippet 1a on removeText(searchText, sourceText) set prevTIDs to text item delimiters of AppleScript set text item delimiters of AppleScript to searchText set sourceText to text items of sourceText ...
0
votes
1answer
41 views

Batch APPEND (RENAME) a specific keyword to set of files

I have few files namely - "a", "b", "c",etc.. I want to add the keyword: ".mov" to all files in that folder. Please suggest me an approach which script will be best suited for this - AppleScript, ...
0
votes
2answers
36 views

Batch TRIM (RENAME) a specific keyword from set of files

I have few files namely - "a.mov-, attachment", "b.mov-, attachment", "c.mov-, attachment",etc.. I want to trim the keyword: "-, attachment" from all files in that folder. Please suggest me an ...
1
vote
1answer
186 views

How can I bind scrollwheel to a key in Mac OS X?

I am new to using a Mac, and I have used AutoHotKey applications that rebind the mouse scroll wheel (for example, E = scroll up by 1 mouse wheel "tick" of sorts) to a specific window title, eg. "Game ...
0
votes
0answers
18 views

Prevent application from detecting screen zoom on Mac OS X

I have an application which streams live television, using a rather expensive portable mobile decoder. And for some reason the company that controls the app has decided to limit the screen size of the ...
0
votes
0answers
22 views

Applescript won't open applications on my external monitor

I'm trying to open a new MacVim window with Applescript, and have found partial success with this: do shell script "cd \"~/code/application\"; ~/bin/mvim > /dev/null 2>&1" This works ...
0
votes
0answers
84 views

Can one show or hide the Mac OS X on-screen keyboard via either keystroke or API?

I would like to show and hide the Mac OS X on-screen software keyboard (fig. 1) with a keystroke, but no actions to do so are available when customizing the keyboard shortcuts via System Preferences. ...
0
votes
0answers
125 views

disabling password require via applescript freezes Mac

I wrote little script to enable/disable screensaver and password check. Idea is that when my iPhone is near to my Mac (Proximity app checking this), screensaver and password check should be disabled. ...
0
votes
1answer
63 views

How can I concatenate multiple clipboard selections in Quicksilver?

I've been using Quicksilver's clipboard module for years but I've always wanted to do this: copy several bits of text. Then paste them as a concat'd list. I found this Stackoverflow post trying to do ...
1
vote
0answers
24 views

Mail.app rules not triggering

I have a mail.app rule set up to run an applescript when incoming emails come in with a certain subject, but it does not trigger. I see the emails in my inbox, and the rule is activated, but it does ...
0
votes
1answer
48 views

Change screenshot default name

How can I change the default screenshot name, to whatever I have written on Preview search tool at the time of the screenshot. As a function on terminal or as a script. Using OS X Mavericks. Thanks in ...
2
votes
1answer
55 views

Make alias in a folder to be chosen

I want to make an alias of selected files or folder in other folders, which I want to be able to choose each time from a pop-up window. This was something that was available on previous OSX versions ...
0
votes
1answer
67 views

Request help/advice with my automator/applescript service

I created an automator service that runs a very simple applescript: on run {input, parameters} tell application "Finder" set theFile to selection set theFolder to choose folder move ...
0
votes
1answer
86 views

How can I incorporate an applescript function into Xcode?

So I have a Cocoa-Applescript project, and I am creating an application: I have this script in applescript, it's in automator. set input01 to (input as text) The rest is kinda secret, but I'll ...
0
votes
1answer
484 views

How can I use AppleScript to open a new Safari window on the current desktop space?

I need to open a new Safari window in the current desktop space using AppleScript. NOT move to another space which has Safari running and then open another Safari window. Of course, if Safari is not ...
1
vote
0answers
177 views

AppleScript shows “Document could not be opened. You don’t have permission.” but file can be opened?

I am getting a "The document [filename] could not be opened. You don't have permission" when attempting to access several files in an AppleScript. However, I can open these files manually without ...
1
vote
1answer
100 views

How can I script my MacBook to open Day One every morning when I open my computer?

I have this idea in my mind that every morning, when I first open my computer, all programs are closed except Day One, so that I can start journaling first thing every day without any distractions. I ...
0
votes
1answer
294 views

Emailing folder's content through AppleScript

I'm trying to write an AppleScript that e-mails all files of the specified folder. It works as expected when there is only one file but doesn't when there are more than one. It just gives me this ...
0
votes
0answers
68 views

Changing Mac OS X text-to-speech voice per contact in Messages.app

I am quite enjoying using the Speak Events.applescript handler in my Messages.app. It speaks the incoming messages. I'd like to have a male voice for my male contacts and a female voice for female ...
0
votes
1answer
191 views

condition in applescript if directory is empty do this, else do that

So far I've got this: property watch_folder : alias "Macintosh HD:Users:davidcuster:iFlicks:Watch Folder:" tell application "Finder" count files of entire contents of watch_folder if the ...
1
vote
1answer
493 views

OSX: check for subfolders, flatten directory structure into new folder, then move to desktop

I am in the process of cleaning a huge library of mangas (mostly -but not only- image files). Each manga has a main folder containing subfolders, one for each volume. But sometimes, volume folders ...
0
votes
0answers
180 views

OSX : Find all zip and rar in a selected folder then unzip and unrar

I am in the process of cleaning a huge library of mangas (mostly -but not only- image files ). Each manga has a main folder containing the different volumes, sometimes in .zip, sometimes in .rar. ...
0
votes
1answer
146 views

File sync solution with pattern matching

I have a directory I want to sync over the cloud using a service like Dropbox. But, within that folder, I only want to sync directories that match a particular pattern. For instance, sync all folders ...
1
vote
0answers
168 views

Applescript + pdfpen for ocr on multiple files: how to move on when pdfpen freezes

I'm using the following AppleScript to batch-process pdfs for ocr: tell application "Finder" set target_folder to target of front Finder window repeat with i from 1 to count (every folder of ...
0
votes
2answers
111 views

Condition in AppleScript if directory doesn't contain extension recursively then quit app

This seems to work. The only problem is it is not recursive. property Location : alias "Macintosh HD:Location" tell application "System Events" to files of Location whose name extension = "ext" if ...
0
votes
1answer
131 views

Get path to applescript stored on iCloud

I wrote a shell script which calls an applescript to do some work. The applescript is in iCloud, so I'm manually writing the path to the document storage location... osascript ~/Library/Mobile\\ ...
1
vote
1answer
89 views

How to allow an application in Mountain Lion in the “Security and Privacy” settings?

Every time I was trying to use an Alfred workflow written in Applescript, I got the error "No user interaction allowed". In Mavericks there is an "Accessibility" option in the "Security and Privacy" ...
0
votes
2answers
977 views

Applescript to close box by hitting ok automatically

I need to create a script that automatically closes a popup box that opens approximately every 55 - 65 seconds. Once the box opens, you merely hit OK (within the box) and it closes. I created an ...
0
votes
2answers
354 views

Apple Script - Reopen Closed Finder Windows

I have the following Applescript which toggles the show/hide hidden files and I would like to reopen the user's Finder windows which will be closed as the Finder gets relaunched. tell application ...
2
votes
2answers
1k views

Get the media buttons on my bluetooth headset working with Spotify on OS X

I just bought a Parrot Zik, which is a pair of bluetooth headphones with volume control, play/pause and next-prev buttons. (Or gestures, as they come with the Zik). The phones work beautifully with ...