Tag Info

New answers tagged

0

You can try launching "SelfControl" in the background, then hiding it (although, simply launching in the background may be enough in your case). The idea is to hide the application once a window appears, indicating the launch process is mostly done, and the application can be hidden (which takes a few seconds. I generally shy away from using arbitrary delays ...


0

Given all the answers I applied the following solution for Yosemite. Using Automator, I created an app with the following code: tell application "System Preferences" reveal anchor "keyboardTab" of pane "com.apple.preference.keyboard" end tell tell application "System Events" to tell process "System Preferences" click checkbox 1 of tab group 1 of window 1 ...


3

Terminal.app probably implements the "media copy" (printer) escape sequence from VT100s. You can read about those control sequences at vt100.net, or in the XTerm Control Sequences, e.g., CSI Pm i Media Copy (MC). Ps = 0 -> Print screen (default). Ps = 4 -> Turn off printer controller mode. Ps = 5 -> Turn on printer ...


2

The error you're getting is related to the sudo command. You're probably trying to run the script as the normal administrator. Instead, you can run it directly as root.


0

If the admin account you're trying to add is an AD one, you should be able to give it admin rights through Directory Utility. Step 7b here shows how to do it: http://www.techrepublic.com/blog/apple-in-the-enterprise/integrate-macs-into-a-windows-active-directory-domain/ [Open Directory Utility] Double-click Active Directory, [...] click on ...


1

You are looking for the dscl command. You can do it through ARD unix command to multiple machines at once, or send via ssh per machine. Here's a quick look at an admin user. dscl . create /Users/corybohon dscl . create /Users/corybohon UserShell /bin/bash dscl . create /Users/corybohon RealName "Cory Bohon" dscl . create /Users/corybohon UniqueID 503 ...


0

Here's code that will wait an amount of seconds before quitting the current application and going to sleep. delay (your amount of seconds here) tell application "System Events" key down {command} keystroke "q" key up {command} set volume "1" say "computer going to sleep" tell application "Finder" sleep end tell end ...


1

Fixing the Lock Removal Try using rmdir to remove the lock folder: rmdir "$LOCK_PATH" Debugging Paths To debug the cp paths, try this command in Terminal.app: open /Volumes/PROOFS_WATCH/ Does the expected folder open? Play around with the path until open displays the expected folder in the Finder. To debug the lock folder, try running the script in ...


0

On Xcode6 simctl was introduced so you can just open the terminal and type: xcrun simctl openurl booted "https://google.com"


2

Lock File Consider creating a lock to note the ongoing copy, see lock your script (against parallel run): #!/bin/sh # Path to a lock folder LOCK_PATH="/tmp/copying.lock" # Ensure the lock is removed should the copy fail trap 'rmdir "/tmp/copying.lock"; exit' 1 6 15 if mkdir "$LOCK_PATH"; then # Lock file did not exist and was created # Perform ...


1

With the benefit of several years of hindsight: user588's answer and koiyu's answer work well, but they rely on utilities (Rez, DeRez, and SetFile) that: aren't installed by default (they come with either Xcode or the developer command-line utilities) are now deprecated (Rez and DeRez, because they relate to Carbon) osxiconutils look interesting, but ...



Top 50 recent answers are included