AppleScript is a proprietary programming language in Mac OS X to control and exchange data with applications.

learn more… | top users | synonyms (3)

-1
votes
0answers
5 views

Apple Script : Remove space / line in variable

I'm using applescript to collect a lost of number from a website, and my script is working fine, I just get a lot of space and a line between the result which I can't figure out how to get rid of. ...
0
votes
0answers
12 views

Apple script not working with folders containing special letters (hebrew)

I am basically a Java developer, but had to run an apple script on my mac to batch convert doc/docx to PDF. I run the following apple script via Automator: property theList : {"doc", "docx"} on run ...
1
vote
0answers
18 views

AppleScript : write text on menu bar

I wonder if AppleScript can print a variable in the top menu bar in OSX 10.11 ?
-1
votes
0answers
7 views

how to make an apple script executable [duplicate]

I have a script with terminal commands. I want to convert into an executable file such that it runs on double click, is machine independent and runs on any MAC machine when transferred. chmod makes it ...
0
votes
0answers
9 views

Flag a message when sent in Apple Mail using AppleScript

I can use a Rule to Flag all incoming messages in Mail but not those I send. Is there a way of automatically flagging a message when it moves from Outbox to Sent? I am using El Capitan with all the ...
0
votes
0answers
13 views

How do I set the number of decimals in a Numbers cell using AppleScript?

I can set the format of a cell in a Numbers spreadsheet using: tell application "Numbers" activate tell document 1 tell active sheet set the selectedTable to ¬ ...
-1
votes
1answer
57 views

Batch copy time creation and modification date from files using OSX

First of all, I have asked the same question at stack overflow, but I am not sure if it's right over there. That's why I decided to post it here, too. t'm having a hard time trying to copy the ...
1
vote
1answer
26 views

Minimize all but the active of the current application's windows

I switch to, for example, Safari and find the window I want. I can Command-Option-H to hide all the other applications, but I also want to minimize all the Safari windows except the one I'm using (the ...
1
vote
1answer
24 views

Toggle Hidden Files without Relaunching Finder

I'm pretty new here, and I looked for an answer to this question, and found some answers but none seemed to work for me. I want to be able to run an applescript that toggles hidden files and ...
0
votes
0answers
12 views

Keep window on bottom

I'm trying to keep one window on the very bottom of my other windows. In attempt to do that I have the following: repeat until application "Firefox" is not running tell application "System Events"...
0
votes
0answers
16 views

apple-script to display a dialogue box with username and password

I am using this command which gives a dialogue box with input field for just password. osascript -e 'tell app "System Preferences" to activate' -e 'tell app "System Preferences" to activate' -e '...
1
vote
2answers
44 views

How to pass a file set as a variable from AppleScript to a Bash shell script

I've got a two part problem. I am trying to pass a variable from AppleScript to be used as a variable inside a bash shell script. I cannot figure out how to this work. I have read about ...
0
votes
0answers
34 views

FFMPEG Unable to find a suitable output format for [partial path from input]

Up until a little bit ago I had an Automator app with applescript and embedded bash for video conversion with ffmpeg and it worked great. Now for some reason I keep getting the following error: [NULL ...
0
votes
0answers
12 views

Script or App that identifies corrupt music files?

I'm wondering if there is a Terminal command or AppleScript or any sort of app that can scan a collection of MP3s, WAVs, and FLACs, and determine if they are corrupt. iTunes skips songs once it hits a ...
-4
votes
1answer
36 views

Write an AppleScript to combine multiple pdf pages in one pdf

I am designing a workflow in which multiple one page-long PDF files should be combined into a single PDF file using Folder Action Script. If you have any script for that please share.
1
vote
1answer
41 views

Applescript - Open password protected excel file

Is there a way for Applescript to open an Excel workbook (.xls) that is password protected? I see that in the library there are functions to check if a workbook has password, but I do not know the ...
0
votes
0answers
26 views

Calling terminal command (pdfcrop) either directly from python or from within applescript (do shell script)

on OSX, I am using applescript to get a latex string from an application (OmniOutliner), process it via a python script that calls pdflatex and pdfcrop, and paste the final cropped pdf back into ...
0
votes
1answer
37 views

Problem “do shell script” on curl – Works in Terminal, but not via “do shell script”

I want to use "curl" with "do shell script" in an apple script. It already worked some months ago, but then the provider changed to https-only service. So I update curl on Mac OS Terminal: $ curl -V ...
0
votes
1answer
30 views

NSString doesn’t understand the “stringWithString_” message

I'm creating an AppleScript Script Library, and want to call some Cocoa methods on NSString. I created an .SCPTD file with this method: on xtrim(sourceText) set the sourceString to current ...
1
vote
1answer
19 views

Open Scripting Architecture Reference

Lots of documents, like this one, refer to the "Open Scripting Architecture Reference," which sounds useful to me. But I can't find it anywhere. Googling the title gets lots of non-authoritative links ...
3
votes
1answer
45 views

How to open a URL without launching a new safari tab?

I would like to write a script (AppleScript or shell script) to open a URL such as https://itunes.apple.com/ca/station/beats-1/idra.978194965 which then launches iTunes and play a radio station. ...
0
votes
0answers
27 views

AppleScripts move files with ‘System Events’ instead of ‘Finder'

When using Finder, script can take much longer. I also want this script to work on the background. How can I use System Events instead of Finder in this script? property source_folder_one : alias "OS ...
0
votes
0answers
8 views

Respond automatically to application dialogue pop up window

I am using the Sony Wireless Auto Import software on a a computer at my desk. It allows me to turn on my Sony camera and send my photos to the computer over my wireless network. It works fine but the ...
0
votes
1answer
13 views

How can I add a property to the window object in Chrome using Applescript?

In Chrome's JavaScript Console, I can type the following: window.myVar = "myValue"; I can then access myVar from the window context, where it returns "myValue". Excellent. However, if I do the ...
0
votes
1answer
52 views

Run AppleScript Applet at boot

I am a complete amateur at this. How would I get this AppleScript to work on my Macbook Pro on boot? What steps do I need to take? What does the script do?
0
votes
0answers
18 views

Rogue Applescript

I am experimenting with automation, particularly the auto typing on other applications. I have followed this site's script and changed the delay between each entry to 0.5 – which is enough to type ...
1
vote
2answers
35 views

Where's my Applescript application?

In the Applications folder (El Capitan iMac) there is no Applescript editor. I've also checked the Utilities folder, but didn't find it. I don't think I would have mistakenly trashed it. Should I ...
1
vote
2answers
101 views

AppleScript set focus on terminal window

I have a AppleScript, which changes the position and the size of the application Terminal: Like here: tell application "Terminal" set position of front window to {1, 1} set size of front ...
2
votes
2answers
40 views

How to enable/disable grayscale mode in Accessibility via Terminal/App?

I'm wondering what would be the process of enabling/disabling the grayscale mode in the Accessibility panel in System Preferences? I would like to run a simple script, either by clicking on an app in ...
2
votes
0answers
44 views

Close Dock and top bar

Is there a way to keep the application Dock closed. Every time I do: killall dock It closes for a bit then automatically reopens. I want to be able to make an AppleScript program that keeps it ...
1
vote
0answers
27 views

'Add notes' to a Calendar event using Automator

I would like to build a 'Service' for selected text which: Get the currently selected text Creates an Calendar event adds the selected text as a 'note' for that Calendar event I prefer Automator ...
1
vote
1answer
36 views

How do I get AppleScript to open another script file

So I'm working on a script and I want one of the buttons to open another script file. I have: tell application "AppleScript Editor" to open "Fallen_Order_Intro.sctp" When I do this, it says ...
2
votes
1answer
41 views

Sharing multiple files on iCloud by using System Events in Applescript: How to intercept an option?

I am trying to share a folder with many Numbers files with iCloud, by sharing each file with an AppleScript and saving the path of each shared file so that I can send it to my collaborators. To do ...
4
votes
2answers
140 views

How can I run a shell script that prompts for user input from within Applescript

I have two pieces of code. One is Applescript and the other a Bash shell script. The shell script needs to run concurrently with the applescript, return some values and then exit. The problem is the ...
3
votes
2answers
40 views

Applescript string matching failed

I want it so that if the current date matches the string, it will log "works!". However it doesn't seem to work. set datesubmit to "27, May, 2016" set trydate to {day, month, year} of (current date) ...
0
votes
1answer
23 views

Applescript email

I have been messing around with applescript for the last week or so and i'm wondering if its possible to attach applescript to an email somehow so that it runs when the email is opened. It might not ...
0
votes
2answers
57 views

Applescript with get every file loop fails

I want to run a script on all files with two specific extensions on a disk with a hierarchy of multiple nested folders. My script works fine when I choose a folder further down the line with fewer ...
0
votes
0answers
11 views

Applescript remote keypress syntax

What is the correct syntax for this? I am trying to mess with my brother by taking a photo of him playing his games. However the syntax for the keystroke line doesnt seem to be working on remote ...
0
votes
1answer
59 views

AppleScript URL from open safari window

I have a Safari window displaying a webpage. I want to be able to retrieve the open URL into AppleScript. However when I do this: if URL of window 1 is "www.google.com" then --do something end if ...
0
votes
0answers
17 views

programatically mimic events on a Mac [duplicate]

How can I listen for an event on my Mac, record the event and than execute it programatically. For example, I want to reload extension I made programatically. For that I need to go to Extension ...
0
votes
0answers
34 views

programatically reload Safari extension

How can I programatically reload extension I created in Safari? This image shows the reload button that I manually have to click every time I update my extension: Any way to this is programatically?...
0
votes
1answer
34 views

OS X Automator: Using custom command in AppleScript's “do shell script”

I have recently asked a question about automatically inserting a value produced by a custom executable into a prompt field. Please look over this post to know exactly what I am talking about. The ...
0
votes
1answer
29 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
2
votes
1answer
25 views

Automator task to open screenshots in Preview automatically

I'm pretty new to Automator but it seems like it's possible - I just can't seem to get it to work. I'd like to be able to take a screenshot and then open it up in Preview for easy annotation. If it's ...
0
votes
0answers
23 views

Extension : Multi-highlight on safari

I'm not sure this topic is appropriate for this forum but I'm looking for a Multi-highlight extension or AppleScript for Safari. I using Multi-highlight for Google Chrome at the moment but I would ...
0
votes
0answers
62 views

Apple Script to Apply Rules in Mail.app

I've created some rules in my Mail.app to change background color of specific messages And also I've created rules in the mail server to move specific messages to some folder For messages in the ...
0
votes
1answer
30 views

How do I find the application name to open a file using AppleScript?

I find the AppleScript method of opening a file convenient but often cannot guess at the application name to use when I do not want the default options. As an example, I have installed Foxit PDF ...
2
votes
0answers
19 views

How to fix «event coreslct» error?

I have an AppleScript source with this code: tell "Microsoft Word" «event coreslct» (last row of table X of document Y) insert rows selection position below number of rows Z end tell After ...
0
votes
0answers
30 views

Changing the font of selected text with AppleScript/Automator

I'd like to set up an Automator service to set the font face, size, color, and background color of the currently highlighted text in Microsoft OneNote, e.g. Consolas 11pt, black text, white background ...
0
votes
2answers
34 views

Applescript remote control volume

Wondering how to turn up the volume on my computer from another computer. set volume 4 of machine remMachine doesn't work Any suggestions?