Thursday, June 4, 2020

#1 2020-03-25 03:56:07 am

rayascott
Member
Registered: 2020-03-23
Posts: 2

Runtime access to 3rd party app's Suite defs.

Hi,

Does anyone know if it's possible to use a system framework to access the suite definitions for any running app? I know I can parse the sdef file in the app's bundle, but I'd rather query the system directly, if that's even possible. Anyone had any experience with this?

Thanks,
Ray

Model: MacBook Air
Browser: Safari 605.1.15
Operating System: macOS 10.14


Filed under: framework, suite, sdef

Offline

 

#2 2020-03-25 05:06:01 am

Shane Stanley
Member
From:: Australia
Registered: 2002-12-07
Posts: 6369

Re: Runtime access to 3rd party app's Suite defs.

OSAKit.framework has an undocumented OSADictionary class that can be used:

Applescript:

use framework "Foundation"
use framework "OSAKit"
use scripting additions

set thePath to "/Applications/Some App.app"
set {theDict, theError} to current application's OSADictionary's alloc()'s initWithContentsOfFile:thePath |error|:(reference)
theDict's parse()
set {theDoc, theError} to current application's NSXMLDocument's alloc()'s initWithData:(theDict's |data|()) options:(current application's NSXMLDocumentTidyXML) |error|:(reference)


Shane Stanley <sstanley@myriad-com.com.au>
www.macosxautomation.com/applescript/apps/
latenightsw.com

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)