Identify hard drive in Time Capsule I have Time Capsule of the 1st generation (the flat one) wherein I changed the hard drive for one with 3TB capacity. This was 2 years ago. Now, the time having passed, I don't have any information regarding the hard disk I put into my Time Capsule and I would like to know exact, specific type of hard drive that resides therein.
I tried using Disk Utility but it won't display any information regarding Time Capsule. I also tried Airport Utility but I could not find any information regarding the hard drive type and manufacturer.
Would should I do?
Thanks in advance.

You could open up your Time Capsule and take a look at the product label on the drive. Or if you bought it online you could look for the order details in your email archive or on the retailer’s website.


How do I install Linux on a 2007 iMac that has its operating system uninstalled? I'm in a bit of a pickle. The iMac will prompt me to reinstall OSX Lion, but it only has 1GB of RAM, and the Lion upgrade requires 2GB, so it doesn't allow me to do that. Since the computer was restored to factory conditions, it doesn't have any backups either.

Additionally, it is not recognizing my live USB with Linux Mint on it under "Startup Devices". It does recognize that there is a USB installed under Disk Utility.

This is what I get on startup (and no boot options seem to work, such as pressing C or command + option + 0).

So basically what I need to do is figure out if its possible to boot into a live environment of Linux Mint and then install it. I'm quite sure the USB is okay. It has a Fat32 filesystem and reads just fine in other devices.

Any helps is appreciated!

I haven't used this process to install Linux Mint, but I have used it to install other operating systems on earlier iMacs and MacBook Pros. So I offer this answer in the hope it works for you, but if not, it may help others.

I see two ways to install an OS from a bootable USB on earlier Macs that didn't support booting from USB:

Start the destination Mac in Target Disk Mode
Remove the HD from the destination Mac and insert it into another Mac or external case

Obviously the above options aren't for everyone. Both options requires access to another Mac that will boot from USB and the second one requires the user being comfortable with the process (in some cases the process would be a nightmare, in others fairly straightforward).

Target Disk Mode

The following is a general guide on what's involved:

Start the 2007 iMac in Target Disk Mode by holding down the T key during startup. You'll know when it's finished by seeing an icon floating around the screen.
Use an appropriate FireWire cable to connect the iMac to another Mac capable of booting from USB. (Note: You may need to use an adaptor if the other Mac does not have native FireWire support - e.g. Thunderbolt > FireWire adapter).
Insert the bootable USB (e.g. for Linux Mint) into the second Mac (i.e. the one capable of booting from the USB).
Start the second Mac and immediately hold down the Option key until you see the startup disk manager.
Select the bootable USB from the list and press Enter.
Follow the steps to install the OS (e.g. Linux Mint) onto the hard drive of the first Mac in Target Disk Mode (e.g. the 2007 iMac).
When complete, shutdown both computers and disconnect the FireWire cable between the two Macs.
Start the first Mac normally (hopefully to see it boot from the OS you just installed).

Remove the HD

This involves removing the hard drive from the first Mac and inserting it into another Mac or an external case. However, choosing this option may depend on the model of your first Mac (e.g. removing a hard drive from a Mac Pro is a lot easier than removing it from an iMac) and may also depend on the model of your other Mac (e.g. a HD from an iMac will not fit into a MacBook).

So, this option will be easier if you use an appropriate external case, and if the original Mac is not hard to work with. If you use an external case, then the process is similar to using Target Disk Mode, because a Mac started in Target Disk Mode is effectively an external hard drive.

Obviously I can't cover all possible scenarios here, but this option is not so easy for an iMac (not even the 2007 model used by the OP). But for users comfortable with doing this, the process is broadly as follows:

Remove the HD from the first Mac
Insert the HD into an appropriate external case
Connect the external case to the Mac capable of booting from USB
Insert the bootable USB (e.g. for Linux Mint) into the second Mac (i.e. the one capable of booting from USB)
Start the second Mac and immediately hold down the Option key until you see the startup disk manager.
Select the bootable USB from the list and press Enter.
Follow the steps to install the OS (e.g. Linux Mint) onto the correct hard drive (i.e. the one from the other Mac)
When complete, shutdown your Mac
Disconnect the external case
Remove the HD from it and insert it back into the first Mac
Start the first Mac normally (hopefully to see it boot from the OS you just installed).

Note: If you're in a situation where you can install the hard drive into another Mac, then at Step 2 you would install it into the Mac instead of the external case and you'd also skip Steps 3 and 9.


Creating a new file from a rectangular region of a PDF file I want to create a new PDF file from a rectangular region of an existing PDF file, old_file.pdf. Currently, I use the following rather laborious process:

Open the old_file.pdf in Preview.
Chose the rectangular regions using rectangular selection.
Copy the region using cmd c.
Paste the region into an empty slide in a Keynote file, using cmd v.
Export that single slide (by hiding all others) into a new_file.pdf.
Open new_file.pdf in Preview, chose and crop the rectangular region, then save the file and exit Preview.

Surely, there must be a better way. What is it?

You can select the region of interest and hit copy. Then go to the file menu and select 'New from Clipboard'. A new PDF file is displayed with only your selection.

Quick workflow example...


Zoomed out on ipad how to set normal view My ipad under ios14 has got to a stage where I have zoomed in.
How do,I reset the screen to.normal
The thumb and finger pinch seems to do nothing other pinches take me to.the tsk screen showing all safari tabs or all apps

The accessibility zoom feature can be turned on and off with a double three-finger tap.
To control the zoom level, double three-finger tap and hold the second tap, then move your fingers up and down the screen to zoom in and out respectively. Pan with three finger drag.


iPhone 4S GPS accuracy Has the GPS chip been upgraded in the iPhone 4S? How does it compare to the 4 and 3GS?

As I understand it the GPS in iPhone 4 is much better than that in the 3GS.

The iPhone 4s, and the most recent iPhone 4 (Verizon) don't use a discrete GPS chip, as it's integrated into the baseband (Qualcomm MDM 6600). I believe the GPS chip in the iPhone 3GS used the Hammerhead II PMB 2540, or 2525 GPS chip. By integrating the GPS with the baseband it allows a smaller phone, less energy consumption, and cost less to produce.

iPhone 4s GPS [Qualcomm MDM 6600 Gobi]

The main improvements should be:

Integration with Siri
Updated antenna switching (spatial diversity)
Improved TTFF and TTSF (fixes)
Longer battery life (more energy efficient)


Back up iPhone that can not be unlocked--screen is broken/shattered. Need help! I left my phone on the roof of my car and drove away on a busy road.  It was hit several times and the screen is broken/shattered and glass comes off of it.  It receives calls/text messages, and the button on the top to turn on/off still works.  The screen is just in such bad shape that it won't register the touch of my finger.  I have an appt with Genius bar in a few hours to get a new phone.  I want to save all my pictures and apps off this phone if possible (I never backed up on the computer prior to this) but it prompts me to unlock my phone and I can't do it.  I can't use another iPhone as a guide, because it won't even recognize my finger touching the screen, but the phone still works.  Can I get some ideas on how to back it up?  I am not tech savvy and this is a difficult problem!

How about PhoneView (http://www.ecamm.com/mac/phoneview/).  Although its not a true backup of your iPhone at least you can get all the important stuff off of it.


App Store Promo Codes - What happens if used after a new version is released App Store Promo Codes - What happens if one is used after a new version is released?

For example, if I give out promo codes for app version 1.4. And then I release 1.41. Would the version codes for v 1.4 still be usable?

Once you release an app update, all previous promo codes become invalid and promo codes cannot be used. They also expire four weeks from the day they’re generated.


homebrew broken after time machine restore I use home-brew for some tools on my macbook and it had been working fine. I recently put a SSD in my macbook and restored it to a time machine backup as I thought this would give me a pretty good replica of what my system was previously. However, since doing that, whenever I call a command that home-brew installed I am given the following error:

-bash: ffmpeg: command not found

ffmpeg is just one example. All of my commands are listed when I enter
brew list so its not as if they aren't there at all. The brew command itself still works (brew help, brew doctor etc) so that isn't missing.

I still have the old hard drive where it all worked fine. What files should I copy over from there to get my brew packages to run properly again? Or is there a brew command I can use that will fix it all for me? I tried brew doctor and brew upgrade ffmpeg but that didn't help.

How can I get this running again? Preferably avoiding uninstalling everything and starting again...

you can brew unlink and brew link for each app.

if its painful for you,
you can back up from your timemachine "after boot".

if you import data from your timemachine at starting your machine,
brew broken.

but after you start up your machine at once,
you will success!


Why do some applications in System Preferences say "To use the “xxx” preferences pane, System Preferences must quit and reopen." When I open my MIDI driver in System Preferences I get the following message:

  "To use the “YAMAHA USB-MIDI Control Panel” preferences pane, System Preferences must quit and reopen."

Then when I open a normal thing like "Sharing" "Sound" or "Startup Disk", I get the same prompt.  It's as if I'm switching between different modes.

What is going on in the background?  Is this to run some compatibility script?  Why does the system need to prompt for this?

Some preference panes are 32-bit binaries and some are 64-bits. When System Preferences is in 64-bit mode, to launch a 32-bit preference pane, the app needs to re-launch.

More information is available from Apple or from MacWorld.


Can I send Notification Center items to my iPhone using Pushover or Prowl? The title pretty much sums it up. I often feel like having notifications on my iPhone are a lot easier to notice, especially if you step away from the computer for a few moments to do something and come back.

Ideally I would like an AppleScript or something similar that forwards my Notification Center items to my iPhone using Pushover or Prowl (ideally Pushover).

Anyone have any experience with this?

An extensive search has determined the following:

There are a number of ways to SEND notifications TO Notification Center in Mountain Lion.

There are currently no hook in AppleScript to read notifications FROM Notification Center. This would be a key starting point in piping such notifications to Pushover or Prowl.

Conclusion: As of OS X 10.8.2 - no. Sorry. :(

Good luck and happy notifying!


Is it possible to add a horizontal line to apple notes on a mac? On MacOS I see ways to enter checklists and tables but no way to enter a horizontal line. Is this possible to do?

I'd like to see this as an actual formatting option too… but it seems unlikely to come any time soon. Experimenting with various Unicode line characters (like ―) or a series of em dashes (opt + shift + dash) is not a great solution as the width of the "line" doesn't change with the width of the note window. And if you squeeze the window width narrower than your faux line, it will wrap. Ugh!

Here's the best workaround I've come up with (it ain't perfect, but it works for me!):

In Photoshop (or similar), make a new document of somewhere in the neighborhood of 2400 pixels wide by 6 pixels high.
Fill it with black.
Save as a .jpg (or .gif, or .png… it doesn't really matter) in a place that you'll have easy access to, like your Desktop.
In Notes, put the cursor on a new line where you would want the horizontal line to go.
Click to select the file you saved to your desktop, and copy it to your clipboard (command + c).
Head back to Notes and paste it in (command + v). You'll end up with something like this:

What's nice here is as you adjust the width of the window, the horizontal line image will always span the full width:

You'll notice that the height of the line also changes proportionally with the window width… so you'll have to experiment with a size that works for you. 2400 x 6 seems to work for me. Here's a link to the file that I'm using, if you want to give it a try (right-click to download):

https://i.imgur.com/bcnfe7K.jpg

BONUS PRO TIP: If you're using TextExpander (or similar) make a new snippet that inserts this line graphic so you don't have to do steps 5 and 6 (above) every time. I've got mine set to -----. Adding the horizontal line with this shortcut has become second nature.

If you do not have TextExpander (or similar) to make a new snippet that inserts this line graphic so you don't have to do steps 5 and 6 above, you can create an Automator service as shown in the image below using the following example AppleScript code:

property hLine : (path to pictures folder as string) & "hLine.jpg"

set the clipboard to (read (hLine as alias) as JPEG picture)
delay 1
tell application "System Events" to keystroke "v" using command down

As coded, the linked "bcnfe7K.jpg" was saved in the Pictures folder within the Home folder as "hLine.jpg", so adjust it in the example AppleScript code as necessary.

Then assign it a keyboard shortcut, as in the image below, I used ⌘L as it was not assigned in Notes.

Now to insert the horizontal line in Notes, set the cursor where you want the line and press: ⌘L

Note: The example AppleScript code is just that and does not employ any error handling and is meant only to show one of many ways accomplish a task. The onus is always upon the User to add/use appropriate error handling as needed/wanted.


Bonjour setup question I have an iPad named aiPad, and a Mac named prosseek.

With 'ping prosseek.local', I can find the Mac, but with "ping aipad.local", I can't find the iPad.

What might be wrong with my iPad bonjour?
What kind of tools/methods can I use to debug this problem?

ADDED

The subnet that iPad logged in was different from the one of my Mac. When I use the same network, it works fine.

You can not do this when the display is asleep. Unless an app is actively utilizing it, the WiFi radio is put into it's sleep routines relatively quickly. (I don't know how the 3G radio in the iPad works, so I can't answer that half of the coin.)
Outside of that, what is the actual problem at hand? Are you using some app that provides a webserver/other connection mechanism that you cannot connect to? Surely you're not concerned that you can't ping your iPad, only because you cannot ping your iPad.

Besides all that, I do want to confirm that it's possible.

$ ping ItsNew.local
PING itsnew.local (10.0.3.127): 56 data bytes
64 bytes from 10.0.3.127: icmp_seq=0 ttl=64 time=9.638 ms
64 bytes from 10.0.3.127: icmp_seq=1 ttl=64 time=398.883 ms
64 bytes from 10.0.3.127: icmp_seq=2 ttl=64 time=211.562 ms
$ ping Its-An-iPad.local
PING its-an-ipad.local (10.0.3.168): 56 data bytes
64 bytes from 10.0.3.168: icmp_seq=0 ttl=64 time=210.275 ms
64 bytes from 10.0.3.168: icmp_seq=1 ttl=64 time=130.986 ms
64 bytes from 10.0.3.168: icmp_seq=2 ttl=64 time=154.825 ms

No, neither my iPhone nor my iPad are jailbroken. Stock iOS 4.3.1.


Apple Airport - Access DHCP from ethernet connection? Is it possible to have a device connected to an Airport Express via the ethernet cable to access the DHCP / sit within the NAT functionality for Internet use?

I have an existing network where a network switch connects to both the cable modem and the Airport Express. This currently works.

I am now trying to add a wired device (an XBox 360) to the switch. All attempts to sit within the Airport's subnet have failed (manual IP setup, tested with various pings, etc). This leads me to the conclusion that all devices receiving DHCP/NAT connectivity must be wirelessly connected.

As the Airport is bridging the connection to the (internet) router, I'd like the XBox sitting within the router. The cable modem has a static IP, which doesn't share well with both the Aiport + XBox trying to use the Internet.

Is there a way to to allow a device connected via ethernet within the subnet / DHCP-controlled zone?

The alternative is to replace it with a wireless router with a built-in switch.

Thanks.

The DHCP works fine for the airport.

If you use ethernet and a static IP address, then you'll have to choose an IP address outside of the DHCP lease range otherwise you can get IP address conflicts.

For example, if your DHCP range is set to 192.168.0.10 through 192.168.0.20 then you can use the IP address ranges 192.168.0.1 - 192.168.0.9 and 192.168.0.21 - 192.168.0.253 for statically assigned IP address.

Hope this helps


Textedit Yosemite erase function In OS X Textedit, I was able to remove unwanted material from images scanned to JPEGs by using the select tool to define the area to be removed and then pressing "delete", resulting in a white area on a white background. How do I do that using Textedit Yosemite?

That can not be done with TextEdit application.

You were probably using the Preview and it will do as you say.

Applications that allow you modifying the JPEG are many but the simplest one are Paintbrush or Gimp.


Connecting iPhone to Windows 10 Computer for USB hotspot I have an iPhone 8+ with iOS 12.2 installed. I'm trying to connect it to a Windows 10 computer with a USB cable so I can access the Internet using the iPhone as a hotspot.

I've had success with Android in the past, but I can't seem to get it with my iPhone.

What am I doing wrong?

I suggest connecting to your iPhone hotspot over Wi-Fi. The USB connection works like a charm on Macs, but the interaction with non-Apple products can be flaky.

The support document from Apple explains this in detail, see https://support.apple.com/en-us/HT204023.

Keep your iPhone displaying the Personal Hotspot page while you try to connect your Windows device over Wi-Fi.

Once you have that working, if you try USB again, be sure you have iTunes running and that you click "Trust" when prompted by your phone and your PC regarding the connection.

Normally there's no performance advantage from using USB vs. Wi-Fi.

Also, be sure your plan allows you to use your phone as a Hot Spot. I have friends with T-Mobile and AT&T plans for whom this silently fails unless they pay an extra $30/month to their wireless provider.


Suppress Time Machine Old Backups Dialogue Via Command Line Instead of letting Time Machine run automatically I use a shell script and the tmutil startbackup command to trigger backups, which gives me a much greater degree of flexibility. Specifically it lets me perform hourly backups to a local drive during my normal hours, with a separate network backup at night (since it tends to be a lot slower).

Unfortunately, I've discovered today that if the network drive is filling up enough that old backups need to be deleted, then the dialogue informing me of this will prevent the backup from proceeding until I hit okay, but since it occurs after I normally leave my computer my machine just ends up staying awake all night waiting for me to do something about it.

What I'd like to do is suppress this dialogue for my overnight backup, but leave it them enabled/re-enable it for my hourly backups. Is there a way I could do this? There doesn't appear to be any capability in tmutil itself. Is there a defaults option I could change perhaps?

I don’t know whether you can suppress the dialog through tmutil directly.

The alternative, as you suggested, is to temporarily turn off the “Notify after old backups are deleted” option of the Time Machine options preferences through defaults:

sudo defaults write /Library/Preferences/com.apple.TimeMachine.plist AlwaysShowDeletedBackupsWarning 0

Use “1” instead of “0” to turn the option back on.

(I should perhaps specify that this answer applies to El Capitan, I don’t know about Sierra, though I assume this hasn’t changed.)


My iPad Air Wi-Fi (A1474) won't restart after getting a new system update After I updated my iPad Air Wi-Fi (A1474), I couldn't get it to turn on again.

What could have possibly gone wrong and how do I rectify?

Try putting your device in recovery mode, you'll need a lightning cable and iTunes
https://support.apple.com/en-gb/HT201263


Editing iMac settings from an external Mac My 2010 iMac's display shows up distorted lines on start up then gets stuck at the gray Apple logo screen. After being stuck there for a while it then reboots itself and does the same process over again until I force shutdown. Fortunately I have a MacBook Pro in which I can use to boot from and view the files from my iMac this way. I believe my iMac is having graphics issues but I have an external monitor I would like to use to view my iMac. Is it possible to configure the settings for my iMac from my MacBook Pro so that I can set my iMac to display via the external monitor and if not are there any alternatives?

Thanks in advance!

This sounds like either a graphics card failure or a logic board failure: I would recommend getting the data off that drive ASAP and look at getting that machine diagnosed and repaired.


How do I sync podcasts added in the iPhone's Podcasts app to iTunes on OS X? I added some podcasts from the iTunes store to the iPhone Podcasts app version 1.2.3 on iOS 6.1.3.

My iTunes 11.0.5 sync settings for this phone's podcasts is sync podcasts, and automatically include all episodes or all podcasts.

However, iTunes does not copy the podcasts from the Podcasts app into iTunes.

How should I do this?

I think for this to work, you need to enable iCloud syncing for podcasts between your devices. The setting you refer to above only applies when you sync your phone from iTunes, either via USB or Wi-Fi. I could be wrong, but as far as I know it only syncs podcasts from iTunes to your phone, not the other way around.

Also, make sure there is enough space on your phone for all those podcasts.


How to get rid of annoying Non-secure Jabber Login popup? My Messages app out-of-blue started to complain that my GTalk credentials are being sent in non-secured manner.

Your name and password will be sent in a way that is not secure.
Do you still wish to connect to this server?

This was working all the time and I didn't change anything (including my network).
How do I fix it?
I've checked my Server Settings for GTalk account, but it seems my 'Use SSL' is greyed out, so I can't enable it.

Normally you've to just turn on the 'Use SSL' option (Preferences->Accounts->Google->Server Settings).

It's greyed out, because the option 'Automatically find server and port' is enabled. If the option is greyed as well, disable temporary the account then disable the option, then set the manual settings or try to click on 'Use Default Settings' option. You can use either 5222, 5223 or 443.


What does each cellular connectivity indicator mean? I'm used to "3G" and "E" on my AT&T iPhone 3GS, and I understand I may see "4G" on my new iPad when I enter a 4G area.
However, I recently saw "o" on the new Verizon iPad, and had no idea what it meant.
What network connectivity indicators can I expect to see on my iOS devices, and what do they generally mean?
Are the connectivity indicators the same for all iOS devices (with expected carrier differences) or should I assume "3G" on the 1st gen iPad means something different than "3G" on the new iPad?

The "o" means that you're on a 2G network. In Verizon's case, that would be 1xRTT. If you see it on an AT&T device, that means you're on GPRS.

Here's a screenshot from the iPad User Guide detailing what the various signal indicators mean:

"3G" means exactly the same thing on the 1st generation iPad as it does on the 3rd generation iPad. However, if you have AT&T, the 3rd generation iPad reports HSDPA+ as "4G". Since the 1st generation iPad is incapable of using HSDPA+, you will only ever see 3G or below on that device.


What Is The Smallest Partition I Can Use Disk Utility to Add? I'm trying to add a new partition to my Macbook, in order to dual boot with Linux. I have a 250GB drive, with 70GB free. However when I try to use Disk Utility it says
"This volume can not be split because the resulting volumes would be too small."

This answer tells someone having the same problem their drive is simply too small. Can I really not create a 70GB partition? What is the smallest size I would be able to create?

Disk Utility will not allow a partition smaller than 10% of the disk size, so creating a 70 GB partition shouldn't be a problem for you.
Try deleting all local Time Machine snapshots:

 tmutil thinlocalsnapshots /

If that doesn't work either, I'd recommend using a Live System such as Knoppix.


Zombie voice memos living in my iPhone Although my voice memos app shows no memos, when I connect my iPhone to my Mac and browse to On This iPhone > Voice Memos in iTunes, every voice memo I’ve recorded for the last three years is there (even ones recorded on my previous iPhone).

I tried removing my entire music collection from my iPhone, but they survived. How do I delete them?

Update: Whatever this bug was, it doesn't seem to be present any longer with iOS 8.

You can download a trial of ecamm's PhoneView from their site -- and perhaps buy it, I've found it very handy. This will allow you to see everything on your phone, copy photos back and forth, and with Admin mode, get into the works.

You should be able to easily delete Voice Memos, those show up on the opening menu.


Why can I browse with Firefox but not with Safari or Chrome? I had a problem a while back where Chrome was working fine but Safari and Firefox were not. This was fixed by unchecking the "auto-discover proxy" box in the network configuration. See my previous question: Why can't I browse the internet with Safari, but Chrome is working?

Today I find myself able to browse with Firefox but not with Chrome or Safari. A select few pages are still working but mostly nothing. Chrome will give me an error:

 Error 7 (net::ERR_TIMED_OUT): The operation timed out.

To help rule out a few things this even happens when trying to browse to my firewall http://192.168.0.1

Thanks for any help in advance!

I'm running OS X 10.7.2.

I can't be 100% sure which of these resolved the issue but i took these steps and everything is now working (touch wood):

Terminal

sudo mv ~/Library/Keychains/login.keychain ~/Library/Keychains/login.keychain.bak
sudo mv /Library/Keychains/System.keychain /Library/Keychains/System.keychain.bak

Reboot
I'd now lost network connectivity and wifi wouldn't connect- i think this is because the wireless key is stored in the keychain which i'd "deleted". I managed to resolve this by going to network preferences, wifi, assist-me and stepping through the wizard.
Lastly i ran software update and upgraded to 10.7.3

Voila


iTunes new song notifications: how to turn off when using miniplayer? I really like that iTunes (Yosemite, iTunes 12) shows OS notifications when a new song comes up. But when I am using iTunes in miniplayer mode, I don't need these notifications. Is there a way to get iTunes to only show the OS notifications when it is in the main window mode?

You can manually turn it on and off in the Notifications System preferences.

Update to this Answer:

This works on my Mac quite well. But it is not localised and is really a quick script put together as a proof of concept.. ( thats the disclaimer )

The idea is the place this script in to the Applescript menu and run it when you want to toggle the iTunes player from Main to mini player.

The script wil do the toggle for you, check which window is active and then open the system prefs try and find the iTunes notifications and switch to either "None" or "Banners" depending. I have completely ignored "Alerts" in this because I am sure most people would not have that selected!.

       property delayTimeMax : 2
property windowTitle : ""
set windowTitle to ""
property delayCounter : 0
set delayCounter to 0
property theList : ""
tell application "System Events"
    tell application "iTunes" to activate
    delay 1

    keystroke "m" using {command down, shift down} --//Toggle the itunes window

    my windowTheTitle() --//-- try and get the window title

end tell

tell application "System Events"
    if delayCounter > delayTimeMax then return --//-- too many trys, lets stop
    set delayCounter to 0

    my openSystemEvents() --//-- try and open the  system  prefs window

    if delayCounter > delayTimeMax then return --//-- too many trys, lets stop
    set delayCounter to 0

    tell application process "System Preferences"

        set this_item to ""
        my findTable() --//-- try and find the app list in the system  prefs window

        if delayCounter > delayTimeMax then return --//-- too many trys, lets stop
        set delayCounter to 0

        set counter to 0 --// the counter will increment for each row that represents an app

        --// find the correct one using it's static text which will be the app name
        repeat with i from 1 to number of items in theList
            set this_item to item i of theList
            set counter to counter + 1
            try
                set theValue to value of static text of this_item
            end try
            if item 1 of theValue is equal to "iTunes" then
                exit repeat --// found it exit repeat
            end if
        end repeat

        select row counter of table 1 of scroll area 1 of window "Notifications" --// select the app in the table

        set theRadiaGroup to radio group 1 of group 1 of window "Notifications" --// the Radio buttons for the Notification type
        if windowTitle is "MiniPlayer" then
            --// mini player is active
            set theVal to value of radio button "None" of radio group 1 of group 1 of window "Notifications"
            --// we do not want to click the button if it is already selected. Which may or may not deslect all of them. (poss bug)
            if theVal is 0 then
                --//select no alert
                click radio button "None" of radio group 1 of group 1 of window "Notifications"
            end if
        else
            --// MAIN window is active
            set theVal to value of radio button "Banners" of radio group 1 of group 1 of window "Notifications"
            if theVal is 0 then
                --// we do not want to click the button if it is already selected. Which may or may not deslect all of them. (poss bug)
                click radio button "Banners" of radio group 1 of group 1 of window "Notifications"
            end if
        end if
    end tell
end tell
tell application "System Preferences" to quit

on windowTheTitle()
    tell application "System Events"
        try

            tell application process "iTunes" to set windowTitle to get title of window 1 --//Get the window title : iTunes or MiniPlayer
        on error
            set delayCounter to delayCounter + 1
            if delayCounter > delayTimeMax then return --//-- too many trys, lets stop

            delay 1
            my windowTheTitle()
        end try
    end tell
end windowTheTitle
on openSystemEvents()
    tell application "System Events"
        try

            tell application "System Preferences"
                activate
                delay 1
                set the current pane to pane id "com.apple.preference.notifications" --//  Open System Events at the notifications prefs

                if id of current pane is not "com.apple.preference.notifications" then
                    set delayCounter to delayCounter + 1
                    if delayCounter > delayTimeMax then return --//-- too many trys, lets stop

                    delay 1
                    my openSystemEvents()
                end if

            end tell
        on error
            set delayCounter to delayCounter + 1
            if delayCounter > delayTimeMax then return --//-- too many trys, lets stop

            delay 1
            my openSystemEvents()
        end try
    end tell
end openSystemEvents
on findTable()
    tell application "System Events"
        try

            tell application process "System Preferences"
                set theList to (get group 1 of UI element 1 of every row of table 1 of scroll area 1 of window "Notifications") -- get all the radio groups : the Apps grouped icon and text it the table
            end tell
        on error
            set delayCounter to delayCounter + 1
            if delayCounter > delayTimeMax then return --//-- too many trys, lets stop

            delay 1
            my findTable()
        end try
    end tell
end findTable

As I said proof of concept. You most likely can put it in an Automator Service and use a hot key with it.

Also note: depending on your system you may need to add more delays to wait for the user interface to catch up

Update 2

It works better actually as a Automator service with a Hotkey.

In Automator use a Run Applescript Action and replace it's template code with the above..

Set the input to non. and Any Application. Save it.

Open up the Shortcut prefs. Find your service under the Services and add a shortcut.

done.


iPad got slow, missing drive space I got an iPad 4th gen from 2012 with 16 GB space. It's in use daily.

For a few months now we have seen the iPad becoming more and more slow. Like, the Safari browser doesn't get up in under 10 seconds.

Also, when I start a game the game crashes saying "no space left on device". But in reality, there is more than 1 GB left.

I believe my flash drive is somehow broken. It shows me a total capacity of 13,05 GB instead of 16. I know, you may never see the full size, but missing 3 gigs feels a bit much.

Any ideas what I can do with this iPad to make it work nicely again or at least analyze what is going on?

Part of the 16GB is taken up by iOS. The system usage screen won't show a category for the OS itself because there's nothing you can do about it.

Your device is coming up on about five years old. Modern device will perform much better on a more resource intensive OS. You could try a restore but really I think it's just that the new features and technologies aren't well optimized or are simply too much for it.


Macbook Pro starts with gray screen When I'm closing the screen on my macbook and tries to start it up a few hours later it always starts with a gray screen. It take about 30 to 60 seconds until I can start using the computer.
The macbook is brand new. It doesn't matter if the charger is connected or not.

Anyone knows what the problem could be?

This sounds like an SMC issue to me. SMC is the System Management Controller chip that controls power-centric pieces of the Mac's hardware, such as power, sleep functions, fans, etc. The exact process varies by model of Intel Mac, so I've included the link below.

Resetting the System Management Controller


How to setup the adaptive firewall I have followed this link: Turn on the adaptive firewall in macOS Server

and I get this output, but I don't know if I have indeed activated the adaptive firewall:

No ALTQ support in kernel
ALTQ related functions disabled
No ALTQ support in kernel
ALTQ related functions disabled
pf enabled
Token : 13540967312582709951
No ALTQ support in kernel
ALTQ related functions disabled

I want to let the adaptive firewall automatically add users with several failed attempts to login.

I have successfully added a certain IP to the firewall blacklist, but I was unable to see it at hb_summary, don't know if it is supposed to show manually added IP's there. And it was not adding automatically when I supposedly turned it on.

There was a brute force attack at my IMAPs port, and my adaptive firewall was not adding that IP in the blacklist. Only postfix was dealing with it by doing a fatal error because of too many errors and the program terminated, but it was just for a very short period of time.

Server specs:

Server.app 3.2.2
Mac OS X 10.9.5

After diving into the Adaptive Firewall once more I got the impression that the whole system is flawed and the documentation is a mess.

The command .../hb_summary apparently doesn't work at all because it seems to rely on the file /private/var/db/af/blockedHosts getting populated
by ipfw which isn't activated in 10.9 (and wouldn't work with the 400.AdaptiveFirewall anchor). pf doesn't use the file blockedHosts at all.

The best you can do is the following:

Enable the Adaptive Firewall service

sudo /Applications/Server.app/Contents/ServerRoot/usr/sbin/serverctl enable service=com.apple.afctl

Populate the whitelist with

sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -c

Define max bad auth attempts (e.g. 3) and ban time (e.g. 60 minutes)

sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -T 3
sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -H 60

This will modify the file /Applications/Server.app/Contents/ServerRoot/private/etc/emond.d/rules/AdaptiveFirewall.plist.

Check the mod with:

sudo grep -m 2 -A 4 hostBlockThreshold /Applications/Server.app/Contents/ServerRoot/private/etc/emond.d/rules/AdaptiveFirewall.plist

Relaunch emond: sudo killall emond
Add known bad hosts for a long time:

sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -a 104.16.35.178 -t 1000000

(Please be aware of the y2038 problem).
This will modify the file /private/var/db/af/blacklist. Hosts added here usually don't survive a reboot.
Start af with sudo /Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl -f
To get blocked hosts enter:

sudo pfctl -a com.apple/400.AdaptiveFirewall -t blockedHosts -T show -vvv

To get pf's state enter sudo pfctl -s all.

This is tested with hostile ssh and openssl s_client -connect imapserver_ip:993 login attempts.

After a reboot the .../afctl -f command will start pf and af but in at least one of two cases it doesn't block hostile login attempts though it's announced in the log file.

Improvements:

After modifying the keys debugLevel and logEvents in the file /etc/emond.d/emond.plist,:

    ...
    <key>debugLevel</key>
    <integer>3</integer>
    ...
    <key>logEvents</key>
    <true/>
    ...

creating the file /System/Library/LaunchDaemons/com.apple.afctl_boot.plist with the content:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Disabled</key>
    <false/>
    <key>Label</key>
    <string>com.apple.afctl_boot</string>
    <key>Program</key>
    <string>/Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl</string>
    <key>ProgramArguments</key>
    <array>
        <string>/Applications/Server.app/Contents/ServerRoot/usr/libexec/afctl</string>
        <string>-f</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

and loading it with:

sudo launchctl load /System/Library/LaunchDaemons/com.apple.afctl_boot.plist

it seems to work more reliably. The Adaptive Firewall will be loaded at boot time. No further afctl launch command is required!


Unable to Sync Movies to iPad I just upgraded our iPad Pro to 10.2 and noticed it the video app was replaced by TV app. I seem to have lost all videos synced from iTunes to my iPad. I tried deleting and reinstalling the TV app and also resyncing the videos through iTunes but no luck.

They show up in the storage used but no way to access them. They are supposed to be available in the Library of the TV app but my Library page is completely blank with no options.

The TV app currently cannot accept video content synced from iTunes. There are 2 explanations:

iTunes itself needs an upgrade to understand that videos should be synced to the TV app instead of the Videos app
Apple has decided that you should not be able to sync video content from the iTunes app at all, only download from iTMS or stream from approved providers.

I think it is the first one. This is a bug which hopefully Apple will resolve soon with an update.

In the meantime, just install the VLC app (free) on your iPad. By connecting the device to your computer and using iTunes to transfer home videos to VLC on your iPad for viewing.


How can I efficiently use Web apps on my Mac? I find that Web apps slow down my workflow a lot.  If I leave browsers open I accumulate lots of unused tabs that slow things down a lot, and new tabs launch in old subject-specific browser windows.  OTOH, if I keep them closed (what I usually do) then I have to wait 10-15 seconds for the browser to launch each time, which is 2-3x the startup time of any reasonable app, and worse I usually must log in again.  How can I keep web apps from slowing me down?

In general, this is an inherent flaw in all web apps, even the good ones and a fatal flaw in poorly designed web apps or web apps where your needs aren’t the main design goal.

You will want to shift your work to apps that can run native if efficiency is required. Offline and API access is generally far more efficient as you can work asyncronously or disconnected which decouples your interaction from the server code and processing with all network delays adding to your frustration.

Also, be sure you try browsers like safari that sharply curtail resource usage when off screen, background and minimized. Perhaps your browser can help with the 20 second startup delays and even that shouldn’t be a huge drain if you get proper work done once the app is runnning.

Lastly, a native app can be coded as a web app and still cause you grief. Some notable ones I've come across are the Atom editor, Slack app and other electron or node or react based apps that are glorified web view containers.

Here's a very well thought out article from some very smart and well funded engineers on balancing the decision to build a pure native app (or building several iterations of the same app as your team learns how to engineer and expand the app) vs building a common core that will run across platforms or embed a web view.

Growing Pains: Migrating Slack’s Desktop App to BrowserView


Time Machine Massive Backups Recently I'm seeing my time machine backups get big. On a typical daily time machine backup, they've gone from a gig,  to 5 gigs,  to today... Time machine wants to back up 329gb. I've not moved huge files around. I've not fired up VMs.

So far it's backed up 17gb of 329gb. What's going on? I'm running 10.9 on a 500gb SSD

Time machine has somehow lost the connection with the previous backups. If you have renamed your drive or large folders it can happen. If you have changed the drive it will definitely happen.

Simplest solution is to reformat the backup drive and start fresh.


If the iPad 2 is not HD, why does Apple advertise them as able to watch HD movies? If the iPad 2 and iPad mini do not have native HD resolution, then why does Apple market them to be able to watch HD movies? Isn't '720p' 1280 x 720, yet the iPad 2 or mini is 1024x768?

I imagine this is a wording thing, there is a difference between benig able to "watch HD movies" and "watch movies in HD".  The iPad can take a HD source, and scale it to display.  Commonly (although not officially) HD modes can be denoted by their number of scan lines (720p = 720 progressive, or non-interlaced, horizontal rows of pixels), and in this case the iPad 2 has 768 rows.


How to block bluetooth device that spams me with pairing requests? A bluetooth device that is not mine nor under my control asks my computer to pair, about every minute or so.

Interestingly, it's fairly effective as a DOS attack actually.

Disabling my BT is not an option, since I need it for my BT devices.

I want to tell OSX to ignore this particular BT device, but I can't figure out how.

The GUI way

Press and hold together the Option + Shift (⌥ + ⇧) and the click the Bluetooth icon in the topbar.

A Debug submenu will appear as shown below:

You get the options to Remove all devices and Factory reset all connected Apple devices — pick whichever you need.

The terminal way

Open terminal and type:

sudo rm /Library/Preferences/com.apple.Bluetooth.plist Enter
rm ~/Library/Preferences/com.apple.Bluetooth.plist Enter
Reboot OSX.

The commands above will remove the MAC addresses of the 'remembered' bluetooth devices from the systems settings. If you want to have a look at the actual contents of those files copy the original file to a user-writable folder and then do:

plutil -convert xml1 com.apple.Bluetooth.plist,

and then open it with a text editor (it is an XML file).

To convert it back to binary use

plutil -convert binary1 com.apple.Bluetooth.plist.


A1185 Macbook battery not charging because of low voltage (capacity is still good). Is it dead forever? I have an old early-2008 Macbook which I'm using only occasionally (my main machine is now a mid-2012 Macbook Pro).

The old Macbook's battery, since it was a 3rd replacement, still has about 90% capacity. However, I've left it in the Macbook and haven't recharged it for several months now.

Now, when I plug it in, it doesn't charge ("Replace Now"), the light on the charger connector turns green after 2 seconds of orange; and the laptop is powered from the grid. The Battery Health Monitor app (which tells me that the capacity is still ample) tells me that the voltage of the battery is approximately 7.01 V.

Is the battery dead forever? Or is there a way to revive it?

(It's Li-Ion.)

Is the battery dead forever? Or is there a way to revive it?

The battery is dead and there's no way to revive it.  It's time to replace it with a new one (get a quality battery with an 18 month warranty)

The logic board needs a minimum of 12V to operate.  7V is way under the threshold to turn on and will require the AC adapter to be plugged in.

For further details, see this post:  Fully charged MacBook Air turns off when power cord removed


Is an admin password enough to protect my files? So I'm debating whether or not I should encrypt my MacBook Pro's HDD. Is the account password enough to keep my files safe? If my MacBook got stolen would the thief be able to access the files?

Would encrypting slow things down significantly?

In general, no - setting an admin password is not enough to keep your files safe. If someone has possession of your MBP, it is pretty easy for them to change your account password, and then access any of your unencrypted files. Your keychain is safe, since it cannot be unlocked without the original password.

FileVault 2 (Full Disk Encryption) does not make much of an impact on speed. If security is a concern, it is worth implementing.


When the monitor is connected, the dock should change its position it is necessary that when the second monitor is connected, the dock becomes from the bottom (without the monitor on the left) and the programs should open from the monitor being launched.

In System preferences -> Displays -> tab Arrangement, you can drag and drop the menu bar (white rectangle) to the desktop you want to be the master. System remembers that and everytime the same display model is connected it sets up automatically.

If you want to see the dock on the other screen, run the mouse pointer to the bottom of the screen and hold it there, the dock should move.


How can I get Aperture to use gmail for emailing photos? I use gmail in a web browser.  I don't use Mail at all.

Except...

In Aperture if I go share -> email it opens up Mail.app.

Is there a way through configuration or through a helper app to get aperture to open share by email pix in a gmail composer window?

I'm using Aperture 3.6 on Yosemite.

Edit:  Currently Mail is set to have Default Mail Reader is Google Chrome.  This works for (so far) everything but Aperture.

To make "share by email" buttons on your Mac (system-wide!) open up in Gmail—instead of the Mail app—follow these instructions:

-Download and install Google Chrome, if it's not on your Mac already.

-Open the Mail app--yes, the stock Mail app.

-Press "Mail" on the menu-bar, in the top-left of your screen, and hit Preferences.

-Make sure you're in the General pane, and press "Choose default Email Reader".

-Choose Google Chrome from the dropdown menu.

Now your system-wide default email viewer is Gmail in the web. Let me know if this helped you!

Source: http://osxdaily.com/2014/05/06/change-default-mail-app-mac/


How to measure local Ethernet speed My Mac mini is connected to my router/modem by Ethernet. I want to know how fast the connection speed is between the Mac and the router.

Obviously, I can use a website like Speedtest.net to get my Internet connection speed, but that doesn't tell me whether the Ethernet connection is a limiting factor, or how much 'spare' capacity there is for local traffic.

The mini serves to other devices. The Ethernet is over a powerline, and the cables are ancient, so may not be optimal.

If I were using Wi-Fi, then the data throughput is shown by holding Alt and clicking on the Wi-Fi menulet icon.

As a rough idea - your speed must be somewhere between 47 and 100 Mbps. Must probably it is 100 Mbps.

If you want to test, get a second computer and take the connection out of the router and plug it into that. Then you can start a transfer from one to the other and measure the speed.

One of the most common tools for making such a transfer and measuring its speed is called "iperf". You can install it via HomeBrew (if you have that), or you can download the Mac binary from their webpage.

After installation, start Terminal.app on both computers and run:

iperf -s

on one, and:

iperf -c 1.2.3.4

on the other. Replace 1.2.3.4 with the IP address of the first computer.

After a short while it will tell you the bandwidth in Mbits/sec.


Filesystem permissions for /var/mobile/Media/DCIM/.MSIC/Incoming I have changed the permissions on /var/mobile/Media/DCIM/.MSIC/Incoming. Now my camera cannot take pictures. Maybe picture is taken but it cannot write it. I want to fix the permissions issue. Could somebody tell me what the permissions should be (iPhone 5s iOS 8.1)?

The permissions on directories in /var/mobile are drwxr-xr-x (755).


Refresh OSX to get rid of stuck info tag Every now and then I get an info tag stuck on my screen on top of all my applications. The only thing I know that will remove it is restarting my computer. Is there an easier way to refresh OSX that would get rid it?

I'm running the latest OSX Mavericks. I tried creating a new desktop deleting the main desktop. The problem persists unto the new desktop.

The tag does go away temporarily when I slide over to the dashboard and when I show the desktop but comes right back when I return to my applications.

Turns out this is a common problem.

One of the following should get rid of the tooltip:

Hover over another element with a tooltip in the same app that generated the stuck tooltip, as explained here
Close the app which you think generated the tooltip
Log out of OSX and log back in


Holding the mouse button automatically on OSX Is there some sort of app that will let me, preferably toggleable with a keyboard shortcut, hold down the left mouse button? (Not click fast, just hold down).

Will the default double tap to drag work for you? You can enable it in System Preferences>Universal Access:


How can I have Safari on OS X remember to permanently trust a website with my current location? The only options on the location privacy prompt are 'Allow' or 'Don't Allow', with a 'Remember my decision for one day' modifier checkbox as well. But what if there's a site that I trust in perpetuity? I want to give it permission to access my location forever. Why can't I do that?

Safari 8.0 on Mac OS X 10.10 Yosemite

But what if there's a site that I trust in perpetuity?

If you want to trust a site in perpetuity check "Prompt for each website one time only" in Settings>Privacy, visit the site, in the sheet that appears check the option "Remember my decision and don't ask me again" and click the Allow button:

If you get prompted to allow Safari to use your location, press the OK button:

Note that the Cookies and Website Data>Details section in Safari:

doesn't mention whether a specific site can access your location information:

so you might lose track of which sites you allowed.

For more information visit this article: http://support.apple.com/en-us/HT5403


What is the voltage output of an Apple 85W MagSafe 2 model A1424 without a load? I’m looking to understand how to test and evaluate chargers so this is a bit technical a problem. Since MagSafe is proprietary, I can’t consult a USB power distribution specification to know how things are designed to work.

What is the voltage output of an Apple 85W MagSafe 2 model A1424 without a load?

I believe these are smart chargers, and initially only supply about 3 volts in order to power a power management chip inside the device to be charged.  Once powered by the 3 volts, the power management chip inside the device then communicates with the charger verifying that the device is compatible to be charged, and if that fact is verified, only then will the charger output full charge voltage.

Additional info provided by @MarcWilson.


Is it possible to use VNC / ScreenShare OS X 10.9 Mavericks OSX Server 3.0.1 Local Network User Quite simply, is it possible to use VNC (Windows) or ScreenShare (OS X) as a local network user?

All users are local network users and when I access the server via Screen Share VNC://LOCAL IP ADDRESS I am prompted for a username/password. When I enter username/password of a local network user I am told "Authentication Failed to 192.168.1.1. Please verify you have entered the correct name and password.

I set up a local account and when entering those details everything works fine.

Surely the ability to use VNC/ScreenShare is available for local network users?

Do you use network accounts (no home folder on the Mac) or mobile accounts (one Home folder in /Users) ? You may be able to add authorization for the VNC/ARD service for mobile accounts with the kickstart command :

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart -activate -configure -access -on -users YOURUSERSHORTNAME -privs -all -restart -agent -menu


How can I change the case of all contacts' cities? Most of my contacts in Contacts.app have the city typed in UPPERCASE. This has led my iOS devices to correct, for example "Stockholm" to "STOCKHOLM" for a while. How can I bulk change all cities from UPPERCASE to Titlecase?

I put together the following Applescript that solved my issue. To get titlecase function, I downloaded and installed "Satimage osax" from http://www.satimage.fr/software/en/downloads/downloads_companion_osaxen.html.

tell application "Contacts"
    set All_Contacts to every person whose name contains "test"
    --set All_Contacts to every person
    tell me to display dialog "Are you sure you want me to correct city of " & (count of All_Contacts) & " contacts?"
    repeat with My_Contact in All_Contacts
        set All_Addresses to (every address of My_Contact)
        repeat with Current_Address in All_Addresses
            set city of Current_Address to (titlecase (get city of Current_Address))
        end repeat
    end repeat
    save
end tell


Mavericks theme for Yosemite I have to admit I don't really like the new design of OS X Yosemite, and I would like to get the good old Mavericks theme on the current Yosemite install.

Is this possible?

Not fully.

You can swap icons with LiteIcon but not the overall theme, as far as I know.


Transferring WinSCP configuration to macOS I have been using Windows for a couple of decades, and just got a MacBook Pro.

Under Windows, I was using WinSCP, with PuTTY. I just installed CyberDuck, and I know I should be able to use the built-in Mac Terminal, for PuTTY sessions. However, I would have to re-enter all the information (domain, login, password) every single time.

Any recommendations of what to use in macOS that can duplicate what I had with WinSCP, as close as possible?

use ~/.ssh/config file.
In there you can set all your settings for a host etc.
For ssh you should not be using passwords, but keys instead.
by default ssh client on MacOS uses ~/.ssh/id_rsa

Some more info on that config file can be found here

Some more info on ssh keys can be found here

Or a little google search with those names will get you on route as well.

P.s. on the command line you can simply use scp (the thing that is ported to windows as WinSCP) to copy files from one place to another through ssh. Depends how much you depend on the GUI I guess.


How can I use smtp to connect email to mail client Right so we have set up a mail server for our company that does not use imap nor pop at the moment, it is based on smtp port 25 and I can't figure out how to link it with my mail client as it always asks for imap or pop :/

As forcer obliquely mentioned SMTP is for sending mail. And one of the most popular programs to do that is called "Sendmail." Not that you need to know that, but hey...

Anyway to be able to send and receive email you need both an SMTP server and an incoming mail server that speaks either POP or IMAP. I won't go into Exchange here as it is Microsoft's own take on IMAP.

Often times the sending and receiving servers are the same. At work mine is mail.domain.local. It sounds like you may have plugged in the same server (or IP address) for sending email into the receiving (POP/IMAP) mail location in your mail.app. If it didn't work, you will have to bug your IT folks for the POP/IMAP address too.


Setting the value of a Numbers cell using AppleScript I'm trying to write a numbers script (to do this, as it happens), in which I need to change the value of a cell.

However, if I do something like

tell application "Numbers"
    activate
    tell document 1
        tell sheet 3
            set the value of cell "E1" to 1000
        end tell
    end tell
end tell

then I get the error

 error "Numbers got an error: Can’t set cell \"E1\" of sheet 3 of document 1 to 1000." number -10006 from cell "E1" of sheet 3 of document 1

but this contains no information about why it can't set that cell. The document, the sheet and the cell all exist.

I guess this might depend on my particular spreadsheet, but is this the correct way to set the value of a cell, and if so, what else can I do to understand why it's not working?

I'm in front of a Mac again and gave your code a go and also got the same error, so it's probably somewhat misleading in terms of what it actually means.

However, I did play around with your script a bit and was able to get the code to work by using the following code:

tell application "Numbers"
  tell table 1 of sheet 3 of document 1
    set the value of cell 1 of column "E" to 1000
  end tell
end tell

However, now that I've got this to work, I just wanted to flag you seem to be hard coding the cell etc. That is, if the position changes then the script isn't going to be dynamic. Whether this is an issue for you or not will depend on what you're trying to do and how your Numbers spreadsheet is designed.


Fundamental Difference Between Charging An iPhone At The Mains & Via USB Cable Linked To An iMac? If you are working at an iMac and there is also a mains socket close at hand, is there any difference (in any respect) to charging an iPhone via USB cable linked to the Mac or is it more advisable to charge via a charger to the mains socket.

eg

Is there a difference in the time taken to charge using one method than the other. ?

If using the Mac to charge, does it cause the Mac to use more RAM in the process (and could this prove to be detrimental on Mac performance if using resource hungry software). ?

According to Apple's support document on the subject:

  For the quickest charge, connect the device to a power outlet using the USB cable that came with the device and an Apple USB power adapter.

The USB spec limits the amount of current that a device may draw from a USB port (500 mA); the included Apple standalone power adapter can supply double that (1 A). The difference is even more dramatic for devices that have higher current draw to recharge (newer model iPads, for example).

Generally speaking, charging from your computer won't affect the performance of your computer at all as long as you aren't syncing or otherwise interacting with the device. USB can supply power without requiring data transmission (such is the case for wall adapters).


Can I clean install Mavericks preserving other bootable partitions (Ubuntu on ext4)? I have checked Will my other partitions be wiped when doing a clean install of Mavericks? but I'd like to make sure whether a clean install of Mavericks to my specific OS X partition won't mess up with the rest of the disk. OS X generally doesn't recognize other partitions types beyond the Windows types.

Is such clean install prone to error even if I take care of asking installation to not touch the partition scheme?

If you clear you partition using Disk Utility and then boot into Internet Recovery or install from another location (for example a USB flash drive) you should be fine, OS X will only be installed (and only effect) the partition you choose to install it on at the start of the installation process.


Downgrading the OS...restore apps from TimeMachine? So I’m downgrading the OS from Mojave to back to Lion..backed up hd with TimeMachine. I will erase the drive and install the older OS. My question is will I be able to restore my applications from my TM backup?

You will be able to restore everything from the backup which was done on the same or an older version of macOS Lion (10.7.5 was the latest, so if you just downloaded it from the App Store, you will probably have this one).

From later backups you have to copy/paste everything manually.

Also for Apple apps like Safari, iTunes, etc. only the latest version that was provided for the OS version your are about to install will be available, eventhough you haven't updated it to that version at the time of the backup.


iPhone ActiveSync showing sent email in Inbox Curious if anyone else is experiencing ActiveSync email accounts showing sent email in your iPhone mail.app Inbox.

Messages still appear even if "organize by thread" is disabled.

iPhone mail seems to handle native Gmail accounts correctly, knowing to hide any sent email, however my Google Apps ActiveSync account/mailbox doesn't.

Is this a known limitation?  I've deleted and re-added my ActiveSync account and it still occurs.

No - this is not normal and I haven't heard of any fix short of deleting the account and trying again. If the store on the phone gets really corrupted, you may have to restore and set up the phone as new - but do try lesser steps first.


How to boot into internet recovery mode with rEFInd installed? I have the bootup manager rEFInd installed on my Macbook. The key combinations for recovery (Command R and Command R+I) just boot into rEFnd's bootloader. At this point in time holding the option key while booting still allows me to plug in a USB and boot it (e.g. I can boot a Linux Live USB and wipe the disk - afterwards I'd be able to do internet recovery mode without a problem). That being said I'd like to be able to access internet recovery without the usage of external media and without giving up rEFInd. How can I achieve this?

I managed to start the internet recovery mode with rEFInd installed by holding right CMD + alt + R just after pressing power button and before rEFInd starts.


How to allow Terminal to Find Commands without Export PATH? The terminal on my Macbook Pro cannot find any commands until I enter this before every session I use :

export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

How can I make it so that I do not have to enter this every time I use the terminal to use commands?

Each shell has ‘profile’ files, the contents of which are run when the shell is launched. For bash, this includes ~/.bash_profile. Create this file and add any commands you wish to run in that file, then relaunch your shell.


How does the new iPad's A5X graphics processor affect PDF rendering speed? How much, if any, has the new iPad has gained in PDF rendering speed with the A5X processor (quad-core graphics)?

I care a lot about PDFs because as a lawyer I have to review a lot of scanned documents. The performance of PDF rendering on the new iPad depends on the techniques used. For full-resolution rendering, it's a little slower, but software goes a long way. The overall experience depends on four factors:

1) Single-page rendering method
2) Zoom method
3) Caching
4) Pre-rendering

Explanation:

1) Single page rendering: some apps don't display anything until the whole page is rendered. Others render in a tiled fashion: some top to bottom, some in a spiral inside out. Some apps first render a low-res version of the page, then render the full-res version--again, by either of the two methods.

2) Zoom: Again, some apps render on the fly, while others zoom in on the pre-rendered image and pop in the re-rendered tiles or the whole view. The iPad handles vector rescaling (including text) superbly, but rasterized PDFs can't be scaled in real-time if they're in iPad-resolution territory.

3) Caching: some apps don't cache at all, so re-render each time you change the view (even if you're on the same page). Others only cache one page at a time. Still others cache three pages or more, so you can flip pages and zoom in smoothly without re-rendering.

4) Pre-rendering: a few apps will pre-render the next page. One app, described below, pre-renders the whole document.

iBooks and the Amazon Kindle app render large PDFs pretty efficiently. iBooks caches three pages, while Kindle's cache seems to depend on page size. Kindle pre-renders the next page while you're on the preceding page. However, neither support PDF markup. (Kindle also doesn't support rotation

One app, just called "PDF" (by Smalltalk Consulting) pre-renders the entire PDF so that most of the subsequent work is done by the GPU. You set the rendering resolution. The default "2x" gives you around 150dpi, "4x" around 300 dpi, etc. It slows down once you get past 4.5x, but that resolution is sufficient for most applications. This is the best app I've found to scroll quickly through large PDFs. However, it doesn't render markup and doesn't support any markup tools of its own.

In short, the new iPad cannot speed through a 600dpi PDF the way a quad-core i7 with 12GB of RAM can. But it can display and handle large PDF files the way they were meant to be--with the right software.

Goodreader has the best performance of any PDF viewer I've tried, followed by PDF Expert. Certain techniques that worked on the old iPad just don't fly on the new one, so some apps perform very poorly. (Adobe's own Reader is one of these.) Other apps, like iPDF, are promising, but still don't have full Retina support. (Several apps only take advantage of the Retina display when zoomed in, but double the pixels when viewing the whole page.)

To answer the original question and the follow-up: rendering is done by the CPU, display and manipulation (scrolling, zooming) is done by the GPU. The CPU converts the text portions using the text rendering engine and the graphical portions using a bitmap engine. (It's possible that the iPad's text rendering engine is handled by the GPU.)

The CPU on the new iPad is not significantly faster. PDF rendering methods that are CPU-heavy are even slower on the new iPad because the CPU has to do significantly more work to render at the higher resolution. But rendering methods that get data to the GPU quickly perform great. The more rendering work done in the background, the better. A well-designed PDF rendering engine will use idle time to generate image data that's ready for the GPU. An engine that renders "on the fly" (what I called "in real time") will choke.

"Pre-rendering the entire PDF" means that instead of each page being converted to an image as you scroll through, the whole PDF is rendered and loaded into memory as an image. This takes more RAM but results in faster performance when scrolling and zooming. It takes 5-30 seconds (or more) to pre-render the whole file. Also, when zooming in, the image does not re-scale. (Text portions of the PDF won't be crisp if you zoom in.) Google Docs basically does this with PDFs if you want to see what I'm talking about.


Why does the lettering wear off MacBook keyboards? Check out the letter "A" in the image.  Why is it smudging / wearing off?

The keys on Apple's laptops are translucent plastic, with black paint applied on the surface. The letter is 'reversed out' of the black paint, backlit through the translucent portion.  So it's not white paint smudging, but black paint wearing off.
Those keys are pressed millions of times. And each press involve some degree of friction, which means the removal of matter. The sweat from your fingers is slightly acidic; and who knows what other oils and particles might get transferred from your sandwich. It's possible - or even likely - that a laptop keyboard might get other 'matter' spilt or splashed onto it.
Any or all of these things might act as a combination of solvent and abrasive. If you use a microscope or macro lens you will see this chipping clearly.
Obviously, the designers know this, and try to make a keyboard whose paint will resist the rigours of a lifetime's use. However, nothing is impervious. How old is your Mac?
As to why this key and no others? A is certainly a key that's going to get more finger-rest and usage than others. It's just the perfect storm of the right amount of wear with a particular mix of particles and chemicals.


Why can't I stop the sound effect for adjusting volume level? If I go to Settings --> Sound, then there's a checkmark that says "Play feedback when volume is changed." I unchecked it, but the sound effect is still there.

Use shift while changing volume. There shouldn't be any sound.


Is there an app for the iPhone 4 that tells the pitch of a note through an audio input? Does anyone know of an app for the iPhone that can analyze sounds and tell us what pitch the sound is?

For example, if i had that app running and i go to the piano and play some notes, it should be able to tell me what notes they are.

Garageband can do this. Open a new (or existing) project and add a new "real" track with no effects. On the bottom edge of the window you´ll see a LCD-like window which usually displays the current time or measure in the track; depending on which version of Garageband you´re using, you can now either use the up-/down-arrows to switch to the tuner (tuning fork symbol) or click on the tuning fork symbol directly to select the tuner. Every sound that is picked up by your Mac´s microphone will now be displayed as note (with off-pitch)


How to remove cached network information from Apple device? I have a lab set up involving AP and DHCP, I am using my Macbook to connect to the AP and it requests a DHCP lease, however, when I change the network information on the router, the Macbook still keeps the obsolete information and has connectivity issues regarding the Internet.

I have been removing the network manually and this seems to clear the cache and accepts the new lease.

This is too time consuming though, is there a quicker way to clear the cache/lease so it can request a new address without having to 'forget' the network every time?

You have to release the IP address, not just renew it.  This is because your DCHP client is going to attempt to request the lease it had previously so long as it hasn't expired.  You have to force the client to ask for a new lease.

$ sudo ipconfig set <interface> BOOTP
$ sudo ipconfig set <interface> DHCP

Additionally, you can use the networksetup command

$ networksetup -setdhcp <networkservice>
$ networksetup -setbootp <networkservice>

You would get the networkservice by issuing the command:

$ networksetup -listallnetworkservices

Of course, you could also do this in Network Preferences


Different category behavior in GUI vs. AppleScript I'm seeing some weird categorization behavior on Outlook 2016 on El Capitan.

In the GUI's Category list, there's a category called, say, "Category1", with the color red. When I use the GUI, that category gets applied correctly.

But when I use AppleScript to apply the "Category1" label, a different color is applied, and there's no checkmark next to "Category1" in the GUI. It's like there are two categories with the same name, and AppleScript and the GUI are pointing to different ones.

Has anyone else seen this, or have a fix?

Thanks.

Updated: Here's a code snippet showing how I'm using AppleScript. Also, note that many of my categories are imported from a Windows PST file.

tell application "Microsoft Outlook"

-- get the currently selected message or messages
    set selectedMessages to current messages

    -- if there are no messages selected, warn the user and then quit
    if selectedMessages is {} then
        display dialog "Please select a message first and then run this script." with icon 1
        return
    end if

    repeat with theMessage in selectedMessages
        set categoryList to get categories of theMessage
        set cleanCategoryList to {}
        set wasCategoryRemoved to 0
        repeat with theCategory in categoryList
            if name of theCategory is "Category1" then
                set wasCategoryRemoved to 1
            else
                set end of cleanCategoryList to theCategory
            end if
        end repeat
        if wasCategoryRemoved is 0 then
            set end of cleanCategoryList to category "Category1"
        end if
        set categories of theMessage to cleanCategoryList
    end repeat

end tell

I had the exact same issue. I was able to resolve by applying the exact category id I wanted like:

set end of theList to category id 33

Rather than like:

set end of theList to category "Category1"

Here is how I got the category ids. I selected a message in Outlook that had only the category I wanted and then ran this script manually from Script Editor:

tell application "Microsoft Outlook"

    set msgSet to current messages
    if msgSet = {} then
        error "No messages selected. Select at least one message."
        error -128
    end if

    repeat with aMessage in msgSet
        set theList to categories of aMessage
        return theList
    end repeat

end tell

I then used the returned category id in the code below to set messages to this category in the future (I cobbled this together from many sources online over time, so unfortunately it's not easy for me to give credit to the right folks):

tell application "Microsoft Outlook"

    -- Workaround for Outlook 2016 Reminders window bug, part 1
    set windowClosed to false
    if "Reminder" is in (name of the front window) then
        set windowClosed to true
        close front window
    end if

    set msgSet to current messages
    if msgSet = {} then
        error "No messages selected. Select at least one message."
        error -128
    end if

    repeat with aMessage in msgSet
        set theList to categories of aMessage
        set end of theList to category id 33 -- CHANGE THIS TO THE CATEGORY ID RETURNED IN THE PREVIOUS SCRIPT
        set categories of aMessage to theList
    end repeat

    -- Workaround for Outlook 2016 Reminders window bug, part 2
    if windowClosed is true then
        tell application "System Events" to keystroke "9" using command down
    end if

end tell

I hope that helps someone else looking for a solution to adding a category to selected Outlook emails with AppleScript.

A great improvement would be removing the first manual step of getting the desired category id, and instead allowing setting category via the textual name of the category, looping through all existing categories in Outlook until you find it, and then applying that id to the selected emails. I'd be grateful if anyone improved my version this way and shared it.


How to group Adobe CS5 application tabs in one window (like the Windows version)? On Windows (7) my Adobe products have all their tabs and tab groups in the same window.
On Mac (OS X Lion) my Adobe products have all their tabs and tab groups separated floated every which way.
Is there a way on the Mac to group all these tabs like on the Windows machine?
See the different windows flung about the desktop:

(source: staticflickr.com)
I am using Adobe CS5.
Apparently I am not the only one complaining about this:
http://blogs.adobe.com/dreamweaver/2010/04/dreamweaver_cs5_help_now_avail.html

I only have CS6, and, in that version, I'd make sure Window > Application Frame was checked. This moves everything (documents, palettes, etc.) into one window frame like the Windows version.


Time Machine is doing very large backups Background: I bought new drive for Time Machine backup. First backup took about an hour and backed up about 80 GB (let's considered as good behaviour). Second backup was supposed to be above 70 GB (bad behaviour, bad) which could not really be the amount of data actually changed for the while between backups.

When i try manually run tmutil compare in iTerm, it returns a bit more sense making numbers

"supposed to be above" comes from estimated size in Time Machine preference pane.
"actually 10 MB changed" comes from terminal tmutil compare result.

I think it's wrong it's backing up almost whole drive again. I know the backups consists of actual files and links to not changed files from previous backup. But the links should not consume same size as the linked file and according to free space after second backup the second backup is really consuming the space almost like first(full) backup (checked in disk utility)

Question: How can i prevent Time Machine to make so big backups when actually 10 MB changed?

Time Machine is using differential backups. That means your first backup is a complete backup which is same size with your drive. Starting from the second one backup will include changed files since last backup.

These Backups are accessible by finder. So you can easily find out which folders causes these big backups. After you find the folders you can manually exclude these folders from Time Machine Backup Options.

Some softwares may cause huge backups if they changes files last updated status like Dropbox Agent or similar. You may consider exclude folders of these softwares because they are already copied to the cloud.


Finder doesn't come back after crash or `killall` This has been happening for quite a while (since before I upgraded to 10.8, I think), although I'm running 10.8.4 currently; I'm on an iMac from 2012. Every once in a while Finder will freeze up for no readily-identifiable reason. You can click in open windows, but if you change the folder you're looking at it won't display the files. Open File dialogs in programs don't work, either, they just display the Favorites along the left side, and maybe a directory path, but you can't select anything. More often than not, either immediately or eventually you'll get the spinning beach ball of death. I haven't found anything in the Console, but maybe I don't know what to look for.

If you Force Quit, either through the Apple menu, by click-holding on the Dock, or by entering killall Finder in Terminal, the process does not restart. Files disappear from the desktop and don't come back, and the little highlight below the Doc icon (indicating a program is running) is not there. If you click on the Finder icon the highlight appears, but the Finder windows don't, nor do the desktop items. Running open /System/Library/CoreServices/Finder.app doesn't work, either. The only way I've found to get it running normally again is to reboot, but there are problems there, too. I'm not sure if it's related to the Finder issue, but if the computer has been running for more than, say, an hour or two, selecting Restart from the Apple menu doesn't actually reboot the computer, it just hangs for a while on the grey screen, without getting to the shutdown log, so I need to do a hard reboot by holding in the power key for a second or two. Sometimes the Finder crash will be so bad that I can't even get to the Restart option, and have to hard reboot right from the GUI.

Any help or suggestions you could give would be very much appreciated!

I have exactly the same problem on a MacBook Air, 13" late 2010 running 10.8.4 (12E55). I tried re-indexing as proposed without any change.

I could trace down my problem now to running "Virtual Box 4.2.16" with specific configurations of sharing the OSx drive/folders with the windows environment.
Don't run Virtual Box - and no problem will occur. This is my actual solution for solving the finder problem.

Since VB 4.2.16 is the latest release there seems to be no help at the moment.


Keyboard Shortcuts during iChat Screen Sharing Switching Screens

I was just on an iChat-initiated Screen Sharing session with a friend, and had a really rough time telling him to get off the mouse so I can click back to my computer in order to look some stuff up.

Even when on my computer, as long as screen sharing is still active, the audio chat interface remains, so I can keep talking to him as I look up information he's asking for.

Doing this, while watching his screen, was an aggrivating task. How does one switch back to their computer without asking for mouse access to do so?

Ending the Sharing Session

Are there alternate keyboard shortcuts for ending a screen sharing session? The menu bar lists ^ ⎋ for achieving this (⎋ is the power button on your computer). However, I'm stuck in a really annoying middle ground.

At work, I have a MacBook Pro, plugged into a Cinema display, external keyboard (mini-style/no-numpad style), and magic mouse, and I use my laptop with the lid closed. Thus, I have no power button.

Can I end the session without asking for mouse access?

Are there alternate keyboard shortcuts for ending a screen sharing session? The menu bar lists ^ ⎋ for achieving this (⎋ is the power button on your computer). However, I'm stuck in a really annoying middle ground.

Actually, the symbol that you're referring to references the "Esc" key.

So, by pressing ^ ⎋ (Control-Esc) you can end the Screen Sharing session without asking for control of the mouse.


Rebuilding iPhoto library causes issues with iTunes photo sync I recently had a nasty problem with my iPhoto library that I corrected by rebuilding it. This restored missing/corrupted photos and fixed several other inconsistencies, so iPhoto is working properly again.

But now, iTunes is the one that's having problems. Whenever I connect my iPhone and visit the Photos pane, it tells me that my iPhoto library contains 0 photos (and, since I sync selectively, it says the same next to every item I've checked). It reported all the right counts before I rebuilt my iPhoto library.

Not only that, but whenever I sync for the first time after connecting, the photos will mysteriously disappear from my iPhone and I'm forced to resync them, even when I don't make any changes (not even outside the Photos pane). The photos then stay on my phone as usual, but once I connect and sync again, the same thing happens. I don't have a large photo library so it's only an extra couple of minutes of waiting, but it's still something I shouldn't have to put up with every single time I connect and sync my device.

I'm using iTunes 11.0.1 and iPhoto 9.4.2. My computer runs OS X 10.8.2, and my iPhone runs iOS 6.0.1. All are at their latest versions as of this writing.

What can I do to make iTunes read and sync my iPhoto library properly again?

Hopefully you have the run of the mill, the iPod Photo Cache is now stale issue which is easily remedied.

iTunes: Understanding the iPod Photo Cache folder - TS1314

Since you are on Mountain Lion, this is just a folder in the "iPhoto Library" and you can right click on it, and show package contents. Just drag that folder to trash and then quit both iPhoto (and Aperture if you have it) as well as iTunes.

A re-launch of iTunes should see that the folder is missing and clear any sync tokens, and proceed to rebuild a list of pictures, albums and events. Usually, there isn't a second step needed as this folder is designed to be safe to delete at any time to save space on a drive and exists to speed up syncing.

As always, kicking off a backup when looking into deleting things is never a bad idea in case the corruption is deeper than expected or just a sign of a failing storage device.


Why doesn't X11/XQuartz start on Lion? After upgrading to Lion, X11 doesn't start. I downloaded XQuartz 2.7.0, it doesn't start either.

The crash dialog mentions the following problem:

  X11:
  Dyld Error Message:
    Library not loaded: /usr/X11/lib/libpixman-1.0.dylib
    Referenced from: /Applications/Utilities/X11.app/Contents/MacOS/X11.bin
    Reason: Incompatible library version: X11.bin requires version 21.0.0 or later, but libpixman-1.0.dylib provides version 17.0.0

  XQuartz:
  Dyld Error Message:
    Library not loaded: /opt/X11/*/libfreetype.6.dylib
    Referenced from: /Applications/Utilities/XQuartz.app/Contents/MacOS/X11.bin
    Reason: Incompatible library version: X11.bin requires version 14.0.0 or later, but libfreetype.6.dylib provides version 10.0.0

Unsetting DYLD_LIBRARY_PATH doesn't help either.

EDIT: I also reinstalled X11 from the Lion installer package as described here, but the problem is the same.

Can anyone help?

It appears that the GnuPlot package delivers an older version of libfreetype.6.dylib than is installed on Lion (or SnowLeopard, in my case).

otool -L /Applications/Gnuplot.app/Contents/Resources/lib/libfreetype.6.dylib
/Applications/Gnuplot.app/Contents/Resources/lib/libfreetype.6.dylib:
    /tmp/gnuplot-i386/lib/libfreetype.6.dylib (compatibility version 13.0.0, current version 13.2.0)

Yet my error is that GnuPlot is trying to load "/usr/X11/lib/libfreetype.6.dylib" and not the library contained in the GnuPlot package. That library is the right version:

otool -L /usr/X11/lib/libfreetype.6.dylib
/usr/X11/lib/libfreetype.6.dylib:
    /usr/X11/lib/libfreetype.6.dylib (compatibility version 14.0.0, current version 14.2.0)

This is as far as I have gotten. I did note that the library aliases in the GnuPlot package all point to the libraries delivered with GnuPlot (4/15/2011 in my case), so my next trick will be to create a new alias for libfreetype.6.dylib pointing to the one in /usr/X11/lib and see if I get a new error.

Maybe the answer is to build GnuPlot on our Macs?


After disabling auto mount, can I show connected but not mounted drives in Finder sidebar? I have an external hard drive connected to my cinema display. I don't use the hard drive every time I connect my laptop to the display. However, I forget to unmount it almost every time I disconnect my laptop.

To avid incorrect disconnecting I disabled automounting in fstab as described here: How to Disable USB Auto-mount

Now it's hard to mount the drive as I have to go to DiskUtility. Is it possible to see the connection but not mounted hard drives in the Finder sidebar and have them mounted when the sidebar entry is selected? (the same way it works with the things shared on network)

To answer the question, no Finder does not offer that preference or option, however there is a workaround.

I have a similar situation and I use an AppleScript script saved as an application that mounts the unmounted target volume when I want, without having to go into Disk Utility to do it.

I have this app on the Toolbar in Finder, with the same icon as shown on the drive, so it's easy to just click it. It could be placed on the Dock or Desktop, etc. At times I access it from Spotlight too. Lots of options, even using the code in an Automator Service workflow and assigning it a keyboard shortcut if you want.

set theVolumeName to "TOSHIBA EXT"
try
    do shell script "diskutil mount $(diskutil list | awk '/" & theVolumeName & "/{print $NF}')"
on error eStr number eNum
    if eNum is 1 then
        display dialog "The disk containing the\"" & theVolumeName & "\" volume is not available." buttons {"OK"} ¬
            default button 1 with title "Check Disk Connection & Power Status" with icon 0
    else
        display dialog eStr & " number " & eNum buttons {"OK"} default button 1 with title "Error Status" with icon 0
    end if
end try

Notes:

Change set theVolumeName to "TOSHIBA EXT" so "TOSHIBA EXT" is the name of the target mounted volume.
This script assumes there is and will only be one volume with the target name. If not, then the awk command will need to be modified to accommodate.

Understanding what the do shell script command is doing:

do shell script "diskutil mount $(diskutil list | awk '/" & theVolumeName & "/{print $NF}')"

do shell script - Executes a shell script using the sh shell.
diskutil mount device - Mount a single volume.
$(...) - Command Substitution. - Command substitution allows the output of a command to replace the command name. In this case it will be device in: diskutil mount device
diskutil list - List disks. If no argument is given, then all disks and all of their partitions are listed.
| - Pipe the output of the previous command to the next command.
awk '/" & theVolumeName & "/{print $NF}' - The example will be: awk '/TOSHIBA EXT/{print $NF}'

awk - Pattern-directed scanning and processing language.
/TOSHIBA EXT/ - Search pattern. Outputs the record (line) containing the search pattern.
In this example it matched:
        1:               Windows_NTFS TOSHIBA EXT             2.0 TB     disk1s1
{print $NF} - Prints the last field of the record. Which printed: disk1s1

The following is example output in Terminal:

$ diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *751.3 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Macintosh HD            750.4 GB   disk0s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk0s3
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:     FDisk_partition_scheme                        *2.0 TB     disk1
   1:               Windows_NTFS TOSHIBA EXT             2.0 TB     disk1s1
$ diskutil list | awk '/TOSHIBA EXT/{print $NF}'
disk1s1
$ diskutil mount $(diskutil list | awk '/TOSHIBA EXT/{print $NF}')
Volume TOSHIBA EXT on disk1s1 mounted
$

So it finds the device for the diskutil mount device command regardless of how many disks are attached to the system.


Find text in Notes app on iPad Pro Is it possible to search for text in the Notes app on an iPad Pro?
The closest I have gotten is the search field to the left of the Home screen, but that does not find the fifth occurrence of that text. Is another app better for searching text?

Currently there's no way to search Notes that specifically. It might be a feature that Apple will add in the future, but for now, Spotlight search on iOS will help you can only perform the basic "if note contains this word, display note" searches. There's also no "Find" function within the Notes app.


iOS weather widget that displays two locations Is there an iOS weather widget (for the lock screen) that displays the forecast for two locations at the same time? I'd like to be able to see the weather at home and at my work or other destination at a glance.

It should show at least today's forecasted high, low, and precipitation. I happen to live in Oakland, CA, and work in San Francisco, which are close to each other but have significantly different microclimates, if that's helpful.

(I'm aware that I can download multiple apps and use a different app's widget for each location, but i'd like to use the same app for both locations)

You're asking about a single iOS app that shows the weather on the lock screen for two locations simultaneously?  I don't have an answer for this exact scenario, but the built-in iOS weather app for iPhones will display the weather for many locations.  You can see the current weather for multiple locations simultaneously, and you can see the forecast for one location at a time and swipe back and forth to see the next or previous locations.

In the weather app, click the menu in the bottom right corner:

This shows all locations that you've set.  You can see the current weather in all that fit on the screen (as well as if it's day or night). Click the "+" in the lower right to add a new location:

Then type in the first few letters of the location you want to add:


iPhone, half of the screen broken, cannot perform backup I recently dropped my iPhone and half of the screen is broken. I directly ordered a new one but I cannot manage to backup my old one.
I can still interact with the bottom half but when I plug it into my Mac, it asks me for my password which contains a "1" and I cannot type it. Face ID is locked so I cannot do anything. Is there a solution for me to backup old data ? I really cannot afford to lose it all so my last resort will be to replace the screen just to make the backup...

Connect your iPhone with a Mac(that is trusted by your iPhone) using USB cable.
open iTunes.
Select your iPhone.
Select the Backup method to your iCloud account or This Computer.

It will not ask for any passcode, but if it does, you could enter it using a Bluetooth keyboard.

Note: I am not sure if a not trusted Mac or PC connected it will work.
Also See the attached image.


How to alt tab to 'about this mac'? This window does not have a tab, so once you alt tab away you can't alt tab back. Is there actually a way that I do not know?

You cannot cmd-tab to it since it is not an application. The best you can do via keyboard commands is to use Cmd+Space to bring up spotlight, then start typing "About this Mac", once it populates, hit Enter.


Why am I asked to open YouTube videos in VLC? I use the mobile site for YouTube in safari on iOS 13.3. Sometimes when I tap play on a video I get a pop up saying 'Open in "VLC"?' as though I had ever made the slightest indication of wanting that.

When I tap cancel I'm left with a non playing video in safari.

How do I disable this nonsense? What's causing it? Is VLC now affiliated with YouTube, or if not, how do I prevent it from infiltrating the domain and interfering with my browsing?

This is most probably caused by having played around with "Request Desktop Site" in Safari, whereby I somehow end up getting served a mobile page, but with an unsupported video format (likely VP9).


How to manually restore emails in Lion? Before upgrading to Mac OS X Lion with a clean install, I backed up Mail app according to this article on Apple Discussions. I know have the com.apple.mail file and the Mail directory and I have no idea how to restore it. As it seems, theses paths have changed. Do you have any ideas on how to restore my emails?

Put the contents of the mail directory in /Users/yourusername/Library/Mail (or  ~/Library/Mail in other words)

com.apple.mail.plist goes to /Users/yourusername/Library/Preferences (~/Library/Preferences)


Migrating Local Folders from Thunderbird to Mail.app I am moving from Thunderbird to Mac mail on my iMac running OSX. If I uninstall Thunderbird will the local folders I created in Thunderbird remain on my computer for importing later?  I don't want to bring all of them over now, but would like to have the option of doing so at a later date.  I don't want to uninstall Tbird and then have the local folders disappear.

All your Thunderbird data, including the local mail data is stored in the Profile folder, located either at ~/Library/Thunderbird/Profiles/<Profile name>/, or "~/Library/Application Support/Thunderbird/Profiles/<Profile name>/.

Deleting the Thunderbird app won't delete any of the data there, unless you use a 3rd party uninstalled app like AppZapper. You can of course make a manual backup of those folders for added safety.


Automatically turn bluetooth on or off depending on current network (MBP running Lion) Is there any way to automatically turn Bluetooth on or off when my MacBook Pro (mid-2010, running Lion) joins specific networks? I typically want Bluetooth off except when I am connected to my home wireless or wired network. It would be really handy if I could configure Bluetooth to turn on whenever I join my home network(s), and likewise, turn it off when I join a non-home network.

ControlPlane is a supported development based on Marco Polo.


Make locator.updatedb run daily on Snow Leopard w/o hacking /System/Library? On Snow Leopard, the locate database is updated once a week by a launchd job, /System/Library/LaunchDaemons/com.apple.locate.plist. I'd like to make the updater run daily, but AFAIK it's considered very bad form to edit anything in /System.

What's the best way to change its StartCalendarInterval so it runs once a day?

The way I understand it, that System folder launchd job does nothing but execute /usr/libexec/locate.updatedb itself.

So simply create your own launchd job executing /usr/libexec/locate.updatedb that runs once a day.

As a sidenote, here's a Super User answer which recommends using mdfind -name <filename> instead of locate so that you can use the Spotlight database which is continually updated.

And this Ask Different answer has more info on creating launchd jobs if you need more help with that.


How to launch pdf viewer from the terminal I'm working using LaTeX, since I compile the document in the terminal, it would be much easier for me to open it in pdf viewer directly from the terminal.

I'm using OS X 10.8.2 in Polish, so I'm not sure of the English name of the viewer I'm using, but it's the default one, I guess it's Preview in English. But the command preview <filename.pdf> results in -bash: preview: command not found.

You can just use open <filename.pdf> and your OS will use the default program to view PDFs. With open -a Preview.app <filename.pdf> your PDF is opened using Preview, even if your default PDF reader is something different.