FaceTime window jumps to unwanted position at start of call Running FaceTime 3.0 on MacOSX 10.10.1, there's an annoying behavior that I can't seem to change:

When I first get an incoming call, the FaceTime window jumps to the far right of my rightmost display (an external 30" Cinema display), and can't be repositioned until the call is fully connected (at which point I need to move it more than a yard to the left to center it with the camera in the MacBook Pro).

Why can't the window just stay where I put it?

Similar problem with FT audio. It goes to the upper right too and ends up covering my apps. Easy to move yes, but then it's not on top anymore and I have to dig around for it to end the call.

I poached this AppleScript and tied it to an Alfred Workflow

tell application "System Events" to tell process "FaceTime"
tell application "FaceTime" to activate
tell front window to set position to {950, 696}
end tell

You could make your own trigger with normal script. Not great, but a quick workaround.


Can I delete files or folders from /private/var/folders/? I have this folder /private/var/folders/bf/ with 3GB of what seems temporary files. Can I delete this folder?

You can safely delete anything in /private/var/folders/ but not the folder itself
sudo rm -rf /private/var/folders/*

Quit all apps before you do & reboot afterwards … and whatever you do, don't touch anything else in /private/var/, and do not delete /private/var/folders/ itself.

Rumor has it that one should not delete /private/var/folders/zz. This article implies otherwise, but if you want to be on the safe side, use
cd /private/var/folders
for i in *; do if [ "$i" != "zz" ]; then sudo rm -rf "$i"; fi; done
sudo rm -rf zz/*

instead.


Bash looping directories My simple task is to create within the workdir up to max separate dirs

copy within it some files from the template dir (so every new dir is replicas and the difference only within it names defined from i)
create new txt file within each of the new dir with some text:

home=/projects/clouddyn/md_bench/for_server/MD_bench
template=$home/template

cd $home
min=1
max=3

for i in $(eval echo "{$min..$max}")
do
    mkdir "sim_$i"
    sim=$(basename "sim_$i")
    pushd $sim
    cp $template/*.* $sim
    prinf "This is $i dir" > ./$sim/file_$i.txt
    popd
done

Unfortunately the new dirs are created but files didn't copy

Thanks for the help!

There are several things in your script which can make it go wrong:

#!/bin/bash
home=/projects/clouddyn/md_bench/for_server/MD_bench

# home is a bad choice, because $HOME has a special meaning and it's
# confusing to have both $HOME and $home. But it doesn't make the script fail

template=$home/template

cd $home
min=1
max=3

# for i in $(eval echo "{$min..$max}")
# this can be replaced by the easier to read
for i in {$min..$max}
do
    mkdir "sim_$i"

    # sim=$(basename "sim_$i")
    # basename strips the path part, but "sim_$i" doesn't even have a path
    # so basically this just assigned "sim_$i" to $sim and can be replaced by
    sim="sim_$i"
    # Ideally this assignment would be the first statement after 'do' so
    # it could be used already in 'mkdir'

    # pushd $sim
    # cp $template/*.* $sim
    # Two problems here:
    # - 'pushd' already changes into $sim, so when 'cp' is called there is
    #   no $sim directory to copy into (as you are already in it)
    # - '$template/*.*' only matches files with a dot in the name, which may
    #   or may not be what you want
    # As there is no need to 'cd' into a directory to copy files into it I
    # would just use
    cp $template/* $sim/

    # prinf "This is $i dir" > ./$sim/file_$i.txt
    # You probably meant 'printf' here. Also this line has the same problem
    # as the 'cp' above (you are already in $sim)
    printf "This is $i dir" > $sim/file_$i.txt

    # popd
    # Not needed any longer
done


Using Applescript to paste the current date into a range of Excel cells I have a simple script written that successfully saves the current date in the format I need. I also have saved a destination range in the active sheet. I just need syntax to paste/insert it into that range of cells.

tell application "Microsoft Excel"
    get active workbook
    tell sheet 1
        set ReportDate to do shell script "date '+%d/%m/%Y'"
        set range_value to value of used range
        set firstUnusedCellA to (count range_value)
        set DestinationRange to "G2:G" & (firstUnusedCellA)
        get ReportDate
        paste special on worksheet active sheet destination range DestinationRange

end tell

I think the code below speaks for itself. The do shell script command shouldn't be used inside another application tell block. Still I prefer a vanilla AppleScript solution as below which is fine to be used in any context in the script.

tell (current date) to set {_day, _month, _year} to {day, it's month, year}
set _day to text -2 thru -1 of ("00" & _day) -- add leading zeros if needed
set _month to text -2 thru -1 of ("00" & (_month as integer)) -- add leading zeros if needed
set _date to _day & "/" & _month & "/" & _year

tell application "Microsoft Excel"
    tell workbook 1
        tell worksheet 1
            set value of range "$A1:A10" to _date
        end tell
    end tell
end tell


Can't find proper keyboard layout for AZERTY MacBook Air keyboard I have a MacBook Air 13" Early 2015 and I couldn't find the proper keyboard layout matching its actual keyboard

This is a picture for my keyboard :

thanks for your help, well, I used an app called UKELELE, it helped me creating a new layout from an existing one, and in my case I chose Spanish as my reference , so I've just changed Q, W, A and Z to match an azerty spinach keyboard , and at the end thanks for all your help guys I appreciate it


How can I enable search by filename in finder on Lion Before switching to Lion (on Snow leopard) I used to open a directory (like my Downloads) and start searching using the search box at the top right of the finder window for a file and there was an option to restrict the search to "filenames" only.
The "filename" option does not show up by default for me, is there a way to bring it back?

You can add tokens like this by typing name: before the search phrase or selecting Filename contains from the suggestion list:


Using a script to notify when a Personal Storage device was inserted into Mac I'm new to Macintosh. Is it possible in macOS to create a certain "script" that will notify both the user and the admin whenever a flash drive/personal storage device is connected to the Mac

Although not a script, this tiny bit of Swift code, will report any disk insertions either physical or virtual. It may be of assistance to you:

import Foundation
import DiskArbitration

let session = DASessionCreate(CFAllocatorGetDefault().takeRetainedValue())

DARegisterDiskAppearedCallback(
    session!,
    nil,
    { (disk, context) in
        if let name = DADiskGetBSDName(disk) {
            print("Disk inserted: " + String(cString: name))
        }
},
    nil)

DASessionScheduleWithRunLoop(session!, CFRunLoopGetMain(), CFRunLoopMode.defaultMode.rawValue)

RunLoop.main.run()


Are Apple Event Demos done in real time? So when there's an Apple Event, and someone does a demo of how Siri works or play a game, etc; Are those done on real time or were they prerecorded? (Just a PPT presentation)

Most demos are done real-time from the console they have off to the side of the screen.  The presentation, and often the code displays, are done with Keynote (not Powerpoint).

Of course, sometimes demos are actually pre-recorded and this was often done when Jobs couldn't get the real demo to work correctly due to network or other issues.


Internet Recovery failed -1006f My problem is same as with this question
-1006F error message when trying to recover mac

I have follow that question which direct me to this thread

https://discussions.apple.com/message/22273842#22273842

from this link it says I need to buy new harddisk, so I bought a new one and installed it.

Now when I boot up the macbook it automatically goes in to internet recovery, but again in middle of loading I still get the -1006f error again?

It's solved already.

The problem is my internet connection not stable at that moment.
when I had a stable connection it worked flawlessy!


safari copy only plain link I'm copying a link from Safari, via "Copy Image Link". When I'm pasting it to some places, like Messages.app, or some input fields on the Web (not every one, but many of them), I just get a file-name:

(The latter sends a clickable filename on Computers, however it's just plain filename, not clickable, on iPhones :-( )

Can I just disable this nurturing behaviour and get raw, plain links? They are fine for me.

From the screenshot, I noticed that you are pasting it into Messages.app. What I'll usually do to work around this annoyance is to paste using Option+Shift+Command+V. This works for most apps that takes more than just plain text input.


Deleting a user account from a OSX machine Is the best way to delete a users information on a macbook pro just to do a clean reinstall or is it safe to just delete the user account from the machine?

It is safe to just use the System Preferences -> Accounts dialog to delete the user account. You always have to have one active account on the machine. You will need administrator access to the machine to delete the account. When you delete an account you'll be asked if you want to save the account's home directory or just delete them. Up to you which way you go there.

Now, if the user had administrator access to the machine, deleting their account may not remove all traces of the user from the machine. If they installed software in to /Applications or made system-level changes via /Library or any other means, those changes are going to persist on the machine. But if they weren't a privileged user, everything they could have changed on the machine was in their home directory and deleting their account got rid of it.

If you want to get rid of any trace a privileged user may have left on a machine you can delete the user account and then roll back to a point in time using your TimeMachine drive when that user didn't exist. Or, before deleting the user account, you can find all files that are owned by that user and manually deal with the ones that fall outside the user's home directory, then delete the user account. Or you can reinstall the entire OS -- but frankly that seems like a sledge hammer for a nail type of solution to me.


How to modify text selection in applescript in an automator service I wrote an Automator Service (intended for use on any selected text in any application) that modifies the length of the selection given a number/length that the user specifies.  Here's a snippet of relevant code that excludes all the other features/niceties of the service:

--Figure out whether the selection must be lengthened or shrunk
set lengthen to false
set mod_length to 0
if character_count is equal to 0 or n is greater than character_count then
    set lengthen to true
    set mod_length to n - character_count
else
    set mod_length to character_count - n
    --This is a trick to make sure arrowing affects the right side of the selection
    key code 124 using {shift down}
    key code 123 using {shift down}
end if

repeat mod_length times
    if lengthen is true then
        --arrow to the right
        key code 124 using {shift down}
    else
        --arrow to the left
        key code 123 using {shift down}
    end if
end repeat

The service works great in most applications, except Terminal.app (because the arrow keys are used to move the cursor on the command line and not the size of the currently active selection).  Ideally, this would actually work in Terminal, because that's usually where I need to use this service.

So is there a way to modify the length of selected text on any line in the history in a Terminal.app window (assuming the first selected character is position 1) using an automator service (and applescript inside that service) in a way that doesn't use the arrow keys?  E.g. I select the output of a command and run the service to adjust the length of the selection to a length I've supplied.

Background:

The reason I'm doing this is because my work involves DNA manipulation/modification and as a part of the debug process for these scripts, I sometimes need to briefly observe what has happened at a specific position in a DNA string output on the command line - quickly and dirtily - just to confirm an intended change had the intended result.  So this is just a quick way to visually find a coordinate in a long DNA string.  I eventually intend to modify this service in such a way that only certain characters are counted in the determination of the length of the selection (e.g. don't count numbers, spaces, newlines, etc).

So as I've learned, there are/were only 3 ways to manipulate the selection in Terminal by entering/using a length value (or via a series of keyboard presses).

Accessibility Inspector shows that it should be possible to programmatically manipulate the selection length, because you can edit an existing selection length using the len field in the "Selected Text Range" in the "Advanced" section by clicking edit and entering a new number, as seen in the screen-cap: https://www.dropbox.com/s/bn2z6ewmdj4mfai/Accessibility_Inspector-selected_text_len.png?dl=0

The "Selected Text Range" Property/Attribute(?) does not appear to be accessible in AppleScript, though if it was accessible, it would be here: (text area of (scroll area 1 of (splitter group 1 of (front window)))) if you have enabled UI elements in your Applescript.  It might be possible to access these values, as @CJK indicated in the comments via Objective-C.  Applescript however, even if it could access the variable, likely wouldn't have the ability to alter it.

One useful feature to see what applescript can manipulate or has access to is to simply return attributes or return properties.  For example:

tell application "System Events"
    if UI elements enabled is false then
        set UI elements enabled to true
        if UI elements enabled is false then error "Can't do it"
    end if
    tell application process "Terminal"
        tell window 1
            tell splitter group 1
                tell scroll area 1
                    --return properties
                    return attributes
                end tell
            end tell
        end tell
    end tell
end tell

This method, as of OS X 10.8 no longer works, but making a selection in Terminal using the keyboard used to be possible, as described here.  All you had to do was hit Command-Option-Return, navigate to the region you want to select with the arrow keys, hit return, select from the cursor position using the arrow keys, and hit return.  I searched for the ability to re-enable this feature, but came up dry.
There is a way to select text in the Terminal using the keyboard, but it's very limited.  You can select text between "marks" using Command-Shift-A (not including the lines that the marks are on).  Marks are added by default on every command prompt line.  However, you can add marks by right-clicking a selection and typing Command-U.  Marks are only per-line however, not specific to the selection start/stop on a line.  If you right-click any unselected text that is soft-wrapped (i.e. multi-line string) and add a mark, a separate mark is added for every soft-wrapped line.  You cannot select text between multiple marks, nor is it possible to add marks via applescript, thus it's not possible to use this to adjust a selection length programmatically.  More info on marks can be found here.

I had also explored what the arrow keys are supposed to be able to do, since shift-{left,right}-arrow for me enters the strings ";2C" and ";2D" with a beep on the command line for me.  So I removed those entries from the table in Terminal -> Preferences -> Profiles -> Keyboard to prevent that.  I had hoped it would allow me to select text (at least on the current line prompt) using shift-arrow but all it did was move the cursor without selecting.

However, given the goal of this endeavor (to see where a coordinate is in a selected string), you can accomplish this via a dialog box from the Automator service using an Applescript.  All you have to do is present the selection in a dialog box and if the target length is longer than the selection, you have to fill the remaining characters with a dummy character ('N' for DNA).

You can do this strategy conditionally, only when Terminal is the frontmost application.  Note, this is not the entire script - just a snippet, but you can see the entire script here, which contains lots of bells & whistles unrelated to this question.

--Check the length of the selected text passed in
set character_count to count characters of ((input as string) as string)

set lengthen to false
set mod_length to character_count - n
--Figure out whether the selection must be lengthened or shrunk
if character_count is equal to 0 or n is greater than character_count then
    set lengthen to true
    set mod_length to n - character_count
end if

--See if we're in Terminal
set isTerminal to ((name of first process where it is frontmost) as string) is equal to "Terminal"

if isTerminal is true then
    if lengthen is true then
        set substr to (input as string)
        repeat mod_length times
            set substr to substr & "N"
        end repeat
    else
        set substr to text 1 thru n of (input as string)
        set substr to substr & (text (n + 1) thru character_count of (input as string))
    end if
    ignoring application responses
        display dialog "Length " & n & " is selected below:" default answer substr buttons {"OK"} default button 1 with title "Selected Character Position"
    end ignoring
end if

--Trick to make sure arrow presses affect the right side of the selection instead of the left
if not (character_count is equal to 0 or n is greater than character_count) then
    key code 124 using {shift down}
    key code 123 using {shift down}
    key code 124 using {shift down}
end if

repeat mod_length times
    if lengthen is true then
        key code 124 using {shift down}
    else
        key code 123 using {shift down}
    end if
end repeat
delay 1

That will effectively accomplish the end-goal.  Unfortunately, the position has to be marked with a text marker in a variable-width type face since dialog boxes don't allow formatting or automatic selection of text.


What is this U folder under root /? I found this folder under my root, not sure what it is. Anyone got an idea?

drwx------    5 root  wheel    160 May  5  2017 casper
drwx------    3 root  wheel     96 May  5  2017 dists
drwx------    3 root  wheel     96 May  5  2017 install
drwx------  281 root  wheel   8992 May  5  2017 isolinux
-rw-r--r--    1 root  wheel  21744 Apr 12  2017 md5sum.txt
-rw-r--r--    1 root  wheel  60928 May  5  2017 menu.c32
drwx------   12 root  wheel    384 May  5  2017 pics
drwx------    4 root  wheel    128 May  5  2017 pool
drwx------    5 root  wheel    160 May  5  2017 preseed
-rw-r--r--    1 root  wheel   1707 May  5  2017 syslinux.cfg
-rw-r--r--    1 root  wheel  15097 May  5  2017 ubnfilel.txt

Catalina creates a read-only volume for System files, including the root level. You can't write to root level while booting from that volume.

Normally, when Catalina is installed, the installer moves any third-party or user folders away from root level. It's not clear why that hasn't happened, unless the datestamp is not accurate.

Disable SIP: Recovery mode, Terminal: csrutil disable
Restart.
Mount drive for read and write sudo mount -uw /
Delete it [sudo] rm -rf /your\ folder\
Restart.
Enable SIP: Recovery mode, Terminal: csrutil enable


How to record and replay mouse activity on automator in the background? I want to create an "application" in Automator for recording mouse actions. When it is run, i want it to execute the actions in the background, like it happens when a macro is run in excel, rather than simply replaying it like a movie. Is this possible?

Update Note:

My original answer, shown further below, was written using a generic example and not the actual target because it had not yet been disclosed. Once it was disclosed, in a comment, I downloaded CopyClip 2 and wrote the AppleScript code using UI Scripting to bring up the Advanced Preferences pane, click the Delete All Clips button, the subsequent Delete All button, close the Preferences window, and close the UI that shows the clips. It works, however it's UI Scripting and you see it as though manually done, but it happens much faster and without seeing visual mouse movements across the screen. (Not really a background solution.)

That said though, I found CopyClip 2 to be very unstable and crashed every other or few times I ran the script, and why I'm not posting the code unless you really want to see it. So I don't recommend the UI Scripting method. Note that the instability expressed was just in conjunction with using AppleScript on the app and not the overall use of it. (I actually have not used it other then to answer the question.)

Looking now for a background solution, I investigated how CopyClip 2 stores the clips, and found where the clip datastore was and in what form. Not surprisingly, it's stored in an SQLite database. So with that information, I see two different options:

The first involves manipulating the data stored in the SQLite database. The problem there is, I don't do SQL programming, so you'd have to pursue that option on your own.

The second option is more of a quasi-brute-force method but it works well and did't crash the app in the process. It involves programmatically quitting CopyClip 2, deleting the clip database, and restarting CopyClip 2.

Either of these option would be considered the background method, especially when compared to using UI Scripting.

The following example BASH script code is what I used for the second option mentioned. It can be run in a number of different ways.

#!/bin/bash

if [ -n "$(pgrep "CopyClip 2")" ]; then
    pkill "CopyClip 2"
    sleep 1.5
    for i in $HOME/Library/Containers/com.fiplab.copyclip2/Data/Library/Application\ Support/CopyClip/*; do
        rm "$i" 2>/dev/null
    done
    open -a "CopyClip 2"
fi

I first tested this a half dozen or so times in Terminal as an executable BASH script before I used the code in a Run Shell Script action in an Automator application, and tested another half dozen or so times. For my 2 cents worth, this is the way I'd go over trying to do the SQL programing option even if I knew SQL.

Saved as an Automator application, e.g., Delete All CopyClip Clips, I used Spotlight to find and execute it, i.e.:

CommandSpacedelEnter

The application could also be placed in the Dock for a quick mouse click to delete all the clips too.

By the way, I also have Hide window as startup set to ON on the General tab in Preferences for CopyClip 2, so as to make this as background as possible in appearance. This way, unless you're looking directly at the Menu bar icon for CopyClip 2, you don't really notice it's been closed and reopened.

Also, note that the clip database is normally created upon first run and only changes as clips are stored or deleted through CopyClip 2. I examined the clip database using SQLiteBrowser when first created and after deleting all the clips and its structure is essentially no different then when first created1, so repeatedly deleting the clip database really isn't a problem to achieve the goal. (1 While technically there are some differences, the deleted data had not be removed from the database by the VACUUM command yet, nonetheless this option is extremely safe and should not be problematic with repeated use.)

Original Answer:

Using the Record button in Automator, you've recorded some mouse clicks on the Menu bar and this produced a Watch Me Do action in the workflow. Subsequently running the Automator workflow containing the Watch Me Do action, to use your words, it plays like a movie.

So you are asking if this can run in the background more like an Excel macro then play like a movie?

Generally speaking, the short answer is both yes and no... yes more like a macro (sort of), but no not in the background.

That said, note however and depending on the target application and what needs to be done, there may be the possibility of coding something to perform in the background but without knowing the explicit specifics it's beyond the scope of  this generally speaking short answer.

The longer answer is, to convert the Watch Me Do action into appropriate AppleScript code. However, because it uses UI Scripting it cannot run in the background, but it can run much more efficiently and faster then a Watch Me Do action played back and you do not see the visual mouse movements across the screen. This means that when the AppleScript code is run, by whichever means one choose, one has to allow the script to process its code uninterrupted, thus being one of the drawbacks of UI Scripting.

However, I believe you'll find this more desirable then playing like a movie and seeing the mouse visually move across the screen.

As an example, recording my actions while using the Clock on the Menu bar in this example, I'm going to click the Clock menu item, then click the Open Date & Time Preferences… menu item, then click the Close button on the Date & Time Preferences pane of System Preferences, which is opened as a result of the two previous clicks.

In Automator, I select the three Events in the Watch Me Do action, then press CommandC to copy the events to the clipboard.

Now I open Script Editor and in a new document, press CommandV to paste the copied events from the clipboard.

This produces the AppleScript code shown at the very end of this answer, which is placed there because not much of it will actually be used, but it will have the key pieces of code, so not having to manually type all of the finished code and is only included herein for completeness of this example case.

Within the pasted code there are three commands that represent the actual click events, and since this is using UI Scripting it's being done by System Events.

So, in another new document, in Script Editor, I add a tell application "System Events" block, e.g.:

tell application "System Events"

end tell

Within that tell block, I copied the appropriate portion of the three click events from the code pasted in the other document while removing the unnecessary code and backslashes for this use case, e.g.:

tell application "System Events"
    click menu bar item 7 of menu bar 1 of application process "SystemUIServer"
    click menu item 6 of menu 1 of menu bar item 7 of menu bar 1 of application process "SystemUIServer"
    click UI element 1 of window "Date & Time" of application process "System Preferences"
end tell

Now because this is UI Scripting, appropriate delay commands need to be added, e.g.:

tell application "System Events"
    click menu bar item 7 of menu bar 1 of application process "SystemUIServer"
    delay 0.5
    click menu item 6 of menu 1 of menu bar item 7 of menu bar 1 of application process "SystemUIServer"
    delay 2.5
    click UI element 1 of window "Date & Time" of application process "System Preferences"
end tell

Now while I could run the code above (or even the originally pasted code) and it should function properly at this time, the problem is that menu bar item 7, which is currently the Clock on my system, can change. So too in some cases, can the menu item n change as well, although not in this example use case. However, knowing this, lets rewrite the code so it's not hard coded for the menu bar item number or the menu item number:

tell application "System Events"
    -- click menu bar item 7 of menu bar 1 of application process "SystemUIServer"
    click (every menu bar item of menu bar 1 of application process "SystemUIServer" whose description is "clock")
    delay 0.5
    -- click menu item 6 of menu 1 of menu bar item 7 of menu bar 1 of application process "SystemUIServer"
    click (every menu item of menu 1 of (every menu bar item whose description is "clock") ¬
        of menu bar 1 of application process "SystemUIServer" whose title is "Open Date & Time Preferences…")
    delay 2.5
    -- click UI element 1 of window "Date & Time" of application process "System Preferences"
    -- click button 1 of window 1 of application process "System Preferences"
    quit application "System Preferences"
end tell

In the code above, the original three lines of code have been commented out, i.e. -- was added in front of each line. Also, the original third line has an additional line under it commented out, but was added to show how to generalize the original third line. However, since its purpose in this example was to close System Preferences, just tell it to quit instead.

So the final example version of the code to handle the three events that took place in the example Watch Me Do action in Automator is:

try
    tell application "System Events"
        click (every menu bar item of menu bar 1 of application process "SystemUIServer" whose description is "clock")
        delay 0.5
        click (every menu item of menu 1 of (every menu bar item whose description is "clock") ¬
            of menu bar 1 of application process "SystemUIServer" whose title is "Open Date & Time Preferences…")
        delay 2.5
        quit application "System Preferences"
    end tell
end try

Now comparing this final example version of the code above to the original code shown below, one can see the difference and what's necessary to cleanup the original code while not hard coding the menu bar item number or the menu item number, thus making it more intelligent then using the Watch Me Do action in Automator.

Note: The example AppleScript code above is just that, and sans wrapping it in a try statement, does not include any other error handling as may be appropriate/needed/wanted, the onus is upon the user to add any appropriate error handling for any example code presented and or code written by the oneself. This includes setting the value of the delay commands as appropriate for the timing on ones own system.

Additionally, not all menu items are as easily scripted as this example case and in some cases may not work well to even use this method, it just depends and is one of the reasons I was trying to get more explicit and specific information from you in my comments. That is, I might have been able to give you explicit and specific code for your immediate need, rather then having to write an answer using an example. Although, hopefully this example with be useful to may others as well.

Original AppleScript code generated when events were copied and pasted from the Watch Me Do action in Automator for this example use case:

-- Click the “clock” menu bar item.
delay 0.249747
set timeoutSeconds to 0.500000
set uiScript to "click menu bar item 7 of menu bar 1 of application process \"SystemUIServer\""
my doWithTimeout( uiScript, timeoutSeconds )

-- Open Date & Time Preferences…
delay 0.186764
set timeoutSeconds to 0.500000
set uiScript to "click menu item 6 of menu 1 of menu bar item 7 of menu bar 1 of application process \"SystemUIServer\""
my doWithTimeout( uiScript, timeoutSeconds )

-- Click the “<fill in title>” button.
delay 0.509640
set timeoutSeconds to 0.500000
set uiScript to "click UI Element 1 of window \"Date & Time\" of application process \"System Preferences\""
my doWithTimeout( uiScript, timeoutSeconds )

on doWithTimeout(uiScript, timeoutSeconds)
    set endDate to (current date) + timeoutSeconds
    repeat
        try
            run script "tell application \"System Events\"
" & uiScript & "
end tell"
            exit repeat
        on error errorMessage
            if ((current date) > endDate) then
                error "Can not " & uiScript
            end if
        end try
    end repeat
end doWithTimeout


How to find the hashed password from the 32 character password keychain shows me? I have a 32 character password that keychain access has shared with me, it's 28 uppercase letters and numbers combined, and 4 "-" symbols. Can I retrieve the hashed password that is the actual password for the login to an email address? Would appreciate the help. I'm using OSX 10.9.5

It's not quite clear from your question whether the password you need is actually stored in Keychain itself or elsewhere.

As a general rule in security, if a password is recognised by a mathematical hash, then it is never stored anywhere in plaintext.

The result of the hash is stored, not the actual password - so that when the correct password is input by the user, the hash of that input matches the stored hash result. Doing it this way means that brute force is the only way to 'guess' the password; it can never be reverse-engineered.

Having said that - Keychain does store original passwords for you & these can be retrieved from Keychain Access by selecting the appropriate entry & entering your keychain password.
Keychain Access is in Applications > Utilities
Keychain does this by encrypting the entire keychain using a separate hash structure & can be locked/unlocked by anyone with the appropriate password.


'No machine certificates found' when adding machine certificate into VPN I've 2 certificates, one for user authentication and another for machine authentication.

My user authentication includes certificate and private key based on which I've generated pkcs12 file using the following command:

openssl pkcs12 -export -clcerts -inkey private.key -in certificate.crt -out MyPKCS12.p12 -name "Your Name"

as suggested here: How can I add a private key to my keychain?

So User Authentication certificate loads fine in VPN configuration, but the problem is when I'm trying to select Machine Authentication. OSX can't find any suitable certificates, even I've imported it into Keychain (ca.crt).

The error says:

No machine certificates found
Certificate authentication cannot be used because your keychain does not contain any suitable certificates. Use Keychain Access to import the appropriate certificates into your keychain. If you do not have the certificates required for authentication, contact your network administrator.

How do I load my machine authentication certificate, so can be recognised by Keychain when configuring VPN (ca.crt & tls-auth ta.key)?

Related:

https://stackoverflow.com/questions/5401088/key-chain-warning-the-system-roots-keychain-cannot-be-modified

Not sure if it's possible using standard network settings, but you can configure VPN this way on OSX by using 3rd party software (e.g. Viscosity).


iPhoto and unknown RAW Formats I have a Camera that supports RAW (Panasonic Lumix FZ35), but sadly iPhoto (and Aperture) don't support this format.

Short of reporting Feedback to Apple and hoping for the best, is there any other way to make iPhoto work with this RAW Format, like a "Plugin" that integrates neatly into iPhoto?

I want to avoit having to use Photoshop to edit/convert them to JPG and then put those JPGs into iPhoto.

A lot of cameras come with software to convert their RAW files to other formats. If your's comes with conversion then see if it supports regular TIFF.

You might want to look into GIMP, which is a graphic program from the *nix world that runs under X11 on the Macintosh. It's very similar to Photoshop but is free. It has some auto conversion capability and/or might be able to read your camera's RAW files. GraphicConverter might be another option. It's got a long list of formats it supports and converts between.

Converting to JPG changes the file format in ways that make it a lot less flexible. I have my own photography company, and only shoot RAW when I'm doing serious work, because I need the flexibility of non-jpeg. I convert to Photoshop format and do all my manipulation in their format, then save a copy of the final image in Adobe's Photoshop format, then make another copy and save it as JPG, ready for sending to the place that does my prints. RAW and TIFF support better color and greater gamut (light range from dark to light) and you can see the difference after converting to jpeg so I want to avoid the conversion until the last step.


Randomly losing CMD+V (paste) functionality I am randomly losing CMD+V functionality. Is there a shortcut which might trigger this? So that the keyboard goes into some kind of different mode?

I am working with cmd/shift/option a lot in gfx apps, like Illustrator.

I thought, maybe the CMD-key is broken, but this happens with both CMD-keys.

After some time using the system it starts to work again.

I am on Mountain Lion, to which I recently switched, never had this problem prior to Mountain Lion.

I had the same issue, what I found was that using a Software called ShareMouse, and when it crashed, I lost my Cmd+v functionality; I then forced ShareMouse to close, and cmd+v returned.

You may be experiencing this issue with ShareMouse, or some other piece of software.


Change media kind of multiple items not working I'm following the guideline in https://www.lifewire.com/create-an-audiobook-from-mp3s-in-itunes-2438719 and have a problem with step

  Use iTunes to Convert MP3s to an Audiobook

  Join multiple MP3s to make your own audiobook

I wanna change multiple mp3 to audiobook. But is not working. Rightclick on selection and "Get Info" -> Options tab -> music->audiobook from Media kind /dropdown/ and OK. Nothing happens.

It's works by single item well.

(iTunes 12.9.2.6 on Windows 10 x64)

If your method does not work it could be the one of the selected  MP3 files (that you are trying to Join in to Audiobook) is not plain spoken word but contains music elements.

I recommend you use the conversion method or find out which MP3 file is the problem.

In this method, you can create audiobook from MP3 files.

As a mp3 to audiobook converter, iTunes is great. Even though the created audiobook files are deleted from iTunes library, you can import them from local into iTunes or other players with audiobook features. And there is no need to operate on the original MP3 file again as long as you have stored the created M4B audiobook files.

Follow the instructions here ...


What is Ethernet Adaptor (wc5) In my Network Preferences panel, I've just noticed a network type I didn't see before.

The name is "Ethernet Adaptor (wc5)" (note it says Adaptor and not Adapter). It has an IP, it's yellow, and it says "Ethernet Adaptor (wc5) has a self-assigned IP address and will not be able to connect to the Internet."

What is it? Where does it come from? I am connected via WiFi - and, probably not a coincidence, I have internet issues right now (some sites work some don't).

What is happening?

EDIT: Disabled this network adapter, and now Internet flies. I don't know what it is and how it got there...

The (wc5) is probably from Wirecast. Do you have it installed?

It may have added an interface so it can stream and grabbed what it thought was an Ethernet interface but was actually your WiFi interface.


macOS Catalina beachball appears when I use TextEdit or Preview apps I have a MacBook with macOS Catalina 10.15.3 installed.

I'm now noticing that whenever I open an image file with the Preview app, a beachball appears right about when I quit the app.

Also, a beachball appears whenever I open a text file using the TextEdit app.

Is there any way I can reset things to fix these problems?

Hi I did some more Google searching, and so the answer for this bug I was facing is to Disable the "Dropbox Finder Extensions" in the "Extensions" section in System Preference.

It seems the Finder features of Dropbox (like green dot next to filename in finder etc.) was causing beachballs in using TextEdit & Preview. Now it's been fixed for me.

Since it's a bug, I hope Dropbox & Apple will fix it.


What open source video editing software packages are available for the Mac? What are open source video editing softwares available for the Mac?
I have used Pitivi, AVS on other systems.

I found two:
Jahshaka
It is an open source free, video editing software, effects, and compositing suite.

When I used it several months back, it was very unintuitive and I couldn't figure out how to use it. However, there are tutorials for Jahshaka now.
Kdenlive
Kdenlive is an open source, multi track video editor released under the GNU Public Licence.

(The screenshot is of Kdenlive running on Windows, but it is available for the Mac through Macports)


Macbook air or Macbook pro? I am iPhone app developer. i have develop application in my hackintosh PC but now i plan to buy a Macbook for app development.

I have two option one is Macbook air and second is Macbook pro
both are coming in 13 inch screen.

Please help me to choose which is the best Macbook for application development ?

Either will do just fine for application development, and if you don't plan on doing heavy photo or video editing there's no need for the extra processing power of the MacBook Pro.

You might want to consider that the MacBook Air does not have a Retina display like the MacBook Pro, so the Pro display is of higher resolution, and you will have the option of scaling the display resolution to make everything smaller in order to get more screen real estate (but on a 13" display that might make stuff hard to read instead).

MacBook Air is also obviously lighter than the MacBook Pro, so it puts less (if only by a little bit) of a strain on your back and shoulders if you'll be carrying it around a lot.

If neither the optional extra screen real estate or processing power is important to you, and price is also important, go with the MacBook Air. If the price doesn't matter and you don't mind the extra weight, go with MacBook Pro.


What should I do if I get email about my account claiming to be from Apple? For about a week now I keep getting an SMS giving me an Apple ID verification code. It will do it a couple of times and then a phone call. Today I received this email:

  Subject: Verify your Apple ID before We closed Your account.

  Dear Apple User,

  We unable verify your account informations in order to continue using your Apple.
  This Apple ID has been locked for security reasons.
  You must unlock your account to continue using your Apple ID.

  To read your secure message by opening the attachment (PDF).
  You will be prompted to open (view) the file or save (download) it to your computer.

  For best result, Save the file first, then open it on a web browser.

  Your account will be disabled if we didn't receive any response from you in more than twenty four hours

  Sincerly
  Apple Support

The whole thing sounds fishy to me. Or phishing to me.

What I am needing to know is, is this a real email from them or no? It just seems off.

Apple has a support page regarding phishing attempts, see Identify and report phishing emails and other suspicious messages. Taken from there:

  These are common signs of a possible phishing attempt:

  The sender’s email address doesn’t match the name of the company that it claims to be from.
  The message was sent to an email address or phone number that's different from the one that you gave that company.
  A link appears to be legitimate but takes you to a website whose URL doesn’t match the address of the company’s website.
  The message starts with a generic greeting, like “Dear valued customer” — most legitimate companies will include your name in their messages to you.
  The message looks significantly different from other messages that you’ve received from the company.
  The message requests personal information, like a credit card number or account password.
  The message is unsolicited and contains an attachment.

It also recommends to report such messages to Apple by using "Forward As Attachment" within Mail and then send it to reportphishing@apple.com.


Is it possible to increase size of an APFS volume? I've an APFS disk image (disk3). Currently it's capacity is near close; around 700 MB left.

Is it possible to increase it while keeping the data inside intact!

I've tried diskutil apfs resizeContainer but with no luck.

diskutil list:

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         251.0 GB   disk0
   1:                        EFI EFI                     314.6 MB   disk0s1
   2:                 Apple_APFS Container disk1         250.0 GB   disk0s2

/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +250.0 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh HD            170.4 GB   disk1s1
   2:                APFS Volume Preboot                 23.1 MB    disk1s2
   3:                APFS Volume Recovery                517.3 MB   disk1s3
   4:                APFS Volume VM                      3.2 GB     disk1s4

/dev/disk2 (external, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *500.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS CAN                     499.7 GB   disk2s2

/dev/disk3 (disk image):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        +30.2 GB    disk3
   1:                        EFI EFI                     209.7 MB   disk3s1
   2:                 Apple_APFS Container disk4         29.9 GB    disk3s2

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +29.9 GB    disk4
                                 Physical Store disk3s2
   1:                APFS Volume cache                   29.3 GB    disk4s1

You can first increase the size of the disk image and in a second step the size of the container:

Get the disk image limits:

hdiutil resize -limits /path/to/disk_image

Eject the disk image items:

diskutil list
diskutil eject diskXsY #eject all volumes/items of the image

Depending on the limits increase the size of the image:

hdiutil resize -size <size> /path/to/disk_image #<size> in b|k|m|g|t (e.g. 50g)

This works for normal as well as sparse images. I didn't test sparse bundle images.
Mount the disk image:

hdiutil attach /path/to/disk_image

Get the details:

diskutil list

Increase the size of the APFS container:

diskutil apfs resizeContainer <disk_identifier_apfs_container> 0

Don't mix the disk identifiers of SSD and disk image APFS container here! The embedded APFS volume should be expanded automatically if required.

Using certain APFS formatted disk images (sparse images) may result in data loss in the image on APFS formatted physical disks with low free space.

Instead of using an APFS disk image simply create a new APFS cache volume (with quota?) in the APFS container (internal SSD) or an image/a second partition on an external HDD.


Disk Utility hangs prior to resizing partition When trying to shrink the size of a partition, the period before the actual resizing happens (where Disk Utility says "Preparing to partition disk") hangs forever. I dug into Console to see what was going on and I came across this error, which is 100% reproducible for me as soon as I click "Apply" to resize the partition:

8/1/14 8:48:48.299 AM Disk Utility[631]: *** setObjectForKey: object cannot be nil (key: FilesystemName)
8/1/14 8:48:48.301 AM Disk Utility[631]: (
    0   CoreFoundation                      0x00007fff879eb25c __exceptionPreprocess + 172
    1   libobjc.A.dylib                     0x00007fff82c08e75 objc_exception_throw + 43
    2   CoreFoundation                      0x00007fff878e622e -[__NSDictionaryM setObject:forKey:] + 1102
    3   Partition                           0x000000010681cdcc Partition + 110028
    4   Partition                           0x0000000106814883 Partition + 75907
    5   AppKit                              0x00007fff8834c06d -[NSAlert didEndAlert:returnCode:contextInfo:] + 90
    6   AppKit                              0x00007fff8834ba9a -[NSWindow endSheet:returnCode:] + 368
    7   AppKit                              0x00007fff8834b66d -[NSAlert buttonPressed:] + 107
    8   AppKit                              0x00007fff88210260 -[NSApplication sendAction:to:from:] + 327
    9   AppKit                              0x00007fff882100de -[NSControl sendAction:to:] + 86
    10  AppKit                              0x00007fff8825cc4d -[NSCell _sendActionFrom:] + 128
    11  AppKit                              0x00007fff88276655 -[NSCell trackMouse:inRect:ofView:untilMouseUp:] + 2316
    12  AppKit                              0x00007fff88275a27 -[NSButtonCell trackMouse:inRect:ofView:untilMouseUp:] + 487
    13  AppKit                              0x00007fff8827513d -[NSControl mouseDown:] + 706
    14  AppKit                              0x00007fff881f6a58 -[NSWindow sendEvent:] + 11296
    15  AppKit                              0x00007fff881955d4 -[NSApplication sendEvent:] + 2021
    16  AppKit                              0x00007fff87fe59f9 -[NSApplication run] + 646
    17  AppKit                              0x00007fff87fd0783 NSApplicationMain + 940
    18  Disk Utility                        0x0000000100e18867 Disk Utility + 6247
    19  libdyld.dylib                       0x00007fff8496a5fd start + 1
    20  ???                                 0x0000000000000001 0x0 + 1
)

I found this link which describes pretty much the same issue, but does not contain any useful suggestions for workarounds.

In case it is helpful, here is an image of Disk Utility at that moment. Note that I am dual-booting Mac OS and Ubuntu -- I assume the reason the FilesystemName is nil is the same reason that the ext4 Ubuntu partition shows up as disk0s4.

Note: This is on 10.9.4 (Mavericks).

Yeah I do encounter this problem sometimes also, but I don't know why is it happening. For some verifying and repairing solves the problem, but for those that doesn't get solved, the command line tool diskutil often does the job.

You can just use

diskutil resizeVolume $1 $2

where

$1 is the Mount Point or Disk Identifier or Device Node of the disk you are trying to resize (obtained with diskutil list).
$2 is the size in decimal with suffix of B, S(512 byte blocks), K, M, G, T, P, or percentage of the current size(%).

e.g. diskutil resizeVolume disk0s6 100G will resize the volume disk0s6 to 100 GB.


macOS Utilities doesn't recognize internal ssd (but normal usage is working fine) I own an early-2015 Macbook Pro and by trying to format it for reselling purposes I've got faced with a curious and annoying problem. macOS utilities does not recognize my internal ssd. Be it by accessing macOS utilities's Disk Utility section or the "Install a previous OSX" one, my internal storage just isn't listed at all.
This is particularly weird given that the computer is working fine, and whenever I access the regular OSX's disk utility, my internal storage unit is being listed properly. Not only that, but the computer is working properly, so I know for a fact that it is no hardware issue that is causing it. I wouldn't even have discovered this issue hadn't I had to reformat this computer.
Does anyone have a clue on how can I get Macos utilities to properly track my internal SSD?
Thanks in advance

If my suspicion is correct, your Mac boots to an older version of macOS Recovery and Disk Utility of that older version doesn't know APFS, so it just hides the partition.
First, make sure that View → Show All Devices is selected in Disk Utility. With this enabled, all drives should be visible – regardless if Disk Utility knows how to handle the filesystem. This should at least allow you to format the drive.
You may also try Internet Recovery. If you're starting your Mac with the keys ⌥⌘R held down until the Apple logo, it should boot into the latest macOS Recovery compatible with your Mac. From there, you should see all partitions and be able to reinstall the most recent compatible version of macOS.


Modifier keys settings does not work on login screen I am using a PC keyboard and have to switch the Win (⌘ Cmd key) and the Alt (Opt key) for this to feel like a proper Apple keyboard. I have this remapped via System Preferences for my user account just fine.

However, this remapping does not work on the login screen, everything seems to be reverted to as if I haven't done any remapping on the login screen.

As I want to use the Cmd+Shift+Letter to select my face to login without having to touch the mouse it became annoying every time I had to re-remember that the remap only takes effect after I login.

Any suggestion on how can I change the modifier key settings for when I am not yet logged-in?

Run:

sudo cp ~/Library/Preferences/ByHost/.GlobalPreferences.*.plist \
    /var/root/Library/Preferences/ByHost

and restart.


Change Terminal Theme for Developing I just got an iMac and wanted to change the default terminal to, what i believe, is a theme.

I saw it a while ago and i'm not finding it.

Screenshot below.

You can find a video from Yeoman using it here

The closest I've found is the Steeef theme for oh-my-zsh. It seems very close, except the font/background is different (however that is set externally in Terminal settings).

To install this:

Install Homebrew and zsh, then set zsh as default shell.

ruby -e "$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)"
brew install zsh
chsh -s /usr/local/bin/zsh

Restart Terminal.
Install oh-my-zsh.

curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh

Edit ZSH_THEME in ~/.zshrc to be steeef.

Restart Terminal.


IPhone contacts are not sorted after import I imported all the contacts to my iPhone via .vcf file and now they are not sorted by name. They are all under the # sign.

I imported contacts with a program called Wondershare TunesGo. I just clicked import and selected vcf file.

A contact from VCARD.

BEGIN:VCARD
VERSION:2.1
N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=C4=8C=75=6B;=4D=65=74=61;;;
FN;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:=4D=65=74=61=20=C4=8C=75=6B
TEL;CELL:0038640823731
END:VCARD

It worked awesome!

Having all your contacts under something as arbitrary as # is not a very good solution and I can relate that you would like a little more structure on your device.

Have you tried logging into your device with iCloud, and then going into www.iCloud.com and importing the vCard following this article there?
If you have the vCard a safe place and a backup of your contacts, I would recommend you to delete all your contacts first and use this method.

Here are the steps to import a vCard with iCloud:

Data should be on
Go to Settings > iCloud
Turn On Contacts
Login into icloud.com with your username
on iCloud you can see all your applications which you share on iCloud, click on Contacts and see if all the contacts are synced. Here all names will be sorted correctly and no # would be there
on iPhone turn off Contacts in Setting > iCloud and choose Delete from iPhone
come out and turn on Contacts again in Settings > iCloud
give it some time and now go to Contacts: all contacts will be synced from iCloud and the # sign should vanish.


How much free space should there be on the start volume? I have a MacBook 2,16 GHz with 3 GB RAM (white from 2007) and I wonder how much free space should there be on the start volume.

I have a 100 GB partition for OS X (10.6.5) and a separate data partition of 300 GB (however the user directory is on the system partition).

free space on the start volume:
30 GB after booting
22..25 GB after one day of use
goes down to about 22 GB after several days of use (I usually reboot, when it reaches 22 GB).

(there is also about 30 GB free on the data partition).

=> Could that be a performance problem or is that enough free space?

I have some large databases open in DevonThink Pro, mostly many pdf files open in Skim,  Safari seems to need quite some RAM and there are some non-native apps (TexMakerX and JabRef) which also get quite slow sometimes.

I've run for 3 years with no more than 10GB ever free on my 160GB disk, and quite frequently as low as 500MB free. Things seem to work just fine.

Aperture complains loudly if there's less than about 1GB free: I think that would be a sensible minimum to stick to.

Your system swap file does get recovered without a reboot -- if memory usage drops enough.

I find that Caches, particularly those of Safari.app and Spotify.app are a big cause of unnecessary disk use. You can rm -Rf ~/Library/Caches whilst the system is running without any bad effects if you're about to run out of space!


Old 'unknown' versions of applications appearing in Spotlight search results When I migrated my old Mac to my new one, I copied some applications over from /Applications on the old Mac. Some of these were App Store apps, which I of course had to reinstall from the App Store in order to actually run them.

What's happened though, is there are some apps that appear in duplicates, with a white nondescript document icon like so:

What's going on here? Can I fix this? I've tried reindexing Spotlight both through the GUI exceptions and via Terminal and scutil, but to no avail. I've also tried searching "This Mac" for the files, but they don't appear in Finder search results anywhere. The plot also thickens when you compare the created/modified dates of the duplicate to it's proper original: they're always the same.

Go to /Library and do a search for whatever junk you're trying to get rid off. This happened to me for Cisco WebEx where I had 7 versions (most of them junk). Re-creating the index etc won't help.


How record line in audio on iPhone with lightning jack? I've been tearing my hair out over this one: when recording audio or video with my iPhone, I can't figure out how to use the lightning port for an audio-in signal.

For example, I'm filming someone playing an instrument, and I want to use the audio-out of that instrument as the direct sound source for the video. (without holding a microphone near the speakers...)

I have tried a 3.5mm 4-pin minijack cable from the instrument to the iPhone (with the minijack to lightning converter) but this 4-pin audio cable is not recognised as a microphone/sound input. I have also read an article about soldering your own cable with the right resistor values, but that can't be the only way to record audio on an iPhone???

The only microphone that gets recognised is the one that is built in the official apple EarPods.

How can I record an audio source directly into my iPhone?

You need a Lightning audio interface. There's a lot of different products in various price ranges from a number of makers. Note that there are some that are targetted at specific instruments such as guitar or bass, or microphones - and some have multiple types of inputs.

You could for example take a look at the Line 6 Sonic Port audio interface for Lightning or similar.

If you want something for 3.5mm minijack, you could instead look at the Tascam iXZ Microphone and Audio Interface for iOS (approx. 60$).

Any assorted music store, or online vendors such as Amazon, has multiple types of these products. Some cheaper than the these, some much more expensive.


Change lockscreen date language iOS 6 When I first configured my new iPod touch 5th gen, I put "English" for iOS language. I then switched iOS to "Français (Canada)" in the General Settings/International. Everything look fine except one thing : The date displayed on the lockscreen which remains in english (Ex: Monday, 15 April). Even after restarting my iPod, the date is still in english.

Any idea how to have the date translated on the lockscreen ?

Under Settings -> General -> International, you need to change the Region Format settings to specify your desired region; I'm assuming you only changed the Language settings.

When I change Region Format to French -> Canada, my lockscreen appears with the correct French date format: mardi 16 avril.


Is JavaScript secure? I have a couple of websites I have to use that require Java so I am leaving it on in Java Preferences.app, disabling it on all browsers bar one that will only be used for those sites. Am I safe to leave JavaScript on in Safari's preference's checkbox?

It's important to make the distinction between Java and JavaScript.

Java is a general purpose programming language and associated runtime originally developed by Sun. Java programs can run inside a browser plug-in. There have been some recent vulnerabilities uncovered, and Apple has taken the step of disabling Java by default.

Javascript is a scripting language used widely on the web to provide all sorts of dynamic behaviour for websites. Like anything, it's never going to be 100% secure, but because it's limited in what it can do (it can modify the behaviour of a webpage, but it can't run arbitrary code on your Mac or modify your files), it's safer than Java.

Javascript is fairly safe to leave on (and it will cripple a lot of sites if you turn it off). If you definitely need Java, then leave it on, but be vigilant about running Software Update so that you get the latest security patches, and consider disabling it if you don't need to access those sites for a while. Disabling it in browsers you don't use for those sites is also a good idea.


Set restriction code automatically when i update my iPhone to iOS 9 I didn't set restriction code on my phone, when i update on iOS 9 it shows pass code and i don't know about it.

Try 2580. Dont know if this is default or a forgotten password of mine that i just happened to remember but i would give it a shot. It worked for me.


Is there a way to automatically change my keyboard language when I switch between windows on macOS? For example, when I use the Messages app in which I use one keyboard, and in Xcode, I use only English keyboard. Can macOS switch my keyboard to English when I make the Xcode window active?

Follow these steps to changing your keyboard language dynamically:

Open up System Preferences. This should be in your /Applications folder.
Click on "Keyboard":

Click on the "Input Sources" tab:

You should see a checkbox titled "Automatically switch to a document's input source". Check that checkbox and you're done!


iCal: How to display full event title? I am new to Mac, Mac OS X and iCal.

In the monthly view of iCal, I found it very inconvenient to read only the first 10-12 characters of an event's title. To read the full length title, I have to do one of the following:

go to full screen
reduce font size to "unreadable"
open the event edit dialog
go to the daily view

None of the above options satisfies me.

Is there a way to have iCal display additional info (full title, comments...) when mouse stay over an event for one second or so?

Alternatively, is there a way to make a long (> 10 chars) title wrap to a new line rather than being cut with ...?

There are many threads (on other forums) asking about the title wrapping, but I'm afraid it isn't possible. For reference, I found this, this, and this.


iPhone 7 Plus stuck at Recovery Mode after downgrading from iOS 11 Understand that some people managed to resolve the "stuck at Recovery Mode" by installing back the iOS 11.

iPhone 7 Plus stuck in recovery mode and can't restore/update even in DFU

Would someone walk me through the steps in some detail the process of how to do this?

Solved it with the following steps

Manually download the IPSW file corresponding to your iPhone model via the links found on Reddit.
Connect iPhone to Mac/PC
In iTunes, select the phone and click on "Upgrade" with either Opt/Alt (Mac) or Shift (PC) pressed, then select the IPSW file you've just downloaded
Installation will start and you will be back at iOS 11.


Create local backup of notes in Notes.app on macOS I'm using a company-issued MacBook where we cannot use iCloud to backup notes. But I would like to have a way to create backups of the notes, since they are not included in the company backup software. Is there a way to do this by hand?

I tried copying the folder:

$HOME/Library/Containers/com.apple.Notes

but when I copied that one to a new Mac, the notes didn't show up when running Notes.app.

You may have copied the wrong directory, depending on your operating system.

Newer operating systems (I believe El Capitan and above, but certainly Sierra and above) use this folder:

~/Library/Group Containers/group.com.apple.notes/

Without iCloud there should be no issue with disappearing notes, which you would have to work around, if you were signed into iCloud Notes.


Is iPod docking station just a USB with a different connector? Let's say I'm building a device with an iPod docking connector. Can I use standard software for USB on the device side? Are there any special considerations?

The device is supposed to play audio. Charging is good to have but optional.

Engadget has a great tutorial on how to create a custom iPod docking station, along with system configurations, etc.

Hope this helps:

How-To: iPod docking station/configuration


X-Mailer header mapping to actual version of mail.app used to send message When email is sent using Mail.app a Apple Mail (x.xxx.x) X-Mailer header is added to the message. Is there a way to determine which actual version of the app was used to send the messages?  In Lion Version 5 the header is (2.1244.3).

Is there some sort of formula that determines what the numbers in the header are?  Is there any way to determine the version mappings from older versions?

Simple answer - no, there is no easy way to tell from just the number.

However, I did a Google Image search for screenshots of the "About Mail" window, and found the following correlations between Mail version numbers.

Mail 5.2 = 1257
Mail 5.0 = 1244
Mail 4.3 = 1081
Mail 4.0 = 1075
Mail 3.6 = 936
Mail 3.5 = 930
Mail 3.4 = 928
Mail 2.1 = 752

If you're wanting to match to versions of the OS:

Lion: 12xx
Snow Leopard: 10xx
Leopard: 9xx
Tiger: 7xx

"About Mail" images found on these (and other) pages:

http://www.ecu.edu/cs-itcs/mac/Apple-Mail-Settings.cfm
http://gseis.ucla.edu/administrative-support-units/educational-technology-unit/etu-documentation/email-apple-mail


Are restrictions in iOS by device and not iCloud account? Just getting to grips with restrictions on multiple iOS devices using the same AppleID. Are restrictions device specific? If yes, do I have to set them up again on the other device?

Yes. Restrictions are limited in scope to the device on which they are configured. If more than one device is tied to the same Apple ID, restrictions will have to be set up separately.


Why does my command line prompt now beging with "vpn"? I was just (unsuccessfully) playing around with setting up a vpn in OS X Server, and now all my new terminal prompts begin with "vpn" followed by my user name. Anyone know why this is the case and how I can revert back to my default prompt, without "vpn"?

SuperUser has a similar question/answer.  I thought this was covered here already, but couldn't find it.

Found it!


Add Library folder to Spotlight privacy folder except Mail/MailData having some search/index problems with Mail app on old Mac OS.

How can I put ~/Library into spotlight privacy (in order to not index) except ~/Library/Mail

Mac OSX 10.8

at the moment I just explicitly select all folders but Mail under Library into Spotlight privacy part. Not so nice...

Another workaround..
move Mail folder out of Library and use symbolic link
then I can just add ~/Library into spotlight privacy part

$ mv ~/Library/Mail ~/Mail
$ ln -s ~/Mail ~/Library/Mail

index/search in Mail app will work.


iOS Mail message won't delete on iPhone XR I received an email yesterday that refuses to unflag or be deleted in the iOS Mail app on my iPhone XR. All other messages around it open when touched and respond to long-press, but this message is completely unresponsive. Pressing "Edit" in the upper right corner of the inbox produces radio buttons to the left of all messages which respond as usual, but the radio button for this message is unresponsive.

In addition to the above, here are the things I've tried to remove this problematic message:

Swipe up to quit the Mail app (multiple times)
Restarted the phone
Deleted this message using the iOS Gmail app and even used "delete forever" after it was in the trash
Restarted the phone again

I also tried some different things within the Settings area for this account, but I was hoping not to have to go so far as to delete the account.

I'm running iOS 13.1.3

I found a way to solve the problem without deleting the email account in Settings. As mentioned in a comment to my original post, deleting the email account was undesirable in this case because it is an account accessed entirely via another account (which required significant time to figure out how to set that up).

I was able to solve the problem by using the Safari browser on the iPhone to log into the gmail account where the problematic message was and deleting it via that browser gmail interface. Just to be sure, I also went to the trash there and deleted it forever.

I then quit the iOS Mail app by swiping upward and then upon reopening found the message was finally gone.

It's surprising to me that message was still there in the Safari interface. After all, I had had already deleted ("forever") the same message using the gMail iOS app.

I conclude that both the iOS Mail app and the iOS gMail app, though very convenient, do not provide the transparent control that the browser interface does.


Transfer a voice memo in iPhone directly into Music app I want to play the voice memos using Music app on my iPhone as it has a loop feature which the Voice Memos app doesn't.

But right now the only way I've been able to do it is by AirDropping from Voice Memos app to my Mac, then adding it to iTunes which sends it up to iCloud. Then go back to the iPhone and get the file in iTunes.

This can't be the most direct way to do it. What am I missing?

I think this is not possible! You have to import them into your computer with iTunes or 3rd party apps. Then put them in music app.


How select date of full backup to restore with Time Machine - NOT the latest backup My hard drive died after files started disappearing for a couple days. I ended up getting a new Mac since the computer was old anyway.

I'm worried that the last couple days of Time Machine backups will be bad due to the dying hard drive, so I'd like to use an earlier backup date from before it started dying with Migration Assistant.

I don't see any way in Migration Assistant to select the date of the backup that I want to use.

Should I just "delete" the latest backup folder dates from the Time Machine drive? Will that screw up the backup?

Any other way to accomplish this?

You should temporarily move the backups from the corrupt/unwanted version of the system to a different location, and then attempt the Restore. You may also try renaming the unwanted backups. For more, please go to:

https://thedesignspace.net/2014/01/11/osx-migration-assistant-doesnt-see-all-time-machine-backups/


Printing in black and white without intermediate greys I'd like to routinely print using only black ink when colour isn't important, because I have a whole lot more black ink than colour ink. I have a Canon printer and I have selected the 'Black & White' option from the print dialogue, but the result is that it prints in grey-scale, and the greys are rendered using the colour inks.

To prove this I scanned a printout at 600dpi and got the following in what looked like a light-grey part of the page:

I suspect that if I can convert the image to pure black and white with dithering (no grey) then the printer might then use only the black ink.  How can I do this easily from any application?  Or, how else might I configure my printer to print using only black ink?

I think there used to be filter options available in earlier versions of OS-X, which might have included something which would do this, but I don't see those anymore.

update: experimenting with Frizlab's suggestion to use the black and white Quartz filter in Preview's PDF save dialogue, I quickly realised that I was still going to have a problem with images.  Even after these become black and white bitmaps, they'll still need to be scaled to the print resolution.

As anticipated, this results in the black-and-white image being scaled with smoothing, resulting in intermediate greys which the printer renders in colour ink.  In fact, on printing my perfectly black and white test page my yellow ink lever dropped by another bar.

I also found that even perfectly black text has colour fringes on it.  I thought this might be a result of the medium-quality print setting (perhaps scaling was involved), so I printed again in high quality:

Even the high-quality image on the right shows a few of coloured spots (eg., top right edge), and I wonder if the difference is simply that the black has over-printed the coloured ink more thoroughly in the high-quality case.

I thought those colour spots might be aliasing or encoding artefacts, so I scanned a laser-printed page and found no such issues.

Remember that I'm not being picky about how this looks.  I just don't want to waste money replacing all my colour ink all the time while the black cartridge still has plenty of usable ink.

After this investigation, I think what I need is:

a dithering conversion, so that low-contrast text and images are visible
a conversion which matches the printer resolution exactly so that there is no scaling
to use the high-quality print setting

Or I need an alternative printer driver or printer firmware.

To convert easily any image in Black & White (no gray):

Open the file in Preview
Choose "Save As…" (Visible in the File menu, while holding the Alt key in Mountain Lion)
In the save dialog, choose the PDF file format
Still in the dialog, apply Quartz filter: "Black & White"

EDIT: You can convert to black & white with dithering using The Gimp (free & open-source):

Open the image using The Gimp
Select menu item Image -> Mode -> Indexed…
On the window that opens:

Select the Black & White palette
Select a dithering mode (I chose Floyd-Steinberg)

You can also use Photoshop using the same technique. However, Photoshop is expensive.

Finally, command-line solutions exist: convert (part of the imagemagick package), or gm (part of the graphicsmagick package).


Unicode character for Apple special keys? Mac keyboards have some unique symbols on their modifier keys such as Cloverleaf and Option.
What are the Unicode values for character representations of these symbols?

See this page for a long list:
https://gist.github.com/Zenexer/c5243c4216f1f8cd2251#complete-list


Some apps won't run after upgrade to iOS 7.1, how to fix? I update to the newest 7.1 yesterday.  Now some of my apps will not open.  Is there a way to delete this update?

Try shutting down all apps by double clicking the home button, then swiping all of the apps up to the top of the screen to quit them then reboot your phone by holding down the Home & Power button at the same time until it prompts you to shut down.

Go ahead and restart it again. If it still won't fully launch, you may have gotten a bum download. To delete the app, tap and hold on the icon until the 'x' appears and tap that 'x'. Go back to the app store and then reinstall the app and give it another try.


Time Capsule Connection Failed after update to Mavericks After I updating OS X to Mavericks, Time Machine backup stopped to work on Time Capsule.

I am connected on internet through Time Capsule without problems
AirPort Utility indicators are green with no errors (as well as Time Capsule LED)
Time Capsule name is displayed in Shared in Finder
I didn't do any changes except for update to Mavericks

But Time Capsule connection fails:

"Connection Failed" is displayed if I select TimeCapsule name in Finder
If I click "Connect as…", error dialog says: "There was a problem connecting to the server …"
If I click "Backup now" on Time Machine, it says: "Backup Failed: The backup disk … is not available."

In my case a serie of rabid and chaotic experiments with restarts and erasing a plist fixed the issue. Steps I did were:

Disabled TM Backup
Removed TimeCapsule from TM Backup Disk (this might not be necessary, you will not be able to add it again until it will start to work)
Saving a screenshot of Exluded paths in TM Options (just for the case)
Renamed /Library/Preferences/com.apple.TimeMachine.plist to *.bac
Restarted Mac
Restarted TimeMachine
Removed /Library/Preferences/com.apple.TimeMachine.plist and renamed the old plist back
Restarted Mac again
Added a TimeCapsule back to TimeMachine Backup Disks

Hopefully it started to work. I don't know which of the steps were necessary and which just desperate.


iOS App Icon Stretched I recently noticed that in iOS 7 my app icon stretches:

And here is how it is supposed to be:

This is only in iOS 7. What should I do? Should I contact Apple?

If you want to target only iOS 7, you just need 76 x 76, >120 x 120 and 152 x 152 icon sizes.
  If you want to target also iOS 6, you’ll need 57 x 57, 72 x >72, 76 x 76, 114 x 114, 120 x
  120, 144 x 144 and 152 x 152 icon sizes. Without >counting Spotlight and Settings icon if
  you don’t want the OS to interpolate them!

If you change the resolution of the app icons the problem should be fixed.

Source: http://blog.manbolo.com/2013/08/15/new-metrics-for-ios-7-app-icons


How does iOS device management work? Under Settings -> Device Management I notice there are at least 3 different categories of items:

Mobile Device Management
Configuration Profile
Enterprise App

But documentation online seems sparse for the layman. What are the security implications for each of these?

I assume "Mobile Device Management" allows virtually full access up to the system level, including seeing what apps you have installed, turning on your camera, or initiating a remote wipe.
"Configuration Profile" seems to allow root certificate installation, allowing MITM and HTTPS sniffing: https://security.stackexchange.com/questions/116967/what-are-the-security-implications-of-installing-an-iphone-configuration-profile
What about "Enterprise App"?

(cross-post from https://security.stackexchange.com/questions/229343/how-does-ios-device-management-work)

You are correct about the first two settings. Enterprise App is a way of developing and installing in-house apps onto iOS devices using an MDM server instead of through the Apple App store model.

Read between the lines and see: https://docs.jamf.com/10.8.0/jamf-pro/administrator-guide/In-House_Apps.html


How do I view the page source in Safari just like I can in Windows Internet Explorer? I'm experienced with Windows, not so much with Mac. In Windows Internet Explorer I can go to the View menu and select Source as in to “view source”. This opens a window showing me the html code of the page I am visiting, just like in the screenshot below:

On my Mac I looked in Safari's View menu and all the other menus and do not see anything resembling this option.

How can I do the same thing on Safari in macOS?

The option is available in Safari, but it’s not on by default. To activate this, follow the steps below:

Launch Safari
Go to Safari > Preferences (or just use the command, shortcut)
Click on the Advance tab in the Toolbar (it should be the last one)
At the very bottom tick the checkbox for Show Develop menu in menu bar
Exit the Preferences window

Now you’ll see a new Develop menu in the menu bar. This will give you access to a whole heap of options, including Show Page Source. It may be worth you exploring the various options to see what else you can make use of.

[EDIT]

I forgot to mention, once you've enabled the Develop menu, you will be able to also right-click on any page and choose Show Page Source from the menu that appears.


Does apple actually name classes as WTF? In the screenshot below, find the stack trace and look at the last stack(s). Is that just a programmers (@Apple) frustration or is there any acronym? I tried looking for some meaningful values

The WTF stands for Web Template Framework, which is a part of WebKit.


Map keyboard key to mouse click in a certain position I want to map my keyboard's arrow buttons to mouse left clicks (mouse down/up) at specific areas of my screen.

For example:

left arrow key   ---(map to)--> mouse left click at position W: 120px | H: 300px
right arrow key ---(map to)--> mouse left click at position W: 120px | H: 300px

Is that possible?

You could use Keyboard Maestro together with a custom macro.


Policy on users of Internet sharing on Mac OS X Mountain Lion I have an ADSL Modem directly connected to my Mac 10.8.2 in bridge mode, the PPPoE connection is initiated by Mac and internet is shared to user computers / mobiles using WiFi.

Question:
Can i limit the speed of a specific IP / Mac address or other restrictions like blocking website ?

Regards

There is not a decent way to do this using OS X's Internet Sharing feature. It is not designed to be a fully-fledged router. I recommend that you purchase an inexpensive router that is capable of 802.11n and WPA2 encryption and use this to share to all devices on your network. This will have a side benefit of protecting your Mac from external attacks.


Set Preview to open PDFs in Thumbnail View by default on El Capitan I can find nowhere to set Preview to default to Thumbnail View with all PDFs.  I use them every day. I have ticked Thumbnails in the View menu but it does nothing. Does anyone know how to set the default?

Have you tried setting Preview to always open with the sidebar? You can do this in Preview menu > Preferences > PDF tab and selecting the checkbox for "Always show sidebar".


Is there any way to view word documents within Safari on the Mac? The title pretty much sums up the question. I have looked, and could not find anything, neither paid, nor free. I know about the DocPreview plugin, however that does not work in Safari 5.1+. There is also the Word Browser Plugin, it was last updated in 2009, and also appears to no longer work.

Is there another method to view Word documents inline in Safari? That is, if I click on a link, I would like to see the document full window in safari, and not be downloaded, forcing me to find the file and open it separately.

One solution is to use Google docs — unless you hate Google :)

Install the NinjaKit extension so that Safari will be able to use GreaseMonley scripts
Install the Google Docs Viewer script from userscripts.org
Now Safari will show a small icon next to Office documents that redirects to Google for online viewing

Incidentally, NinjaKit is a great extension and there are plenty useful scripts on userscripts.org


I erased my stolen iPhone instead of putting it in lost mode Recently my iPhone was stolen, and instead of putting it in lost mode, I erased it via Find My iPhone.

Is there any way to switch it to Lost Mode? Can I see its last location? And will the thieves be able to use my iPhone now?

You will be able to locate an erased iPhone if it's near a previously used Wi-Fi network. The thieves won't be able to use your iPhone as well.

Quoting from the Apple Support document, Find My iPhone: Erase your device:

  When you remotely erase a device, Activation Lock remains on to protect it. Your Apple ID and password are required to reactivate the device.

and

  Important: Before you erase your device, try to locate it or play a sound on it. After you erase it, you can’t use Find My iPhone to do either. You may still be able to locate your Mac or Apple Watch if it’s near a previously used Wi-Fi network.


Moving finder window from one display to another Would it be possible to create an AppleScript to instantly drag one screen from one screen to another (say, center of the second screen)?

Try this:

--  Window Moving Script between multiple monitors for Apple Mac OS X 10.x
-- (something I've been doing with UltraMon for quite a while)
--  inspired by:
--     http://www.tidbits.com/webx?14@@.3c7b1ae3/5
--     http://macscripter.net/viewtopic.php?id=24511
-- and http://daringfireball.net/2006/12/display_size_applescript_the_lazy_way
-- thanx for the input ... I was looking for a solution of this quite a while
-- best to be used with a custom trigger in Quicksilver where this script is assigned to a
-- keyboard short cut (I use ALT Cursor-Right)
-- you might want to put Quicksilver into your Autostart Objects
-- 2009-09-14 Wolfgang Fahl

--
-- get the front Window
--
on getFrontWindow1()
    tell application "System Events"
        set theFrontWindow to first window of (first process whose frontmost is true)
        -- set theFrontWindow to the front window
        set windowname to name of theFrontWindow as string
        say "Moving" & windowname
        --display dialog "front most windows is " & name of  theFrontWindow buttons ("Cool") giving up after 3 default button 1
        return theFrontWindow
    end tell
end getFrontWindow1
--
-- get the front Window
--
on getFrontWindow()
    tell application "System Events"
        repeat with theapp in (every application process whose visible is true and frontmost is true)
            repeat with ew in (every window of theapp)
                return ew
            end repeat
        end repeat
    end tell
end getFrontWindow
--
-- list all windows
--
on listWindows()
    tell application "System Events"
        repeat with theapp in (every application process whose visible is true and frontmost is true)
            repeat with ew in (every window of theapp)
                set windowname to name of ew as string
                say windowname
            end repeat
        end repeat
    end tell
end listWindows

--
-- message dialog
--
on show(aMessage)
    -- display a dialog with a message
    display dialog aMessage buttons {"Ok"} default button "Ok"
end show

--
-- get the screen information
--
on getScreenInfo(theIndex)
    -- get the Screen Information from the windowserver defaults
    -- we are using awk to go to the DisplaySets sections and assume that Active = ... is
    -- at the start of each section
    -- we'll find OriginX= ...,OriginY= ..., Width = ... and Height= ... entries
    -- and return all of them a a list like
    -- 0 0     1920 1200
    -- 0 1920  1650 1050
    set screenInfo to do shell script "defaults read /Library/Preferences/com.apple.windowserver | awk '
        BEGIN { FS=\"=\" }
        /Active/  { screens++ }
        { gsub(\";\",\"\",$2) }
        /^ *OriginX/ { ox[screens] = $2 }
        /^ *OriginY/ { oy[screens] = $2 }
        /^ *Width/   { w[screens]  = $2 }
        /^ *Height/  { h[screens]  = $2 }
        END       {
                for (si=1;si<=screens;si++) {
                    print ox[si],oy[si],w[si],h[si]
                    }
            }'"
    set theInfo to paragraph theIndex of screenInfo
    return {word 1 of theInfo, word 2 of theInfo, word 3 of theInfo, word 4 of theInfo}
end getScreenInfo

--
-- move the front window to another monitor
--
tell application "System Events"
    -- get the OffsetX,OffsetY,Width and Height information for the screens
    -- here we assume that two screens are present (without checking this ...)
    -- first screen info
    set theScreen1 to getScreenInfo(1) of me

    -- second screen info
    set theScreen2 to getScreenInfo(2) of me

    -- for the functionality of this script we are happy with the resolution info for the time being
    set startX to item 1 of theScreen1
    set startY to item 2 of theScreen1
    set resolutionX to item 3 of theScreen1
    set resolutionY to item 4 of theScreen1

    set startX2 to item 1 of theScreen2
    set startY2 to item 2 of theScreen2
    set resolutionX2 to item 3 of theScreen2
    set resolutionY2 to item 4 of theScreen2

    -- make some nois to let everybody know we have receive the command
    beep

    -- 1st, determine current X & Y Positions of the current front window
    set theWindow to getFrontWindow() of me
    set thePosition to position of theWindow

    -- uncomment this if you'd like to debug
    -- display alert name of theWindow & ": " & ((first item of thePosition) as string) & ", " & ((second item of thePosition) as string) & " screen1:" & (startX as string) & "," & (startY as string) & "-" & (resolutionX as string) & "," & (resolutionY as string) & " screen2:" & (startX2 as string) & "," & (startY2 as string) & "-" & (resolutionX2 as string) & "," & (resolutionY2 as string)
    set currXPos to (first item of thePosition)
    set currYPos to (second item of thePosition)

    -- are we on the first monitor?
    if currXPos < resolutionX / 2 then
        -- move right
        set newX to currXPos + resolutionX
        set newY to currYPos - startY2
    else
        -- move left
        set newX to currXPos - resolutionX
        if newX < startX then
            set newX to startX
        end if
        set newY to currYPos + startY2
    end if
    -- Now we move the window moveX pixels to the right (or left if negative)
    set position of theWindow to {(newX), (newY)}
end tell

I tested it and it works for me on Mavericks and a dual display. Use Butler, Keyboard Maestro, etc. to create a hotkey and it works great.

(Original post found here.)


New MacBook had user accounts already; I deleted admin and can't get back in So when I get this new machine...there is already a user on it called "mac"...for my convenience they said. There is also another user already there named "admin"

well..i'm new to apple but when it's my pc, I am the admin. so i erased the "admin" they made (and for which they gave me no password for this account".

so i deleted it. now no one can log in, i can't use apple id, I've changed the passwords several time successfully only to attempt to make an edit or log in and get the message that an admin has to give his username and password....but i made myself the admin!!!!! why can't i log in with my username and the correct password i regenerated?

it's been hours of trying to make new admins, resetting passwords, everything... mount -uw, rv/ etc. it is totally messed up.

and this company did this account making for my benefit...? i can't get system assistant to do anything or even activate again. I've reinstalled OS 10.10...nothing. does anyone? know if i have to start at square one, reinstall yosemite or is there a way to fix this? much appreciated.

I would suggest you to reinstall OS X and doing it not on the top of the existing version.
Start Mac in Recovery mode (hold Cmd-R keys pressed on boot). When in Recovery mode - select Disk Utility, format your disk, exit Disk Utility and select Install or reinstall OS X.

P.S. If you have your files stored in Mac - backup ones before formatting the disk.


Kid installed XP over OSX, help! He thought he was installing it with Boot Camp, booting with option held down shows 2 HDs (Windows and EFI Boot) and clicking on either of them just launches XP. So, option doesn't work, R doesn't work, C from the OSX CD doesn't work. It doesn't read the OSX CD from within XP. Apparently he overwrote my Mac OSX HD with XP. (I would love if this is not actually the case, but since neither HD selection launches OSX, it doesn't look good.)

I want my Mac back!

I've got a quad core Mac Pro w/ 3 HDs installed, I think it was running 10.6. Onhand I've got install CDs for 10.1 and Snow Leopard (which I had installed and then restored back because of app compatibility issues.)

If possible, I'd like to get XP off and restore to OSX. Timeline should have my backup on HD #3 but I can't get the machine to recognize the OSX install CD, let alone run an OSX recovery program. It asks if I want to format the disk.

Does it seem like it's possible to somehow boot back into OSX that I'm missing?

Can I get OSX back without completing wiping the HD? (it probably already is wiped, I guess.)

How can I reinstall OSX if I can't get XP to read the OSX install disk? (It doesn't show it as an option to boot from the CD when restarted with Option key held down.)

The first thing to do is to eject your CD/DVD and then power down the Mac and then disconnect any drives and accessories other than your keyboard and monitor.

Then boot the Mac and as soon as you hear the fans start or the chime - hold only the option key down.

This should boot to a grey screen that lists any bootable OS that are connected.

At this point, see if you can see a Mac partition to boot to. Worst case, if you only see windows, try installing the DVD/CD and boot to disk utility. Don't erase things, just use it to see the partition scheme and report back what it shows. A cell phone picture of the window would be a good start to see what damage if any has been done.

Don't agree to any prompts to reformat any drives for now. Also, consider paying for AppleCare to walk you through this reinstall or visiting a local genius bar. Sometimes having a thorough back and forth dialog is far better than posting updates to the internet which can take days or weeks to cover what 15 minutes of troubleshooting from a trained pro can accomplish.

The best case for you is that the system forgot that it has a Mac partition ready to boot and you can re-"bless" that partition and be back in business in 10 minutes. Worst case, you'll end up doing an erase/install per the guide here from Apple:

http://support.apple.com/en-us/HT3910

On second thought, that isn't the worst case. Worst case is you have a hardware error and have to triage and fix that before you can follow the steps that normal work to reinstall the OS of your choice. From the details, you certainly have backup media and possibly a data backup so even getting another computer to load your data is an option. You might be able to find a very inexpensive Mac Mini or such to keep running the OS of your choice if you don't want or need to move up to newer hardware.


Alfred takes longer to show results, database disk image is malformed I don't know why, but about a week ago I started seeing a lot of errors like this in system.log:

9/15/12 5:55:21.769 AM Alfred[263]: DB Query: select item, count(item) as used from knowledge where ts > ? and item in (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) group by item
9/15/12 5:55:21.769 AM Alfred[263]: DB Error: 11 "database disk image is malformed"

It would occasionally take about a second for files to show up in the result list.

Deleting the Spotlight index didn't help, but then I noticed that the usage tab didn't display any statistics either:

I think I solved it by just pressing the reset knowledge button. But I didn't find search results for this issue, so I'm answering this question myself.

So, pressing the reset knowledge button in the preferences seems to have fixed it.

If you get similar errors, you could also try removing ~/Library/Application Support/Alfred/knowledge.alfdb or other database files. If you're using a sandboxed version bought from the App Store, they are in ~/Library/Containers/com.alfredapp.Alfred/Data/.


How to close info window batchly This habit was inherited from windows 7. I normally choose all the files and then right click and get the folder size. But when I do this in Macos, mac open all the file info. Then how can I close those windows at once? Thank you very much.

To close all Finder windows at once, press the Option key while clicking the File menu in Finder and select Close All or just press Option-Command-W.

By the way, to get Summary Info for multiple files/folders in Finder, select the target files/folders and then Control click and select Get Summary Info.  Then you only have one Get Info sheet open and you can press Command-W to close it.

To close just the ones from Get Info use this AppleScript, by James Stout.

tell application "Finder"
    set theWindowList to windows (* get all Finder windows *)
    repeat with i from 1 to number of items in theWindowList (* loop through them *)
        set shouldClose to false (* reset to false *)
        set this_item to item i of theWindowList (* get a window from the list *)
        set windowName to name of this_item (* get the window'ss name  *)
        (* this list should contain class property that tells you the type of window - which is nice *)
        (* Class would be either "Finder window" for normal windows or "information window" for the Info windows *)
        (* However, it doesn't contain the class property. alas. *)
        (* So to differentiate, we can use the current view/panel props *)
        set thePropList to get properties of this_item
        (* in a try/catch as prop not set for the diff windows *)
        try
            set CurrentView to current panel of thePropList
            set shouldClose to true (* no error, it's an info panel, so close *)
        on error
            log "Not an info panel, leaving open: " & windowName
        end try
        (* this try/catch is just for a double check, feel free to comment out *)
        try
            set CurrentView to current view of thePropList
        on error
            if shouldClose = false then log "Not an info panel: " & windowName
        end try
        if windowName ends with " Info" and shouldClose then
            close this_item
            log "Closing info panel: " & windowName
        end if
    end repeat
end tell


"Other" storage macOS More than half of my hard disk space is occupied by "other" storage, how can I find and delete those files? some of it is probably garbage left from deleted or unused software.

One safe boot can clean a lot of space, so restart and hold shift. Then log in and check, restart from safe mode and continue if needed.

I like following the mange your storage section here to locate and
delete things. It sorts by size so you can quickly scan and move on
if any one category won’t free up the space you want cleaned.

https://support.apple.com/en-us/HT206996

Once that is done, go to reduce clutter and start cleaning. Or choose a third party tool if you prefer another tool. "Other" taking up over HALF of my storage space


How do i unfreeze my iPhone 7 when it is stuck on the lock screen? What do I do? My iPhone screen is completely frozen. I've pressed the power button by itself to turn my phone off but when it cut back on it was still frozen, so I have no way into my phone.

According to this site, you press and hold the Power Button. While holding the Power button down, press and hold the volume down button. Continue holding these buttons until you see the Apple Logo after the power comes back on.  See image below.