Platforms to show: All Mac Windows Linux Cross-Platform
Apple Script
Classes to compile and run apple script.
- Classes
- class AppleScriptErrorMBS
- property AppName as String
- property AppSerial as MemoryBlock
- property BriefMessage as String
- property Errorcode as Integer
- property ErrorCodeAvailable as Boolean
- property Message as String
- property RangeAvailable as Boolean
- property RangeEnd as Integer
- property RangeStart as Integer
- class AppleScriptMBS
- method close
- method Compile(text as string)
- method CountScriptProperties as Integer
- method Error as AppleScriptErrorMBS
- method Execute
- method ExecuteEvent(eventname as string, parameters() as string)
- method Result as string
- method ResultAsStringArray as string()
- method ResultDisplayString as string
- method ScriptProperty(index as Integer) as string
- method Source as string
- method SourceTextStyle as string
- property AllowInteraction as Boolean
- property CanUnicodeText as Boolean
- property Handle as Integer
- property Lasterror as Integer
- property ResultID as Integer
- property ScriptID as Integer
- property UnicodeText as Boolean
- property Binary as string
- property ScriptPropertyValue(name as string) as string
- event Periodic as Integer
- class NSAppleEventDescriptorMBS
- shared method appleEventWithEventClass(eventClass as string, eventID as string, targetDescriptor as NSAppleEventDescriptorMBS, returnID as Int16, transactionID as UInt32) as NSAppleEventDescriptorMBS
- method attributeDescriptorForKeyword(keyword as string) as NSAppleEventDescriptorMBS
- method coerceToDescriptorType(descriptorType as string) as NSAppleEventDescriptorMBS
- method Constructor
- method copy as NSAppleEventDescriptorMBS
- shared method currentProcessDescriptor as NSAppleEventDescriptorMBS
- method descriptorAtIndex(index as Integer) as NSAppleEventDescriptorMBS
- method descriptorForKeyword(keyword as string) as NSAppleEventDescriptorMBS
- shared method descriptorWithAlias(item as folderitem) as NSAppleEventDescriptorMBS
- shared method descriptorWithApplicationURL(fileURL as string) as NSAppleEventDescriptorMBS
- shared method descriptorWithApplicationURL(item as folderitem) as NSAppleEventDescriptorMBS
- shared method descriptorWithBoolean(value as Boolean) as NSAppleEventDescriptorMBS
- shared method descriptorWithBundleIdentifier(BundleID as String) as NSAppleEventDescriptorMBS
- shared method descriptorWithCurrentProcessSerialNumber as NSAppleEventDescriptorMBS
- shared method descriptorWithDate(value as date) as NSAppleEventDescriptorMBS
- shared method descriptorWithDateTime(value as dateTime) as NSAppleEventDescriptorMBS
- shared method descriptorWithDescriptorType(descriptorType as string, data as memoryblock) as NSAppleEventDescriptorMBS
- shared method descriptorWithDescriptorType(descriptorType as string, data as memoryblock, offset as UInt32, length as UInt32) as NSAppleEventDescriptorMBS
- shared method descriptorWithDouble(value as Double) as NSAppleEventDescriptorMBS
- shared method descriptorWithEnumCode(enumerator as string) as NSAppleEventDescriptorMBS
- shared method descriptorWithFileURL(fileURL as string) as NSAppleEventDescriptorMBS
- shared method descriptorWithFileURL(item as folderitem) as NSAppleEventDescriptorMBS
- shared method descriptorWithInt16(value as Int16) as NSAppleEventDescriptorMBS
- shared method descriptorWithInt32(value as Int32) as NSAppleEventDescriptorMBS
- shared method descriptorWithProcessIdentifier(PID as Integer) as NSAppleEventDescriptorMBS
- shared method descriptorWithSingle(value as single) as NSAppleEventDescriptorMBS
- shared method descriptorWithString(text as string) as NSAppleEventDescriptorMBS
- shared method descriptorWithTypeCode(typeCode as string) as NSAppleEventDescriptorMBS
- shared method descriptorWithUInt32(value as UInt32) as NSAppleEventDescriptorMBS
- method insertDescriptor(descriptor as NSAppleEventDescriptorMBS, index as Integer)
- method keywordForDescriptorAtIndex(index as Integer) as string
- shared method listDescriptor as NSAppleEventDescriptorMBS
- shared method nullDescriptor as NSAppleEventDescriptorMBS
- method paramDescriptorForKeyword(keyword as string) as NSAppleEventDescriptorMBS
- method print
- shared method recordDescriptor as NSAppleEventDescriptorMBS
- method removeDescriptorAtIndex(index as Integer)
- method removeDescriptorWithKeyword(keyword as string)
- method removeParamDescriptorWithKeyword(keyword as string)
- method send(options as Integer, timeoutInSeconds as Double, byref error as NSErrorMBS) as NSAppleEventDescriptorMBS
- method setAttributeDescriptor(descriptor as NSAppleEventDescriptorMBS, keyword as string)
- method setDescriptor(descriptor as NSAppleEventDescriptorMBS, keyword as string)
- method setParamDescriptor(descriptor as NSAppleEventDescriptorMBS, keyword as string)
- property aeDesc as Ptr
- property applicationURLValue as String
- property booleanValue as boolean
- property bundleIDValue as String
- property data as Memoryblock
- property dateTimeValue as DateTime
- property dateValue as date
- property description as string
- property descriptorType as string
- property doubleValue as Double
- property enumCodeValue as string
- property eventClass as string
- property eventID as string
- property fileURLValue as String
- property Handle as Integer
- property int16Value as Int16
- property int32Value as Int32
- property isRecordDescriptor as Boolean
- property numberOfItems as Integer
- property processIDValue as Integer
- property returnID as Int16
- property singleValue as single
- property stringValue as string
- property transactionID as Int32
- property typeCodeValue as string
- property UInt32Value as UInt32
- class NSAppleEventHandlerMBS
- method Constructor
- method Destructor
- property Handle as Integer
- event handleAppleEvent(theEvent as NSAppleEventDescriptorMBS, replyEvent as NSAppleEventDescriptorMBS)
- class NSAppleEventManagerMBS
- method appleEventForSuspensionID(id as NSAppleEventManagerSuspensionIDMBS) as NSAppleEventDescriptorMBS
- method Constructor
- method currentAppleEvent as NSAppleEventDescriptorMBS
- method currentReplyAppleEvent as NSAppleEventDescriptorMBS
- shared method NSAppleEventManagerWillProcessFirstEventNotification as string
- method removeEventHandlerForEventClass(eventClass as string, eventID as string)
- method replyAppleEventForSuspensionID(id as NSAppleEventManagerSuspensionIDMBS) as NSAppleEventDescriptorMBS
- method resumeWithSuspensionID(id as NSAppleEventManagerSuspensionIDMBS)
- method setCurrentAppleEventAndReplyEventWithSuspensionID(id as NSAppleEventManagerSuspensionIDMBS)
- method setEventHandler(handler as NSAppleEventHandlerMBS, eventClass as string, eventID as string)
- method suspendCurrentAppleEvent as NSAppleEventManagerSuspensionIDMBS
- property Handle as Integer
- class NSAppleEventManagerSuspensionIDMBS
- method Constructor
- property Handle as Integer
- class NSAppleScriptMBS
- method compile as boolean
- method compile(byref error as dictionary) as boolean
- method Constructor(file as folderitem, byref error as Dictionary)
- method Constructor(source as string)
- method Constructor(sourceLines() as string)
- method Constructor(URL as string, byref error as Dictionary)
- method copy as NSAppleScriptMBS
- shared method DeterminePermissionToAutomateTarget(target as NSAppleEventDescriptorMBS, theAEEventClass as string = "****", theAEEventID as String = "****", askUserIfNeeded as boolean) as Integer
- method execute as NSAppleEventDescriptorMBS
- method execute(byref error as dictionary) as NSAppleEventDescriptorMBS
- method executeAppleEvent(event as NSAppleEventDescriptorMBS, byref error as dictionary) as NSAppleEventDescriptorMBS
- method executeSubroutine(Name as String, parameters() as NSAppleEventDescriptorMBS, byref error as dictionary) as NSAppleEventDescriptorMBS
- shared method NSAppleScriptErrorAppName as string
- shared method NSAppleScriptErrorBriefMessage as string
- shared method NSAppleScriptErrorMessage as string
- shared method NSAppleScriptErrorNumber as string
- shared method NSAppleScriptErrorRange as string
- method properties as string()
- method setValueDescriptorForProperty(propertyName as string, value as NSAppleEventDescriptorMBS) as boolean
- method valueDescriptorForProperty(propertyName as string) as NSAppleEventDescriptorMBS
- property Handle as Integer
- property isCompiled as boolean
- property richTextSource as NSAttributedStringMBS
- property source as string
- class OSALanguageInstanceMBS
- method Constructor(language as OSALanguageMBS)
- shared method languageInstanceWithLanguage(language as OSALanguageMBS) as OSALanguageInstanceMBS
- method richTextFromDescriptor(descriptor as NSAppleEventDescriptorMBS) as NSAttributedStringMBS
- property componentInstance as Integer
- property defaultTarget as NSAppleEventDescriptorMBS
- property Handle as Integer
- property language as OSALanguageMBS
- class OSALanguageMBS
- shared method availableLanguages as OSALanguageMBS()
- method Constructor(ComponentHandle as Integer)
- shared method defaultLanguage as OSALanguageMBS
- shared method languageForName(name as String) as OSALanguageMBS
- shared method languageForScriptDataDescriptor(Descriptor as NSAppleEventDescriptorMBS) as OSALanguageMBS
- shared method setDefaultLanguage(Language as OSALanguageMBS)
- property componentInstance as Integer
- property Features as Integer
- property Handle as Integer
- property Info as String
- property isThreadSafe as Boolean
- property Manufacturer as String
- property Name as String
- property sharedLanguageInstance as OSALanguageInstanceMBS
- property SubType as String
- property Type as String
- property version as String
- class OSAScriptControllerMBS
- method compileScript
- method Constructor
- method recordScript
- method runScript
- method stopScript
- property Handle as Integer
- property isCompiling as Boolean
- property language as OSALanguageMBS
- property resultView as NSTextViewMBS
- property script as OSAScriptMBS
- property scriptState as Integer
- property scriptView as OSAScriptViewMBS
- class OSAScriptMBS
- method compile(byref error as dictionary) as boolean
- method compiledDataForType(type as string, options as Integer, byref error as dictionary) as MemoryBlock
- method Constructor(Data as MemoryBlock, byref error as dictionary)
- method Constructor(Data as MemoryBlock, url as string, storageOptions as Integer, byref error as NSErrorMBS)
- method Constructor(Data as NSAppleEventDescriptorMBS, URL as String, LanguageInstance as OSALanguageInstanceMBS, storageOptions as Integer, byref error as NSErrorMBS)
- method Constructor(File as FolderItem, byref error as dictionary)
- method Constructor(File as FolderItem, language as OSALanguageMBS, byref error as dictionary)
- method Constructor(File as FolderItem, languageInstance as OSALanguageInstanceMBS, storageOptions as Integer, byref error as NSErrorMBS)
- method Constructor(Source as String)
- method Constructor(Source as String, Language as OSALanguageMBS)
- method Constructor(Source as String, URL as String, LanguageInstance as OSALanguageInstanceMBS, storageOptions as Integer)
- method Constructor(URL as String, byref error as dictionary)
- method Constructor(URL as String, language as OSALanguageMBS, byref error as dictionary)
- method Constructor(URL as String, languageInstance as OSALanguageInstanceMBS, storageOptions as Integer, byref error as NSErrorMBS)
- method copy as OSAScriptMBS
- method execute(byref error as dictionary) as NSAppleEventDescriptorMBS
- method executeAndReturnDisplayValue(byref displayValue as NSAttributedStringMBS, byref error as dictionary) as NSAppleEventDescriptorMBS
- method executeAppleEvent(event as NSAppleEventDescriptorMBS, byref error as dictionary) as NSAppleEventDescriptorMBS
- method executeHandlerWithName(Name as String, arguments() as String, byref error as dictionary) as NSAppleEventDescriptorMBS
- shared method OSAScriptErrorAppAddressKey as String
- shared method OSAScriptErrorAppNameKey as String
- shared method OSAScriptErrorBriefMessageKey as String
- shared method OSAScriptErrorExpectedTypeKey as String
- shared method OSAScriptErrorMessageKey as String
- shared method OSAScriptErrorNumberKey as String
- shared method OSAScriptErrorOffendingObjectKey as String
- shared method OSAScriptErrorPartialResultKey as String
- shared method OSAScriptErrorRangeKey as String
- shared method OSAStorageApplicationBundleType as String
- shared method OSAStorageApplicationType as String
- shared method OSAStorageScriptBundleType as String
- shared method OSAStorageScriptType as String
- shared method OSAStorageTextType as String
- method richTextFromDescriptor(descriptor as NSAppleEventDescriptorMBS) as NSAttributedStringMBS
- shared method scriptDataDescriptorWithContentsOfFile(file as FolderItem) as NSAppleEventDescriptorMBS
- shared method scriptDataDescriptorWithContentsOfURL(URL as String) as NSAppleEventDescriptorMBS
- method writeToFile(File as FolderItem, type as String, byref error as dictionary) as boolean
- method writeToFile(File as FolderItem, type as String, storageOptions as Integer, byref error as dictionary) as boolean
- method writeToURL(URL as String, type as String, byref error as dictionary) as boolean
- method writeToURL(URL as String, type as String, storageOptions as Integer, byref error as dictionary) as boolean
- property Handle as Integer
- property isCompiled as Boolean
- property language as OSALanguageMBS
- property languageInstance as OSALanguageInstanceMBS
- property richTextSource as NSAttributedStringMBS
- property Source as String
- property URL as String
- class OSAScriptViewMBS
- method Constructor
- method Constructor(Handle as Integer)
- method Constructor(left as Double, top as Double, width as Double, height as Double)
- property indentsWrappedLines as Boolean
- property indentWidth as Integer
- property source as String
- property tabWidth as Integer
- property usesScriptAssistant as Boolean
- property usesTabs as Boolean
- property wrapsLines as Boolean
- class AppleScriptErrorMBS
- Controls
- control DesktopOSAScriptControlMBS
- property AcceptTabs as Boolean
- property Scrollview as Variant
- property View as OSAScriptViewMBS
- event BoundsChanged
- event Closing
- event ConstructContextualMenu(base as DesktopMenuItem, x as Integer, y as Integer) As Boolean
- event ContextualMenuItemSelected(selectedItem As DesktopMenuItem) As Boolean
- event didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- event FocusLost
- event FocusReceived
- event FrameChanged
- event MenuBarSelected
- event MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
- event MouseDrag(x as Integer, y as Integer)
- event MouseUp(x as Integer, y as Integer)
- event Opening
- event ScaleFactorChanged(NewFactor as Double)
- event shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string) as boolean
- event textDidBeginEditing
- event textDidChange
- event textDidEndEditing
- event textShouldBeginEditing as boolean
- event textShouldEndEditing as boolean
- event textViewDidChangeSelection
- event willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- control OSAScriptControlMBS
- property AcceptTabs as Boolean
- property Scrollview as Variant
- property View as OSAScriptViewMBS
- event BoundsChanged
- event Close
- event Closing
- event ConstructContextualMenu(base as MenuItem, x as Integer, y as Integer) as Boolean
- event ContextualMenuAction(hitItem as MenuItem) as Boolean
- event didCloseContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- event EnableMenuItems
- event FocusLost
- event FocusReceived
- event FrameChanged
- event GotFocus
- event LostFocus
- event MenuBarSelected
- event MouseDown(x as Integer, y as Integer, Modifiers as Integer) As Boolean
- event MouseDrag(x as Integer, y as Integer)
- event MouseUp(x as Integer, y as Integer)
- event Open
- event Opening
- event ScaleFactorChanged(NewFactor as Double)
- event shouldChangeTextInRange(affectedCharRange as NSRangeMBS, replacementString as string) as boolean
- event textDidBeginEditing
- event textDidChange
- event textDidEndEditing
- event textShouldBeginEditing as boolean
- event textShouldEndEditing as boolean
- event textViewDidChangeSelection
- event willShowContextualMenu(menu as NSMenuMBS, NSEvent as NSEventMBS)
- control DesktopOSAScriptControlMBS
Release notes
- Version 19.0
- Removed descriptorWithFSRef and FSRefValue from NSAppleEventDescriptorMBS in favor of FileURL methods.
- Version 18.4
- Added NSAppleScriptMBS.DeterminePermissionToAutomateTarget function.
- Version 18.0
- Removed deprecation note for AppleScriptMBS.
- Version 17.5
- Added AppleScriptMBS.AllowInteraction property.
The items on this page are in the following plugins: MBS MacClassic Plugin, MBS MacCocoa Plugin, MBS MacExtras Plugin.