AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

-1
votes
0answers
6 views

How to open new Chrome window with applescript as a different user

I would like to know how to open a new Chrome window as a different, non default, user using applescript. I'm trying to create Alfred workflow to open chrome window as a user from a list, but i ...
-2
votes
0answers
11 views

I'm looking for an applescript to convert eml to html. [on hold]

I know that eml is based on MHT which you might as well call a cousin of HTML but I need a simple applescript that will duplicate some efforts I see on the web. I would prefer not to pass my data ...
0
votes
0answers
9 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
0answers
12 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 ...
-1
votes
0answers
14 views

How to cache data for comparison between two apps in .db file [closed]

I'm looking for a way to store cached data from two apps for comparison in a .db file. How can I do this with applescript? Here's what I'm looking for: I want to be able to write to this file I want ...
0
votes
0answers
31 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
55 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
15 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 ...
-1
votes
0answers
34 views

How to automate an app to run daily in OS X

I am very new to AppleScript programming. This is my code to open an app at 6 PM. I saved this code an as application, and now I want to open this application automatically daily at 6 PM without any ...
0
votes
0answers
22 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
34 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 / ...
1
vote
3answers
49 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
22 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
28 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
12 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
31 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
17 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
28 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
17 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
64 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
129 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
40 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
27 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
124 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
49 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
48 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
60 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
128 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
23 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
126 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
59 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
74 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
55 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
204 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
92 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
77 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
45 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
91 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
41 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
222 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
28 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
89 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
132 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
76 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
26 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
51 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
64 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
84 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 ...