Questions tagged [applescript]

AppleScript is an end user scripting language that has been available in Mac computers since System 7 Pro (7.1.1). It allows for automation of system tasks, communication between processes, and creation of workflows, amongst other functions.

AppleScript is a inter-application scripting language, designed to control and exchange data between scriptable applications. Users can use AppleScript to combine the functionality of multiple scriptable Mac applications to form a new application to meet their special need or demand without "reinventing the wheel".

Resources

8740 questions
2
votes
1 answer

AppleScript throwing errors on curly braces in string

I'm trying to generate a shell script in AppleScript. When using the following pattern: set tDur to "PT1H21M7S" set tSh to "echo '" & tDur & "' | egrep -o '[0-9]+M' | sed s/M// | sed -e :a -e s/^.\{1,1\}$/0&/;ta" ...I get the error: Expected “"”…
dave_d
  • 159
  • 1
  • 9
2
votes
0 answers

OSX application permissions only allow them to be opened by one user account

I have written a very basic AppleScript application which should connect our users to the network shares whenever they execute it. I want to be able to put this in everybody's Applications folder so it is accessible to whichever user logs in. tell…
ryansin
  • 1,735
  • 2
  • 26
  • 49
2
votes
1 answer

find current wallpaper path and show original image in finder

I do have the following two applescripts which are doing the same thing in different ways. The scripts are finding and displaying the path and the image name of the current wallpaper on OS X Yosemite 10.10.3 and then showing the original image in…
afrikapit
  • 29
  • 1
  • 9
2
votes
1 answer

Search a custom property

I am using AppleScript to search through a bunch of my contacts, with a specific (custom) property. Here is my code: tell application "Address Book" set allPeople to every person whose last name = "CERTAIN_LAST_NAME" get properties of item 1…
Rushy Panchal
  • 16,979
  • 16
  • 61
  • 94
2
votes
1 answer

How can I call brew from an Applescript

I'm trying to create a script to check if Homebrew is installed on any given mac and in case it is if it has a particular formula installed. I have the part that checks if brew is installed, but when I try to run brew list to see what packages are…
Samssonart
  • 3,443
  • 3
  • 31
  • 41
2
votes
1 answer

How to send a Cocoa Lumberjack log file in email from within an OSX application

I have been trying to send a Cocoa Lumberjack log file through email from within my Mac OSX application, using apple script. Is it possible to do this? I have a problem with being able to use applescript to get the attachment out of the correct…
Justin
  • 33
  • 2
2
votes
2 answers

Applescript changes?

I have a problem with an applescript on an iMac I am upgrading at work, this is below, it stops at: error number -1719 from text field 1 of window 1 of process "QuarkXPress" The full script I am trying to run: try tell application "FileMaker…
mazmorbid
  • 41
  • 4
2
votes
2 answers

Applescript mystery: A scientific notation conversion subroutine

I have a bit of a mystery on my hands. I found a subroutine (http://macscripter.net/viewtopic.php?id=27520) to convert a scientific number into a string of digits. However, it seems to delete the remaining digits, no matter what I…
2
votes
1 answer

Applescript error "invalid key form" when run

I tried to run this applescript: tell application "Finder" duplicate POSIX file contents "/Users/xx/Desktop/xxxx/" to POSIX file "/USB/" with replacing delete POSIX file contents "/Users/felix/Desktop/xxxx/" empty trash end tell but…
Felix
  • 128
  • 1
  • 12
2
votes
2 answers

How to use Mac synthetic voice called from VBA code (through MacScript) to read non-Latin characters (Greek)

I'm facing a problem when trying to call AppleScript (MacScript) to read out aloud non-Latin characters from VBA on Mac Excel 2011 (e.g. text in specific Excel cells). The following code line is working fine to read French text using the synthetic…
Ivo Meyer
  • 31
  • 5
2
votes
4 answers

Access built-in Power Manager? states

Im trying to write a super simple applescript that will launch the OneDrive App, or ensure it is open, whenever the machine's power source is set to plugged in, and will quit, or make sure is closed, when the power source is set to battery. I'm…
Francisco Aguilera
  • 3,099
  • 6
  • 31
  • 57
2
votes
3 answers

Create an image annotation tool with AppleScript and Automator

On Mac, is it possible to use AppleScript/Automator to show a preview of an image in the background, while the Automator app is running? I have hundreds of images to which I want to add meta data so that they can be displayed on a web site. My plan…
James Newton
  • 6,623
  • 8
  • 49
  • 113
2
votes
1 answer

making an Objective C program respond to applescript

I have an Objective C program, and I'm trying to add scriptability. I have read the docs, and I've seen the SimpleScripting examples. so, I have two questions: 1) Am I correct in saying that every (non-standard) command is going to need it's own…
Brian Postow
  • 11,709
  • 17
  • 81
  • 125
2
votes
2 answers

Change the name of the Mounted Drive on Mac OS X using applescript

I am mounting a drive on mac os using applescript. tell application "Finder" try mount volume "http://user:pwd@196.145.75.18/mydrive/page.apsx/webdav" end try end tell I am getting drive name as 'webdav' and on the sidebar in shared…
Arun
  • 31
  • 1
  • 3
2
votes
1 answer

AppleScript: How to create and communicate with a singleton Terminal.app window

I want to programmatically create one and only one Terminal.app window that's uniquely identified by a literal Terminal.app window title (let's call it 'MyConsole1') and send bash commands to said window for the life of the Terminal.app process. Can…
Johnny Utahh
  • 2,389
  • 3
  • 25
  • 41
1 2 3
99
100