New answers tagged

0

Using a bit of Bash and some nice utilities is possible to compare MD5 of every single file. I will assume here that the same MD5 means the same content. Make MD5 of everything: find /one/dir -type f | xargs md5 > one.txt find /other/dir -type f | xargs md5 > other.txt Compare every MD5 in order to find what is missing where: diff -u <(cut ...


-1

BetterTouchTool can do this. So can Keyboard Maestro but that would really be overkill.


0

Write an AppleScript to do what you want. Then: Configure it as a Service using Automator, and assign a keyboard shortcut to it via the Keyboard System Prefs. Or Get a copy of FastScripts and assign the keyboard shortcut using that.


0

Here is what I use for disconnecting my Samsung Soundbar. Also remember that you need to give permission to application to use SystemUIServer steps for that. System Preferences > Security & Privacy > Accessibility > [name_of_your_application] One little remark: you need to have bluetooth icon on your menu bar. tell application "System Events" ...


1

As one of the commenters alluded to, "get first message of inbox" probably won't return what you expect. When retrieving messages using AppleScript, Mail sorts your mailbox accounts alphabetically. Within each account's inbox, messages are sorted newest first. What you have selected in Mail doesn't change the order in which they're returned to ...


0

From my experience I may recommend Path Finder app (http://www.cocoatech.com/pathfinder/). It has very powerful Commands -> Folder Sync command that does exactly what you are asking for: shows synced files and those you may need to copy left or right. They are highlighted with different color. App has free trial period (fully functional) and then asks ...


0

OK, it's kind of embarrasing, in a way, when you figure out the answer to your own question, but, here it is: You just go to the Security and Privacy pane, click on the Privacy tab, and then add the apps where you want to allow GUI scripting. Just that simple....


0

There is not. Individual applications are now given access to the Accessibility features, there is no global control. As you can see there is a + icon to allow you to add an application. You can also have your script add itself. Another method: http://www.macosautomation.com/mavericks/guiscripting/index.html


0

As Mark mentioned, AppleScript is the way to go here: Create a mail rule that runs the following script when an email from your home automation system is received. using terms from application "Mail" on perform mail action with messages theselectedMessages tell application "Mail" repeat with a_message in theselectedMessages set ...


0

It's a similar error as in your last question: You can either reuse button_returned and the_results (like you already did in line 6 and 7 <-> 1 and 2): ... if button_returned is "More" then set the_results to (display dialog "Second Page" buttons {"FaceTime", "Thank You!"}) set button_returned to button returned of the_results end if if ...


2

Use this instead (source and short explanation): if the text returned of the result is "Cameron67" then set the_results to (display dialog "Welcome! What would you like to do?" buttons {"Chrome", "Messages", "More"}) set button_returned to button returned of the_results if button_returned is "Chrome" then tell application "Google Chrome" ...


0

To better understand the AppleScript, try breaking it down. Within Script Editor.app run the following: set outFolder to ((path to desktop from user domain) as string) & "PDF Files" After running, the Result panel will show the value outFolder is set to. This should be a path to a folder called PDF Files on your Desktop. Does this folder exist on ...


1

General when using the do shell script command, you will need to use the quoted form property of text objects. In other words, do something like this. set command to "ls" set result to do shell script quoted form of command display dialog result


0

You can force Terminal to become frontmost by adding the line: activate application "Terminal" into your applescript. if you launch Terminal with: tell application "Terminal" to open location "ssh://user@example.com" then Terminal won't open an extra window.


0

Automatically execute html in an email. I'm not familiar with Smart Mailbox and what language it uses but below is a VBA script for Outlook that searches for the text "Click" which is a href to a URL, extracts the URL and executes it in Internet Explorer as a weblink. The code is very messy with very little documentation but it uses the Split Array ...


1

You can execute shell script directly on OS X, so there's generally no good reason to do that. However, if you really feel like it, you can use do shell script "script" to execute a shell script in AppleScript.


0

If you don't want or need those temporary files to be available to all users, then definitely using "from user domain" is ideal. If you require the files to be available to all users, then you should use the plain "path to temporary items".


1

You can work around this with something like set a to "/tmp/" & fileName set targetFile to POSIX path of a --since you are using curl do shell script "curl http://example.com/images.jpg > " & targetFile This AppleScript will make a string containing /tmp/, and targetFile sets it to interpret as POSIX (used by shell and curl). Then it downloads ...


1

To make this work you have to use a third party tool: Karabiner. I propose to use one of the option keys though: usually one of both is rarely used and you can use M as normal key. Download, install and open Karabiner Open in the menulet Karabiner -> Preferences Enter "Space" Enable the chosen keycode and close the window.


0

I have used KeyRemap4MacBook with success before. (It has been renamed to Karabiner since) http://lifehacker.com/5882684/the-best-keyboard-remapper-for-mac-os-x This article gives a bit of an overview on it. The only downside is that it doesn't allow you to remap a key through the interface, you will have to do that through editing an XML file but it isn't ...


0

Try: tell application "Notes" set myFolder to first folder whose name = "FolderA" set myNotes to notes of myFolder repeat with theNote in myNotes -- insert your code here end repeat end tell


0

To start with, you can try this Applescript: set interval to 7 set target to (current date) - interval set oldCount to 0 tell application "Mail" set box to mailbox named "INBOX" of account named "Your_mailbox_here" set maxMessages to count of messages in box repeat with index from 1 to maxMessages set currentMessage to message index in ...


2

Certainly the easiest way to accomplish this is by using do shell script. pmset is definitely a viable option, though I am personally partial to the caffeinate command, which doesn't modify any preferences and doesn't require administrator privileges. You could use the following AppleScript to keep your screen awake indefinitely: do shell script "caffeinate ...


0

You can use the AppleScript do shell script command with the pmset command to alter the energy saving settings. The following example disables display sleep: do shell script "pmset -a displaysleep 0" with administrator privileges


-1

I created a script and launch agent to accomplish the same thing. This method avoids that message(tested on OS X 10.11.3). The agent calls a shell script every 30 seconds and tries to ping an IP address that is static on the vpn network. If it cannot ping that IP it enables your vpn connection. If you did this through an Apple Script App, the app icon will ...


0

Here is another option: I created a script and launch agent to accomplish this. The agent calls a shell script every 30 seconds and tries to ping an IP address that is static on the vpn network. If it cannot ping that IP it enables your vpn connection. If you are home, the script will be able to ping that address and will not connect to the vpn. Clone the ...


1

Add this to Your Info.plist file: <key>CFBundleIconFile</key> <string>filename</string> where filename is Your .icns file inside Contents/Resources directory. Info form the Apple Documentation CFBundleIconFile (String - iOS, OS X) identifies the file containing the icon for the bundle. The filename you specify does not need to ...


2

Here is an Automator Service that becomes available in Finder when Folders are selected and emulates the context-menus Compress [n] Items command except it creates an individual zip archive file for each selected Folder in the name of the selected Folder. If the Folder Name.zip file already exists then a " 2" (space 2) is appended to the filename, e.g. ...


0

The linked script to get the AppleScript version is bogus. To get your current AppleScript version open AppleScript-Editor/Script -Editor. In the menubar got to Script-Editor->About Script-Editor The current AppleScript version is just below the AppleScript-Editor/Script -Editor version number. Examples: Mavericks 10.9.5:       AppleScript 2.3.2 El ...


0

You can not change the version of AppleScript installed with OS X. AppleScript is a core part of the operating system. If you are running the latest version of OS X, then you have the latest AppleScript.


2

First, you're trying to check against text returned of y, where y is text returned of x – a string, not a dialog result so text returned of y won't work. Just use y. Second, you need to be testing your string stored in y against another string, not a number. Wrap 3232 in quotes: set x to display dialog "What is your password?" default answer "" with hidden ...


2

No - Applescript is not multi-threaded in the sense that you can set up two things to happen at one time. To do what you want, you'd need another language that could open a window so the user could type characters to be interpreted and change the signal variable to exit the loop. That language would handle multiple threads and communication between the two ...


0

Try: tell application "Terminal" if not (exists window 1) then reopen activate do script "echo hi" in window 1 end tell


2

AppleScript is written in English. Read what it says! Remove the posix path of from the code, and you'll get the HFS path. Full code: tell application "Finder" to get (container of (path to me)) as text


0

You can pass administrator privileges to a line of AppleScript which requires administrator privileges by appending "with administrator privileges": do shell script "security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ~/Desktop/MyWiFiCertificate.crt" with administrator privileges


0

If you have 'Displays have separate Spaces' unchecked, then you cannot do what you are looking for. The 'Space' will automatically be the same Space on both monitors, you can't have one Space on the left & another on the right. You would need to re-check 'Displays have separate Spaces' in order to do that. Then you could call up any Space on any ...


0

Here's how you'd do this: Go into the finder, and drag whichever folder you want to use for this into the "Favorites" section in the sidebar (enable the sidebar in the view menu if it isn't showing). Run this script, but replace menu item "Xcode" of click menu item "Xcode" of menu 1 of pop up button "Where:" with the name of the folder you added to your ...


2

Paste this script into script editor and save it as a service. Map the service to a keyboard shortcut. tell application "Safari" activate tell current tab of window 1 do JavaScript "location.reload();" end tell end tell EDIT tell application "Safari" activate tell window 1 --options set myTab to tab 1 ...


1

I'm not going to pretty this up like Graham Miln nicely did however it you want to create an AppleScript app that you can run before disconnecting your external display then this will wait 30 seconds, check to see if it's in clamshell mode and if yes put the system to sleep. AppleScript code: delay 30 set AppleClamshellState to do shell script "ioreg -r -k ...


2

Using the included Script Editor.app with OS X, try experimenting with these snippets. Wait 30 Seconds The following snippet will make your script wait 30 seconds before showing a dialog: delay 30 -- this waits thirty seconds display dialog "Hello?" -- this shows a dialog Sleep The following snippet will put your Mac immediately to sleep: tell ...


1

The curl command in the do shell script command is malformed. The -o option expects a filename or a fully qualified pathname filename not just a path like what the variable theFilePath contains. See the man page for curl, in a Terminal type man curl and press enter and then scroll down to -o, --output <file> where it states: Write output to ...


0

Since I do not have the Dispense Items Incrementally Action what I'm going to present is an alternate way of achieving what I understand your end goal to be, at least in part anyway. The code presented below is not polished or complete in that it simply preforms the insertion of the number of images in the selected folder into the document without regard for ...



Top 50 recent answers are included