Sample Header Ad - 728x90

Ask Different (Apple)

Q&A for power users of Apple hardware and software

Latest Questions

32 votes
5 answers
20333 views
Trouble opening plist files in text editor
From Finder, I can preview a plist file without any difficulties. For example, using Quick Look with `~/Library/Preferences/com.apple.Safari.RSS.plist` I get a nice preview of its contents: ![Quick Look][1] However, if I then try to open the file, either with TextEdit, or any other editor (I've trie...
From Finder, I can preview a plist file without any difficulties. For example, using Quick Look with ~/Library/Preferences/com.apple.Safari.RSS.plist I get a nice preview of its contents: Quick Look However, if I then try to open the file, either with TextEdit, or any other editor (I've tried SublimeText, TextMate, Vim, Nano, and Coda 2 so far), the encoding appears to be off: bplist00Ò_"FixedRefreshesInBackgroundSettings_(com.apple.PreferenceSync.ExcludeSyncKeys ¡ 2]^����������������������������` Here's what it looks like if I open it with TextEdit: TextEdit I've tried changing the encoding in Sublime Text and other apps, but that doesn't help. Any thoughts? I'm running 10.8.4.
apc (423 rep)
Sep 13, 2013, 07:08 PM • Last activity: Jun 1, 2025, 11:29 PM
2 votes
1 answers
103 views
change mutiple xml fields data and the data have differnt name #have try apple script #on mac
### Scenario description This side needs to go to a ftp regularly to download the data down and change their fields. The process is: 1. Download from a place to get a file name called "202301081014XXXX.REQ" data format xml 2. change the data of one of the fields of S001 which content is "1234" Chang...
### Scenario description This side needs to go to a ftp regularly to download the data down and change their fields. The process is: 1. Download from a place to get a file name called "202301081014XXXX.REQ" data format xml 2. change the data of one of the fields of S001 which content is "1234" Change it to "abcd" 3. If the change is completed, create a file with the same name and name it as "202301081014XXXX.REQ.OK" 4.Upload the two created data to another ftp path Currently I have tried the action 1. via Mac app script tools 2. The operation of recording the screen is as follows
tell application "Finder"
    activate
    open document file "202301081014N1234.REQ" of folder "Downloads" of folder "blue2" of folder "Users" of startup disk using application file "BBEdit.app" of folder "Applications" of startup disk
end tell
tell application "BBEdit"
    activate
    open find window
    find "1234" searching in text 1 of text document id 829 with selecting match
    set characters 406 thru 428 of text document id 829 to "abcd"
    select insertion point after characters 406 thru 428 of text document id 829
    save text document id 829
end tell
### Problems encountered Because the names of the data are different, I have read the [official documents](https://developer.apple.com/library/archive/documentation/AppleScript/Conceptual/AppleScriptLangGuide/reference/ASLR_folder_actions.html#//apple_ref/doc/uid/TP40000983-CH219-SW2) but I don't know how to define the scope. And the \ field is in a different position, so I can't execute the recorded AppleScript.
blue2lynn (21 rep)
Jan 8, 2023, 02:27 PM • Last activity: Sep 30, 2024, 11:04 PM
8 votes
7 answers
14841 views
Open a large XML file
I am trying to open a relatively large XML file (50mb) but my Mac just won't open it: No errors though, just been waiting for almost 10 minutes but nothing happens. Tried using **TextEditor, Xcode** Any other suggestions?
I am trying to open a relatively large XML file (50mb) but my Mac just won't open it: No errors though, just been waiting for almost 10 minutes but nothing happens. Tried using **TextEditor, Xcode** Any other suggestions?
inside (183 rep)
Jul 10, 2017, 09:05 PM • Last activity: May 4, 2024, 02:44 PM
2 votes
2 answers
298 views
airport -s -x returns truncated output
I am the author of `wifi-wand`, a Ruby command line utility that can be used as a simple way to manage the Mac's WiFi (https://github.com/keithrbennett/wifiwand) without having to learn all the different underlying Mac OS commands and their options. To get a list of network names, I used to use `air...
I am the author of wifi-wand, a Ruby command line utility that can be used as a simple way to manage the Mac's WiFi (https://github.com/keithrbennett/wifiwand) without having to learn all the different underlying Mac OS commands and their options. To get a list of network names, I used to use airport -s but found that it does not work because since the network names are right justified (left padded), there is no way to know if leading spaces are part of the name or just there for formatting. So I use airport -s -x to get the information displayed in (pseudo-)XML. This almost always works, but I've noticed in several locations, if there is an HP printer network, the output terminates somewhere in that element. For example: SSID_STR DIRECT-0E-HP OfficeJet 4650 WPS_PROB_RESP_IE IE_KEY_WPS_AP_SETUP_LOCKED IE_KEY_WPS_CFG_METHODS 0 IE_KEY_WPS_DEV_NAME DIRECT-0E-HP OfficeJet 4650 IE_KEY_WPS_DEV_NAME_DATA RElSRUNULTBFLUhQIE9mZmljZUpldCA0NjUw IE_KEY_WPS_MANUFACTURER HP IE_KEY_WPS_MODEL_NAME OfficeJet 4650 series Without the -x option, the output works, but, as I say, there is the space issue that prevents me from relying on it: SSID BSSID RSSI CHANNEL HT CC SECURITY (auth/unicast/group) NETGEAR25-5G a0:04:60:1a:5a:89 -67 153,-1 Y -- WPA2(PSK/AES/AES) DIRECT-0E-HP OfficeJet 4650 ac:e2:d3:a9:d9:0f -90 6 Y -- WPA2(PSK/AES/AES) iPhone b2:8d:6c:9f:dd:00 -49 1 Y US WPA2(PSK/AES/AES) NETGEAR25 a0:04:60:1a:5a:87 -62 9 Y -- WPA2(PSK/AES/AES) CBCI-4F58 60:3d:26:57:4f:5c -86 6 Y -- WPA2(PSK/AES/AES) What's going on and how can I fix this? Thanks in advance. (The Github issue is at https://github.com/keithrbennett/wifiwand/issues/20.) This HP related error is confirmed at https://clburlison.com/macos-wifi-scanning/ , which says: When you run airport with the --xml flag the command would fail to output properly formatted xml data...one idea is that HP printers are broadcasting a SSID with unsafe characters... [which is close, but it is the model name, not the SSID, that seems to generate the error]
Keith Bennett (1263 rep)
Nov 2, 2018, 06:23 PM • Last activity: Dec 13, 2023, 06:15 AM
2 votes
3 answers
5880 views
Share Itunes Library with all users on same machine
Looking to share my Itunes Library with my wife on same machine. SO for example, when I log off, and she logs in, I would like to be able to access my library in her ITunes. I have spent countless hours combing the internet with no success and wondered if this is now even possible. I have read this...
Looking to share my Itunes Library with my wife on same machine. SO for example, when I log off, and she logs in, I would like to be able to access my library in her ITunes. I have spent countless hours combing the internet with no success and wondered if this is now even possible. I have read this THIS stack exchange thread about how to share but it seems this method doesnt work. | When I open Itunes on my wifes account with OPTION key and choose the newly created Library from my existing account nothing gets imported. Another method I tried and failed with is to simply export the the Library from my existing Itunes as XML. The result was that the playlists get loaded fine but all the songs are missing (except for 3 or 4 songs)! It should be noted that all the Media for the playlists and libraries are in a shared folder that are accessible to my wife's account with read & write permissions turned on. I also tried setting up Home Sharing, but this does not seem to work on the same machine. Running Sierra 10.12.6 with Itunes version 12.7.2.60 At this point i have no clue what to do. Any help is appreciated.
Kalamalka Kid (1428 rep)
May 4, 2018, 08:08 PM • Last activity: Aug 11, 2022, 09:53 PM
0 votes
1 answers
319 views
I need help translating this cron job into launchd
How do achieve the following cron job into launchd xml format?: * * * * * date > /Users/mariano/cron_test.log I've been trying in several ways, but I don't seem to be getting the `ProgramArguments` right. I guess that the `>` might be interfering with the xml tags or something. Any help is greatly a...
How do achieve the following cron job into launchd xml format?: * * * * * date > /Users/mariano/cron_test.log I've been trying in several ways, but I don't seem to be getting the ProgramArguments right. I guess that the > might be interfering with the xml tags or something. Any help is greatly appreciated!
mariano-daniel (284 rep)
Apr 9, 2022, 09:00 PM • Last activity: Apr 9, 2022, 10:05 PM
0 votes
1 answers
206 views
launchctl gives "Invalid property list" error, but plutil validates "OK"
mariano@host LaunchAgents % plutil local.test.plist local.test.plist: OK But then: mariano@host LaunchAgents % sudo launchctl load local.test.plist Password: /Users/mariano/Library/LaunchAgents/local.test.plist: Invalid property list 🤔 File in question: Label local.test.plist ProgramArgument...
mariano@host LaunchAgents % plutil local.test.plist local.test.plist: OK But then: mariano@host LaunchAgents % sudo launchctl load local.test.plist Password: /Users/mariano/Library/LaunchAgents/local.test.plist: Invalid property list 🤔 File in question: Label local.test.plist ProgramArguments /bin/echo "Hello world" StartInterval 1
mariano-daniel (284 rep)
Apr 8, 2022, 09:47 PM • Last activity: Apr 9, 2022, 06:31 AM
3 votes
2 answers
3427 views
How make Safari open XML file instead of downloading it
I'm on MacOS Sierra. When I click on a link to XML file, Safari downloads it. Instead I want to view the XML right in the browser. Is there a way to accomplish this?
I'm on MacOS Sierra. When I click on a link to XML file, Safari downloads it. Instead I want to view the XML right in the browser. Is there a way to accomplish this?
akirekadu (131 rep)
Jan 23, 2017, 07:55 PM • Last activity: Feb 12, 2022, 09:10 AM
63 votes
15 answers
378669 views
What's a good XML viewer/editor for Mac OS X?
I use XML Editor from XMLmind for editing/viewing XML file in Mac. It's not bad, but I expect an XML editor for Mac. What options do I have including the commercial/free software?
I use XML Editor from XMLmind for editing/viewing XML file in Mac. It's not bad, but I expect an XML editor for Mac. What options do I have including the commercial/free software?
prosseek (5726 rep)
Feb 15, 2011, 06:41 PM • Last activity: Nov 5, 2021, 12:09 PM
1 votes
0 answers
193 views
How to debug MacOS/iOS calendars discovery process
I'm putting together a Caldav server and both iOS 14 and MacOS Catalina seem to be ignoring the XML responses and then both continuing to try different URLs until giving up. I've posted details here: [stack overflow question][1] How can I figure out what is going on? [1]: https://stackoverflow.com/q...
I'm putting together a Caldav server and both iOS 14 and MacOS Catalina seem to be ignoring the XML responses and then both continuing to try different URLs until giving up. I've posted details here: stack overflow question How can I figure out what is going on?
GisMofx (111 rep)
May 18, 2021, 11:42 AM
22 votes
1 answers
3463 views
How to Change default fallback font (for non-latin languages)
**My question is:** How do I change the default fallback font for Thai (or any non-latin language for that matter) so that the terminal app shows the Thai font of my choice while keeping the English font. Forgive the long extra details, but I’m really stuck here on Mac OS 10.11.1 and my terminal fon...
**My question is:** How do I change the default fallback font for Thai (or any non-latin language for that matter) so that the terminal app shows the Thai font of my choice while keeping the English font. Forgive the long extra details, but I’m really stuck here on Mac OS 10.11.1 and my terminal font is set to Menlo at a font size that is comfortable to me. Menlo does not have any Thai characters, which I double-checked in Fontbook > View > Repertoire and also via the Menu bar > Show Emoji and Symbols. (But interestingly has Lao.) However, when I type Thai characters in the terminal, miraculously Thai appears. Apparently, there is a system wide default fallback font. However, one Thai character does not display properly. (Sara Am, สระ อำ) I can change the terminal font to CS Prajad and the Thai looks very good including the problem character. However the English font is hideously ugly and is useless as a programming font. I disabled SIP (System Integrity Protection) in order to modify the xml file DefaultFontFallbacks.plist located in /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreText.framework/Versions/A/Resources then rebooted thinking that this would solve my problem. However, the original default Thai font is still showing in the terminal. (Changes I made to DefaultFontFallbacks.plist.) Substitute default string. ... ... Thonburi to CSPrajad (no space) ... add CS Prajad as monospace font as per Han Chinese and Korean xml strings. ... ... th CSPrajad-Regular ... ... How do I change the default fallback font for Thai (or any non-latin language for that matter) so that the terminal app shows the Thai font of my choice while keeping the English font.
BrianWilson (373 rep)
Nov 11, 2015, 04:50 PM • Last activity: Mar 2, 2021, 05:23 PM
22 votes
1 answers
12023 views
Easily pretty print XML
Is there a way to quickly pretty print large XML files without needing an app? Online solutions don't allow for massive files and I'd like to do this without install more junk on my computer.
Is there a way to quickly pretty print large XML files without needing an app? Online solutions don't allow for massive files and I'd like to do this without install more junk on my computer.
wmarbut (673 rep)
Jul 12, 2013, 06:43 PM • Last activity: Apr 28, 2020, 10:51 PM
7 votes
2 answers
17414 views
Launchctl says plist is invalid, plutil says it's OK
I'm trying to have launchd run a shell script when I join a new WiFi network. I've created this plist file (closely based on [this SuperUser answer][1]) at `/Users/myname/Library/LaunchAgents/my.networkChangeListener.plist`: Label my.networkChangeListener LowPriorityIO ProgramArguments /Users/myname...
I'm trying to have launchd run a shell script when I join a new WiFi network. I've created this plist file (closely based on this SuperUser answer ) at /Users/myname/Library/LaunchAgents/my.networkChangeListener.plist: Label my.networkChangeListener LowPriorityIO ProgramArguments /Users/myname/bin/networkChangeListener/onNetworkChange.sh WatchPaths /etc/resolv.conf /Library/Preferences/SystemConfiguration/NetworkInterfaces.plist /Library/Preferences/SystemConfiguration/com.apple.airport.preferences.plist RunAtLoad My user is the owner of the plist, and the group is "staff". When I try to load the file by running launchctl load ~/Library/LaunchAgents/my.networkChangeListener.plist, I get an error saying "Invalid property list". However, when I run plutil ~/Library/LaunchAgents/my.networkChangeListener.plist, it returns "OK" What is the problem with my plist file? Is is something specific to launchd? I'm completely at a dead end for how to debug this.
LiberalArtist (337 rep)
Apr 16, 2015, 01:06 AM • Last activity: Feb 16, 2020, 05:44 PM
1 votes
1 answers
85 views
How can I stop AppleScript from converting variables like "\087" into their octal form when passing through bash?
I have a program I'm using to write xml with variables, and it passes through AppleScript and bash to form the final xml. However, one of my variables usually begins with "024", "054", or other three digit codes that paired with the "\" forms an octal character, like "," for "\\054". Once they are p...
I have a program I'm using to write xml with variables, and it passes through AppleScript and bash to form the final xml. However, one of my variables usually begins with "024", "054", or other three digit codes that paired with the "\" forms an octal character, like "," for "\\054". Once they are passed through bash, they become replaced with these octal characters. These variables need to stay the way they are, because they are part of a file path the xml ultimately pulls from. Unfortunately, I can't change these variables because they're linked to many other things working properly, and the backslashes are obligatory too. I want to know if there is a way to stop AppleScript from implementing octal encoding on this script as it passes through. A colleague recommended using iconv, which I tried unsuccessfully, partially because I'm not sure how to use it properly. Here is the AppleScript for reference: do shell script "echo \" W:\\Sequences\\087_TLD_TL_Taking_The_Lead\\Shots\\TLD0640\\Versions\\MOV\\TLD0640_v0173.mov\\ \" > ~/Desktop/Test.xml" And the output: W:\Sequences87_TLD_TL_Taking_The_Lead\Shots\TLD0640\Versions\MOV\TLD0640_v0173.mov\ Thank you for your help! Edit: thanks Gordon Davisson for making the code viewable, and updated the codes to the bare minimum for reproducing the question.
Brandon Steenhoek (11 rep)
Jul 12, 2019, 12:49 AM • Last activity: Jul 12, 2019, 12:49 PM
2 votes
2 answers
1678 views
Remapping Y and Z keys with Karabiner
I just want to switch the Y and Z keys. I've tried everything with Karabiner on High Sierra, but it just doesn't seem to work. I always get an error message along the lines of: "Karabiner Error. Error in xml. Unknown symbol: KeyCode::0x6" Attached you can see the code that I've been trying to use, a...
I just want to switch the Y and Z keys. I've tried everything with Karabiner on High Sierra, but it just doesn't seem to work. I always get an error message along the lines of: "Karabiner Error. Error in xml. Unknown symbol: KeyCode::0x6" Attached you can see the code that I've been trying to use, as well as the modifier keys for Y and Z (which I've tried every variation of in the code). Swap Space and Tab private.swap_z_and_y __KeyToKey__ KeyCode::0x6, KeyCode::0x10 __KeyToKey__ KeyCode::0x10, KeyCode::0x6 strong text Please help! picture
Rhine Ellery (21 rep)
Apr 23, 2018, 02:12 PM • Last activity: Jan 5, 2019, 08:01 PM
0 votes
1 answers
367 views
XML phonebook for iOS ?
Ive got a online phonebook that our company voip phones connect to, which allows us to keep a centralised list of all contacts phone numbers which is available on all voip phones. The online phonebook outputs an XML file with the contact phone numbers, which the voip phones read. Is it possible to a...
Ive got a online phonebook that our company voip phones connect to, which allows us to keep a centralised list of all contacts phone numbers which is available on all voip phones. The online phonebook outputs an XML file with the contact phone numbers, which the voip phones read. Is it possible to also get our mobiles (iOS 11) to read from the same XML phonebook and input the data into the iphone contacts ?
sam (3985 rep)
Mar 23, 2018, 10:52 AM • Last activity: Mar 26, 2018, 04:13 AM
3 votes
2 answers
781 views
How to find cause for iTunes not exporting library XML?
My iTunes XML export has not been working for months but I need it for DJ software like Traktor Pro. I would like to find and fix the problem and can't reset the database. When trying to export the whole library as XML manually (File -> Library -> Export Library) I can see `Assertion failure: succes...
My iTunes XML export has not been working for months but I need it for DJ software like Traktor Pro. I would like to find and fix the problem and can't reset the database. When trying to export the whole library as XML manually (File -> Library -> Export Library) I can see Assertion failure: success == noErr (-8753) in the system log but that is ALL I know right now. **What can I do find the root cause of this problem?** macOS version: 10.12.5 iTunes version: 12.6.1.25 These are my relevant settings: enter image description here
Hedge (545 rep)
May 25, 2017, 08:46 AM • Last activity: May 30, 2017, 07:05 PM
2 votes
1 answers
8100 views
How do I add preview devices to Interface Builder in Xcode to retrieve the device's code?
Is there any way to add devices to the selection in the lower left corner? [![enter image description here][1]][1] I want to add the iPad Air and iPad Mini, so that I can view their ID (e.g. for iPhone 4 "retina3_5") when I view the .xib file as code. ---------- My actual problem is that I am genera...
Is there any way to add devices to the selection in the lower left corner? enter image description here I want to add the iPad Air and iPad Mini, so that I can view their ID (e.g. for iPhone 4 "retina3_5") when I view the .xib file as code. ---------- My actual problem is that I am generating .xib files from a model and don't want Xcode to be asking like this Xcode asking for an initial device for an initial device when viewing the generated view in Xcode. The only and therefore initial device for this view is set in the model. I already added the following lines which set the initial device: The only problem is that I don't know the identifiers for iPad Air and iPad Mini. I know their resolution is the same as that of the iPad Pro 9.7" so I might as well just use the ID of the Pro but that doesn't feel completely right. Any suggestions? I already spent a lot of time on searching how to add devices (the only suitable answer I found said press + in the lower left corner, but there is none for me) and for the keys of i-devices but without luck. Apple seems not have documented the xib-format at all.
Florian Blume (123 rep)
Feb 21, 2017, 03:55 PM • Last activity: Feb 22, 2017, 09:35 AM
0 votes
1 answers
1097 views
Formatted XML display in Safari 8
I'm trying to find an extension or plugin that allows Safari to display XML in a more user friendly form, similar to how its handled by Firefox. The only relevant information seems to be heavily outdated and not applicable to the latest version (8.0.7). https://apple.stackexchange.com/questions/4603...
I'm trying to find an extension or plugin that allows Safari to display XML in a more user friendly form, similar to how its handled by Firefox. The only relevant information seems to be heavily outdated and not applicable to the latest version (8.0.7). https://apple.stackexchange.com/questions/46038/how-can-i-view-the-raw-xml-of-an-rss-feed-in-safari-or-reeder had an answer about 'XV XML Viewer', but the answer itself has been updated pointing out that it no longer works in Safari 5.1. There is also an older .webplugin that could have been used, but then I read that the .webplugin mechanism itself is deprecated and no longer used in modern versions. Is there any updated extension that can show a formatted xml view in current Safari versions? The ability to collapse/expand nodes would be nice, but atleast basic formatting would still be better than just a giant blob of text whenever I view a web service from Safari instead of Firefox.
Alok (101 rep)
Jul 30, 2015, 01:39 AM • Last activity: Jul 9, 2016, 01:23 AM
0 votes
1 answers
59 views
Log in window (El Capitan)
How can I update changes to the Login window (Mac OS X 10.11.3). When I change settings in the Preferences and then restart computer, there is absolutely no difference. Is there a XML file with these settings or cache?
How can I update changes to the Login window (Mac OS X 10.11.3). When I change settings in the Preferences and then restart computer, there is absolutely no difference. Is there a XML file with these settings or cache?
Martin Trubelik (319 rep)
Mar 9, 2016, 02:17 PM • Last activity: Mar 9, 2016, 10:22 PM
Showing page 1 of 20 total questions