New topic: Reading a Complicated Plist File With Shell
<http://forums.realsoftware.com/viewtopic.php?t=30466> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message rbasic20091005153 Post subject: Reading a Complicated Plist File With ShellPosted: Tue Oct 13, 2009 2:56 pm Joined: Sat Apr 04, 2009 5:10 pm Posts: 341 Hola. I've searched the entire place with "defaults read." But I have not been able to find the answer for my question. I want to read a plist file and save the values of specific keys. If the preference file is simple with one layer under Root like com.apple.screencapture.plist, then I have no trouble. For example, if I want to get the default screenshot format, then I can get it with the following code. Code:myShell1.Execute "defaults read "+f.ShellPath+ "/com.apple.screencapture type" EditField1.Text=myShell1.Result But if a preference file has more than one layer (index, paragraph or whatever you call), then I don't know how to jump to a deeper one. For example, if I open NetworkInterfaces.plist (Library/Preferences/SystemConfiguration) with Property List Editor, there are Item 1 Item 2 Item 3 under Root and then Interfaces. And there are such keys as Active BSD Name IOBuiltin .. under Item 1. How can I jump to the second layer, say, Item 1 and find Active's value? Thank you for your advice. Tom _________________ Mac OS X 10.5.6/REALBasic 2008 R5.1 I say 'no' to MBS plug-ins. I boycott them. Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
