AppleScript is the Mac OS scripting language.
1
vote
3answers
724 views
Can Automator or Applescript copy the number of items in a folder to the clipboard?
In Automator or Applescript, is there a way to get the number items in a folder and save result to the Clipboard or Automator Variable so I can use it in the next Action?
2
votes
2answers
275 views
AppleScript to logoff Mac user after closing an application?
I've configured a local user account on an iMac (Lion) to immediately launch Firefox to a specific page after logging in – the page contains a survey to be completed by the user. This works fine.
...
0
votes
2answers
68 views
Can AppleScript/osascript be used to click menu extra menu items?
I have an application installed that only appears in the menu bar (as a menu extra to the right). I would like to click one of the items contained in its menu via osascript. I've found the following ...
0
votes
2answers
228 views
OS X switch to single monitor mode?
I have an extra monitor hooked up to my iMac running Snow Leopard. This additional monitor is also used by my linux box, so I occasionally switch to VGA mode when I need to use the linux box.
My ...
3
votes
1answer
775 views
Applescript create event in calendar, how do I remove the default alert?
Running 10.8 Mountain Lion, I'm trying to create a new event with Applescript like this:
set theDate to (current date)
tell application "Calendar"
tell calendar "Calendar"
set timeString ...
3
votes
1answer
300 views
How can I run an AppleScript or shell command on Mac OS X at screen unlock?
Note that this is not the same as startup or login. I never log out of my machine and I want to run the script whenever I unlock the machine to start working.
2
votes
1answer
1k views
How to open a new Firefox window with URL argument
I am trying to upgrade the existing answer
How to open a new Firefox window with Terminal
to accept a URL as an argument and open a NEW Firefox window.
I can use
open -a Firefox ...
2
votes
1answer
436 views
Set OS X application preference to stop prompting for admin password
I am trying to write an applescript that sends some actions to an application (specifically waterroof). The problem is, the application periodically asks me for the admin password when I open the ...
2
votes
1answer
375 views
OS X Lion: AppleScript unbearably slow for moving Mail messages
I've been using for years now the following applescript, triggered via iKey by an F12 keystroke:
tell application "Mail" to move (get selection) to mailbox "Archive"
I'm using it to move inbox ...
2
votes
1answer
552 views
Different Wallpaper if two monitors are attached
I am working on my MacBook Pro. In the office I have 1 27" Monitor attached to it, at home I tend to work without an second monitor. For that setup I want to change the wallpaper if no 2nd monitor is ...
2
votes
1answer
602 views
Save as PDF to Folder Script for Apple Mail
I want to add a script to a rule to auto-print messages as PDF to a specific Folder.
What I found was this: http://is.gd/acmsE but it doesn't work for me on OS X 10.6.
I already know the Save to PDF ...
2
votes
1answer
658 views
Save and reopen Spaces configuration in Mac OS X
Let's say that I am working using several spaces. In one of them I have 20 applications opened with their respective files. My computer crashes and I have to open everything again.
Instead I want to ...
2
votes
1answer
78 views
Are Snow Leopard text substitutions scriptable?
I prefer using typographical quotation marks when possible, so I love the Smart Quotes part of Snow Leopard’s text replacement feature. But there are a few cases in which I need to toggle it, and it’s ...
1
vote
1answer
102 views
OSX script to Check if ffmpeg process has stopped
I have a Automator Workflow that uses Videobox to convert flash videos for multiple devices but cannot tell when it finish a conversion,I know that it uses ffmpeg for its conversion as I can see it in ...
1
vote
1answer
93 views
Applescript to shell script watch folder
I am trying to setup a watch folder so that when a file is added to a folder, I can run a shell script...for this purpose I made a simple test but cannot make it work...
Here is my applescript
on ...
1
vote
1answer
73 views
iTerm 2 change row size using AppleScript
I want to change the height of my terminal window using a script. Currently this is what I have come up with:
tell application "iTerm"
activate
tell the current terminal
tell the ...
1
vote
1answer
166 views
How can I pause growl notifications via Terminal/Shell?
I was wondering if there was a way I could pause (hide) growl notifications from the command line? Failing that, is there a way to do this with an AppleScript?
0
votes
1answer
26 views
Applescript to play Windows share (smb://) videos with VLC Player
I'm building a script to automatically run videos held on a windows server using VLC. I can get VLC to play files on my drives, but not from files held on a server. For example:
tell application ...
0
votes
1answer
26 views
Applescript to execute script in new terminal window and maintain a reference to that window
How do I use applescript to execute a script in a new terminal window and then close the window?
After the line:
set x to do script ""
Is there a way to get a reference to the window of tab x? A ...
0
votes
1answer
49 views
Apple script/app to give me a reminder when I shut down
I have two network drives which I leave running for backups - they are a bit sensitive to being simply powered off - I need to log in to the drive and tell it to shut down first. Sometimes I shut down ...
0
votes
1answer
940 views
Get parent of folder in AppleScript
I am writing some AppleScript in an Automator workflow, and I need to get the parent folder of a file (or folder) object. I have searched all over for this, and gotten the same answers, which are to ...
0
votes
1answer
104 views
Resume Execution from where a function left -Applescript
I have an app coded in Applescript where a dialog pops up with three buttons: {Help, Add, Subtract} .
When user taps the Help button, a dialog should popup displaying information about the app.This ...
0
votes
1answer
198 views
Applescript to Windows script (VB or java)
I want to have a button in Powerpoint (2003) and have it open iTunes to a specific playlist and start playing using AppleScript
tell application "iTunes"
play playlist "iTunes DJ"
end tell
...
0
votes
1answer
291 views
Using AppleScript to Enable Snow Leopard's Text Replacement Feature
I currently use Quicksilver with a Plugin and Trigger in concert with Snow Leopard's text replacement feature (for frequently-used combinations of hashtags, due dates and other parameters) to quickly ...
0
votes
1answer
717 views
Inserting Keynote slides into a Pages document
I have a number of training documents which are formed from a word processor file and a slideshow. I'd like to be able to keep them together ideally by inserting the slides from Keynote into Pages. Is ...
0
votes
1answer
370 views
iDVD Random Transitions
I am creating a dvd slide show using iDVD and I see how to add transtions manually but what I would like to do is have iDVD insert random transitions for me. Is this possible?
4
votes
0answers
594 views
Folder actions on OS X observing all subfolders
I have a folder that I would like to add a folder action to. The action works great when the file is added to the top level. But when a file is added to and sub-folders, the action is not enabled. Is ...
3
votes
0answers
163 views
iTerm2: How to get output of a shell command with applescript
I want to get the output of a shell command run through iTerm2's applescript into an applescript variable. I tried the following but it does not work:
tell application "iTerm"
activate
try
...
2
votes
0answers
58 views
Applescript Adobe Updater
So, I am new to Applescript editor and I am trying to write code to automatically update computers.
For some odd reason I can not seem to get Adobe to update successfully.
I tried using Accessibility ...
2
votes
0answers
278 views
Applescript to connect to bluetooth device
I'm trying to create an applescript to allow me to connect to a bluetooth device by it's Bluetooth ID.
So far, i've managed to get an applescript to turn on bluetooth if it's off. Here's the code:
...
2
votes
0answers
168 views
Script to join WPA2 Enterprise wifi
When I head to work with my MBP running OSX 10.7, I have to go through this series:
Join Other Network
Enter SSID
select Security = WPA2 Enterprise
generate a pw via my RSA soft token
Join
...
1
vote
0answers
22 views
LaunchAgent plist to keep an app running and hiden
I'm using the following script
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN"
"http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist ...
1
vote
0answers
68 views
Trying to re-direct emails as plain text using Applescript. Code (inside) isn't working, any help would be great
I have users sending mail through Outlook which formats the text as Rich text. I'm trying to create script where a "catch-all" email address intercepts the email, converts it to plain text then send ...
1
vote
0answers
602 views
Pass arguments to osascript via shell function in OS X Mountain Lion
The answer in How to open a new Firefox window with URL argument is broken in Mac OSX Mountain Lion (10.8.2). I can't comment on that answer or question, so I had to create a new question.
It fails ...
1
vote
0answers
102 views
Add a contact from an email address within email text
I came to Office/Outlook 2011 from Mac Mail, and now I find that I'm unable to do something that I need to do ALL THE TIME.
In Mail, if there was an email address within the text of an email message ...
1
vote
0answers
121 views
Switch between Tabs with Applescript
I have a cocoa-applescript application whose GUI interface has 3 tabs.The identifiers for these 3 tabs are "item 1" "item 2" and "item 3" respectively.
Tab1 is the default tab with a form on it. Tab ...
1
vote
0answers
104 views
Desktop Picture Placement
I made an Automator app that changes the desktop picture to whatever image file you drop on its icon. It used to work perfectly until Snow Leopard. Now the image placement always resets to Full ...
1
vote
0answers
125 views
process pdf attachments with applescript and pdfpenpro
I've set up a gmail account that will contain nothing but emails with pdf attachments. I've also set apple mail up to check this account. Now, I would like to set up an applescript to take the pdfs ...
0
votes
0answers
28 views
Outlook emails per category per week over last year
I have categorize and archive almost all emails I have received over the past year. I want to know which categories are trending up in volume and at what rate.
Is there anyway to query Outlook 2011 ...
0
votes
0answers
29 views
How to open a new tab in Chrome using AppleScript, only if it doesn't already exist?
I'm trying to write a little AppleScript to make a new tab in Chrome only if it doesn't already exist. I tried the following:
if title of tab is not "Gmail" then
open location ...
0
votes
0answers
22 views
Service created by Automator to controll iTunes is not working all the time
I'm using Mac OS X 10.7.5 (Lion) and iTunes 11.0.2 (26).
I was searching for a global hotkey to skip a track back and forward with 5 second, but I couldn't find it. After that I saw that how we can ...
0
votes
0answers
31 views
Forced TimeMachine backup to a network TM DISK of specified folder following shutdown command for each of 22 networked computers using Mac OS 10.8.x
I have a 22 computer LAN, wirelessly connected.
Each user has their own identity, user name, and unique password. I wish to FORCE a TimeMachine backup of a specified named folder ON EACH DESKTOP, ...
0
votes
0answers
38 views
AppleScript currency conversion in Word and QuarkXPress
I'm new to AppleScript and attempting to automate one of the more time-consuming tasks that I do on a day-to-day basis: currency conversions. I work in the editorial department of a publishing ...
0
votes
0answers
93 views
Read message content from Messages.app on OS X using AppleScript
I'm trying to integrate unread messages (from iMessage) to my desktop with GeekTool. I need a way to extract the message contents using AppleScript.
I can't seem to find the definition to get the ...
0
votes
0answers
148 views
Adding an event listener with applescript
Migrating question: http://stackoverflow.com/questions/12023396/adding-an-event-listener-with-applescript in hopes for results.
I am trying to do a little hack with the Messages application on OSX ...
0
votes
0answers
173 views
Force a file to overwrite instead of appending the filename
I've got an application running is OS X that won't overwrite a file with the same filename. It will only append the filename with a 'space 1'. If I write a file more than once I get something like ...
0
votes
0answers
534 views
Script Mail.app to auto-save attachments?
In similar thinking to a previous question, is it possible to script Apple's Mail.app to auto-save attachments from a given address or file type?
Presuming it is, what would that AppleScript look ...
