AppleScriptObjC is a powerful framework that allows developers to write AppleScript code using Objective-C syntax. One of the key benefits of AppleScriptObjC is its ability to easily interoperate with Objective-C code. This cheatsheet focuses on the Objective-C interoperability features of AppleScriptObjC.
set myArray to current application's NSMutableArray's arrayWithObjects:"Hello", "World"
set myArray to current application's NSMutableArray's arrayWithObjects:"Hello", "World"
set objectCount to myArray's count()
set myArray to current application's NSMutableArray's arrayWithObjects:"Hello", "World"
set newArray to current application's NSMutableArray's arrayWithArray:myArray
set myArray to current application's NSMutableArray's alloc()
set myArray to myArray's initWithCapacity:10
set myArray to current application's NSMutableArray's arrayWithObjects:"Hello", "World"
set myArray to missing value
set myWindow to current application's NSApplication's sharedApplication()'s mainWindow()
set windowTitle to myWindow's title()
set myWindow to current application's NSApplication's sharedApplication()'s mainWindow()
myWindow's setTitle:"My Window Title"
set myConstant to current application's NSApplication's NSAppKitVersionNumber