Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

Platforms to show: All Mac Windows Linux Cross-Platform

NSAppleScriptMBS.Handle as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: The internal reference to the NSAppleScript object.
Notes: (Read and Write property)

Feedback, Comments & Corrections

NSAppleScriptMBS.isCompiled as boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Returns a Boolean value that indicates whether the receiver's script has been compiled.
Example:
dim source as string = "tell Application ""iTunes"" to play"
dim n as new NSAppleScriptMBS(source)

MsgBox "isCompiled: "+str(n.isCompiled)

call n.compile

MsgBox "isCompiled: "+str(n.isCompiled)
Notes: (Read only property)

Feedback, Comments & Corrections

NSAppleScriptMBS.richTextSource as NSAttributedStringMBS
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Returns the syntax-highlighted source code of the receiver if the receiver has been compiled and its source code is available.
Example:
// init with some source
dim source as string = "tell Application ""iTunes"" to play"
dim n as new NSAppleScriptMBS(source)

// compile
call n.compile

// format text
dim richtext as NSAttributedStringMBS = n.richTextSource

if richtext = nil then
MsgBox "Failed to format source."
else
// write to RTF file
dim file as FolderItem = SpecialFolder.Desktop.Child("test.rtf")
dim b as BinaryStream = file.CreateBinaryFile("")

b.Write richtext.RTF
b.close

file.Launch
end if
Notes:
Returns nil otherwise. It is possible for an instance of NSAppleScript that has been instantiated with Construtor to be a script for which the source code is not available, but is nonetheless executable.
(Read only property)

Feedback, Comments & Corrections

NSAppleScriptMBS.source as string
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacCocoa Plugin 11.2 Yes No No Yes, macOS only No
Function: Returns the script source for the receiver.
Notes:
Returns the script source code of the receiver if it is available, "" otherwise.

It is possible for an NSAppleScript that has been instantiated with Constructor to be a script for which the source code is not available but is nonetheless executable.
(Read only property)

Feedback, Comments & Corrections

The items on this page are in the following plugins: MBS MacCocoa Plugin.




Links
MBS FileMaker Plugins