AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

0
votes
0answers
16 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
12 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
13 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
47 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
23 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
8 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
16 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
22 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
24 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
24 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
48 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
17 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
54 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
174 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
33 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
23 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
66 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
86 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
69 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
108 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
18 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
45 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
22 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
47 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
20 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
128 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
157 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
45 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
40 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
370 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
91 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
1answer
83 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
90 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
154 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
27 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
190 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
68 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
90 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
61 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
229 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
129 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
92 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
50 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
132 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
43 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
45 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
323 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
38 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
111 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. ...