Xojo Conferences
MBSSep2018MunichDE
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

AppleScriptMBS.AllowInteraction as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 17.5 Yes No No Yes, macOS only No
Function: Whether to allow user interaction.
Notes:
Default is false to disallow.
You can set to true to allow GUI.
(Read and Write property)

Feedback, Comments & Corrections

AppleScriptMBS.CanUnicodeText as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 3.1 Yes No No Yes, macOS only No
Function: True if AppleScript can handle Unicode text.
Example:
dim a as new AppleScriptMBS

MsgBox str(a.CanUnicodeText)
Notes:
This property is set to true if AppleScript 1.3 or newer is installed.
(AppleScript 1.3 was introduced around the time of Mac OS 8.6)
(Read only property)

Feedback, Comments & Corrections

AppleScriptMBS.Handle as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 3.1 Yes No No Yes, macOS only No
Function: The handle of the used AppleScript component.
Example:
dim a as new AppleScriptMBS
MsgBox str(a.Handle)
Notes: (Read and Write property)

Feedback, Comments & Corrections

AppleScriptMBS.Lasterror as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 3.1 Yes No No Yes, macOS only No
Function: The last error code.
Example:
dim a as new AppleScriptMBS
MsgBox str(a.Lasterror)
Notes:
Value is 0 for successfull and -1 if function is not available.
All other values are normal Mac OS error codes.

Some common error codes for this class:
OSASystemError -1750
OSAInvalidID -1751
OSABadStorageType -1752
OSAScriptError -1753
OSABadSelector -1754
OSASourceNotAvailable -1756
OSANoSuchDialect -1757
OSADataFormatObsolete -1758
OSADataFormatTooNew -1759
OSACorruptData -1702
OSARecordingIsAlreadyOn -1732
OSAComponentMismatch -1761Parameters are from 2 different components
OSACantOpenComponent -1762Can't connect to scripting system with that ID
OSACantCoerce -1700Signaled when a value can't be coerced to the desired type.
OSACantAccess -1728Signaled when an object is not found in a container
OSACantAssign -10006Signaled when an object cannot be set in a container.
OSAGeneralError -2700Signaled by user scripts or applications when no actual error code is to be returned.
OSADivideByZero -2701Signaled when there is an attempt to divide by zero
OSANumericOverflow -2702Signaled when integer or real value is too large to be represented
OSACantLaunch -2703Signaled when application can't be launched or when it is remote and program linking is not enabled
OSAAppNotHighLevelEventAware-2704Signaled when an application can't respond to AppleEvents
OSACorruptTerminology -2705Signaled when an application's terminology resource is not readable
OSAStackOverflow -2706Signaled when the runtime stack overflows
OSAInternalTableOverflow -2707Signaled when a runtime internal data structure overflows
OSADataBlockTooLarge -2708Signaled when an intrinsic limitation is exceeded for the size of a value or data structure.
OSACantGetTerminology -2709
OSACantCreate -2710
(Read and Write property)

Feedback, Comments & Corrections

AppleScriptMBS.ResultID as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 9.6 Yes No No Yes, macOS only No
Function: The internal result ID for the current script.
Example:
dim a as new AppleScriptMBS

a.Compile "return ""hello"""
a.Execute

MsgBox str(a.ResultID)
Notes:
May be useful for Toolbox calls.
(Read and Write property)

Feedback, Comments & Corrections

AppleScriptMBS.ScriptID as Integer
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 9.6 Yes No No Yes, macOS only No
Function: The internal script ID for the current script.
Example:
dim a as new AppleScriptMBS

a.compile "beep"

MsgBox str(a.ScriptID)
Notes:
May be useful for Toolbox calls.
(Read and Write property)

Feedback, Comments & Corrections

AppleScriptMBS.UnicodeText as Boolean
Type Topic Plugin Version macOS Windows Linux Console & Web iOS
property Apple Script MBS MacClassic Plugin 3.1 Yes No No Yes, macOS only No
Function: True if you want to use unicode.
Example:
dim a as AppleScriptMBS

a=new AppleScriptMBS
a.UnicodeText=true

dim s as string="tell application ""iTunes"""+chr(13)+"set rating of (track ""Flintstones áé"") to 40"+chr(13)+"end tell"
a.compile ConvertEncoding(s,Encodings.UTF16)
MsgBox str(a.Lasterror)

a.Execute
MsgBox str(a.Lasterror)

MsgBox a.Result
Notes:
If this property is true, all functions try to get strings as 16 bit Unicode strings.
Strings you pass which are in 16 bit Unicode are passed in Unicode to AppleScript.
You may get trouble if the strings you give this class are not in the system encoding (MacRoman?) or 16 bit Unicode. UTF8 will not work!
(Read and Write property)

Feedback, Comments & Corrections

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





Links
MBS Xojo PDF Plugins