macos – Apple Script – How do I check if the borders of a window match specific values?

The following example AppleScript code uses the value of bounds to the Note in your operating room, to check if the electricity bounds corresponds to the given one list:

tell application "Notes"
    if (bounds of front window) is not equal to {0, 0, 540, 300} then
        set bounds of front window to {0, 0, 540, 300}
    end if
end tell

It can also be written like this:

tell application "Notes" to ¬
    if (bounds of front window) ¬
        is not equal to {0, 0, 540, 300} then ¬
        set bounds of front window to {0, 0, 540, 300}

Or with one variable assignment:

tell application "Notes"
    set checkBounds to bounds of front window
    if checkBounds is not equal to {0, 0, 540, 300} then
        set bounds of front window to {0, 0, 540, 300}
    end if
end tell

Note that example AppleScript code is exactly that and contains none error proper handling. It is the responsibility of the user to add one error handling as needed, need or desire. Look at that To attempt statement and error statement in that AppleScript phrasebook, See also, Work with errors,

macos – Open file: /// linked to the folder

I have used symbolic links (eg file:///Users/me/Documents/Secret%20Project/) to link different items in different apps on my Mac.

However, if these links point to a folder, they open the Finder in the folder's parent folder. I have to cross the finder one level deeper. Not backbreaking, but in any case impractical.

The desired behavior is to open the Finder in the linked folder.

Any ideas how this will be possible?

How do I get macOS Catalina Postfix Send Mail (with Gmail SMTP)?

I tried everything (I guess), like writing my sasl_passwd and editing main.cf in the folder / etc / postfix (as in https://www.justinsilver.com/technology/osx/send-emails-mac- described) os-x-postfix-gmail-relay /? unapproved = 2688 & moderation-hash = cf71581ee481cb1c6f76481946c2ef7e # comment-2684). I've also copied my LaunchDaemon list with a name other than the / Library / LaunchDaemons folder (as described in How to Change a Launch Daemon Permanently on OS X El Capitan?).

While these people managed to get Postfix to send SMTP Gmail messages from their terminal under Mojave or El Capitan. I did not manage to get their solutions working under Catalina.

Any suggestions?

macos – 2012 iMac boots on Prohibited Sign after trying to update itself overnight? Hard drive can not be mounted now?

My friend's 2012 iMac has been trying to update itself overnight. As a result, the forbidden character was displayed on a gray screen this morning and the iMac stops booting.

Here are all the things I've tried so far:

1) If you hold down the SHIFT key while switching on to enter safe mode, a black progress bar followed by a forbidden character will be displayed.

2) If you press and hold CMD-R at power-on to access the recovery console, a black progress bar followed by a forbidden character will be displayed.

3) Press and hold CMD-OPT-R at power on to access the online recovery console. This works, the connection to the WLAN is established, and the recovery console starts successfully.

3a) From this online console, I can go to the Disk Utility and see the internal 1TB hard disk, but I can not mount it because it does nothing when I select the MOUNT item. In addition, disk information (disk0) is very small because the drive could not be accessed. However, using the Terminal> "diskutil list" command I can see two partitions in disk0, but nothing happens when I enable or force one of these partitions: disk0s1 (150 MB EFI) and disk0s2 (1000 GB APFS)

3b) In Disk Utility, I tried to use the First Aid feature on Disk 0 (not on the actual partitions, as they are not displayed by the Disk Utility, but on the root disk itself). There was a pop-up window showing "Running First" help … "for an hour without progress, nothing is listed or displayed in this window, nor is there a cancel or close button.

I am aware of these two interesting ideas, but as I mentioned earlier, we can not access disk0s2 to browse / delete files.

The system stops booting after attempting to update 10.13.4

OSX ban icon on boot (causing high Sierra update)

More ideas? We have NO other Mac, this is the only Mac we can use. However, I have some external drives that we can format and use. Also, the internet is very slow here (booting to the online recovery console starts with downloading 1GB of data, which takes almost half an hour!). So, the most preferred method would not imply the downloading of Gigabyte installation files, unless this is actually mandatory.

macos – How can I delete some disk images in my recovery partition?

When I upgraded my MacBook Air from Sierra to High Sierra in mid-2011, I had some installation issues … that resulted in at least 2, possibly 3, disk images being created on my recovery drive.

I have disk image files that they do not own (such as a bunch of keys), and my system compensated them by putting them somewhere else.

The implications are bigger than I can list here … The two most problematic ones are:

/dev/disk4 in /Volumes and /dev/disk12 on /Volumes/untitled,

-bash-3.2# mount

/dev/disk1s1 on / (hfs, local, read-only)  
devfs on /dev (devfs, local, nobrowse)  
/dev/disk3 on /private/var/log (hfs, local, union, nobrowse)
/dev/disk4 on /Volumes (hfs, local, union, nobrowse)
/dev/disk5 on /private/var/tmp (hfs, local, union, nobrowse)
/dev/disk6 on /private/var/run (hfs, local, union, nobrowse) 
/dev/disk7 on /private/tmp (hfs, local, union, nobrowse)
/dev/disk8 on /System/Installation (hfs, local, union, nobrowse)
/dev/disk9 on /private/var/db (hfs, local, union, nobrowse)
/dev/disk10 on /private/var/folders (hfs, local, union, nobrowse)
/dev/disk11 on /private/var/root/Library (hfs, local, union, nobrowse)
/dev/disk13 on /private/var/root/Library/Containers (hfs, local, union, nobrowse)
/dev/disk14 on /Library/Preferences (hfs, local, union, nobrowse)
/dev/disk15 on /Library/Preferences/SystemConfiguration (hfs, local, union, nobrowse)
/dev/disk16 on /Library/Keychains (hfs, local, union, nobrowse)
/dev/disk17 on /private/var/tmp/RecoveryTemp (hfs, local, union, nobrowse)
/dev/disk18 on /private/var/tmp/InstallerCookies (hfs, local, union, nobrowse)
/dev/disk2 on /Volumes/Macintosh HD (hfs, local, journaled)
/dev/disk12 on /Volumes/untitled (hfs, local, nodev, nosuid, no owners)

No audio under macOS QuickTime MPEG-4 video

I wonder what can prevent the Quicktime player from playing the audio next to a video.

The files I have are MPEG-4. When starting up in macOS QuickTime no sound is heard. I quickly tested it on an iPhone and the audio plays when the same files are started. Elmedia Player also successfully produces the audio on the same computer.

How can I tell why QuickTime can not play the audio track?

macos – How to play music from your iPhone via Apple Music in OS Catalina?

Your question is a little unclear, but if you're using your iPhone as an audio input and want to play music from iPhone through the MBP speaker, do the following:

Before following the instructions, make sure you have a Lightning USB cable at hand (the same as when you're charging your device). You need it to complete the setup process. When you're ready, follow the step-by-step guide below:

  1. Connect your iPhone to your computer with the USB cable.

  2. Open the Audio Midi Setup on your Mac. You will find it in applications > Utilities,

  3. If your iPhone is not listed in the left pane, go to window > Show IOS Device Browser.

  4. Find your iPhone in the list of devices and mark it.

  5. Click Activate. Your phone will now be displayed as an input device.

There are no further steps required. Any audio you play on your phone (except phone calls) will play on your Mac.

Enter image description here

To justify my answer (if it does not suit your question), iTunes is still present in Mojave. You can sync all your music and play everything directly from MBP.

MacOS – Where are terminal designs / profiles used by Terminal.app on the hard disk?

I know that I can export a profile, so I can use it, but if I change it, I need to re-export it to have a proper backup.

I would rather have one symlink to the indeed file I have to constantly re-export if I want to back up my system.

However, I can not find that Location from where terminal Uses the imported designs. Where does it take you?

Someone?

macos – How do I create a custom dynamic wallpaper in Catalina?

I tried to set a custom dynamic wallpaper in Catalina, as I did in Mojave (which worked well), but my dynamic wallpaper displays the following option because you can see the image (broken).

Enter image description here

and if I want to change it the "Dynamic" option is not there!

Enter image description here

I tried to find the path of the default dynamic backgrounds and I could not paste the ".heic" files where the background image of Catalina is located. I also tried setting a default dynamic background image first and in dynamic mode. Then I switched to the custom wallpaper and did not work.

Has the dynamic background image format changed in Catalina OS?

How can I set a custom wallpaper in Catalina?

Link to the custom wallpaper

macos – How do I specify the network interface for different protocols?

At work I have 2 interfaces active: WiFi and Ethernet.

Eth connects to the corporate network for shared volumes through SMB. But then no internet.

WiFi connects to the Internet, but not to the corporate network.

I can not deploy shared volumes if I have Wi-Fi first with Set Service Order. and I can not access my FTP if it is set to Ethernet.

Can I somehow specify which protocol uses which interface?

Or at least certain IPs / servers to Eth lead?