Wednesday, December 15, 2021

Recent Questions - Ask Different

Recent Questions - Ask Different


Using osascript to get the file currently edited in Xcode

Posted: 15 Dec 2021 07:07 AM PST

I'd like to write osascript that fetch the full path of the file currently being edited in Xcode. I've tried the following code, which works most of the times.

However, if I just modified the file from Xcode and ran this script from Xcode using custom behavior (Xcode->Behaviors), it doesn't get the file name at all and I get empty string. To workaround this I need to repeat my action and run the script again.

I assume this is something to do with caching that Xcode manage for recently edited files.

Perhaps anybody knows how to fix the script so that it work even in this special case ?

FILE=$(osascript -e '  tell application "Xcode"      activate      tell application "System Events" to keystroke "s" using command down      delay 0.5      set last_word_in_main_window to (word -1 of (get name of window 1))      set current_document to document 1 whose name ends with last_word_in_main_window      set current_document_path to path of current_document  end tell ')  

thanks

Apache stops working after installing Homebrew PHP (which is missing on Monterey)

Posted: 15 Dec 2021 06:19 AM PST

Hello I have followed these instructions to configure builtin Apache web server on Macos 12.1, although I have realised that PHP was removed by Apple on Monterey. As such, I have installed homebrew and installed PHP from there, however, now Apache won't work, since the instructions below are not commented in httpd.conf:

LoadModule php_module /opt/homebrew/opt/php/lib/httpd/modules/libphp.so        <FilesMatch \.php$>          SetHandler application/x-httpd-php      </FilesMatch>  

Attempting to open localhost through Chrome, will throw:

This site can't be reached127.0.0.1 refused to connect.  Try:    Checking the connection  Checking the proxy and the firewall  ERR_CONNECTION_REFUSED  

keyboard preferences error, setup language

Posted: 15 Dec 2021 07:03 AM PST

I have a magic keyboard A1843 and wanted to change the layout from german to uk layout (I use a macbook pro from 2014). I tried it with 'set up bluetooth keyboard' (the keyboard can be found and the bluetooth connection is fine) but when i want to continue to set up my preferences the error 'Preference error: There was an error in Keyboard preferences.' occurs. I restarted my laptop but the error still occurs... Maybe someone could help with this problem ..

Safari can't open pages because server does not respond + problems with delayed response

Posted: 15 Dec 2021 06:43 AM PST

For some time, I have been experiencing problems with Safari. I have faced these two issues:

  1. When a tab is opened, and some page is loaded and I try to search for something through the search bar, the tab freezes for some time, and it opens what I asked for only after that.
  2. Safari regularly says that it can't open a page, but after reloading the page, it opens the page successfully. This happens on all pages.

Does anyone else face similar issues? Can someone help?

My MacOS version is macOS Monterey 12.1.

A shortcut to switch audio output and play podcast for 15min

Posted: 15 Dec 2021 04:00 AM PST

I use to listen to podcast before sleep. But that actually means:

  1. On iPhone 12, open overcast app and start playing
  2. Switch audio output to homepod
  3. Set it to stop playing after 15min (I expect to be sleeping at this time)

Is it possible to automate that?

Today I spend some noticed the shortcuts app and managed to create a shortcut to start a 40min timer when I say "Hey Siri, Laundry timer". But automate my sleep routine seems much more complex.

Crack forgotten Notes Mac password

Posted: 15 Dec 2021 03:47 AM PST

I forgot the password to my notes file with pertinent info. I tried guessing. Any help?

OSX Screenshots: Is there a way to disable the toolbar like we can disable the shadow?

Posted: 15 Dec 2021 02:43 AM PST

I recently found a terminal command to disable shadows when taking screenshots in OSX, do you know a way to disable the toolbar and just have the image or window content saved in the clipboard when using shortcuts?

Here's the example for shadows fyi:

defaults write com.apple.screencapture disable-shadow true  

Thanks for your help.

How do I auto script "su admin" as a non-admin?

Posted: 14 Dec 2021 09:58 PM PST

I can auto script "sudo su" logged in as an admin in terminal with:

echo 'pa$$w0rd' | sudo -S su  

If I'm logging in as a standard (non-admin) user on Big Sur, I need to first login as "su admin". How do I auto script "su admin" as a non-admin?

How do I get touchbar settings on a macbook without a touchbar?

Posted: 15 Dec 2021 01:38 AM PST

I have a Macbook Pro on macOS monterey 12.1, and I have discovered through XCode.app that you can enable a touchbar that works as if you were using a 2016(4 USB-C/thunderbolt port) through 2020 model. I have also seen a post on Reddit where people are getting the option to customize their touchbar under keyboard settings despite not having one.

How would I intentionally make the option to customize what options appear on the virtual touchbar (at least on XCode) under keyboard settings to show up, if not through: the command line?

Purpose: I want to see how apps use the Touchbar, if at all.

How does Google Drive locally cache files before uploading them? How safe is it when offline?

Posted: 15 Dec 2021 08:08 AM PST

I've been using Google Drive to backup via Time Machine on a macOS 10.13.6. More precisely, I've created a sparse bundle disk image, attached such image and mounted it in order to make it visible to Time Machine.

Now, usually Time Machine finishes the backup way before Google Drive completes syncing all the files. Occasionally, however, either my computer sleeps or due to other reasons my internet disconnects. Or, maybe worse, due to power outages, my computer might eventually turn off. In those cases, what happens to whatever is being written inside the disk image?

Usually, when the internet disconnects and reconnects again (even after several hours), Google Drive seems to indicate that the progress could be resumed. At least, I see some files similar to the ones when Time Machine output was being uploaded. However, I'm unaware on whether some of these files were corrupted or, even, whether all the written files were uploaded.

So, in summary, after creating a file inside the Google Drive folder, for how long and how much can Google drive stores the files locally before uploading then with and without internet connection? nce.

iPad and web page gallery being updated [closed]

Posted: 14 Dec 2021 10:43 PM PST

I want to be able to Airdrop videos from a server gallery that is visible with an iPad to guests. I have tried to simply tap the video however it wants to send the gallery URL.

What HTML needs to be embedded in the gallery index to allow this?

No Chime, No boot up - just fan noise on my Mac Pro 3,1

Posted: 15 Dec 2021 03:28 AM PST

I have run into a problem with my Mac Pro 3,1 in that I decided to strip down the Mac clean and dust every thing to improve performance after erasing the hard drive and having a lot of problems. I left it overnight before re-building the next day, now all I get is fan noise when powering up, no boot up or chimes. my question is would the lack of power to the memory left over night be the cause, ie, nothing to boot from?, and would booting up from an external drive be the answer?

I was thinking of making a bootable macos high sierra copy from my Macbook on an external hard drive and trying to boot from this.

PRAM battery was changed in the last few days.

iPhone 12 camera inserts unknown icon in photo of crossword puzzle

Posted: 15 Dec 2021 05:20 AM PST

I photograph solved crossword puzzles at nyxcrossword.com. I use the photo as answers to the same blank puzzle I am trying to solve. I use an iPhone 12 recently upgraded to iOS 15.1.1

Since the upgrade I am getting an icon in the lower right corner. I did a reverse image search of the icon at images.google.com and tineye.com and both said "zero matches".

Does anyone recognize the icon and know how to get rid of it?

image

Call Forwarding with non-call-enabled sim

Posted: 14 Dec 2021 11:45 PM PST

I have dual sims: one is a data only plan (i.e. it cannot receive calls, it is not connected to the phone network) and the other can receive calls.

I used the data only sim for all my contacts for years (using facetime and message), and now just got the second sim, but don't want to have to transfer all my contacts over.

Is there some way to forward any calls to my old number to my new, even though it cannot receive calls? I don't think the traditional call forwarding works; I get an error message of failed activation.

Auto schedule Ethernet to activate/inactivate

Posted: 14 Dec 2021 10:57 PM PST

I use a USB-C Ethernet dongle on my MacBook Pro. I frequently find it has stopped working and suspect it's due to the dongle overheating.

I'd like to automate this sequence:

  • Inactivate Ethernet at 1am (after I go to bed).
  • Activate Ethernet at 7am (before I start working).

Is that possible by Automator or by a 3rd party app?

Memory Pressure in yellow with new MacBook Pro M1 Pro (14 inch / 16GB RAM )

Posted: 15 Dec 2021 02:47 AM PST

I recently purchased a new MacBook Pro 14 inch model (16GB RAM and 8 core CPU).

The new laptop is running just fine. It's super fast. However, memory pressure is usually in the yellow. On my old system (MacBook Pro mid 2018 with 16GB RAM), I was hardly ever in the yellow.

Even when memory pressure is in the yellow on the new system, the computer seems totally fine - no fan, no lag, nothing.

Should I consider upgrading to 32GB? Something seems off about this memory pressure. I read something about this possibly being a bug in macOS Monterey. I don't want to needlessly upgrade for budget reasons.

Can anyone advise?

enter image description here

enter image description here

***** UPDATE ***** After updating my system to Monterey 12.1, memory pressure is steady in the green.

Connect 2 4K monitors to a M1 Pro laptop via Thunderbolt 4 dock?

Posted: 15 Dec 2021 06:30 AM PST

Is it possible to connect two external 4K60 monitors to a M1 Pro macbook using a single Thunderbolt 4 port, more specifically using a dock?

I have researched this and am getting conflicting answers. The official docs aren't helpful, as they don't specify this. I found this related question on Apple forums, and some answers there say it's possible.

But then I asked the specific question there myself, and got an opposite answer.

I called Apple, and the rep also said that this is not possible even with the M1 Max (only one monitor per port), but I am not 100% confident in their knowledge.

People here are sharing their personal experiences and confirming that it does work with specific setups.

Bug in Preview: How do I hide slideshow controls when viewing a full screen PDF?

Posted: 14 Dec 2021 11:48 PM PST

Preview has two distinct kinds of full screen mode:

  1. The normal full screen mode that most macOS applications have (View > Enter Full Screen)
  2. Preview's special slideshow mode (View > Slideshow)

In slideshow mode, whenever you move your mouse, slideshow controls will appear at the bottom of the screen. They look like this:

However, since I upgraded to macOS Monterey, these controls also appear when I open a PDF in ordinary full screen mode. This is really annoying when I try to read and looks like a bug to me, as it wasn't there before.

The problem only occurs after the mouse pointer has been hidden at least once, which automatically happens after a few seconds of not moving it.

Is there any way to disable the slideshow controls in normal full screen?


Edit: In the meantime, I also noticed that the slideshow mode (that isn't particularly useful for PDFs but nevertheless exists) is now totally messed up: When you start the slideshow and press any key, Preview will end the slideshow, as can be seen in the View menu: The View > Slideshow menu entry is selectable again!

I think this is related to the problem I asked about—the entire slideshow vs full screen logic is confused.

System Preferences can't alter Files and Folders

Posted: 15 Dec 2021 04:16 AM PST

I am trying to set some privileges for apps to access folders using System Preferences->Security & Privacy and choosing Files and Folders.

However clicking on the buttons for an app has no effect and the + and - icons are greyed out. (Just before this clicking on the button for an app would change the button for another app0.

I am on macOS 11.6.1 and have the same issue in Safe Mode and also with a new admin user.

How do I change the permissions for files and folders

Show greyed out +/-

Mac forgets window-workspace association on monitor disconnect

Posted: 15 Dec 2021 07:01 AM PST

Since moving to a new macbook, I've encountered a problem. I'll have several windows spread out across multiple Spaces, like the following illustration based off of the mission control view:

enter image description here

(Apologies for the silly drawing.) After connecting and disconnecting to my external monitors, the windows all get chucked to the first Space, like so:

enter image description here

Now I need to drag all the windows back to their appropriate Spaces/Desktops. I'm used to windows getting slightly outta whack when disconnecting from monitors, but I could use Moom to return to normal. However my understanding is that there's no OS API to move windows between spaces.

I have "Displays have separate spaces" unchecked.

What happens if you are being tracked using an AirTag but you don't own an apple device?

Posted: 14 Dec 2021 09:40 PM PST

While Apple positions AirTags as a tool to find things you lost, it can also be used to (most probably illegally) track other people. Assuming I don't own an iPhone/iPad, how can I figure out that this is the case and what can I do in such cases?

How to turn off new popup for spell checking in Word for Mac on macOS 11.3

Posted: 14 Dec 2021 10:51 PM PST

After the last macOS update, a popup started appearing when you click on a misspelled word in Word for Mac. Popup for helping with spelling in Word for Mac

This is a very frustrating function when you work in several different languages not always wanting to spell-check even though the red underscoring is good as a reminder. Hence, I want to keep the previous functionality to get suggestions when right-clicking on an underscored word but would really want to turn this popup function off. Does anyone know how this could be done?

The only option I've found is to turn spell-checking as you write off completely, which also removes the red underscoring that I'd like to keep.

Moving an icon on the dock triggers "Keep in Dock", any way to prevent this?

Posted: 14 Dec 2021 10:08 PM PST

If you 'right click' an icon on the dock > hover 'Options' > un-check "Keep in Dock" and proceed to drag the icon to move it, what happens is the "Keep in Dock" option becomes checked once again.

This is annoying because I do not want closed applications to be on my dock, yet I want to be able to organize my dock when application are open.

The issue was briefly mentioned in the comment section of this thread with no apparent solution.

Is it possible to disable this behavior?

iPhone X stuck in recovery mode after maxing out storage. Getting "Error Code 14"

Posted: 15 Dec 2021 06:02 AM PST

So a couple of weeks ago I restarted my iPhone after it started glitching like crazy, when I tried to boot it up again it got stuck on the Apple logo. A couple of days later I found an article that said something about booting it into recovery mode and then updating it through iTunes would fix it, well big mistake. Now it's stuck in recovery mode. I have tried every possible thing I can think of to boot it out.

Including:

Updating it in iTunes

Updating it in Finder

Switching cables

Switching computers, from Mac to Windows

Using Reiboot to boot it out of recovery mode

Using Reiboot Pro (Paid Version of Reiboot) to "Repair the operating system"

Using 3u tools to repair it.

Using checkra1n to jailbreak it in DFU mode

Using a Windows computer to try to mount the iPhone as a removable storage device

And a couple of other 3rd party tools. None of which have successfully fixed it. Any help or advice would be much appreciated.

P.S. This iPhone is a business phone with a lot of important information on it that hasn't been backed up in quite a long time, so it's very important for me to try to get the information off of it.

Thanks

Magnet near 2020 Macbook Pro

Posted: 15 Dec 2021 08:05 AM PST

So I recently got a cool portable monitor, the travel case/stand of which as a magnet to hold the monitor upright and in place. I wasn't thinking and put my computer on top of the monitor while it was in it's case, kind of like a bookstand. I noticed a weird noise (like a 'computing' sound if you will) coming from the machine and assumed it was just the intensive processes I was running. It started to get quite annoying until I realized that the noise went away when I removed the laptop from off the case. I also regularly travel with the folded case and computer in close proximity. Am I endangering my computer by having this case anywhere around it? Is there anyway to check for damage? I seem to have all my files and the computer works fine.

Left-align Safari Favorites labels

Posted: 15 Dec 2021 03:07 AM PST

Is there a hack to make the items in Safari's Favorites bar be left-aligned rather than centered?

I've never gotten used to having to scan visually for the folder I want.

Can I use an iTunes gift card to sign up for the developer program?

Posted: 15 Dec 2021 03:27 AM PST

I want to develop apps for Apple devices but I can't get them there as I do not have a credit card. So, can I use an iTunes gift card to sign up for the developer program or, do I really need to use credit card?

1 comment:

  1. E-Techbytes: Recent Questions - Ask Different >>>>> Download Now

    >>>>> Download Full

    E-Techbytes: Recent Questions - Ask Different >>>>> Download LINK

    >>>>> Download Now

    E-Techbytes: Recent Questions - Ask Different >>>>> Download Full

    >>>>> Download LINK BL

    ReplyDelete