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
1answer
228 views

iTunes 12: How to cycle through View Options with script/shortcut?

I'm trying to writing an applescript that cycles through Songs, Albums, Artists, Composers, Genres, and back to Songs. There is nothing in applescript Dictionary with regards to this, so I have to ...
0
votes
1answer
105 views

How to periodically run a script/command when a specific application is being used?

I would like a certain applescript to run every 10 seconds but only when a specific application is being used (i.e. both being the front application AND the mouse or keyboard being used in the last ...
0
votes
1answer
26 views

AppleScript to Delete Folder

I was wondering if anyone can give me some advice on how I can use apple script to delete this folder? Users/user1/Library/Application Support/Skype/tankitan
0
votes
1answer
165 views

Focus most recent window of pid without requiring accessibility approval

I currently use this AppleScript to try to set focus to the most recent window of a PID, in example here my pid is 450. tell application "System Events" set frontmost of the first process whose ...
0
votes
1answer
458 views

Get the process id of the app, which called the service

I have an service in automator, which is binded to the Safari ,no input option. Now is there any way for the service in automator to get the process id of the Safari, which called it ? New to ...
0
votes
1answer
293 views

Automator: How to send an email to multiple recipients with Font colour and attachment image?

I have done a program of 'Send-Email-To-Multiple-Recipients' in Automator as see an attachment image below. But, it does not work to retain font colour of texts in a message body within this ...
0
votes
1answer
222 views

Problem With the Click Command - AppleScript

I'm trying to do some GUI scripting with AppleScript but every time I try to use the click command, it will work but cause an error. If I use a try statement it works fine, but I shouldn't have to do ...
0
votes
1answer
622 views

Grab the “Active” Window in Applescript

I have a script which perform the following: Load a file into a program (Subler — done separately, not in this script) Confirm the loading of the file (this is where the script begins) Saves the ...
0
votes
1answer
447 views

Where does Applescript Event Log go when run under Launchd?

Or, how to log from an AppleScript (saved as application) and/or view the Event Log? None of the AppleScript's log statements can be found. I have tried adding the following to the launchd plist: ...
0
votes
1answer
51 views

Banning domains temporarily from local access

I need to control myself. So far, I was using a Windows device for work, where I would simply reroute Facebook, news sites and similar to 127.0.0.1. In near future, I will have to use the same device ...
0
votes
1answer
533 views

How do I get system_profiler output from a lot of machines in a network?

I need to have a script that will execute "system_profiler -detailLevel full" command in a remote mac machine. While this is going on, the user on the remote machine should not know that there is ...
0
votes
1answer
101 views

Search for a folder using applescript

I am trying to make a folder to go on a server, that people can add photos to and then the script sends them to the correct place, however I'm having trouble with the search part. As you can see ...
0
votes
2answers
145 views

Is there a way to extract contents from AppleScript file without using AppleScript editor?

I have a bunch of applescript files I need to run but some that were running yesterday are not running today. Applescript is showing me this beautiful message. When this message is shown, console ...
0
votes
1answer
228 views

AppleScript to save active Microsoft Word document IFF there is one

I use this with Keyboard Maestro to automatically save the front-most document in Microsoft Word whenever Word deactivates: tell application "Microsoft Word" if it is running then save ...
0
votes
1answer
759 views

Running second Google Drive Crashes constantly on OSX Mavericks

I have been trying to get a second instance of Google Drive to run under another user on my MBP running Mavericks. I have been following the instructions here ...
0
votes
1answer
203 views

Why does this AppleScript not run in Outlook?

I would like set up an inbound rule in Outlook to run applescript on certain messages. However the rule fails with the following message: While processing message "Test" (ID 39523), the rule ...
0
votes
1answer
230 views

How can I locate in iPhoto an image selected in the Finder?

This is essentially the reverse of this question: given that I have selected an image in the Finder, is there an applescript or similar tool which will open iPhoto and highlight this file in the ...
0
votes
1answer
652 views

How Can I Copy files to a Mounted Drive using AppleScript?

In what way can I copy home folders (Documents, Pictures, Movies, etc...) to a mounted drive without using the POSIX function in AppleScript?
0
votes
1answer
87 views

Mail rules with Script Warning message

I am getting so fed up with this: It is too real not to make the mistake in a moment when I am not fully on alert (and to be hones that stresses me out), and I want to use my powerful Mac to ...
0
votes
1answer
25 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
2answers
78 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
2answers
420 views

script copy sender(s) email address only to the clipboard

I am a blind voiceover user of mac. The new Mail.app makes it difficult to copy the sender's email. I would like to have a script which copies the sender email only, of one or more selected ...
0
votes
1answer
290 views

AppleScript counts multiple Mail messages

In this AppleScript on Mavericks: tell application "Mail" activate set viewer to the first message viewer set msgList to selected messages of viewer end tell set msgCount to 0 repeat ...
0
votes
1answer
148 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 ...
0
votes
1answer
733 views

Printer Setup Utility gone in Mavericks, how to set default printer in Applescript now?

I have some Applescripts that set the default printer using "Printer Setup Utility", that seems gone in Mavericks. Anyone have an alternative to suggest?
0
votes
1answer
1k views

AppleScript - “Close tabs to right of current tab” in Safari 7

I have been using the AppleScript below as an Automator service in order to get Safari to close all tabs to the right of the current tab. However I have updated to Mavericks (10.9) and find that this ...
0
votes
1answer
219 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) ...
0
votes
2answers
109 views

How do I save a screenshot with the ISO 8601 date format with Applescript?

I am building a script that saves many consecutive screenshots. I would like to save the files in the ISO 8601 date format.
0
votes
2answers
679 views

AppleScript: Find all instances of “Folder” and list the contents in a drop down box/list

I'm trying to make a script I can use to find all instances of a folder, be it on the root drive, external drive or mounted networked storage, and list all the contents in either a drop down box or a ...
0
votes
1answer
73 views

How can I make a .command file that I can share without giving permissions on each computer?

I have a terminal command that I would like to run. telnet 169.254.216.127 54326 Ideally I would like to convert this into a .command file and be able to share it with many other mac users ...
0
votes
1answer
71 views

Applescript sub-procedure problem

I would like to display a comma-delimited list of values in a List. Unfortunately, I get an error that reads Microsoft Outlook got an error: Can’t continue joinList. when I attempt to use the ...
0
votes
1answer
364 views

Applescript - Run Multiple Instances of an App in Mac OSX

I was hoping one of you kind folks could help me write a script that would open another instance of Transmission. From my online research, I took a stab at making my own and compiled the following ...
0
votes
3answers
2k views

How Can I Create a Multi-Line Input Dialog using Applescript?

How can I create a multiline text input dialog using Applescript? Creating a single line dialog is simple...
0
votes
1answer
633 views

How do I remove the Finder from the Dock automatically at login?

This is related to this question here, except that, in addition to removing the Finder, I want to do it automatically. There are several solutions on the web that suggest using this AppleScript: tell ...
0
votes
1answer
111 views

Applescript, quit app if other app is quit

I have a (very basic) apple script that I use as a trigger to start and hijack Plex, using Audio Hijack Pro. tell application "Audio Hijack Pro" start hijacking session named "Plex" end tell tell ...
0
votes
1answer
80 views

How do I add a custom field to the login dialog?

When the screensaver has been disturbed, or the computer wakes from sleep, my system asks for a password. I would like to add to this dialog. Along with username and password, there would be a third ...
0
votes
1answer
3k views

Permission denied for symbolic link

I'm creating a symbolic link with the following applescript: on run do shell script "rm /usr/bin/ant" with administrator privileges do shell script "ln -s ...
0
votes
1answer
309 views

apple tv ssh script automation

I have a Apple TV 2nd generation that is jailbroken and I run xbmc on it. At times it gets hung or freezes up. At that point, I open up the terminal on my macbook and run this script. ssh ...
0
votes
1answer
94 views

Any way to add Lion full-screen feature for TaskPaper by AppleScript?

I am using TaskPaper and, unlike most Mountain Lion apps, it appears that there is no way to make it go full screen. Would it be possible to use an AppleScript to make it go full screen in the same ...
0
votes
2answers
1k views

Compress files with the output name same as Parent Folder with Automator

I've been searching the internet for a solution to this. I would like to create an Automator workflow that will zip the selected files, name the zip the name of the Parent directory and save that zip ...
0
votes
1answer
44 views

Is it possible to show custom icons in the Scripts menu?

You know that "scripts" menu you can show in the right side of the menu bar? It's very useful. I'm talking about this menu: I've set some custom icons for the files in the scripts folder using the ...
0
votes
1answer
238 views

Swap Mouse Button using AppleScript

I use mouse with left-hand. My system is shared with other people who are right handed. So, I need frequently to switch mouse button. I would like to know how to swap mouse button using AppleScript? ...
0
votes
1answer
154 views

Set environment variable for the process before startup [duplicate]

I have the following situation: I have Mac OS bundle with application which uses some 3rd party dylib's and those dylib's depend on some env variable, let's name it ENV_VAR. I want to set ENV_VAR to ...
0
votes
2answers
157 views

How do i automatically send ebooks to my Kindle?

I would like to create an automation, that automatically sends a new file to my kindle email address if i put a new ebook into that folder. How would a script look like, that i would have to apply to ...
0
votes
2answers
103 views

What is the maximum amount of file arguments I can pass to a command?

If I do this in OS X, what is the maximum amount of files I can test? Or is there a maximum length for this string? do shell script "md5 -q 'path/to/file1.txt' 'path/to/file2.txt'"
0
votes
1answer
237 views

How do you set the selection in iTunes in an AppleScript

I'm writing a script in iTunes, part of which changes the selected playlist. When I'm all done, I want to restore the playlist and the selected tracks. I was able to do the first, but haven't found a ...
0
votes
1answer
3k views

Searching for items in list

I'm trying to search within a list of items (specifically, a list of files from a folder) for certain files. However, I don't know the names of these files; all I know is that they all begin with the ...
0
votes
1answer
323 views

Automator: start embedded YouTube

So, I need to show some kids a sequence of YouTube videos (with Automator, because there's no one available to man the computer for 30 minutes), but it's at a school where the YouTube domain is ...
0
votes
1answer
290 views

Applescript and Fantastical

I trying to add a Fantastical event with AppleScript. Aparently the Fantastical Suite is quite simple as there is only one verb. parse sentence v : parse sentence parse sentence text : sentence ...
0
votes
2answers
956 views

Applescript dialog, Bash alias/function

I'm trying to create a short alias for creating System dialogs from the Terminal. I tried to create a Bash function (since an alias didn't seem to take arguments) and add it to my .bash_profile, but ...