Platforms to show: All Mac Windows Linux Cross-Platform

/MacClassic/AppleScript/Test property and result


Required plugins for this example: MBS MacClassic Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacClassic/AppleScript/Test property and result

This example is the version from Wed, 27th Oct 2020.

Project "Test property and result.xojo_binary_project"
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu7 = ""
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
MenuItem UntitledMenu6 = ""
MenuItem UntitledMenu5 = ""
MenuItem UntitledMenu4 = ""
End MenuBar
Class App Inherits Application
EventHandler Sub Open() dim s as String dim a as AppleScriptMBS dim i,c,cc as integer dim z,t as String s=s+"property hello : ""Hallo Leute"""+chr(13) s=s+"property just : ""Just a test"""+chr(13) s=s+"display dialog hello"+chr(13) s=s+"return just"+chr(13) MsgBox "The script:"+chr(13)+s a=new AppleScriptMBS a.Compile s c=a.CountScriptProperties cc=c-1 for i=0 to cc z=a.ScriptProperty(i) if z<>"" then if i=0 then t=z elseif i=cc then t=t+" and "+z else t=t+", "+z end if end if next MsgBox str(c)+" properties in the script: "+t t=a.ScriptProperty(0) z=a.ScriptPropertyValue(t) MsgBox "Value of the property named "+t+" is: "+z a.ScriptPropertyValue(t)="Hello World!" z=a.ScriptPropertyValue(t) MsgBox "The new value of the property named "+t+" is: "+z a.Execute MsgBox "The result is: "+a.Result quit End EventHandler
End Class
ExternalFile info
End ExternalFile
End Project

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


The biggest plugin in space...