text:
MacBook Pro only charges with smaller MagSafe 60W
My MacBook Pro 2.3ghz  i7 mid-2012 stopped charging and the light on the charger doesn’t show up anymore.
I thought it was the MagSafe 85W and got a new one, but my MBP is still not charging. The light does not work on both the old and new 85W charger, and neither actually charge my MBP.
However, I have a smaller 60W MagSafe that works ok. The light comes on and it charges the MBP.
What could explain this?
The DC jack looks ok, but I wonder if that could be it? Or is it more likely to be a logic board problem?
UPDATE
I’ve also conformed this by using iStat - it shows that the 65W charger provides around 30W while both the 85W chargers do not show up at all.
UPDATE 2
I have also used pmset from the terminal window to check the power management. As suspected, both MagSafe 85W are not seen at all, it reports "no adapter attached". It only works with the MagSafe 60W.
The rawlog, with the MagSafe60W attached and then removed shows:
AC; Charging; 57%; Cap=3748: FCC=6550; Design=6900; Time=2:02; 3028mA; Cycles=92/1000; Location=0; Polled boot=05/12/19 08:19:07; Full=05/12/19 09:15:17; User visible=05/12/19 09:18:17 05/12/19 09:18:31 No AC; Not Charging; 57%; Cap=3761: FCC=6550; Design=6900; Time=2:01; 3097mA; Cycles=92/1000; Location=0; Polled boot=05/12/19 08:19:07; Full=05/12/19 09:15:17; User visible=05/12/19 09:18:31
The rawlog with the same MagSafe 60W detached shows:
No AC; Not Charging; 57%; Cap=3761: FCC=6550; Design=6900; Time=2:01; 3097mA; Cycles=92/1000; Location=0; Polled boot=05/12/19 08:19:07; Full=05/12/19 09:18:31; User visible=05/12/19 09:18:31
The only difference between the Magsafe 85W and the 60W is the output:
- MagSafe 85W: output 18.5V, 4.6a
- MagSafe 60W: output 16.5V, 3.6a
I have also replace the DC jack and still no luck.
Why on earth my laptop only works with the adapter that provides less voltage and amperage?

Firstly, welcome to Ask Different! :)  I hope you come to find this site has a lot to offer! In case you haven't already, it's worth taking the time to read the tour. With regard to your question, can I ask whether it's just that the light doesn't show up any more on the old MagSafe, or is it definitely not charging? And what about the new MagSafe 85W charger? Does the light come on or not? Finally, what happens with the smaller MagSafe? Does the light work?

Hi, thanks. Both 85W are definitively not charging, lights do not come on and computer doesn’t recognise them. The smaller MagSafe 60W works ok, light comes on

Try to do a SMC and PRAM reset.
SMC, amongst others, controls power management of your Mac. From https://support.apple.com/en-us/HT201295:

These symptoms might mean that an SMC reset is necessary:

[...]
The battery doesn't charge properly.

I did it but the MagSafe 85W still do not work

@lrzprz That is an odd problem you have there. To diagnose the issue further you can try and cover the middle pin. This will suppress communication between the charger and the Mac. However it will only be able to draw power but not charge the battery. Not sure what that info will help you though... Maybe you can rule out that the chargers are actually functional.

You may or may not get any useful information from pmset, but it takes virtually no effort, so why not?

What is pmset?  A command line utility for manipulating and viewing power management setttings under macos. Ref Wikipedia article
You can access pmset from a terminal window. You can access the system manual for pmset by entering man pmset at the command line (type q to close the manual).
The -g options for pmset will display potentially useful information, and do not require root/su privileges. You will be required to use root privileges with pmset to make changes to system settings, but that may not be necessary at this time.
You may wish to try the following when your chargers are connected, and note the differences. The output below is from my MBP:

pmset -g ac
 Wattage = 86W
 Current = 4300mA
 Voltage = 20000mV
 AdapterID = 5718
 Manufacturer = Apple Inc.
 Serial String = C047*************       # * replaces a portion of this string
 Adapter Name = 87W USB-C Power Adapter
 Hardware Version = 1.0
 Firmware Version = 01070069
$

You might also try monitoring the log for a bit to see if that turns up anything relevant:

$ pmset -g rawlog
pmset is in RAW logging mode now. Hit ctrl-c to exit.
 * Battery matched at registry = 7939
05/11/19 23:01:34
 AC; Not Charging; 99%; Cap=6154: FCC=6181; Design=6669; Time=0:00; 0mA; Cycles=286/1000; Location=0;
 Polled boot=05/11/19 14:56:06; Full=05/11/19 22:54:49; User visible=05/11/19 23:00:49
05/11/19 23:03:49
 AC; Not Charging; 99%; Cap=6155: FCC=6181; Design=6669; Time=0:00; 0mA; Cycles=286/1000; Location=0;
 Polled boot=05/11/19 14:56:06; Full=05/11/19 22:54:49; User visible=05/11/19 23:03:49

Note that the charger was connected to my MBP during this logging activity, but the battery showed 100% charged in the menu bar at the top of my monitor.
Finally, if you see anything in the pmset output that seems suspicious, please consider editing your question to include that. No promises any of this will help of course, but we'll certainly give it a try.

I used pmset but on both MagSafe 85W chargers it reports "no adapter attached".
The rawlog, with 60W attached and then removed show:
AC; Charging; 57%; Cap=3748: FCC=6550; Design=6900; Time=2:02; 3028mA; Cycles=92/1000; Location=0;
Polled boot=05/12/19 08:19:07; Full=05/12/19 09:15:17; User visible=05/12/19 09:18:17
05/12/19 09:18:31
No AC; Not Charging; 57%; Cap=3761: FCC=6550; Design=6900; Time=2:01; 3097mA; Cycles=92/1000; Location=0;
Polled boot=05/12/19 08:19:07; Full=05/12/19 09:15:17; User visible=05/12/19 09:18:31

with MagSafe detached:
No AC; Not Charging; 57%; Cap=3761: FCC=6550; Design=6900; Time=2:01; 3097mA; Cycles=92/1000; Location=0;
Polled boot=05/12/19 08:19:07; Full=05/12/19 09:18:31; User visible=05/12/19 09:18:31

@lrzprz: Could you please edit your question to put those results in there (similar to the formatting I've used in my answer)?? Please try to be specific wrt which MagSafe charger... as I understand it, you have 2x MagSafe 85W & 1 MagSafe 60W?

Done! updated with more infos, still no luck

@lrzprz: How many of these "tips" have you tried?

Do you have or can you download iStat Menus; then look at the DC In sensor with both adapters connected. I suspect the MagSafe connector on your Mac has detritus in it and needs to be cleaned.
Check how many watts of input are being provided with each adapter. The LED may not be changing because it can't transfer the expected amount of current and/or the sense pins have been damaged.
Please see How to reset a magsafe charger that doesn't charge macbook pro's battery?

I’ve tried with iStat and seen that the 65W charger provides around 30W. Both the 85W chargers do not show up, as if they are not connected at all


text:
Change Safari microphone input device to be blackhole or soundflower
I want to change Safari input device from built-in microphone to Blackhole 2ch.
I tried to do this by choosing Blackhole as the Input device system-wide in System Preferences.
The input device is working, in every other app I can use it as the input device and hear that it records properly, in System Preferences the volume monitor flickers correctly.
However, Safari always just records silence. I've tested with two websites: Whatsapp and https://online-voice-recorder.com
It just records silence, except a single tiny blip of the audio I am routing through blackhole.... sometimes.
What's going on with Safari? How can I route songs of my choosing into Safari as if it were through the microphone?

It might be more helpful if you'd also add a URL that you're having an issue with in Safari. That way we would have something to test against that's not working for you.

@user3439894 any microphone input.

What are your settings at Safari > Preferences > Websites > Microphone?

@user3439894 ask

As a general rule, which sound input device is used is controlled by the OS in System Preferences > Sound > Input (as shown in the second image below) and some, but not all, apps one can choose a sound input device other than the one set for the OS. For example, in Audacity you can select other than the one set for the OS.
However, I am not aware of a built-in preference in Safari that lets one choose a sound input device. There is a microphone setting in Safari, but it doesn't offer control over which sound input device to use.
Have a look in: Safari > Preferences > Websites > Microphone

I guess it's impossible then.

source: Stack Exchange

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

sort: votes


text:
Why aren't iTunes and Windows Photo acknowledging my iPhone?
My mom must move pictures on her iPhone (not iCloud) to her PC. She's computer-illiterate, and I'm using TeamViewer to access her PC. She has plugged in her iPhone to her PC. Then her iPhone asked her "Trust This Computer?", and she obviously clicked "Trust".
This post links to an Apple website dated Oct 28 2018 that features an ostensibly outdated iTunes layout because it differs from the one below, and I downloaded iTunes today.
This post recommends the Window Photos App.

Do you get any prompt on the iOS device? Does it say device/accessory not supported?

You must unlock the iPhone in order to get data connection to any device at all, on recent iOS. Re-connect, enter touchID or passcode.

@Tetsujin I think she did? Please see my edited post.

@abc Yes, but not "device/accessory not supported". Please see my edited post.

all_licenses: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/


text:
Audio level in video different between Mac players and other players
I ripped a dvd of a family event using HandBrake, and increased the gain setting to maximum since the audio on the dvd was extremely quiet. Now when I play the resulting m4v on iTunes, Quicktime, or Mac's spacebar preview, the audio is fine, maybe a little on the quiet side. However, when I play it with VLC or import it into Audacity, Blender, or even iMovie for editing, it's far too loud, and much of it is clipped. Any ideas as to why this is?
Maybe this would be better in an a/v forum, but since the problem seems related to mac players, I thought I'd give it a try here.

idk for sure, but you've probably added a DialNorm or ReplayGain type parameter that some software recognises - the really loud ones - & some that don't... the quieter ones.

Thanks, good idea. I'll try posting on StackOverflow; if the answer is this technical that'll be a better bet.


text:
iCloud space not working
I have purchased iCloud space on my iPhone which currently have over 45GB storage left. I still get storage space warnings on the iPhone. I cannot download anymore apps, take photos or receive anymore WhatsApp messages due to lack of space. How to a fix this issue? thanks.
The previous answer to this question does not answer the question. It states the problem but not how to fix it.
Thanks

You can‘t fix it as such. The phone complains about low memory on the phone itself, the iCloud storage you bought is storage on Apple‘s servers. These are two different things. If you are low in memory on your phone, you need to remove unused apps or data.

You bought the iCloud space–now turn on iCloud features like iCloud Photo Library to allow stuff to be moved off your phone. It cannot solve every problem though.


text:
History of Location
Problem
I would like to know the places a device of mine has been in.
Question
Is there any way to get the history of locations with my iphone 5s?

Which version of iOS do you have installed?

@nohillside 12.2

Option 1:
You can use the Apple Find My iPhone service to track and find your missing Apple device.

Use Find My iPhone
When you sign in to iCloud.com or the Find My iPhone app, you can see your missing device on a map or play a sound. And you can use Lost Mode to lock, track, or remotely erase all of your personal information.
More information on apple.com

Option 2:
If the device is currently in your possession and location services are turned on:
Use Significant Locations settings’ to check visited places. These are buried pretty deep. You’ll find them in Settings > Privacy > Location Services > System Services > Significant Locations. You must authenticate yourself to see them, using your passcode, Touch ID or Face ID.

@santimirandarp Please specify your question. Just follow the steps above. Everything should be displayed on your device.

Is there any way to export this information to a file?

@santimirandarp I think that is not possible.

I only see there items under recent records and no apparent way to access more even though 260 are counted in the summary. Am I missing something?


text:
Windows Gaming RGB keyboard - Scroll Lock on Mac does not enable RGB lights
I'm a mac user and I just bought a new RGB windows keyboard. In order to enable the RGB light, I have to press "Scroll Lock". But every time I press, it keeps decreasing the brightness. It doesn't work because it's a windows keyboard.
Is there any way to solve this?

Please be more specific about the brand and model of keyboard you're attempting to use. More than likely, you'll need drivers of some sort to enable this keyboard.

Check out https://github.com/damieng/setledsmac. It can be used to toggle the scroll lock LED, which may or may not trigger the RGB functionality of your keyboard. I think you may be able to hack the script to enable RGBs. There's a few threads floating around out there on this very topic.

Also check out https://apple.stackexchange.com/questions/156273/os-x-cm-storm-devastator-keyboard-doesnt-light-up/181975#181975


text:
disable lid sleep in mojave
I used to use InsomniaX but it doesn't work for me right now.
I want to stop my MacBook from sleeping when I close the lid.

Use the latest version of KeepingYouAwake. It works pretty well in macOS Mojave. It's a GUI based wrapper around Apple's caffeniate command line utility. All current versions of macOS ship with caffeniate tool built-in. So, it should be safe to use.
Courtesy: https://github.com/newmarcel/KeepingYouAwake/#how-does-it-work
For installation:

You can download latest version from here, or
Install it using Homebrew by running: brew cask install keepingyouawake

Reference: https://github.com/newmarcel/KeepingYouAwake/#installation

KeepingYouAwake is great app to prevent your Mac from sleeping. However, it doesn't prevent sleep while the lid of a MacBook is closed.


text:
keyboard shortcut in google docs is same as safari
Google Docs uses the ⌘, shortcut to apply subscript formatting, but I can't type this in Safari because ⌘, opens Safari's preferences.
How can I work around this?

Did you try ctrl instead? - many places that are non Mac-specific mirror the key commands to ctrl from cmd

@Tetsujin doesn't work

You should consider reporting it to Google. Command + , is the universal shortcut in macOS for opening app preferences.

Unfortunately, ⌘Cmd, is almost universally the default keyboard shortcut in Mac apps for Preferences.
As I could not find any simple way of reassigning or customizing keyboard shortcuts for Google Docs, the best workaround is to override the system shortcut for Preferences instead, to avoid the conflict.    Thankfully this can be done easily in OS X:

Open System Preferences, and then the Keyboard pane
Select the Shortcuts tab. Click "App Shortcuts" on the left pane. Then, click the little "+" below the right pane to enter our own custom
shortcut.
From the Application dropdown, choose Safari. (Or you can
leave it as All Applications if you prefer to do a system-wide
change).
For Menu Title, type Preferences... exactly, including the 3 dots.
Choose a different keyboard shortcut, preferably something not used by Google Docs. Perhaps ⌘CmdAlt,?

Once you've added the new shortcut for Preferences, you can use ⌘Cmd, for formatting subscripts in Google Docs!

legend, this is the only thing that worked.

The above fix does not work for me. However, a comment from webapps.stackexchange does the trick: use fn + command + comma in Google Docs.

This solution works, which is great, but it is completely insane on Apple's part that this is the only way to resolve this issue.


text:
Mouse cursor really frequently vanishes
Recently my mouse cursor is disappearing a lot and I can't make it visible again until I slide where the mouse should be up to the menu bar and click the menu bar.
How do I fix this?
Some people think this is same question as: Fix invisible cursor?
Maybe it is? But that's for an older OS, and the OP of that question has accepted an answer that doesn't fix the problem for me.
I want to prevent  the problem from happening at all ("fix").
I have already detailed how I can get my cursor back when it disappears, but it's really annoying and I want that to not happen.
The other question some people flagged as duplicate doesn't help out at all.

If you shake your mouse, does the cursor become bigger allowing you to see it ? I lose my cursor all the time and that action helps me a lot !

@EddGrowl I am not losing it, it literally becomes invisible.

yes that is what I meant, sorry for the confusion. Sometime when I use the full screen mode on an app my cursor vanish and doesn't come back until I shake my mouse. I was wondering if it was the same issue here.

@EddGrowl doesn't seem to work for me. Only clicking on the menu bar or revealing Mission Control shows the mouse again.

Possible duplicate of Fix invisible cursor?

Same problem. I've tried all the stuff and it disappears constantly. Its the worst when you're playing a videogame, like league of legends, and it disappears bc you cant exactly tab away and not die. Is there a place to check for an error code? Or do we have some way of checking whether this is a bug or is instead considered a feature?

Looks like a someone had this issue as well and accept the answer here : Fix invisible cursor? :

If your mouse cursor has mysteriously disappeared in OS X, try the
  following tricks in descending order to bring it back:

Hit Command+Tab to switch back to the Finder or to another app, then switch back to the active app
Summon the Force Quit menu by hitting Command+Option+Escape, there is often no need to actually force quit anything as just summoning the
  menu is often enough to make the cursor return
Quit and relaunch the app, or quit all apps if the cursor is gone everywhere
Adjust the size of the cursor, found in System Preferences > Accessibility > Display to make it reappear

Reboot

Also, he commented that :

Slightly increasing the cursor size in system preferences seems to have fixed the issue entirely.

"Slightly increasing the cursor size in system preferences seems to have fixed the issue entirely." didn't work. The rest of this answer is not a solution.

Don't copy an answer from another question. If the answer is the same then you shpould flag the question as a duplicate so any new readers will see a pointer to the actual answers

Some other people claim they fixed the issue with an NVRAM reset ( described here : https://support.apple.com/en-ie/HT204063 )


text:
Is it possible to export a simple Numbers spreadsheet while being dynamic?
I have a few Numbers Spreadsheet that I use to keep track of my budget over the weeks/months but its only accessible in Numbers, which is fine Until I am at work where we use windows.
My only recourse there is my old iPhone runs Numbers slowly. I feel my phone works with PDF quickly.
Is it possible to export spreadsheet as a PDF document and still retain the automatic calculations of the spreadsheet and not just be a standard table?

Do you have an Apple ID / Cloud account?

No, PDF exports of a numbers file become static and can no longer be edited as a spreadsheet. You must use the Numbers program (or an equivalent like Excel) to achieve the dynamic features of spreadsheets.

I might add, if numbers is slow, it’s almost always lots of formatting and formulas that loop on other formulas. Cleaning the spreadsheet might be faster than looking for an alternate spreadsheet app.

There are web versions of the iWork applications, including Numbers, available in the iCloud.com web portal (called iWork for iCloud).
These work in Windows as well, the only thing required is a supported Windows web browser.
Browser requirements for iWork for iCloud below (from https://www.apple.com/iwork/)

iWork for iCloud works with Safari 9 or later, Chrome 50 or later, and
  Internet Explorer 11 or later.

There is no need to export your Numbers document into a different format. If you save your Numbers spreadsheet document to your iCloud Drive on your Mac/iOS device, it will be available and editable in the web version. The edits you make in the web version of Numbers will then sync to your Mac/iOS device and vice versa.
This requires a free Apple ID / iCloud account. If you already set one up on your Mac or iOS device, you just use the credentials to login on the iCloud.com web portal.
Otherwise, see https://support.apple.com/en-us/HT204174 for more info about setting up iCloud.com web access.


text:
How can I simply and sustainably remove Chess from my macBook Air, Mojave?
I have a list of applications I was interested in possibly removing as long as the OS does not need them to function.
For starters I want to remove Chess and Stocks as I never use them.  However when I right click on them on Finder, there is not option to delete.
I can't imaging that Chess is integral to the OS working so how can I delete it?
I need it deleted it in such a way that when my computer automatically updates it does not show up again.
Thanks.

Also a duplicate of this: https://apple.stackexchange.com/q/303657/88313
Please use the search function at the top of the page to see if your question has already been answered.

I updated the question to be more specific.

@J.M. As AdminHam said, the installer will always reinstall the 8MB Chess Application and reassert privileges. You will need to follow the instructions at the page marked duplicate after each update.

This is not a duplicate, as you can create a Launch Agent ...

Tricky to keep them from coming back.. I would create a LaunchAgent to monitor the path(s) to the apps, & include a "sudo rm -r /path/to/app" command to delete them.
https://www.macissues.com/2015/02/02/how-to-use-launchagents-to-monitor-folder-contents-in-os-x/
You would likely have to keep SIP disabled (but even this can be re-enabled through OS updates!)


text:
iPhone has WiFI turned off, but router is asking ARP to IP
I am using wireshark to diagnose a WiFi problem at my house. I turn everything off, except me of course, and traffic looks normal.
However, when I turn my iPhone on, the router instantly starts sending ARP packets to the IP address. Even when I have WiFi turned off!
Why is this happening?

It’s starts sending ARP traffic to WHAT IP address? If the WiFi on your phone is off, it doesn’t have an IP address.

Did you try putting the phone into Airplane Mode?

Turning WiFi off on the iPhone means the device shuts down the radio - it means it doesn’t establish a network connection and route traffic.
We would need to see what “the IP address” is and know details about your network to dig deeper, but here are how the system is designed. WiFi can work in airplane mode and turning off wifi is more like releasing DHCP reservation than not broadcasting.

https://support.apple.com/en-us/HT204234
https://support.apple.com/en-us/HT208086

It also matters which iPhone and which iOS you have.


text:
Why aren't my photos synchronizing?
They stopped syncing recently.  I called Apple support and they had me update both my iPhone 6 and my Macbook Air which I did.
I verified that the settings are correct.

I also verified that both devices are connected to the internet.
What else can I check?

Just to clarify, the photos you click on your iPhone are not visible in photos.app right?

I have both a photos app on my iPhone and a photos app on my macBook Air.  The photos on my iPhone are not showing up on my macBook Air in the photos app like they should.

At the bottom of the iPhone photos app, in photos tab, see if the photos has been synced. Also in iCloud.com, Please check and confirm if the photos has been uploaded. Then we might isolate macbook

Magically started working when I looked in the Photos tab in ... the Photos app.  I recently have been using QuickTime to watch movies and I noticed that iCloud was configured to save "QuickTime files".  I don't know if this means it was trying to upload movies I watched to the cloud, but maybe that was jamming up my network ... I don't know.

I did recently configure iCloud not to synch QuickTime.  Don't know if that fixed it.

Glad it helped. Also, wifi and cellular are also some factors in play sometimes. And low power mode too. Also plug into power to speed up face recognition in the app. So many things to remember.

At the bottom of the iPhone photos app, in photos tab, see if the photos has been synced. Also in iCloud.com, Please check and confirm if the photos has been uploaded.
Maybe other uploads are jamming the networks. As mentioned in the comments, Quicktime files are doing so


text:
Why does iTunes ask me to update my carrier settings?
and then tell me that it has failed ...
Should I just ignore this as my phone is working fine?
My internet connection is fine.

What version of macOS and iOS are you using?  Does this happen when you connect your iPhone to your Mac?

Can you update the carrier settings on the iPhone? https://support.apple.com/en-us/HT201270

It happens when I connect my iPhone to my macBook Air via iTunes.  macOS - Mojave for Air and iOS 12.3.  My phone just told me I need to update again this time I'm not plugged in to my Air.


text:
Error archiving from Xcode project
I am unable to archive from an Xcode project. The build is failing with the following error:

How do I resolve it?

The error appears pretty self explanatory. What have you tried so far to resolve the issue?

I have tried to archive into a ipa


text:
Can I close Finder application?
It looks like Finder can't be closed with Command+Q shortcut.
Command+W works though but it's not the same as Command+Q.
And there is not option for Finder to be closed whatsoever, only Hide.

Why is it so? Can I close Finder? How?

Why do you want to Quit Finder? - it's not meant to ever quit. It runs all the time the Mac is running.

You can quit the finder via the `terminal, but again why? see this and linked questions : https://apple.stackexchange.com/q/304717/237687

@Tetsujin, well I didn't know that it's meant to run all the time


text:
Retrieve network password (network share) from keychain in terminal
How can I retrieve my NAS password from Keychain using the terminal? Using security I can retrieve both application and internet passwords, but I've been unsuccessful for those where kind is set to network password.
Using the -D flag of find-generic-password doesn't do the trick.

After searching, it seems the case is important for the kind. The following worked for me with the following keychain config:
security find-internet-password -D "Network Password" -l "the_share" -w

Of course you can filter a bit more by indicating more element to your research
security find-internet-password -h
Usage: find-internet-password [-a account] [-s server] [options...] [-g] [keychain...]
    -a  Match "account" string
    -c  Match "creator" (four-character code)
    -C  Match "type" (four-character code)
    -d  Match "securityDomain" string
    -D  Match "kind" string
    -j  Match "comment" string
    -l  Match "label" string
    -p  Match "path" string
    -P  Match port number
    -r  Match "protocol" (four-character code)
    -s  Match "server" string
    -t  Match "authenticationType" (four-character code)
    -g  Display the password for the item found
    -w  Display only the password on stdout
If no keychains are specified to search, the default search list is used.
        Find an internet password item.

With the above results here's what are the fields (replace -w by -g)
security find-internet-password -D "Network Password" -l "the_share" -g
keychain: "/Users/bric3/Library/Keychains/login.keychain-db"
version: 512
class: "inet"
attributes:
    0x00000007 <blob>="the_share"
    0x00000008 <blob>=<NULL>
    "acct"<blob>="the_user"
    "atyp"<blob>=<NULL>
    "cdat"<timedate>=0x32303139313233303133323534345A00  "20191230132544Z\000"
    "crtr"<uint32>=<NULL>
    "cusi"<sint32>=<NULL>
    "desc"<blob>="Network Password"
    "icmt"<blob>=<NULL>
    "invi"<sint32>=<NULL>
    "mdat"<timedate>=0x32303139313233303133323534345A00  "20191230132544Z\000"
    "nega"<sint32>=<NULL>
    "path"<blob>=<NULL>
    "port"<uint32>=0x00000000
    "prot"<blob>=<NULL>
    "ptcl"<uint32>="afp "
    "scrp"<sint32>=<NULL>
    "sdmn"<blob>=<NULL>
    "srvr"<blob>="the_share._afpovertcp._tcp.local"
    "type"<uint32>=<NULL>
password: "the password"

E.g. specifying the protocol using -r "smb " will not result in any result for me as it is an afp share, but using -r "afp " will, for this particular (Note that the extra space is mandatory for this particular criteria to work). But it's also possible to search for the account using -a the_user. But for this password specifying other fields (as they are NULL) will not return anything.
macOs 10.15.2


text:
Wireless Keyboard: SHIFT-P suddenly not working
(This question is NOT about Macbook Pro keyboards. It is about an Apple Wireless Keyboard)
I'm using an old Apple Wireless Keyboard (can't find model number - it's the white and clear plastic model).
Yesterday the SHIFT-P (capital 'P') functionality suddenly stopped working. I didn't spill anything or otherwise mess with the keyboard (that I am aware of).
The "p" key works fine but in order to type a capital 'P', I need to set the caps lock. I looked at the 'keyboard viewer' and SHIFT-P doesn't trigger an event. No other keys appear to be affected.
Anyone seen this before?
UPDATE ok, so it's the left SHIFT key which is failing with the letter "P" but the right SHIFT key works fine with it. Weird. I understand total hardware failure but why would the left SHIFT key only fail with the letter "P"?
(the irony here: I am using the wireless keyboard because my MacBook Pro laptop battery swelled up and knocked out the Y, U, I, O keys. I replaced the battery but that didn't fix the keyboard issue)

@Allan - not a duplicate of that question. That question is about Macbook Pro keyboards. This question involves an Apple Wireless Keyboards.Please read my question again. Thanks.

It’s a canonical question about all keyboards - external keyboards are addressed in the question/answer.   This question is no different from the scenarios presented.


text:
iPhone 6s ios 12.3 general settings restrictions
Good day, My “restrictions” folder in “general “ unable to access)
It’s disappeared in “general “ settings. In search I can see  search result as “restrictions” but unable to access this search result. Is it connected with update 12.3??? Symbol E appeared in music. I’m not sure regarding this symbol during usage 12.2. And my friend with 12.2 now has normal access to “restrictions” folder in “general” settings.

I'm having some difficulty in understanding your situation and your problem.  Could you add some screenshots?

Symbol E in music stands for explicit content. To play this music you have to access “restrictions” folder and enable explicit content . Thank you for your time. I guess that is all.

Content & Privacy Restrictions is now under Settings -> Screen Time.  Check your Restrictions there.


text:
Turn on Bluetooth on an iMac without a keyboard or mouse?
I have a 2015 iMac, that I use with a Magic Keyboard and a Magic Trackpad. Today I was changing some settings and accidentally turned off Bluetooth, disconnecting my peripherals.
Is there any way to get Bluetooth re-enabled without a USB keyboard/mouse? I don't have either a wired mouse or keyboard. Could I remote in from my iPhone somehow?
If I have to get them, will a wired keyboard be sufficient to enable Bluetooth without a mouse?

You can use the Magic Keyboard/Trackpad as wired devices by using a Lightning-to-USB cable (like the one from your iPhone).

Is there any way to get Bluetooth re-enabled without a USB keyboard/mouse?

If you have accidentally turned off Bluetooth thereby disconnecting Apple Magic Keyboard and Magic Mouse/Magic Trackpad, simply hard reboot your Mac by pressing and holding the power button.
Then restart your Mac, and it will trigger the wizard for connecting keyboard and mouse which will in turn, enable Bluetooth.
Do note that hard rebooting may not be the desirable approach as it may cause you to lose data.

Could I remote in from my iPhone somehow?

If you already have screen sharing configured, it's possible to use any of the various VNC apps available on the App Store to remote control your iMac and thereby easily turn on Bluetooth.

If I have to get them, will a wired keyboard be sufficient to enable Bluetooth without a mouse?

Yes. Open System Preferences, and use the keyboard shortcut Command + F to highlight the search field. Now enter keyboard shortcuts and press Enter. You'll be presented with keyboard shortcuts preference pane. Now use the keyboard shortcut Control + F7 (You may need to use the fn key), to select All controls setting.

Now switch to search field again using the keyboard shortcut Command + F and type Bluetooth. Use the Tab key to move focus to Turn Bluetooth On button and press Enter or Spacebar to toggle.

To add something here for anyone that happens to google their way in here and, like me, uses the Adobe Creative Cloud and has also turned off the cmd-space shortcut for spotlight... My keyboard connects via USB but I have a bluetooth mouse.
Use cmd-tab to select Finder.
Then cmd-U to open Utilities.
Use arrows to navigate to Bluetooth File Exchange.
Cmd-O (that's oh, not zero) to open this while selected -- I was furiously hitting enter to no avail
It should detect that your bluetooth is off and prompt you to hit enter to enable

I'm not a friend of hard reboot, which can cause trouble in macOS. I think using a Lightning-to-USB cable is a good solution.
"Could I remote in from my iPhone?"
Yes you can!
For other problems, when macOS stalled I'm using Terminus on iPad where I configured the settings for my iMac.
https://apps.apple.com/de/app/termius-ssh-client/id1176074088?l=en&mt=12
I'm using Terminus for free.
Simply using:
sudo shutdown -h now
or
sudo reboot
does the job..

Greetings

After rebooting , nothing happened.   But, I found an answer!  If your wifi is still working,  connect a wifi enabled mouse and it works!

Can you add a link to a product description of a wifi-enabled mouse?


text:
How do you disable escape to exit fullscreen?
How do you disable escape to exit fullscreen?


text:
How to delete app data from iCloud?
I had an app called Ulysses classic. I'm not using it anymore, so I want to delete it. I select Delete documents & data under System Preferences → iCloud → Manage, but it didn't work and app remains in the sidebar showing 63 KB (same in my iPhone).

How can I remove it?

I have the same problem but with a different app. No matter which device I try to delete it with, it will not go away

Welcome to AppleSE!
What you are seeing in that image is what is backed up in iCloud. You have to delete the app on iPhone by holding down its icon and then pressing the cross which appears when the icons start wiggling.
Then you'd be able to delete its data from iCloud by going to iPhone settings-> Account (First in the list with your name and photo)-> iCloud-> Manage Storage-> Ulysses classic-> Delete documents and data.

hi, thanks for answer
I don't have that app installed in my iPhone or MacBook. I also tried remove iCloud data from iPhone settings but it didn't work.
"Ulysses Classic" appears in purchased list (app store, macOS). I hid the application but I can't remove iCloud data.

How about reinstalling it and turning off iCloud for the app. Then it will prompt you to delete it again. Maybe it works!

ok, I tried turning off iCloud backup from app but it didn't work neither. I used free trial but the app appears as "purchased" in app store.


text:
Turn on Internet Sharing from Terminal (on Mojave)
In System Preferences > Sharing, there is a way to turn on Internet Sharing so that devices connected to my laptop can use its Internet connection.
Start/stop internet sharing from a script? recommends to manually load /System/Library/LaunchDaemons/com.apple.InternetSharing.plist but this file doesn't exist on Mojave.
So how do I turn Internet Sharing from Terminal on Mojave?

I’m going to tag this command line since that’s really the tool - shell / bash / whatever. Whether you use iterm / bash / scripting framework - this isn’t so much about terminal app as command-line control.

@bmike thanks, i don't even use Terminal.app. I didn't think to read the tag summary (i don't actually know how on mobile when adding it to the question), but you're absolutely right i was meaning to ask after a command-line solution.

Sorry to follow up so late, but is it possible that com.apple.InternetSharing.plist is the same as com.apple.NetworkSharing.plist (which is visible in my /System/Library folder in Mojave)?


text:
make keyboard shortcut screenshot include cursor
The cmd shift 3 screenshot doesn't include the mouse cursor.
How can I make it (as in, cmd+shift+3) capture the mouse position also?

https://www.idownloadblog.com/2015/03/13/screenshots-mouse-cursor-mac/ explains it, but please consider googling your question yourselves before asking here.

@user3439894 thanks for converting your comment into an answer.

No problem, didn't have time for full answer when I posted the comment and then the question was put on hold. I saw the hold was removed, so I did the answer then.

One way of accomplishing this is to create an Automator Quick Action  with a Run Shell Script action, using screencapture with the -C option and assign it the ⇧⌘3 keyboard shortcut, after unchecking it for [] Save picture of screen as a file in: System Preferences > Keyboard > Shortcuts > Screen Shots
The image below shows the Automator Quick Action  with a Run Shell Script action, its settings and the screencapture command formatted to produce the macOS default naming as on a US English install with the Region set to United States. This of course can be modified to suit ones own needs/wants.
The following command:
screencapture -C "$HOME/Desktop/$(date "+Screen Shot %Y-%m-%d% at %H.%M.%S %p.png")"

Creates a PNG image on the Desktop, named as in this example:
Screen Shot 2019-06-03 at 3.45.30 PM.png

Before assigning the e.g. Full Screen Shot Including Mouse (Quick Action) the ⇧⌘3 keyboard shortcut, first uncheck it for [] Save picture of screen as a file in: System Preferences > Keyboard > Shortcuts > Screen Shots
Then in System Preferences > Keyboard > Shortcuts > Services, give the e.g., Full Screen Shot Including Mouse the ⇧⌘3 keyboard shortcut.
Note: Sometimes a newly created Automator Quick Action, which has been assigned a keyboard shortcut, doesn't trigger the first time the keyboard shortcut is pressed. If this occurs, usually triggering the Quick Action by the Services menu will enable the keyboard shortcut to work going forward.

If you want a different image format for the saved screen shot, you'll need to use the −t option. For a JPEG image use, e.g.:
screencapture -C -t jpg "$HOME/Desktop/$(date "+Screen Shot %Y-%m-%d% at %H.%M.%S %p.jpg")"

See the manual page for screencapture for additional information.
The filename uses the date command within command substitution $(...) which allows the output of a command to replace it. See the Command Substitution section in the bash manual page for additional information.
See the manual pages for the date command and strftime Standard C Library for additional information and an understanding of the operand used to format the date and time portion of the filename produced within the command substitution.
Hint: An easy and more user friendly way to show the manual page for any given command is to, in Terminal, type the command and then right-click on it, selecting: Open man Page


text:
transfer video file to iphone from macbook over shared internet connection
My iPhone is USB-connected to my macbook and my macbook has internet sharing turned on.
How can i send a video file from my macbook to the iphone using the command line?

[Not a full answer; not re CLI]
I don’t know if the transfer is possible in a useful manner, but look at iExplorer from Macroplant & especially its feature to use device as USB drive. Whatever limitations exist to this (e.g., no root directory access) would suggest to me that those limitations are fundamental to iOS.


text:
Remapping keybinding not workin in Firefox for MacOS (mojave)
Coming from Windows, I wished to change the Open Location... keybinding for my browsers. I was able to do it for Chrome by following the suggestions here, but the same process does not work for Firefox.
I looked at the other answers where they suggest an Add-on called Saka but it is really complicated for me. All I wish is to have the following Keybindings.

 Cmd ⌘   D   for Open Locations...
 Cmd ⌘   L   for Bookmark this Page...

I am using MacOS Mojave (10.14.5) and Firefox (67.0)
I would be grateful if someone could help me figure this out.
Thanks,

I don't have FF to test, but in general for menu replacements you must have the exact menu name. I suspect you're using 3 stops ... rather than an ellipsis … They may look the same, but they're not the same to the system.

Thanks for the response, @Tetsujin. But as you can see in this image, there is no ... in bookmarks option for Firefox.

Well, you added one in your question - anyway, why not use the system shortcut replacer, it looks like a regular menu item?

@vykor - nice find. I wasn't aware Firefox was as awkward as Chrome for ignoring the standard Mac toolbox. I'll stick with Safari ;)


text:
How to make AppleScript read the items of a variable that are numbers
set theList to {"123", "124", "abc", "125", "efgh", "126"}
set theNumbers to numbers of theList
return theNumbers

How can I get AppleScript to recognize which items of theList are numbers and assign a variable to those numbers?
The variable I have for theList is a place holder, the items it represents will be constantly changing.

You could try converting items in the list to the desired class, and ignore the ones that error:
set theNumbers to {}
set theList to {"123", "124", "abc", "125", "efgh", "126"}
repeat with anItem in theList
  try
    if contents of anItem is not "" then set the end of theNumbers to anItem as number
  on error errmess number errnum -- didn't convert
    log errmess
  end try
end repeat
return theNumbers

This does work! However when I place the actual, non substitute of theList, I get some results that are just: ""
Is there any way to get rid of these empty items?

A check can be added for empty strings - I've updated my answer to also add the numbers instead of text.


text:
Make AppleScript delay a random number between x and y?
set DelayTime1 to {18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58}
set DelayTime2 to some item of DelayTime1
delay DelayTime2

Is there any way I can clean this up so that if I want the range to be larger I don't have to type a bunch more numbers? i.e. set DelayTime1 to 18 thru 58

You can use random number, e.g.:
set timeDelay to random number from 18 to 58
delay timeDelay

Or any integer values you wish.

For more information about random number click the link.  Also have a look at: AppleScript Language Guide


text:
Why does Apple allow factory reset if passcode is forgotten?
I just came across the instructions to factory reset Apple device if one does not remember the device passcode: https://support.apple.com/en-us/HT204306
I am very new to Apple and I don't understand how come Apple allows such a thing. What if someone stole my device and wants to clean the device before selling it? Should the iTunes on the connected computer be logged in with the same Apple ID as the locked device? Is that what would prevent a thief from cleaning a stolen device? Would the above instructions work if the iCloud account on the device is locked as well?

Questions asking how/why Apple does  are typically not allowed here and are subject to being closed or deleted.

Anyway, the question in the title is based on a wrong assumption. The answer to the linked Q explains why a reset is not possible while Activation Lock is in place.

You looked at a question from 2013, about an iPhone 4. An iPhone 4 was a lot less secure than any iPhone you could buy today. The other link is for the case that you backed up your iPhone to your computer. It doesn't help a thief who steals your phone but hasn't got your computer.


text:
Program mouse and keyboard movements to be run with input on Mac
This is a very specific question. I'm running a gaming server for my friends and I to play on (on my old iMac that I just use as an external monitor for my MacBook Pro now), and I have a firewall in place to prevent any unwanted IP addresses accessing the port. I have a whitelist with all my friends' IP addresses so they are the only ones allowed to access the server. The problem is, their IP addresses can change without notice and then it's a hassle for me to get them to tell me their new IP and input it into the NetBarrier firewall program. Is there some way I get a program or code something to, when one of my friends iMessages me a code word or something followed by their updated IP, make my mouse and keyboard navigate through the firewall software and add the new IP to the whitelist?
Esssentialy, I need a way to detect when I receive a text with a key word (maybe: "UPDATEDIP: " followed by the new IP), extract the IP from that message, have the mouse perform some movements & clicks to get through the firewall software and add a new whitelisted IP, and paste in the IP that it got from the message?

Have you thought about Applescript with an email?

No, can you accomplish similar things with AppleScript?


text:
Make AppleScript turn a variable into the items between two specified items
set theList to {"1", "", "", "apple", "acda", "", "3454", "ImportantStuff", "important1", "important2", "important3", "NotImportantStuff", "2", "", "efrg"}
set theImportant to items between "ImportantStuff" and "NonImportantStuff" of theList

How do I make it so AppleScript takes the items in between "ImportantStuff" and "NonImportantStuff" and assign a variable to those items. the variable "theList" is a substitute, the amount of items that are important (between the two specified items) is indefinite--along with the amount of items before and after the specified items.

Here's an alternative implementation that will be faster and is a lot more compact:
set L to {"1", "", "", "apple", "acda", "", "3454", "ImportantStuff", ¬
   "important1", "important2", "NotImportantStuff", "2", "", "efrg"}

set {i, j} to {1, -1}

tell L
    repeat until item i = "ImportantStuff"
        set i to i + 1
    end repeat
    repeat until item j = "NotImportantStuff"
        set j to j - 1
    end repeat
end tell

return items (i + 1) thru (j - 1) of L
-- OR: set myVar to items (i + 1) thru (j - 1) of L

It doesn't iterate through every item in the list, as that wastes time.  Instead, we hone in from the left to find the index where the important stuff begins; then hone in from the right to find the index where the important stuff ends.
Then you can simply retrieve the items between those two indices.
Method 2: Text Manipulation
Less generally, if you know your list contains only simple text items, then you can use text item delimiters to coerce the list into a string and manipulate the string:
set my text item delimiters to linefeed

set L to {"1", "", "", "apple", "acda", "", "3454", "ImportantStuff", "important1", ¬
   "important2", "important3", "NotImportantStuff", "2", "", "efrg"}

set textList to L as text

set my text item delimiters to {"ImportantStuff", "NotImportantStuff"}

set importantStuffText to text item 2 of textList

The first set of text item delimiters transform the list into a string where each item in the list occupies a single line in the string.  The second set of text item delimiters splits the string at the two places where the keywords are found.  This allows us to retrieve the bits in between, which, as it stands, will return:
"
important1
important2
important3
"

If there are multiple occurrences of the keywords, the important stuff will be all the even numbered text items.
To change the string back into a list again, you can do this:
set importantStuffList to paragraphs 2 thru -2 of importantStuffText
    --> {"important1", "important2", "important3"}

Amazing to see how the typically verbose AppleScript language can be compacted.

In this case, it's not that I've used briefer AppleScript syntax, but rather used a briefer algorithm in my approach.

Manual Filter
One approach is to manually filter the list with a repeat loop:
set theList to {"1", "", "", "apple", "acda", "", "3454", "ImportantStuff", "important1", "important2", "important3", "NotImportantStuff", "2", "", "efrg"}

-- put the filtered items into subList
set subList to {}

-- note when iterating through important items
set withinImportant to false

-- examine every item in the list
repeat with i from 1 to length of theList
    set anItem to item i of theList

    -- are we within an important section?
    if withinImportant then

        -- have we reached the end of the important section?
        if anItem is "NotImportantStuff" then
            set withinImportant to false
        else
            -- append to subList
            set subList to subList & anItem
        end if

    else

        -- is this item the start of the important items
        if anItem is "ImportantStuff" then
            set withinImportant to true
        end if
    end if
end repeat

See Manipulating Lists of Items and AppleScript “list” examples for more examples of working with lists in AppleScript.

You can exit the repeat loop once you reach the end of the important section, which would save iterating through unnecessary items at the end.  But, overall, it might be better (many fewer operations and more space efficient depending on final method) if, instead of building a working list of items iteratively, the index of the two pertinent list items are sought and then used to return items x thru y of theList.

CJK's improvements are worth experimenting with. This answer's implementation will pick up multiple blocks of "important stuff" but CJK's is more compact.

I get error "Can’t set sublist of {} to some object." number -10006 from «class LST-» of {} when trying to run this script. sublist shows in bold blue like a command but I don't have anything in Plug-ins in Preferences of Script Editor. After some searching, I did find out I had Satimage installed. Which now explains some other anomalies I've run into lately.

I can confirm this script works on plain macOS 10.14. Does changing subList to another word fix the problem? If not, maybe worth asking if anyone else can reproduce the behaviour.


text:
Temporarily turn off all notifications on iPhone
I don't want my iPhone to vibrate, show me banners, etc., when I toggle the desired setting.
I tried Do Not Disturb but I don't find it solving the intended purpose.
How can I turn off all notifications temporarily? Is there some feature that's easy-accessible from Control Centre?
I want to watch videos online (in Safari) and not get interrupted by notifications during this.

Power the iPhone off. Sounds simple, but it is the easiest way to achieve what you want. Works for me in the movie theatre and the funeral I went to last week, where some idiot didn't silence their phone and his ringtone, "I Really Got You" by the Kinks, although funny, was inappropriate.

It sounds like you did not have Do Not Disturb configured correctly, because what you are asking is exactly what it is designed to do. Be sure that you enable Settings » Do Not Disturb » Silence » Always so that DND will be in effect even if you are using the phone. If that does not suffice, please provide some more specifics about what kinds of notifications and alerts you are still seeing with DND enabled.

@IconDaemon i want to keep using the phone. I watch videos online and don't want to get notifications during that

@TJLuoma that setting was turned off, i just turned it on and expect it will solve my problem. Why didn't you make that an answer?

I enabled Settings » Do Not Disturb » Silence » Always and now my phone has completely silenced notifications.

There is no single settings/toggle that will let you turn off/on all notifications on your iPhone. The way notification are implemented in iOS, you are limited to configure them on a per app basis only.
A couple potential solutions are:

Turn on Do Not Disturb. This will have a side effect of suppressing any regular phone calls.
Make sure to set Allow Calls From to Everyone under Do Not Disturb settings. This will suppress all the notification banners while you are watching videos/playing games in full screen, while keeping the phone function active.

Once you have configured Do Not Disturb as above, you can easily toggle the setting via the Control Center icon.
Turn off Internet connectivity by toggling Wi-Fi/Mobile data from Settings app or Control Centre.

The second approach will have a drawback that you won't be able to access the Internet. Also, turning off Internet connectivity won't suppress local notifications.
However, disconnecting from Internet is possibly the best way to temporarily cut-off from the barrage of notification that one receives, while keeping the basic phone functionality (calling + SMS) active.

You said "There is no single settings/toggle that will let you turn off/on all notifications on your iPhone" but doesn't TJ Luoma's comment on the OP work?

@theonlygusti I understand your point here. However, the original problem statement is a wee bit ambiguous when it comes to handling incoming phone calls. It also didn't contain the intent that you wish to watch videos uninterrupted. I have updated the answer above.


text:
Permanently disable SIP
I disable SIP like this: reboot into recovery mode, run csrutil disable and then restart.
Great, now SIP is disabled.
But if my MacBook restarts again, it looks like it is enabled again.
How can I make subsequent restarts not change csrutil status?

So I guess it's a bug

You said, "So I guess it's a bug", well have you tried resetting NVRAM and then disabling SIP and and an rebooting a time or two to see if it now holds or not across reboots/shutdown/startup? If yes, then all I can say is if I disable SIP it stays disabled across reboots/shutdown/startup and if it doesn't for you, not sure I'd call it a bug, not enough information to classify it, but I'd say it's annoying. FWIW I typically do not disable SIP as I see it as a security feature and if there is something I need to mod, I just do it right from the Recovery HD, no disabling SIP... keep things safe.


text:
Handoff webpages in Safari from iPhone to MacBook without the Dock
I have a webpage loaded on my iPhone. Now I want it in Safari on my MacBook Pro (Retina, Mid-2015).
The only way I found so far: Click the icon in the Dock (on my MacBook). But I don't want to use the Dock.
How can I Handoff a webpage from my iPhone to my MacBook without needing to look at the Dock?

You can use a feature called iCloud Tabs.

Set up and use iCloud Tabs

iCloud keeps the tabs you have open in Safari up to date on your iPhone, iPad, iPod touch, and Mac. That means you can go from one device to the next and pick up browsing wherever you left off.

Once you have iCloud Tabs setup, simply launch Safari on your MacBook and go to Safari Menu bar → View → Show Tab Overview, or use the keyboard shortcut Shift + Command + /.
The web pages open in Safari on all your linked devices are listed just below the tabs open in the current window.

The iCloud Tabs are listed just below all the open tabs in the current Safari window, so you may have to a bit of scrolling if you have a lot of tabs open in Safari on your Mac.
The beauty of iCloud Tabs is that it also works the other way round. You can easily open pages from your Mac on your iPhone. This comes in handy especially since iPhone (unlike iPad) doesn't show a Handoff icon in the Dock.

The handoff icon appears in the app switcher, which is activated by command-tab:


text:
How to set a variable to all the numbers located in a list?
Lets say I have a variable set to this:
set myVar to {"asdf", "qwerty24", "23", "22", "21abc" "20"}

How can I set a variable to the numbers in myVar, including those with text inside of the item--but without keeping the part that is text.
Each item should only contain one number, if an item were to consist of multiple numbers ie "302 303" then the outputted result would preferably be just combined to "302303". Any spaces in the item need to be removed to, just like the text. If each number needs to be an integer so "0abc.1200" needs to have it's period removed and result with "1200". The result would be preferably listed as {"24", "23", "22", "21", "20"}, instead of being listed as {24, 23, 22, 21, 20}.

Could you give a more varied list of example items and, importantly, what you would expect the desired result to be ?  For example, should "123abc456" map to {"123", "456"}, or just "123", or just "456", or "123456", or "123 456" ?  One seemingly-simple item yields multiple possible solutions, and there's no way to know what one you deem "the correct" one.  You need to be specific and try and cover all your scenarios, otherwise you won't get optimal solutions. You can edit the question to change/add information as needed.

Okay I added some more information on what I want the result to be. The solution I want out of this is pretty broad so the it really doesn't matter what it maps to, as long as all text is removed from each item.

That's a bit clearer. Another thing: you've been imprecise with your definition of what "text" is and what a "number" is. I think I know what you want, but for clarity: do you mean to say you want only digit characters retained in the text but the final items to remain as text, e.g. "23" (this is not a number; it is text that contains numerical characters, and forms a text representation of a number); and that you do not want the final items to be returned as numbers, e.g. 23.  Summary: YES: {"24", "23", "22", "21", "20"}; NO: {24, 23, 22, 21, 20}. Correct?

And...  What about non-integer representations and leading or trailing zeroes?  Should "0abc.12300" come back as "0.12300" or ".12300" or ".123" or "012300" or "12300"?

There shouldn't be any numbers that aren't integers, but if a period appears before, after, or in between a number, it too should be removed. If there is a leading 0 it needs to go down to the number without it. so "0abc.12300" needs to be "12300"

It doesn't matter if they are text representations of the number or the number itself. But yes, the preferred one is that they are text representations.

Objective: To process an AppleScript list of strings so that each string is filtered to remove any non-digit character followed by all leading zeroes.  Resultant empty strings are discarded.
property digits : "0123456789"
property text item delimiters : {}

set L to {"abc", "qwerty.24", "01 abc23xyz", "123abc456", "2.1abc", "20"}

repeat with textItem in L
    set stringOfDigits to filterCharacters from textItem thru digits
    set numericalString to the processedNumericalString(stringOfDigits)

    set the contents of the textItem to the numericalString
end repeat

return the strings in L --> {"24", "123", "123456", "21", "20"}

------------------------------------------------------------------------------------------
# HANDLERS:
to filterCharacters from someText as text thru allowedCharacters as text
    local someText, allowedCharacters

    set tid to my text item delimiters -- to reset them after

    set my text item delimiters to {missing value} & characters in the allowedCharacters
    set illegalCharacters to characters of (text items of someText as text)

    set my text item delimiters to {missing value} & the illegalCharacters
    set filteredText to the text items of someText as text

    set my text item delimiters to tid
    return the filteredText
end filterCharacters

on processedNumericalString(numericalString as text)
    local numericalString

    if the numericalString = "" then return missing value

    try
        the numericalString as number
    on error
        the numericalString
    end try

    return the result as text
end processedNumericalString

Breakdown
property declarations
A property is similar to a variable, except for two differences: properties are persistent, and have global scope; variables are disposed of when a script ends, and default to local scope.  I will let you research those terms if you need to, as it's beyond the remit of this answer.  I almost never use a property for either of those features I just mentioned.  Rather, I use them most often to separate storage of values that I generally intend to remain constant throughout the script (as opposed to variables that can be expected to change at any stage).  AppleScript doesn't have a way to declare constants like other languages, so this is just a bastardisation of another construct.
Handlers
Handlers in AppleScript can be thought of to be what other languages refer to as a function, and the actual differences are nuanced and mostly academic, with one practical implication being that handlers aren't self-aware so can't report any information about themselves back to you.  But, like functions, they receive arguments (or parameters), do something with them, and spit out a result at the end in most cases.

filterCharacters: this is the core of the script in terms of where the heavy lifting is done.  It receives a single piece of text you wish to be filtered, and a list of allowed characters, and removes everything else, i.e. it extracts occurrences of allowed characters in the order they occur.  It does this by utilising AppleScript's text item delimiters, which you should read about more thoroughly, but essentially deletes all instances of delimiters in the list you supply it, splitting the string into fragments at the points of deletion.  So, it's almost performing the opposite function that we want, and can be thought of being a text filter that you supply a list of illegals rather than a list of allowables.  Therefore, I use them twice: first to strip out the allowables, leaving only the illegals; then giving that list of illegals back to text item delimiters, which then get stripped from the original piece of text, thus leaving us only with allowables.  Very efficient; avoids iterating through characters in the piece of text.
processedNumericalString(): This handler is just a cheap and lazy way to strip off the leading zeroes once the first handler has given us a string containing only digits.  It would be arguably more correct to iterate through each digit character until reaching the first non-zero character, deleting the ones that are, with a special case to prevent "0" being obliterated.  But, instead, I just decided to coerce the string to a number, then back to a string.  A hack that works effectively and one assumes more speedily too (though that's not definitive).

The main body of the script
With the two handlers defined at the bottom of the script, all that remains is to iterate through the list of strings, sending each string in turn to each handler.  What comes back is the piece of text you desire, which set the contents of... is what lets me replace the original item in the list with the new version.  I was mindful not to retain empty strings (""), and the processedNumericalString() handler swaps those out for an AppleScript object called missing value that represents exactly what it says (it's the closest pre-defined AppleScript object to what other languages often call null or nil).  Anyway, the important this is it isn't a string, because the final line of the script's run is:
return the strings in L

and this does exactly that: any item in the list that is not a string (or text) class of object is discarded.  You can, of course, swap this line for:
set myVar to the strings in L

if you need it assigned to a variable in order to keep using it.

ADDENDUM
The OP added:

The list I described as myVar in the original post is always changing over time, I want the process of taking the items in myVar and isolating all the numbers to repeat indefinitely

OK.  Let's bung the main part of the script into another handler:
to formNumericalStringsWithItems from L as list
    local L

    repeat with textItem in L
        set stringOfDigits to filterCharacters from textItem thru digits
        set numericalString to the processedNumericalString(stringOfDigits)

        set the contents of the textItem to the numericalString
    end repeat

    return the strings in L
end formNumericalStringsWithItems

Place this with the other handlers to keep it separate and out of the way now.  The main body of the script is reduced to these two lines, where I've used the identifier myVar instead of L just for clarity:
set myVar to {"abc", "qwerty.24", "01 abc23xyz", "123abc456", "2.1abc", "20"}
set myNewAndImprovedVar to formNumericalStringsWithItems from myVar

Now, wherever myVar in your script gets updated/changed, you follow it with a call to this new handler, as I've illustrated here.
Just be clear about how I've delineated the different "parts" of the script: keep the property declarations at the top—don't put them inside your repeat loop; also don't put the handler declarations inside the repeat loop—I put all of mine at the bottom of the script, where I've marked a line and headed a section only for handlers.  The "main body" of the script (despite now only being two lines here) is what your code will occupy, so keep things neat and grouped (it's why I separate the property declarations from the main body by two paragraph breaks instead of just one).

Will update answer with some explanation of what the script does.

How can I make it so that this can repeat indefinitely? It is not allowing me to put this inside of a repeat cycle.

I don't understand what you mean.  Can you clarify what you want to do ?

The list I described as "myVar" in the originally post is always changing over time, I want the process of taking the items in "myVar" and isolating all the numbers to repeat indefinitely.

An important point you omitted in your post.  Bear with me and I'll update the answer with an addendum.

Amended.  I hope it makes sense.  As a side-note, any script that runs on an indefinite repeating loop = ❌. But that's for whenever you decide you might want a code review.  For now, just let me know if it goes okay.


text:
spotlight search for folder within finder
I hit cmd-shift-g for go to folder, but I have to type the full path
Is there some way for me to search a folder name and go straight there?
Like how automjump/z etc. work in the terminal

Yep, just search for what you want in the top right of the finder window. As long as you are not in gallery view mode, have your mac updated to the latest version, and have made sure the application is searching the whole mac, it should show a section called folders. There, it will show all of the folders that match your search.

You might want to mention that you can click the [+] button under the Search box to refine the search criteria. Also, I've found that the search does not always bring up system folders, e.g. searching for Library doesn't always bring up /Library, ~/Library, /System/Library, etc.

No, this shows folders in a weird order (doesn't seem to be based on most frequently used), and it's annoying to distinguish between folders of the same name. It's also a very multi-step procedure: start searching, change to "This Mac", change to filter for folders only, then click through the results until I find the one with the right path. This solution sucks.

Well, I don't know any other way besides getting a 3rd party file manager...

@theonlygusti You could create an Automator service and write a script that does what you want, then redirect the shortcut key you’re currently using to the service.  I think the transition would be seamless.  You would need to be clear with what the scope of the folder search should be, and what to do if there’s multiple folders with the same name.

@CJK I want it "like how automjump/z etc. work". Making a new service is annoying: is there a way to track what folders I visit  with Finder?

You're going to have to explain how automjump/z works for those, like myself, who have not used it—you'll probably get more help when people know precisely what you want. "is there a way to track what folders I visit with Finder" Finder stores the 10 most recent folders visited. To obtain them, you still need to do some scripting, so if you find making a service annoying, then you probably don't have very good odds of achieving what you want. It's up to you, I suppose: depends which you find more annoying: creating the service, or continue to type full folder paths.


text:
This iPhone cannot be used to create another Apple ID
I have been an Android user for the past few years, and recently switched to an iPhone. I was given a used iPhone 6 by someone. But when I try to create an Apple ID, I get an error message stating, This iPhone cannot be used to create an Apple ID and prompts me to the website even after I reset the iPhone completely and removed all the previous accounts and settings.
Why does Apple not allow creating multiple IDs from an iPhone?

See this page for the reason.

Welcome to Apple StackExchange! I am not sure why you are having this problem, though it could be possibly fixed by resetting iOS (Settings->General->Reset->Erase all content and settings). That is not necessary though, if you just want to create and sign into an Apple ID. To do that, visit appleid.apple.com in any browser, and then chose to create an Apple ID. If your version of iOS is ≤9.3.5, I wouldn't suggest setting up 2FA.

Possible duplicate of Why won't my secondhand iPad let me activate an Apple ID?


text:
How to put a tab detached from fullscreen Safari back into it

Start Safari
full-screen Safari
open at least 2 tabs
click and drag one of them away from the tab bar
release left-click
it creates a new full-screen Safari instance, with that tab as the only tab

Now, how do I take that tab, and put it back into the other Safari window?

If you only have the one window which had two tabs and now is two full screen windows, you can do Safari > Window > Merge All Windows but that is only good in that scenario, otherwise you'd have to bring both windows out of full screen, add a new tab to one of the windows and then drag the other tab back to the other window, then close the window that you opened a new tab on.

Make two tabs in one window, other free tab can now be brought in.
Window Menu > Merge all windows.


text:
Hard Drive Corrupted
I Erased my hard drive from mac utilities from the recovery mode, but now i am not able to install Mac OS Mojave as it doesn't shows my mac hard drive to install and when i checked it in utilities, it shows the drive as UN-formatted. So now i cannot install mac os and my ssd has been erased. What can i do for it ?
I am attaching a image that it is showing in the disk utilities.

Please answer the question: Did you want to erase your SSD hard drive? Or do you want to recover your erased partition? You need to explain this, because if you format your SSD hard drive, you may never be able to recover your erased data.

Yes, I wanted to erase my SSD, I wanted to reset my MAC , but at first when i erased the drive it was showing the drive , but now it is showing it as unformatted and i cannot install the OS in that drive.

What is your current version of macOS?

I had OS Mojave before.

And i am ok with my ssd erased as i wanted to install a new fresh copy of macOS

Can you take a better picture of the whole screen? I'm not an expert on this, but you should be able to use Disk Utility to format the unformatted partition.

the option to erase the disk is blurred, i cannot click it, I tried to do first aid of the drive, but still the error persists.

the answer below is an attempt to erase your disk from the command line as the GUI does not appear to be giving you the option. Is the disk you are working on the internal disk? If yes, then continue. Do you have any other disks attached? If yes, disconnect the external disks then continue. After booting to recovery mode 1. pull up a terminal by selecting terminal from the utilities menu 2. In the terminal type 'diskutil list | grep internal'. The output should be something like '/dev/disk0 (internal)'. Note the path (in bold). 3. type the following: 'diskutil erasedisk APFS MacOS GPT

It says could'nt unmount disk. after i enter the second command.

i used diskutil unmountdisk force /dev/disk0 , but it shows - 'Forced unmount of disk0 failed : at least one volume could not be unmounted. '

Yes, this is because we are trying to erase the disk whilst we are using it (you are currently booting from the Recovery OS which is a volume on the disk we are trying to erase). I am sorry that that didn't occur to me before. If you really need to wipe the disk clean you will need to do it from an installer or by booting from another disk with macOS on it. I am looking into other alternatives.

from your picture you appear to be in the partition submenu and currently targeting the unformatted part. Go back in to diskutil and get the unformatted part highlighted (as in your picture).  Is the + sign active (not greyed out)? If so, click it and you will have the option of entering new partition information (Name, format [choose APFS] and size [make sure it is at least 30GB]). then click apply and follow through. If that works then that partition will become available for installing to. If that works we can free up the remaining partitions after and get back the space.

no the + sign is greyed out, I have tried that.

Can I create a usb bootable stick having macOS using my Windows ?

apparently, yes. here is a guide to doing that: https://pureinfotech.com/create-macos-bootable-usb-windows/

thanks man, I will let you know if it goes right,

but before you do that (or whilst you are doing that) could you do a 'diskutil list' command and paste the output here?

and by the way, the reason the + is greyed out is that this tool does not allow you to partition free space (as was pointed out to me here recently). The other option is to resize the existing container to reclaim the disk space but first, i am getting you to do what i should have asked for at the start ('diskutil list').

I added the pic of diskutil list.

Can you try the following command?     'diskutil apfs resizecontainer disk0s3 0'

it is saying that - disk0s3 is not an APFS Physical Store

indeed, it isn't, please try 'diskutil apfs convert disk0s3'

apfs couldn't recognise verb 'convert'

was that the exact error message if not, could you please post it?

diskutil: did not recognise APFS verb "convert"; type "diskutil apfs" for a list

i see. apparently diskutil in earlier versions of macOS had some functionality stripped out and we were supposed to use  a different command. please try   'apfs_hfs_convert -v -i /dev/disk0s3'.

its is saying Conversion Failed! /BuildRoot/Library/Caches/com.apple.xbs/Sources/apfs_executables/apfs-249.20.2/hfs/hfs_convert.c:4265 slice=-1 phase=1 location=81 error=-4

Given the volume of back and forth, it's not clear an edit will make this clear. Please do flag for reopening if you can make a good edit to this or the linked answer doesn't help you move forward. By including your research and showing which steps you took - sometimes that shows how a question isn't a duplicate of another.


text:
change safari audio output device
I want to change the audio output device only for Safari.app.
How do I do that?
I know I can change system-wide settings, that's not helpful to me.
I am hoping for a macOS built-in, code-injection or very lightweight invisible third-party app solution.

Audio Hijack would be my go-to app for anything like that, but not cheap.

@Tetsujin I already have it but it's annoying to have to run it for something as basic as this


text:
What does Finder (10.12) and IP Scanner require to run?
I am working on creating a macOS 10.12 Live USB, and need to know what /System/Library/Frameworks/ frameworks Finder and IP Scanner requires (and how do I install them/track all of their files down)?
I'm making a macOS 10.12 Live creator based on dosdude1's macOS Sierra Patcher, with a few changes (such as what gets moved onto the installer). Any help would be greatly appreciated.

What is your definition of a macOS USB Live? Running macOS installed on a USB drive you can run Finder just fine. Have you tried running Finder from e.g. the UI environment of a USB macOS Installer? If from a normal boot of macOS, you double-click Finder in Activity Monitor and select the Open File and Ports tab, you might get a better picture of whats needed. That said though, it may not be a complete picture.

My definition of macOS Live is just plugging in a thumbdrive, running macOS Live Creator, and then being able to boot from the usb from any mac (since I am not removing the booting patch from macOS Sierra Patcher).
Also, yes I have tried running Finder from a macOS Installer, it won't launch because of missing frameworks.

macOS Live Creator?

@user3439894 a variation of macOS Sierra Patcher by dosdude1

If macOS Live Creator is software you're developing, then it's are off-topic here, but can be asked on Stack Overflow.


text:
iPhone 4s headphone jack stops and starts working randomly
iPhone 4s headphone jack will stop working at times and I have to believe this is some sort of software or internal error. Reason being is it will start working again after a while. I've done a hard reset and checked all the settings.

Please don’t include two questions in one question. To answer your second question, see How to reinstall old iOS software?.

Physically, there may be cruft (dust, crumbs, etc) inside the headphone socket that needs cleaning out. Some compressed air in a can may help dislodge it. As for a software/internal error - that's impossible to diagnose without having the device on the test bench.

To answer your second (now deleted) question, older versions of iTunes stored iOS apps (.ipa files) at this path: /Users/your_user_name/Music/iTunes/Mobile Applications. The apps should still be there even if you upgraded the iTunes app. The biggest problem is loading an older version of iTunes that uses these iOS .ipa files to reload your 4S.

I believe it may have been an app. I was getting ready to go for a run and starting a running app and then I saw a volume icon or symbol with a line across  it as a new pop-up right after starting the app. I deleted the app but it didn't get my earphone jack back.

There might also be a loose connection if you have e.g. dropped it with the head phone plug in at a time.


text:
Unable to prevent APFS partition from mounting automatically in Mojave (10.14.5)
I'm trying to prevent macOS from asking me the FileVault password for 2 APFS partitions on boot. I don't want them to be mounted at all.
APFS container:
/dev/disk1 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +121.1 GB   disk1
                                 Physical Store disk0s2
   1:                APFS Volume macOS                   43.2 GB    disk1s1
   2:                APFS Volume Preboot                 121.3 MB   disk1s2
   3:                APFS Volume Recovery                1.0 GB     disk1s3
   4:                APFS Volume VM                      1.1 GB     disk1s4
   5:                APFS Volume Shared                  7.7 GB     disk1s5
   6:                APFS Volume macOS Beta - Data       21.7 GB    disk1s6
   7:                APFS Volume macOS Beta              10.0 GB    disk1s7

Partition 1:
   Device Identifier:         disk1s6
   Device Node:               /dev/disk1s6
   Whole:                     No
   Part of Whole:             disk1

   Volume Name:               macOS Beta - Data
   Mounted:                   No

   Partition Type:            41504653-0000-11AA-AA11-00306543ECAC
   File System Personality:   APFS
   Type (Bundle):             apfs
   Name (User Visible):       APFS
   Owners:                    Disabled

   OS Can Be Installed:       No
   Booter Disk:               disk1s2
   Recovery Disk:             disk1s3
   Media Type:                Generic
   Protocol:                  PCI
   SMART Status:              Verified
   Volume UUID:               C6C28412-1505-4F19-8056-369FAE57B0CF
   Disk / Partition UUID:     C6C28412-1505-4F19-8056-369FAE57B0CF

   Disk Size:                 121.1 GB (121123069952 Bytes) (exactly 236568496 512-Byte-Units)
   Device Block Size:         4096 Bytes

   Volume Total Space:        0 B (0 Bytes) (exactly 0 512-Byte-Units)
   Volume Free Space:         0 B (0 Bytes) (exactly 0 512-Byte-Units)

   Read-Only Media:           No
   Read-Only Volume:          Not applicable (not mounted)

   Device Location:           Internal
   Removable Media:           Fixed

   Solid State:               Yes
   Hardware AES Support:      No

Partition 2:
   Device Identifier:         disk1s7
   Device Node:               /dev/disk1s7
   Whole:                     No
   Part of Whole:             disk1

   Volume Name:               macOS Beta
   Mounted:                   No

   Partition Type:            41504653-0000-11AA-AA11-00306543ECAC
   File System Personality:   APFS
   Type (Bundle):             apfs
   Name (User Visible):       APFS
   Owners:                    Disabled

   OS Can Be Installed:       No
   Booter Disk:               disk1s2
   Recovery Disk:             disk1s3
   Media Type:                Generic
   Protocol:                  PCI
   SMART Status:              Verified
   Volume UUID:               55930D94-2CF3-481B-B845-FEAB3C492F23
   Disk / Partition UUID:     55930D94-2CF3-481B-B845-FEAB3C492F23

   Disk Size:                 121.1 GB (121123069952 Bytes) (exactly 236568496 512-Byte-Units)
   Device Block Size:         4096 Bytes

   Volume Total Space:        0 B (0 Bytes) (exactly 0 512-Byte-Units)
   Volume Free Space:         0 B (0 Bytes) (exactly 0 512-Byte-Units)

   Read-Only Media:           No
   Read-Only Volume:          Not applicable (not mounted)

   Device Location:           Internal
   Removable Media:           Fixed

   Solid State:               Yes
   Hardware AES Support:      No

Current /etc/fstab which doesn't work:
UUID=55930D94-2CF3-481B-B845-FEAB3C492F23 none apfs rw,noauto
UUID=C6C28412-1505-4F19-8056-369FAE57B0CF none apfs rw,noauto

What am I doing wrong? Is it because of a mistake I made or is /etc/fstab no longer supported? What's /etc/fstab.hd for?
Operating System: macOS Mojave 10.14.5
Hardware: MacBook Air (13-inch, Early 2015)

Did you manage to find a solution for this? What if you you use the traditional none hfs rw,noauto instead?
(even though its an apfs volume)

"Educated" guess:
In your case FileVault unlocking is managed by the preboot APFS volume (disk1s2).
Your specific APFS container configuration implies that preboot manages booting to macOS 10.14.5 as well as macOS 10.15 beta.
At this boot stage disk1s1's /etc/fstab is probably not yet involved and thus entries won't work.

If you really want to disable disk1s6/disk1s7, you probably have to rename one of the two folders with UUID names (one for macOS 10.14.5 and the other for macOS 10.15 beta) in preboot. The folder names correspond with the APFS boot volume UUIDs you get with diskutil ap list.
You have to rename the one which is identical with the UUID of macOS 10.15 beta's boot volume.
Not tested - absolutely not recommended!

BTW: I tried to find some kernel flag to add to /Volumes/Preboot/[UUID]/Library/Preferences/SystemConfiguration/com.apple.Boot.plist to prevent FV unlocking but failed.


text:
Bluetooth Keyboard on Mac Mini
I have a bluetooth mouse and keyboard on my Mac Mini runing 10.13.6 OS.
I am getting a popup whenever the keyboard connects/disconnects, this is very anoying. The popup only occurs for the keyboard not the mouse.  I have disabled notifications but this does not work.  I do a lot of screen captures of video and this keyboard popup is anoying, also I get connect and disconnect at random (bluetooth is NOT a reliable interface) it is subject to many external conditions that play havoc with it.
So in a nutshell is there a way to disable all bluetooth notifications.
Thank you

What does the pop-up say?

The pop-up shows a pic of a keyboard with "Connected" or "Lost Connection", it is only for the keyboard not the mouse, both are bluetooth

Issue is fixed.  I was using a non Apple keyboard, it was turning off to conserve battery life.  I bought an Apple keyboard yesterday and all is ok now.  Apple got another $140 CDN from me.

I was going to ask if it was an Apple-branded, or Apple-compatible device. I've had clients who have had problems with devices which don't meet specs. I've got a Matias bluetooth keyboard which has been going strong for almost 2 years with nary a glitch.


text:
host ftp server on Mojave
I had been doing this
sudo -s launchctl load -w /System/Library/LaunchDaemons/ftp.plist

but it doesn't work in Mojave
/System/Library/LaunchDaemons/ftp.plist: No such file or directory

How can I start an ftp server on my MacBook?

I wanted to use an FTP server just to share files to and from my Mac.
The easiest solution is to run this python script within the directory I want to share/upload from/to:
#!/usr/bin/env python3

"""Simple HTTP Server With Upload.

This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.

see: https://gist.github.com/UniIsland/3346170
"""

__version__ = "0.1"
__all__ = ["SimpleHTTPRequestHandler"]
__author__ = ""
__home_page__ = ""

import os
import posixpath
import http.server
import urllib.request, urllib.parse, urllib.error
import html
import shutil
import mimetypes
import re
from io import BytesIO

class SimpleHTTPRequestHandler(http.server.BaseHTTPRequestHandler):

    """Simple HTTP request handler with GET/HEAD/POST commands.

    This serves files from the current directory and any of its
    subdirectories.  The MIME type for files is determined by
    calling the .guess_type() method. And can reveive file uploaded
    by client.

    The GET/HEAD/POST requests are identical except that the HEAD
    request omits the actual contents of the file.

    """

    server_version = "SimpleHTTPWithUpload/" + __version__

    def do_GET(self):
        """Serve a GET request."""
        f = self.send_head()
        if f:
            self.copyfile(f, self.wfile)
            f.close()

    def do_HEAD(self):
        """Serve a HEAD request."""
        f = self.send_head()
        if f:
            f.close()

    def do_POST(self):
        """Serve a POST request."""
        r, info = self.deal_post_data()
        print((r, info, "by: ", self.client_address))
        f = BytesIO()
        f.write(b'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
        f.write(b"\n<title>Upload Result Page</title>\n")
        f.write(b"\n
Upload Result Page
\n")
        f.write(b"
\n")
        if r:
            f.write(b"Success:")
        else:
            f.write(b"Failed:")
        f.write(info.encode())
        f.write(("
back" % self.headers['referer']).encode())
        f.write(b"
Powerd By: bones7456")
        f.write(b".\n\n")
        length = f.tell()
        f.seek(0)
        self.send_response(200)
        self.send_header("Content-type", "text/html")
        self.send_header("Content-Length", str(length))
        self.end_headers()
        if f:
            self.copyfile(f, self.wfile)
            f.close()

    def deal_post_data(self):
        uploaded_files = []
        content_type = self.headers['content-type']
        if not content_type:
            return (False, "Content-Type header doesn't contain boundary")
        boundary = content_type.split("=")[1].encode()
        remainbytes = int(self.headers['content-length'])
        line = self.rfile.readline()
        remainbytes -= len(line)
        if not boundary in line:
            return (False, "Content NOT begin with boundary")
        while remainbytes > 0:
            line = self.rfile.readline()
            remainbytes -= len(line)
            fn = re.findall(r'Content-Disposition.*name="file"; filename="(.*)"', line.decode())
            if not fn:
                return (False, "Can't find out file name...")
            path = self.translate_path(self.path)
            fn = os.path.join(path, fn[0])
            line = self.rfile.readline()
            remainbytes -= len(line)
            line = self.rfile.readline()
            remainbytes -= len(line)
            try:
                out = open(fn, 'wb')
            except IOError:
                return (False, "Can't create file to write, do you have permission to write?")
            else:
                with out:
                    preline = self.rfile.readline()
                    remainbytes -= len(preline)
                    while remainbytes > 0:
                        line = self.rfile.readline()
                        remainbytes -= len(line)
                        if boundary in line:
                            preline = preline[0:-1]
                            if preline.endswith(b'\r'):
                                preline = preline[0:-1]
                            out.write(preline)
                            uploaded_files.append(fn)
                            break
                        else:
                            out.write(preline)
                            preline = line
        return (True, "File '%s' upload success!" % ",".join(uploaded_files))

    def send_head(self):
        """Common code for GET and HEAD commands.

        This sends the response code and MIME headers.

        Return value is either a file object (which has to be copied
        to the outputfile by the caller unless the command was HEAD,
        and must be closed by the caller under all circumstances), or
        None, in which case the caller has nothing further to do.

        """
        path = self.translate_path(self.path)
        f = None
        if os.path.isdir(path):
            if not self.path.endswith('/'):
                # redirect browser - doing basically what apache does
                self.send_response(301)
                self.send_header("Location", self.path + "/")
                self.end_headers()
                return None
            for index in "index.html", "index.htm":
                index = os.path.join(path, index)
                if os.path.exists(index):
                    path = index
                    break
            else:
                return self.list_directory(path)
        ctype = self.guess_type(path)
        try:
            # Always read in binary mode. Opening files in text mode may cause
            # newline translations, making the actual size of the content
            # transmitted *less* than the content-length!
            f = open(path, 'rb')
        except IOError:
            self.send_error(404, "File not found")
            return None
        self.send_response(200)
        self.send_header("Content-type", ctype)
        fs = os.fstat(f.fileno())
        self.send_header("Content-Length", str(fs[6]))
        self.send_header("Last-Modified", self.date_time_string(fs.st_mtime))
        self.end_headers()
        return f

    def list_directory(self, path):
        """Helper to produce a directory listing (absent index.html).

        Return value is either a file object, or None (indicating an
        error).  In either case, the headers are sent, making the
        interface the same as for send_head().

        """
        try:
            list = os.listdir(path)
        except os.error:
            self.send_error(404, "No permission to list directory")
            return None
        list.sort(key=lambda a: a.lower())
        f = BytesIO()
        displaypath = html.escape(urllib.parse.unquote(self.path))
        f.write(b'<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">')
        f.write(("\n<title>Directory listing for %s</title>\n" % displaypath).encode())
        f.write(("\n
Directory listing for %s
\n" % displaypath).encode())
        f.write(b"
\n")
        f.write(b"<form ENCTYPE=\"multipart/form-data\" method=\"post\">")
        f.write(b"<input name=\"file\" type=\"file\" multiple/>")
        f.write(b"<input type=\"submit\" value=\"upload\"/></form>\n")
        f.write(b"
\n
\n")
        for name in list:
            fullname = os.path.join(path, name)
            displayname = linkname = name
            # Append / for directories or @ for symbolic links
            if os.path.isdir(fullname):
                displayname = name + "/"
                linkname = name + "/"
            if os.path.islink(fullname):
                displayname = name + "@"
                # Note: a link to a directory displays with @ and links with /
            f.write(('
%s\n'
                    % (urllib.parse.quote(linkname), html.escape(displayname))).encode())
        f.write(b"
\n
\n\n\n")
        length = f.tell()
        f.seek(0)
        self.send_response(200)
        self.send_header("Content-type", "text/html")
        self.send_header("Content-Length", str(length))
        self.end_headers()
        return f

    def translate_path(self, path):
        """Translate a /-separated PATH to the local filename syntax.

        Components that mean special things to the local file system
        (e.g. drive or directory names) are ignored.  (XXX They should
        probably be diagnosed.)

        """
        # abandon query parameters
        path = path.split('?',1)[0]
        path = path.split('#',1)[0]
        path = posixpath.normpath(urllib.parse.unquote(path))
        words = path.split('/')
        words = [_f for _f in words if _f]
        path = os.getcwd()
        for word in words:
            drive, word = os.path.splitdrive(word)
            head, word = os.path.split(word)
            if word in (os.curdir, os.pardir): continue
            path = os.path.join(path, word)
        return path

    def copyfile(self, source, outputfile):
        """Copy all data between two file objects.

        The SOURCE argument is a file object open for reading
        (or anything with a read() method) and the DESTINATION
        argument is a file object open for writing (or
        anything with a write() method).

        The only reason for overriding this would be to change
        the block size or perhaps to replace newlines by CRLF
        -- note however that this the default server uses this
        to copy binary data as well.

        """
        shutil.copyfileobj(source, outputfile)

    def guess_type(self, path):
        """Guess the type of a file.

        Argument is a PATH (a filename).

        Return value is a string of the form type/subtype,
        usable for a MIME Content-type header.

        The default implementation looks the file's extension
        up in the table self.extensions_map, using application/octet-stream
        as a default; however it would be permissible (if
        slow) to look inside the data to make a better guess.

        """

        base, ext = posixpath.splitext(path)
        if ext in self.extensions_map:
            return self.extensions_map[ext]
        ext = ext.lower()
        if ext in self.extensions_map:
            return self.extensions_map[ext]
        else:
            return self.extensions_map['']

    if not mimetypes.inited:
        mimetypes.init() # try to read system mime.types
    extensions_map = mimetypes.types_map.copy()
    extensions_map.update({
        '': 'application/octet-stream', # Default
        '.py': 'text/plain',
        '.c': 'text/plain',
        '.h': 'text/plain',
        })

def test(HandlerClass = SimpleHTTPRequestHandler,
         ServerClass = http.server.HTTPServer):
    http.server.test(HandlerClass, ServerClass)

if __name__ == '__main__':
    test()

It creates a web page on port 8000 which I can upload files to (they get dropped into the directory the script is run from), and download files from (that directory).

Removed by Apple
Apple removed the included File Transfer Protocol (FTP) server from recent versions of macOS. FTP is not secure by default and better avoided.
FTP is not secure because the connection is not encrypted. Modern network protocols are encrypted by default – even on local networks.
Replacements and Alternatives
If you need to regularly transfer files, consider Syncthing. Otherwise, installing and running your own ftp server is still possible through projects like brew.
See quick to install and set up FTP server on homebrew for macOS
 for various ftp server choices.

In what way is it not secure? I literally just wanted to send some audio files from my windows PC to my Mac, on my home local network.

I have updated the answer to mention encryption, a reasonable alternative, and added a link to the brew project.

Suggest you switch to sftp which provides security. /usr/bin/sftp ( I'm running 10.10.5, but I heard sftp is around in later releases. )

/usr/bin/sftp is present in macOS 10.14.

@theonlygusti FTP is insecure because it sends passwords on the control channel in clear text.  It is insecure because anyone with access to the data channel can capture verbatim whatever files you transfer, those files not being encrypted.  It has nothing to do with it being "only" on your local home network.

@MarcWilson which passwords?

@theonlygusti Marc assumes the server will require a password to connect. However, it sounds like your situation is an edge case – local only, trusted environment, and no desire for passwords to protect to the server.

@GrahamMiln Which has nothing to do with FTP being any more or less secure.

@MarcWilson Absolutely. :-)