AppleScript is the Mac OS scripting language.

learn more… | top users | synonyms

0
votes
0answers
6 views

Intercepting an Applescript script to work on a spreadsheet

I have just begun using Applescript & have the following question: is it possible to make an applescript script on OSX El Capitan to open a spreadsheet, intercept the script to make changes/...
0
votes
0answers
20 views

How to open iTerm2 version 3 in Forklift

I am looking for a solution which can open iTerm2 version 3 as the default terminal. For iTerm2 version 2 there were multiple AppleScripts on the internet which worked well for opening the current ...
0
votes
1answer
30 views

Opening a new terminal from the command line and running a command on Mac OS X 10.10?

So I want to run a script, that launch when I log in, in a new terminal and print in a few line. Do I need AppleScript as for what I've read so far ? Is there not a simple bash command to run this ? ...
0
votes
2answers
23 views

OSX control volume with keyboard

I'd like these keybindings: Cmd+PageUp = volumeUp Cmd+PageDown = volumeDown I followed these instructions: creating AppleScript worked fine, but it is impossible to set Cmd+PageUp shortcut in ...
0
votes
0answers
13 views

AppleScript Dismiss a website dialog box whose text contains something unique

I have this code to dismiss a popup for a website. The popup has no title, however it has text. How can I make this so it doesn't do it for all websites and/or doesn't do it for all dialog boxes. I ...
0
votes
0answers
22 views

applescript to change tab forward or backward in chrome

So I'm aware that using using ctrl+page up sends a command to chrome that activates the previous tab.. and ctrl+page up activates the next tab I tried sending the keyboard command to chrome using ...
0
votes
1answer
63 views

How to run a shell script from an AppleScript?

I am using a Mac running OSX Yosemite v.10.10.5. When I try to run my shell script from my AppleScript, I get the following error message: Error message at AppleScript Script Editor error "sh: /...
0
votes
0answers
13 views

How to cd into my local git repo from an AppleScript?

I am running a Mac using OSX Yosemite v10.10.5. I want to push my local git repo to my remote using AppleScript. So the git code would be: shell git init git add README.md git commit -m "first ...
4
votes
1answer
64 views

Remove All Illegal Characters from All Filenames in a Given Folder and subfolders

I Know this was was basically answered and the automator with the shell script (Sanitize Filenames) works great, but I need it to also do all subfolders as well. And if possible trim the file name ...
0
votes
0answers
278 views

Applescript/Automation in Outlook 2016 for Mac

Im trying to script some automation for some repetitive tasks I do in my workflow. My script (as of now) needs to accomplish only a basic task, but nonetheless, timesaving. I need it to (when called ...
0
votes
0answers
22 views

open ssh server file automatically with apple script

Hello respected persons , i am trying to build a apple script which first open terminal login in ssh with details and after login it open a python script which is on ssh server automatically . i ...
0
votes
1answer
68 views

How do you add a spotlight comment to a folder

How do I set a spotlight comment for a folder using Bash. (Or Applescript) The following example is not working: osascript -e "tell application \"Finder\" to set comments of alias POSIX file \"$...
0
votes
0answers
45 views

Applescript to upload files to OneDrive

I am wondering if anybody knows how to Upload a file to OneDrive using an applescript. I would connect this applescript to Automator so if the script could include the necessary variable parsings for ...
0
votes
1answer
50 views

Cannot execute ssh-ed osascript properly inside of shell script

I have created a ip-down script in my etc/ppp/ directory. Essentially I am trying to kill certain programs/servers when the VPN disconnects, then display a notification on another computer via ssh. I ...
0
votes
0answers
23 views

How to script detection of an OS X program bouncing in the dock?

How can I use AppleScript or something similar to detect the presence of an app which is bouncing in the dock (in this case Adobe Illustrator)? Once I detect that Adobe Illustrator is requesting ...
1
vote
0answers
48 views

How to get input with a custom dictation command

I'm trying to write a few scripts to allow me to write code via voice. However, I need a way to specify a way to capitalize a variable name. For example, I want to be able to say, "stud my super ...
0
votes
0answers
52 views

Mount AFP from terminal / AppleScript

I try to mount an AFP / SMB drive either from terminal or AppleScript, Used to have a code for that but can't find it, the only issue is my password have "@" character with probably make the terminal ...
0
votes
0answers
13 views

Mailing by aid of AppleScript with no user interface dialogues

I want to send a couple of emails with an AppleScript. The annoying thing about this script is that I have to do the last part of it, clicking the arrow icon. How can I avoid this? Sorry I am a newbie ...
2
votes
0answers
171 views

Keyboard shortcut to “Love” currently playing song in iTunes 12 on OSX

It seems as if apple has forgotten to build in a keyboard shortcut for "Loving" or "Hearting" the currently playing song in iTunes. This is unfortunate because often whilst I am working I would like ...
1
vote
1answer
55 views

Export iTunes library?

A long time ago, I remember using an AppleScript I downloaded from somewhere that exports all the music files from my iTunes library into folder neatly organised by artist and albums. Now, I am ...
1
vote
1answer
24 views

How to send a signal to a running Applescript

I am running a script that basically has a loop inside a loop. I need some way to signal this script to break out of the inner loop. repeat doxyz repeat doSoreWork if signalPresent ...
0
votes
0answers
26 views

applescripted keybinding issue with extended keyboard's number keys

I've written an applescript that remaps the Switch to Desktop n commands to the extended keyboard's numbers instead of the main keyboard. I've looked up the codes and they are Key codes 82 - 92. The ...
0
votes
1answer
57 views

How do i write an applescript application from terminal?

I want to write an applescript application from terminal. So far I have been able to write an .scpt file but that is not enough. I need to convert it to an applescript application that can then be ...
0
votes
1answer
55 views

Automatic open new browser tab on Mac OS X

Im trying to create a action in Automator, but I am not sure if its possible only use this software or I would need use applescript. I need to create a action for when I set a specific URL in some ...
0
votes
1answer
84 views

Creating a cycle between spaces on OS X

On Windows, I constantly used the keyboard shortcut 'alt-escape', which enabled me to move from one window to another without having to press x times 'alt-tab'. I'm new to mac OSX, and it seems that a ...
0
votes
1answer
300 views

AppleScript to mount and unmount drives

this is my first post on this site, so excuse me if this is a double post but I couldn't find anything similar. I'm on Macbook Pro 13 early 2011, I have installed an ssd and moved the hdd to the ...
0
votes
0answers
53 views

AppleScript and Pages: change font of numeric characters

I have a Pages document written in a non-standard font. It's actually the New Testament in a Greek font, with verse numbers throughout. While the numbers show up properly, the font lacks the ability ...
1
vote
1answer
30 views

writeToFile in a .app

I am currently trying to write content inside an Applescript.app which is a resource file. I can write to the .scpt file if I copy it in a different folder out of the Applescript.app @...
1
vote
1answer
266 views

automatic new mac setup (dotfiles, scripts, etc)

I'm looking for a way to automate the setup of a new macbook I'm about to purchase. I've done through quite a few during the years and it always takes forever to get everything up properly. I don't ...
0
votes
0answers
37 views

Applescript - how to tell which window is topmost on second screen?

I need to find topmost window on a given screen. I thought I could calculate the screen using position or bounds so this is not a problem, however I am struggling with the index property. I tried this:...
0
votes
1answer
59 views

Send click event to dialog shown through display dialog command in OS X Terminal

I have an sh script that displays a dialog; this dialog can be closed by the user but I am looking at a gracious way to close it, from within another similar script, run at a particular moment, if ...
0
votes
2answers
45 views

Click Every Word that ends with “.log.gz” in Any Language Compatible with Google Chrome

I have looked up the answer to this already and cannot do this with the programming languages I know, so I'd like the code for this and an explanation as to how it works so I can use this in future ...
0
votes
1answer
54 views

Shell script, AppleScript Mac OS X

I’m trying to copy embedded metadata from image files and write to a .txt file, as well as generate MD5 and SHA1 checksums for the same images to be added to the same .txt file. I can run this ...
1
vote
1answer
225 views

Write content to file with Automator

I'm building an Automator Service to create an .html file and write some text in it. I've managed to create my .html file by using the New Text File action, but how can I write text in it? I see no ...
0
votes
1answer
197 views

Sharing variables between applescript and bash script in same script

Is it possible, in a bash script, to have a variable, but also allow applescript (with osascript) to use that variable?
1
vote
0answers
96 views

Toggling Yosemite's Notification Center between “Today” and “Notifications” views (back and forth)

I want to create a keyboard shortcut/trackpad gesture to: - display Yosemite's Notification Center first - then toggle back and forth "Today" and "Notifications" panes every time the corresponding ...
0
votes
1answer
211 views

script needed to Reset group permission to enclosed items in folder OS X Yosemite

Error with Excel document falling read only on server shared document. i'm looking for a script to apply "group" folder permission to all included files.Every day at a specific time 8pm.to fix ...
1
vote
2answers
247 views

Open “About This Mac” from Terminal?

This probably seems totally useless to most, but i've got a specific need to open the "About This Mac" dialog from within Terminal. Any idea if its possible? I suppose AppleScript might be the way to ...
1
vote
1answer
30 views

How do I close a window from an application but not quit the application

I'm trying to have a shell script run and then close itself but not quit Terminal all together. Here's what I have: #!/bin/sh while [ "$JOB_NUMBER" = '' ]; do echo -n "++++++++++++++++++++Job ...
1
vote
2answers
44 views

How do I to modify Automator Service ditto command?

Using and Automator Service and an AppleScript that is redly available and exists on this thread of but a "GUI" around ditto. The solution works well, however, I am not getting the behavior I expected....
0
votes
1answer
70 views

Is there a way to have two or more clipboards via keyboard shortcuts for storing & using multiple text items simultaneously? (OSX)

I would like to be able to have multiple clipboards on Mac OSX (happen to be using Mavericks currently). The end-solution would look something like this: Let's say I copied one piece of text using... ...
1
vote
1answer
107 views

How to periodically show alert message *in foreground* on Mac OS X?

I want to have an alert / dialog box to fire up periodically in foreground on my Mac. I tried a combination of AppleScript and launchd and managed to have the script (actually converted to a app) ...
0
votes
1answer
51 views

How can I stop Drobox sync during the day and automatically start at night

I'm trying to stop the Dropbox daemon from running during the day. I'd like to start it and perform a sync around 6 pm daily. I'm running Mac OS X Yosemite 10.10 on an iMac 27'.
0
votes
1answer
59 views

Applescript Ext Loop early

I've created an applescript loop that automates a repetitive task. It prompts for the amount of times to loop, and then does it's thing. However I've been asked for a way to exit the loop, if for ...
1
vote
1answer
304 views

Extract text from HTML using Applescript

I am looking to extract text from an html using Applescript, here is the code: <div class="vk_bk vk_ans">3:27 PM</div> I want to extract "3:27 PM" which is the result google gives you ...
0
votes
1answer
201 views

Applescript can't get process “…”

I am getting an error in applescript In the first script i created a search engine and the script is as follows on dialogBox(theMessage) display dialog theMessage default answer "" buttons {"Cancel",...
2
votes
0answers
85 views

NSUserAppleScriptTask and Script Monitor

I am wondering why some users of our app ghostnoteapp.com see the Script Monitor icon in their menu bar and others, including myself do not. According to the AppleScript release notes " (Script ...
0
votes
1answer
173 views

Applescript exec shell script with space in path

The problem I'm trying to solve is to simply run Google Chrome with the --disable-web-security switch in OSX. Since it appears that I cannot add a switch (argument) to an alias I started looking for ...
0
votes
1answer
69 views

How do I create a new database?

Since upgrading to Yosemite 10.10.1, I can't create a new database set theOutputFolder to choose folder with prompt "Please select an output folder:" tell application "Database Events" make new ...
0
votes
1answer
959 views

Make Applescript wait for an application to be closed before running a shell script

I have an applet i made using Applescript which opens an Application and then once it's loaded runs a shell script which unload's Spotlight. I need to make it then wait for me to finish using relevant ...