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

learn more… | top users | synonyms (3)

0
votes
0answers
4 views

Applescript and iTunes: enable shuffle by song or album and play?

The documentation for shuffle/shufflable in the iTunes Applescript dictionary is really confusing, at least for me. As I read it shuffle seems to be a property of a playlist (not a state of the ...
1
vote
1answer
11 views

if application “Safari” visible is false then (AppleScript)

I would like to check if Safari is visible, my AppleScript code was this, but it doesn't work ... How can I check the visible with AppleScript? if application "Safari" visible is false then tell ...
0
votes
1answer
14 views

List of AppleScript and Automator resources for Windows developer new to OSX?

I'm a long time Windows developer (C, C#, Python) who finally made the move to the Mac. Now that I've figured out how to move around in Yosemite (loving it!), I'm itchy to start learning how I can ...
0
votes
1answer
16 views

Use AppleScript to play an iTunes Radio station vs. an iTunes Internet Radio station?

Looking for hints or a code snippet that will show me how to use AppleScript to play an iTunes Radio Station (with cover art, add to iTunes wish list, play more like) vs. playing an iTunes Internet ...
0
votes
1answer
13 views

Using Applescript to paste the current date into a range of Excel cells

I have a simple script written that successfully saves the current date in the format I need. I also have saved a destination range in the active sheet. I just need syntax to paste/insert it into that ...
2
votes
1answer
32 views

Applescript: Help to extract PDF “Author” metadata and set it in iTunes Author field

Using other applescript as template, I've been trying to modify this particular one to do the following task: Extract "Author" tag from a PDF file and write it automatically in the iTunes12 "Author" ...
0
votes
0answers
5 views

How do I a search with applescript cocoa that sets properties with actions

A little bit of context here, I have a text file which is compiled of all the computers and users of my network, its referenced so I can easily find and VNC into them. My regular applescript looks ...
0
votes
0answers
15 views

Using applescript to create spaces and launch apps

So the end goal of what I am looking to do is this: When I am at work I use an external monitor with my MBP. I have a consistent set of spaces and apps that I setup everyday. What I would like to ...
2
votes
1answer
44 views

How to replace all Finder files with a placeholder file for each

I have lots of files from a database which are to be copied to a new database, but the files for these are corrupt (They are zero-byte in size and contain no data). Rather than the new database ...
0
votes
0answers
16 views

AppleScript/Automator Add AutoCorrect Settings

I am making a AppleScript/automator script for April Fools that is going to change the AutoCorrect. I know that I can change the autocorrect settings by going to Settings > Text > '+' ...
0
votes
1answer
11 views

Launch Apple Script on App Focus

Is there a way to configure an Apple Script (or any script for that matter), to be run every time an application is focused? For example, if I am on Safari currently, and I tap on a QuickTime window, ...
3
votes
2answers
134 views

Script to change downloaded mac wallpaper automatically?

I want to change my mac wallpaper daily with microsoft bing images. I found this script that download the daily picture automatically, but I sill have to set the wallpaper automatically. Is it ...
0
votes
0answers
15 views

How can I programmatically read and write the texttone of a Contact in the OSX' Contacts app?

On the Contacts app (V9.0) of Mac OSX 10.10 Yosemite I want to read and write programatically the texttone property in some of my contacts. How can I do this with Applescript or another scripting ...
-1
votes
2answers
51 views

AppleScript for restarting to Bootcamp?

I have tried to use an AppleScript to reboot to Windows It's not going well though, as when I tried it the first time, a white screen appeared on startup and didn't go away. A hard reset rebooted to ...
0
votes
0answers
17 views

How to iterate through iCal events in Applescript

I am trying to iterate through the events in a calendar to copy them to another: tell application "iCal" set localEvents to events of calendar "localCalendar" set remoteEvents to events of ...
1
vote
0answers
11 views

How do I automate selecting files in a .jar file?

My .jar file has a number of buttons that, when clicked, prompts me to select a file to load. I need to find a way to get this file selection to be automated, and decided on applescript. ...
1
vote
0answers
27 views

Forcing application to go to selected window on startup

I run a multi-monitor set-up on a single "Desktop". All of my applications when opened run on the primary monitor, which is the smaller monitor. I would like to have some (e.g. browser, mail client) ...
0
votes
0answers
18 views

Automator script doesn't show up in services menu

I made an automator script to help me to assign LaTeX indexes to words in TexMaker. It would convert a highlighted word test to \index{test} test. This is the little script: on run {input, ...
0
votes
1answer
14 views

Problems with the command delete function in applescript

I have an applescript that I am using to clear out a huge folder. I can select all of the files but how can I indicate the "command delete" key while keeping all of the files selected? Basically after ...
2
votes
1answer
31 views

Droplet with a progress bar?

First of all, apologies for my ignorance on the subject. All of this ffmpeg and automation is new for me and sometimes I cannot see even evident things. I am learning command lines to encode videos ...
2
votes
1answer
29 views

Open application from terminal and remain linked to the process (like Linux) so when CTRL+C is sent to terminal the application closes too

I have an application (closed-source tool not developed by me) which requires another process to exist before executing properly. When I quit this application, I also want that custom process to be ...
1
vote
0answers
35 views

select a menu item of a window instead of a process using Applescript

I'm quite new to applescript (and a beginner programmer) and I've hit a dead end. I figured out how to access a menu item of a process but I do not know how to do it once I have multiple windows. ...
0
votes
1answer
20 views

Programmatically catch app opening / closing

Is it possible, via an AppleScript, a background service or daemon, or any other programmatic way, to catch the following events: a specific app (eg Aperture, Excel ...) being launched, an app being ...
1
vote
1answer
16 views

AppleScript Dialog gives error?

My AppleScript app on my computer gives a error. Here is the code: set file to display dialog "Open Script?" default answer "tests/helloworld.in" do shell script "cat " & file & " | python ...
0
votes
0answers
30 views

Mac Outlook 2011 - moving folders from On My Computer to Exchange Server

I've just noticed a very odd peculiarity about using Mac Outlook 2011 with an Exchange server. I am hoping to write a script that will allow me to highlight a folder On My Computer and move it onto ...
0
votes
1answer
11 views

My iPad unable to view subtitles

My iPad unable to open or view video online with subtitles. But when I open the same website with my lappy, the video and subtitles work well. There have something wrong with the website or my iPad?
0
votes
2answers
61 views

Automate Fn key switch when opening Excel

So Microsoft released a free preview of Office for Mac, and it is pretty sweet. One of my biggest problem when using Excel on a mac has always been that the most popular/frequent shortcut (F2 -> edit ...
1
vote
1answer
38 views

Simple 3 line applescript - Error -128

I have a scenario where I'd like 2 separate applescripts. The idea is super simple. 2 Applications, but only one runs at a time. Example: Close application 1, launch application 2 (and vise versa) ...
1
vote
1answer
39 views

IF statement doesn't work properly in osascript

I'm working on script which should do something if application is running or not Also there should be a timer of checking(60 seconds) The problem is that "if" statement which is checking "count" ...
2
votes
3answers
69 views

How can I automate pasting of password into SecurityAgent?

On OS X 10.8.x I had an Automator service set up to paste a password from clipboard into the password window that pops up for mounting an encrypted disk. I don't wish to store the password in my ...
-1
votes
0answers
9 views

Using variables in pathnames and pathname variable help plus finding username applescript?

So, I want to have my script to be able to find out the current user's username and store it in a variable (myUsername). Then, it will go to /Users/myUsername/Desktop/FV.app. How can I do this and ...
0
votes
0answers
30 views

Applescript to click green (zoom) button with Option down

Based on Applescript - the activate command makes application "half-active", I wrote the following Applescript which would allow me to click the green (zoom) button at the top-left corner of ...
1
vote
0answers
14 views

Help with Applescript to paste text into Word

I've just started using Apple Script and I was trying to make Word paste some text in an unformatted way. This is the code I am using: tell application "Microsoft Word" tell selection try set theClip ...
2
votes
2answers
29 views

How do I assign a keyboard shortcut to an AppleScript I wrote?

How do I assign a keyboard shortcut to an AppleScript? I found a script for automatically going back to the inbox in Office 2011.
0
votes
0answers
28 views

How to use Numbers to generate pdf on a web server and then email it out?

I have an issue. My client loved the report I generated using Numbers on Mavericks OS X. The bad news is that the data is being processed on a ubuntu machine running python and django. I want to ...
0
votes
1answer
28 views

Changing volume at command line using script/function

I found this nifty command which sets volume to 50% (or any level desired): osascript -e 'set volume output volume 50' I'd love to have a script or function that lets me type v 50 or v 30, etc. to ...
0
votes
0answers
41 views

Automatically sort Finder items based on file type?

I work in video production, when a new job comes in we use Post Haste to create a new directory with our folder structure and default files included. What I'm looking to do is automate the process of ...
1
vote
1answer
21 views

Apple script to toggle comment/uncomment in Script Editor?

I want Apple script which allows me to toggle comment/uncomment in Script Editor, using (* and *). I found this link, but it is not exactly what I am looking for. Can anyone help?
1
vote
2answers
28 views

In which .plist is the underscan setting stored?

I'm trying to write a script which changes the underscan value on my Mac mini, but I haven't found the .plist file containing the setting. Does anyone know where the underscan setting is saved?
0
votes
1answer
55 views

Can I generate a clickable link to local file using relative path like “file:///~”

This is the background: in my company, we use Google Drive and often have to tell each other the path to a particular file. Paths are long as we use a lot of nested folders, so it's pretty boring and ...
1
vote
2answers
87 views

Assistive Access when script is launched by agent

Problem Applescript run by osascript is not allowed Assistive Access when launched by agent (~/Library/LaunchAgents). Although it works when run from Applescript editor or commandline directly (using ...
0
votes
0answers
26 views

Unable to run 'display notification' using osascript in a tmux session

If I run the following command in Apple Script Editor directly, display notification "Hello, world" I can see a notification as expected However if I tried to invoke it via command line: ...
0
votes
1answer
20 views

How do I run a binary program without showing the gear icon?

I created a automator workflow, add a Run Shell Script part and put these lines in: /Users/xxx/Library/Android/sdk/tools/android avd I saved it as an app and it works. But I will always see a ...
1
vote
0answers
38 views

Start QuickTime and set camera to iPhone from command line

I'm attempting to start QuickTime from AppleScript and select the camera of my iPhone like I do from QuickTime. I can't seem to make it change the camera. The script I have now is: tell application ...
2
votes
2answers
69 views

Insert Character on batch folder rename

I have a folder that has several hundreds of thousands of files named like "ABC 123456". I need to add a dash after between the two blocks of text like this "ABC - 123456". Leaving the trailing space. ...
0
votes
1answer
36 views

Is there a way to get a list of all currently running program's window titles with AppleScript?

I'm looking to write a script which outputs a list of all the window titles of all the currently running programs. Is there any way to do this with AppleScript? I tried running the following code: ...
0
votes
0answers
39 views

AppleScript: Select a specific drop down menu item?

folks. I'm incredibly new to AppleScript...just starting to open up my world to coding, and thought I'd start here. (I did BASIC back in high school. haha) All I'm trying to do is set a font type ...
0
votes
0answers
16 views

Activate the frontmost Safari and run Javascript

I'm trying to run Javascript on the Safari, whose frontmost is true. tell (application "Safari" whose frontmost is true) to do JavaScript theScript in current tab of first window But I get an ...
0
votes
0answers
53 views

Run Javascript on specific Safari using Applescript

There will be many Safari browsers running in my machine. I want to execute the some javascript commands on specific Safari using the PID's. I have the code in applescript for it here: tell ...
0
votes
0answers
48 views

Yosemite Mail “Load Remote Content” from senders in my contacts

I would like Mail on Yosemite to load remote content from senders in my contacts and not for everyone else. I have remote content disabled now and I have pieced together an AppleScript to click the ...