Platforms to show: All Mac Windows Linux Cross-Platform

/MacClassic/Summary with AppleScript


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/Summary with AppleScript

This example is the version from Sun, 17th Mar 2012.

Project "Summary with AppleScript.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control EditField1 Inherits TextArea
ControlInstance EditField1 Inherits TextArea
End Control
Control EditField2 Inherits TextArea
ControlInstance EditField2 Inherits TextArea
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() run End EventHandler
End Control
Control Slider1 Inherits Slider
ControlInstance Slider1 Inherits Slider
EventHandler Sub ValueChanged() run End EventHandler
End Control
EventHandler Sub Open() run End EventHandler
Protected Sub run() Dim a as new AppleScriptMBS Dim lines(-1)as string lines.append "property InText : """"" lines.append "property OutText : """"" Lines.append "set OutText to summarize InText in "+str(Slider1.Value) a.compile join(lines, EndOfLine.Macintosh) dim t as string = EditField1.text t = ReplaceLineEndings(t, EndOfLine.Macintosh) t = ConvertEncoding(t, encodings.MacRoman) a.ScriptPropertyValue("InText")=t a.Execute EditField2.text = a.ScriptPropertyValue("OutText") End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

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


The biggest plugin in space...