0
votes
0answers
12 views

How to click on an exact element in chrome using apple script?

I know it's website specific, but i'm just having a hard time understanding exactly how the do Javascript function works. For example, say I have this site to vote on and i wanted to run an apple ...
1
vote
1answer
21 views

Script to check Software Version

Hi i'm tryin to write a script to check software version. I want to pass my own variables, which are name of the Application and Version. Here's a copy. It's not working for me currently... i'm a ...
1
vote
0answers
43 views

How can I permanently force Xerox secure printing?

My clients are printing direct to a network printer (no print server). Xerox have confirmed that the Secure Print Only option is only available in Windows, so I am looking at editing .plists, ...
0
votes
0answers
21 views

How to schedule Skype launch with AppleScript only on weekdays?

I need to launch Skype only on work days using AppleScript. How could I do this?
2
votes
1answer
32 views

String of variable has a space - how do I escape spaces?

I'm working on an applescript that pulls old Time Machine backups and places them into a new folder. But if the old computer name has a space in it, that causes an issue in the do shell script ...
2
votes
1answer
27 views

list box in applescript?

I'm trying to have users pick a department from a list box. And then that choice is stored in a variable as string. How can I do this? I have code written like this: set deptList to {"dept1", ...
3
votes
4answers
82 views

AppleScript: Press Enter Every X minutes If Terminal is Open and Application Has Been Idle for X Minutes

I am new to AppleScript and am attempting to use it. If I am using Terminal and if I have not pressed a key for x minutes I want my Mac to press the return key. It is to repeat this process every y ...
1
vote
1answer
125 views

Opening new Terminal.app window/tab with a certain profile from command-line or AppleScript?

When I login to my Mac, I want to automatically open a new Terminal.app window with a certain profile, say Monitor, that has a startup command and several appearance settings. I thought it would be ...
0
votes
1answer
60 views

How can you set up a free, universal OS X-wide ‘autosave’ script?

I want to set up a free solution in OS X for a universal ‘autosave’ function (given Apple’s own solution is limited to only a few apps - at least for now), and let Dropbox do my file versioning and ...
1
vote
1answer
29 views

How do I tell AppleScript to read the contents of the “Network” Finder window?

I'd like to be able to get the contents of Finder's "Network" folder (Menubar-->Go-->Network). The folder contents here is different than /Network or /net. The overall goal is to grep the names in ...
0
votes
3answers
72 views

Applescript - Unable to find resource when inside application

I have a regular Applescript application bundle that executes an applescript file when it's run. I'm trying to run a shell file that is located at "/Contents/Resources/Data/df.sh", however with the ...
1
vote
0answers
52 views

Third party apps can't call applescript that otherwise work in 10.9

I am invoking my apple script from third party executable(C executable). Here is the applescript: on run argv do shell script ("open -n /Applications/Test.app/ --args " & "'" & item 1 ...
0
votes
1answer
22 views

Naming Folders usin

Is there a script that allows one to insert text from the clipboard into the name field of a new folder? I would like to name a new folder or change the name of a folder using the last text clip.
0
votes
0answers
36 views

Export reminders from osx Reminders app programmatically

I need to get reminders list in any form (could parse it later) from Reminders app in osx (10.9.1) I know that i could do it from menu, but i need it programmatically. Perfectly it would be some ...
1
vote
0answers
24 views

Automatically reduce MacBook brightness on connecting to external display?

I would like my macbook to reduce its screen brightness to zero when I connect it to an external display. I know there's no such setting, but how would I go about writing a script that would do that? ...
0
votes
2answers
57 views

Universal path in Terminal

I'm writing an AppleScript that will allow me to copy the Time Machine folder from an external drive and paste it onto the user's desktop of their Mac. The reason I'm doing this is because when a time ...
0
votes
1answer
38 views

Error with AppleScript - Integer?

I have been making a simple script for my sister, but it does not work. It calls for an integer? I did not specify it in my program, but it calls it anyway...? My Script: activate display dialog ...
2
votes
2answers
252 views

Automator app with a menubar icon

I've created an application with Automator. I want to have a new icon in the menubar like this: Which starts the app when I click on it. Is it possible? (without using Xcode) PS: I don't ...
1
vote
1answer
166 views

How do I focus a specific window with applescript without doing an activate and bringing other windows to the front?

I'm looking for a method w/ AppleScript to select/focus a specific window of an application without actually doing an "activate" which brings all windows to the front. Here's what I have so far: ...
0
votes
0answers
17 views

AppleScript to get all tracks from albums with less then a certain number of tracks

How would I write an AppleScript to get all tracks from albums with less then n tracks in iTunes?
1
vote
1answer
99 views

How to create Mac OS X global hot key to open .txt file in MacVim.app at vim 'mark'?

Can and how can I create Mac OS X global hot key (possibly mapped to an OS X service, like what OmniFocus and Fantastical offer to make new entries in their inbox/calendar, respectively) to open a ...
0
votes
0answers
36 views

Making an Auto-Transfer app or script for Android

This question may be super broad so bear with me. In a nutshell I want to be able to connect an Android device to my Mac and then have a script go through, find the DCIM folder and then copy that ...
1
vote
1answer
165 views

how to add button to Finder toolbar to call python script with current folder as argument?

Recently I added context menu under services to execute python script but I think it would be convenient if I add a button on the Finder toolbar, like next to New Folder Button in below image. Is ...
2
votes
5answers
205 views

Set Services keyboard shortcut via script OSX

I need a way to set the following programmatically: Specifically for shortcuts under Services, if that makes a difference. I'm wondering if this is possible via shell or AppleScript? EDIT: I've ...
1
vote
1answer
84 views

how to capture folder as input and pass it to python script as argument

How to capture folder as input and pass it to python script as argument? This is what I have so far, but this is always taking the user home directory as input no matter which folder i right click > ...
3
votes
2answers
181 views

Can AppleScript be used to downloading files from a web page?

I want to write a script that searches a web page for an updated file, then downloading it when detected. There is no command I have found that does this, accept Automator's download URL function, ...
2
votes
1answer
79 views

How can I rename an ordered list of files with an ordered list of file names?

I have a series of files. I need to apply a series of file names. So, 001.jpg -> apple.jpg 002.jpg -> banana.jpg 003.jpg -> orange.jpg etc. I will have to repeat this for each of 16 folders with ...
1
vote
2answers
266 views

AppleScript and Finder - How to detect an “empty” selection when copying paths to the clipboard (Expanded Question)

I'm trying to build a Service that does the following: If some folder/files are selected in Finder, copy (all) the paths to the clipboard If nothing is selected, copy the "Path" of the window. ...
2
votes
1answer
421 views

Applescript to copy folder (and contents) to current location?

I am trying to create a button on my Finder toolbar powered by applescript to make a copy of a set folder (e.g. /Users/James/doc) and all files/subfolders within it to the current location in Finder. ...
2
votes
1answer
65 views

Why does “if exists” fail with a false positive?

The file, "Test.file" in the below code does not exist, yet the script returns true. Why? What am I doing wrong? set thePath to (path to application support folder from user domain) if exists ...
1
vote
1answer
40 views

Getting the lower variable

In applescript I have 4 variables, each one with its number. I'd like to have a function that tells me which variable is set to the lower number. EG. set one to 12 set two to 55 set three to 2 set ...
0
votes
1answer
77 views

Windows positioning with applescript

I want to set the position of some windows to certain coordinates. In particular I have 4 possible positions that those windows should have. For example if I have 4 windows opened I want them to go ...
1
vote
2answers
72 views

Escaped path in AppleScript adds leading /

I have the following AppleScript that I am trying to debug: tell application "System Events" set theResult to (do shell script "sqlite3 ~/Library/Application\\ Support/Dock/desktoppicture.db ...
2
votes
1answer
33 views

Best way to distribute script with low friction

I have helped a few friends recently with fixing a problem on OS X and I would like to turn it in to a script so I can send it to people instead of walking them through it. It consists of two steps: ...
2
votes
1answer
1k views

How do I give accessibility permission to my AppleScript and System Events in Mavericks?

I've got this old AppleScript that uses a mouseclick function: activate application "Safari" tell application "System Events" tell process "Safari" click at {424, 699} end tell end ...
0
votes
1answer
274 views

Get Current Path to Script within AppleScript and Append Subdirectory

I have an AppleScript that I would like to be able to use from anywhere in the file system. Currently, it has some paths which are hardcoded, so it runs only from the Downloads folder. How should I ...
2
votes
1answer
441 views

Change the icon of an applescript-called notification

With OSX Mavericks we now can make notifications with applescript pretty easily. However, there doesn’t seem to be a way to change the icon that appears to a custom one. Is there a way to accomplish ...
0
votes
1answer
38 views

How to create a record at the runtime in applescript?

I would like to create a variable of type record at the runtime, I found this could work: set bcd to run script ("{" & "abc" & ":" & "def" & "}") But it doesn't: error "The ...
0
votes
1answer
40 views

Is there in AppleScript any way to use “X of every” to get multiple properties of each object to create a record?

It is possible to with the script: tell application "Safari" set urls to URL of every tab of every window end tell when execute, get all urls of every tab of every window (two dimensional list) ...
1
vote
0answers
115 views

Disable copy/paste for an OS X application

I would like to disable copy/paste for an app to protect sensitive information displayed in it. I don't have the app source code. I'm already aware of this general solution: ...
0
votes
0answers
52 views

Microsoft Word 2011 - Enforce All Documents read only mode

My use of Microsoft Word is often just reviewing documents - I often don't want to edit them, I mark my reviews separately (on our issue tracking tool). I know I can open a document in Microsoft Word ...
1
vote
1answer
265 views

A turning gear appears when I run this workflow, why?

I am running the following script (called Restart AppleTV) using automator : on run {input, parameters} do shell script "sudo killall coreaudiod" with administrator privileges return input end ...
2
votes
2answers
339 views

How to swap command and option modifier keys with a script in OS X Lion

I use a PC usb keyboard with my macbook. So, I've gone into System Preferences > Keyboard > Modifier Keys... and swapped command and option for the usb keyboard. This puts those keys in the ...
1
vote
1answer
200 views

Launch App with Automator when system is idle

My idea is to dim the display when the system is idle for 10 seconds, and with a keystroke or trackpad activity revert to original (I want to preserve battery automatically and not using a screen ...
6
votes
2answers
3k views

Run AppleScript from bash script

If I wanted to run an AppleScript from within a bash script I could call a file with the list of commands that I require to execute. #!/bin/bash {some commands} osascript file.scpt {other commands} ...
4
votes
2answers
698 views

Bash Script that will start up second Terminal process?

I need a script that will be able to fire up a second Terminal instance and pass a command directly to that one whilst it continues it's own executions. It's to start up Python script that will host ...
1
vote
0answers
104 views

Script to make the x red button kill the app

Quick background: new mac, long time windows user; not scared by linux and scripts. I am currently using RedQuits to make the x red button quit de app, not just close the window. It is a great ...
1
vote
2answers
55 views

Boot straight into an application without showing the desktop

How do I boot straight into an application without showing the desktop? Essentially I would like to turn the machine on, see the grey screen with loading icon, and then see my application. The ...
2
votes
1answer
80 views

Removing only birth years from a group in my Address Book

A lot of my contacts (600+) had somehow got their birth years set to 2000. Their birth months and days are correct, but the 2000 is wrong. With the tremendous help I got here, I was able to get them ...
1
vote
1answer
209 views

How can I change Contacts.app custom labels automatically using AppleScript?

Is there a way to change the current labels in Contacts.app to custom ones using AppleScript based on a specific criteria? Here is what I mean: I need the script to go through my contacts to change ...