AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

0
votes
0answers
21 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 ...
4
votes
5answers
3k views

How do you duplicate current open Finder view in new tab (Mavericks)?

In a thread on this forum there is an interesting solution on how to open a duplicate of an already open Finder window with the help of an AppleScript: How do you duplicate current open Finder view? ...
1
vote
1answer
26 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 ...
4
votes
4answers
3k views

Quotes within quotes applescript

I am doing an applescript that is supposed to set an command with quotes an varible. This is the code so far: set myString to "This is a "quoted" text." But an error occurs because applescript ...
1
vote
2answers
22 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
1answer
35 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
25 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
24 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
47 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
53 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
14 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 ...
0
votes
1answer
32 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
23 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
35 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
27 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
29 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
35 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 ...
1
vote
1answer
87 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 ...
3
votes
3answers
4k views

Switch between Google Chrome Tabs using AppleScript

I was hoping that the following code would do the job, but no cigar: --Only the window is brought into focus tell application "Google Chrome" activate tab 1 of window 1 end tell
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 ...
0
votes
1answer
57 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
16 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
1answer
111 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 ...
7
votes
2answers
3k views

Programmatically set the color of a tab in iTerm2?

My daily workflow includes me Launching iTerm2 Creating 3 tabs Setting one tab each to red, orange and yellow Changing to a specific path in each tab I would like to script this process; shell, ...
2
votes
2answers
706 views

Automating tasks in OSX like VPN Connection?

I am using my school's VPN service to surf on netflix. I have to connect to the VPN most of the time. My school uses Cisco AnyConnect Secure Mobility Client. I have to enter password and accept a ...
2
votes
1answer
5k views

How to zip multiple files into separate archives?

I admit this question was asked here before: Like Zip into separate files where the person who asked didn't specify the OS he used and received no answers. I need to separate a huge directory ...
0
votes
0answers
34 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
43 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 ...
3
votes
2answers
2k views

What is the best way to make Calculate SHA1 as a context menu option in Mac OS X?

In order to calculate the SHA1 checksum of a downloaded file, I could type /usr/bin/openssl sha1 in Terminal and then drag there the file which I want check. To make it simpler, one could enable a ...
1
vote
2answers
2k views

Use launchctl to fire an AppleScript script periodically

I have written an AppleScript that lets me back up a particular file. The script runs fine inside AppleScript Editor: it does what it's supposed to do perfectly. So far so good. Now I'd like to run ...
0
votes
0answers
39 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
39 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
68 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
73 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 ...
1
vote
4answers
4k views

Shortcut for moving an email to another folder in Mail.app

How could I setup a keyboard shortcut for Mail.app in OSX Lion so an email in the inbox, which is still unread, when I use this shortcut is moved automatically to some other previously defined folder? ...
3
votes
1answer
403 views

AppleScript based Automator service quite unstable (sometimes very slow, sometimes encounter error)

I have some applescript based Automator services, for instance, Launch Emacs With Selected File: tell application "Finder" set selectedDirectory to (quoted form of POSIX path of (target of window ...
0
votes
1answer
289 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
44 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
3answers
158 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
1answer
99 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
0answers
102 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
179 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
32 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
55 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
43 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
59 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
26 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
153 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
183 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 ...