Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacClassic/AppleScript/AppleScript with Periodic Event
Function:
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/AppleScript with Periodic Event
This example is the version from Sun, 17th Mar 2012.
Project "AppleScript with Periodic Event.rbp"
MenuBar Menu
MenuItem UntitledMenu3 = ""
MenuItem UntitledMenu2 = "File"
MenuItem FileQuit = "Quit"
MenuItem UntitledMenu0 = "Edit"
MenuItem EditUndo = "Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cut"
MenuItem EditCopy = "Copy"
MenuItem EditPaste = "Paste"
MenuItem EditClear = "Clear"
End MenuBar
Class App Inherits Application
EventHandler Sub Open() dim a as AppleScriptMBS dim b as AppleScriptMBS a=new MyAppleScriptMBS // compile this source code, runs 30 seconds a.Compile "set x to 0"+EndOfLine+"repeat until x=10000000"+EndOfLine+"set x to x + 1"+EndOfLine+"end repeat" b=new MyAppleScriptMBS // now we copy the binary code to another object b.Binary=a.Binary // and run it b.Execute // -1753 if you press control to cancel // 0 if you let it run MsgBox str(b.Lasterror) // now decompile MsgBox b.Source Quit End EventHandler
End Class
Class MyAppleScriptMBS Inherits AppleScriptMBS
EventHandler Function Periodic() As integer System.DebugLog "Periodic event" if Keyboard.AsyncControlKey then Return 1 else Return 0 end if End EventHandler
End Class
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Chart Plugins