Tagged Questions

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

learn more… | top users | synonyms (2)

0
votes
0answers
17 views

What is required to make a bookmark that creates calendar events from values on a web page?

So I have a page that has days and times on it, and I want to know how to make a script or bookmarked script that will find these values and put them into my calendar. Any idea?
-2
votes
1answer
49 views

error “Can’t get button returned of \”C\“.” number -1728 from button returned of “C”

set buttonChoice to (display dialog "Play game?" buttons {"Yes", "No"} with title "Play?") if button returned of buttonChoice = "No" then return "No" end if repeat set levelnum to text returned of ...
1
vote
0answers
37 views

Automatically saving message attachments to a mailbox

I subscribe to a rather odd mailing list, through which I receive emails to which further emails are attached (in eml format). I want to archive those attachments into a dedicated mailbox, all within ...
0
votes
1answer
25 views

iTunes: get selected mobile apps with AppleScript

I fear I already know the answer to this one, but is there any way to access the locally-stored Mobile Applications in an iTunes library using AppleScript? The selection property appears to not ...
2
votes
0answers
19 views

Applescript Editor's compiler erratic behaviour

I've just come across some bizarre behaviour in the Applescript Editor (Snow Leopard - 10.6.8) that I was wondering if anyone knows how to get around it. Basically, one second a statement will ...
0
votes
3answers
87 views

How do I determine which application launched automator service?

Is there a way to determine which application launched a Automator Service? The idea is to check the app that launched the service, with a shell/apple script and react differently depending which ...
0
votes
1answer
50 views

How to change filepath structure using automator (windows to mac)?

I use a mac at work and people send me windows file paths all day. Does anyone know how to convert the filepath using applescript in an automator so I can right click in an email and then open it? ...
0
votes
1answer
88 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
3answers
109 views

How can I set the default browser depending on time of day?

I have a MacBook Pro from work. To keep my browsing history separate, I use 2 different browsers. (Chrome = Work, Safari = Fun) I want to make my default browswer Chrome while at work (9 am to 6pm), ...
1
vote
0answers
33 views

Sync applescript calls.

I'm very new to applescripting and I have the following code: tell application "Safari" tell document 1 do JavaScript "document.getElementById(\"binaryFilePath\").click()" end tell ...
0
votes
1answer
147 views

Applescript date manipulation to get multiple formats

I need to get a date (month, day, year) in multiple different formats for each part. So, for January 2, 1999 I need: the month as January and Jan and 01 and 1 the day as 2 and 02 the year as 1999 ...
2
votes
1answer
118 views

Can only run AppleScript from Automator

I have the following AppleScript which toggles the scroll direction on the trackpad: tell application "System Preferences" activate set current pane to pane "com.apple.preference.trackpad" ...
2
votes
1answer
49 views

Applescript question for copying files

I wrote a script to copy files from an SD Card to a Thunderbolt Hard Drive. I wanted the action to automatically do all of this in a single shelled applescript under an automator action. When I ...
1
vote
0answers
28 views

How can I start a Hangouts phone call with Applescript/Terminal?

I want to initiate a Google Hangouts phone call with Applescript. Hangouts has an AS dictionary, but with only the default suites. I want to emulate opening the Hangouts popup, typing in a phone ...
1
vote
0answers
135 views

Set iMessage sender in applescript for a new message

Applescript allows you to send messages via iMessage and the command line, ie) http://stackoverflow.com/questions/11812184/how-to-send-an-imessage-text-with-applescript-only-in-provided-service Is ...
3
votes
1answer
42 views

Variable not defined not sure why

For some reason "the name of thePath" comes up as not defined by my automator workflow. on run {input, parameters} tell application "Finder" set thePath to the (first item of the input) ...
0
votes
1answer
46 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
113 views

Applescript Invoke Specific User and Password

I have a do shell script that I need to run in Applescript, but it needs to run as a different user. It is to be deployed into the student's network drive as a standalone application that the students ...
0
votes
0answers
30 views

Why is my test for folder under /tmp existence fails?

I'm trying to create a "flag file" under /tmp using AppleScript but the check for whether it exists keeps failing. Following the answer Why is my applescript for checking if a file exists failing?, ...
0
votes
1answer
44 views

Display message box only if “filter finder items” finds an item (Automator)

Currently, I have a workflow going like this: When files and folders added to downloads Filter finder items where kind = music Open finder items with ID3 tag editor Ask for confirmation "Click OK ...
0
votes
2answers
40 views

AppleScript prints out keypresses, doesn't execute them

I expect this script to switch applications (command tab): $ cat hello.applescript tell application "System Events" key code 48 using command down end tell But it just prints out a tab: $ ...
1
vote
1answer
95 views

Is there a way to use automator/write an apple script to change the font in several powerpoint documents?

A recurring issue at work: A powerpoint file needs to be moved in to illustrator and saved as an .eps file. The files are almost always submitted with the font set to Calibri which Illustrator ...
1
vote
0answers
29 views

Creating an Automator/Applescript to compare two versions of an MS Word document

I'm storing MS Word documents in GIT and would like to have an rudimentary document compare system on the rare occasion that I need to diff them. I've seen: ...
0
votes
1answer
25 views

Applescript automate double keystroke

I need to emulate a keystroke using applescript for double time shift press. Adding Part of snippet.. tell application "System Events" keystroke shift keystroke shift end tell Even tried ...
1
vote
1answer
34 views

AppleScript keystroke ignoring numbers

A very simple AppleScript like this: tell application "System Events" keystroke "abc 123" end tell results in just “abc” being typed. Online resources suggest this should not be the case. ...
0
votes
1answer
58 views

Run an applescript on mouse down

How can I trigger an applescript on mousedown? I want this applescript to run when a user doubleclicks on empty space in the desktop (i.e. not clicking on the icons present on desktop). This is my ...
2
votes
2answers
74 views

Run an AppleScript that requires keystrokes while the screen is locked?

I've got a very simple AppleScript whose job it is to type some words into a text box. tell application "TextEdit" activate end tell delay 0.2 tell application "System Events" keystroke "Hello ...
1
vote
1answer
65 views

Difference between variable and pipe to shell in applescript

In answering this question I wrote this script: global presenterNotes tell application "Keynote" activate open (choose file) tell front document set presenterNotes to presenter ...
0
votes
2answers
54 views

Create an automator/applescript service that opens a file in an external program

Just wondering about some automator/applescript help. Basically: I download a MP3 file from an artist (for example) It is saved to my Downloads folder. From there, I want to open it automatically ...
1
vote
1answer
54 views

Get the Sound Output Device Name with AppleScript

How can I get the current sound output device name with AppleScript? For example, in my System Preferences: Sound pane "Internal Speakers" is currently selected. All I need to do is retrieve that ...
1
vote
1answer
58 views

Apps Stuck in Security & Privacy > Accessibility

I was messing around with using AppleScript for GUI manipulation so the apps I was making had to be granted access. The very first one I did showed up in Security & Privacy > Accessibility as ...
0
votes
1answer
52 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 ...
1
vote
0answers
51 views

Can I use AppleScript to upload a file to a webpage open in Safari using drag and drop?

I would like to create an AppleScript to open a specified URL in Safari, login automatically if that would be possible and then upload a file to a form that accepts drag and drop file upload. Would ...
0
votes
1answer
49 views

Applescript to change desktop image on all monitors?

I have the following code to change the desktop image of my Macbook tell application "System Events" tell current desktop set picture to "/Library/Desktop Pictures/Beach.jpg" end tell end tell How ...
1
vote
2answers
159 views

Open an new Safari window on the current space from the Termial shell with multiple tabs (URLs)

How to open an new Safari window from the Termial shell on the current space? Now when using the open http://example.com it got opened the URL as last TAB on my 1st safari window. I'm looking for ...
0
votes
1answer
24 views

Automator Service that works with and without selection

I have an AppleScript that I want to run with a keyboard shortcut. The script uses the current selection of text if it is available, but will also work without it. I have created an Automator Service ...
4
votes
1answer
69 views

How can I restart from an Apple script without warnings?

I wrote this Apple Script to bless my Windows partition and boot to Windows only once: do shell script "/usr/sbin/bless --device /dev/disk0s3 --setBoot --legacy --nextonly " with administrator ...
0
votes
1answer
115 views

AppleScript Error

Edit: Well now it seems to just work. I have no idea what's going on lol. Can someone tell me what's going on here? tell application "Terminal" do script "killall Finder" tell application ...
0
votes
2answers
220 views

In Applescript, how do I launch Safari “Silently” open url then close the unseen Safari window

I am new to Applescript and MACs although my first computer was an Apple II Plus and I programed in Apple Basic and Assembly. I am using it to create a "Silent" alarm button. We have a system in ...
0
votes
1answer
71 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
2answers
50 views

Geeklet script to ping hosts

I have found the nice script below to ping a host to check if it is up or down. However I haven't found a way (and my very basic programming knowledge has failed me here) on how I can ping multiple ...
0
votes
1answer
86 views

Using AppleScript to toggle Internet Sharing not working

I am using an applescript to activate internet sharing option from 'System Pref> Sharing'. I work on MacOs 10.9.4. I found this script on a forum and am using it. This works fine, when the System ...
1
vote
1answer
93 views

Applescripts not working in Finder since Mavericks

I have a bunch of Applescripts that do things like change sort column in Finder windows, but they've stopped working since Mavericks. If I close and reopen the window, then the change takes effect, ...
4
votes
2answers
97 views

Applescript File vs Alias

I have these two Applescript commands in which they both point to the same file alias "Macintosh HD:Users:scott:Dropbox:Downloads:AppleScriptFinderGuide.pdf" file "Macintosh ...
0
votes
1answer
103 views

How to fix my Applescript plugins for the Contacts application that are no longer available since 10.9 Mavericks upgrade?

I have got 5 scripts listed in ~/Library/Address Book Plug-Ins/ SkypeABDialer.bundle SkypeABSMS.bundle TelephoneAddressBookPhonePlugIn.bundle TelephoneAddressBookSIPAddressPlugIn.bundle Dial with ...
0
votes
2answers
48 views

I want to show a file in an AppleScript bundle, but shell returns: file not found

My Bundle File: reference.txt My Code: set bashFile to path to resource "reference.txt" set the reference_data to do shell script "type " & quoted form of (POSIX path of bashFile) display ...
0
votes
1answer
47 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
112 views

Converting Automator Action in applescript to bash script

I just wrote an Automator app using AppleScript (along with a couple of bash lines) to start FTP with a single click. However it runs more than a tad slow. Here's the code: set ftpstatus to "off" try ...
0
votes
0answers
76 views

Applescript and Outlook - can't get all occurrences of repeating events

I'm trying to export a list of all the events in my Outlook Calendar into a text file using the following code: set eventDetails to "" set currentDate to current date set yearFromNow to currentDate + ...
2
votes
1answer
27 views

What is the location of this Application's file?

This application shows in Finder at path (with target): Macintosh HD/Applications/Trans_Helper.app/Contents/MacOS/applet and I have not been able to successfully start it with launchd, using ...