ACTION "Go to previous page" BEHAVIOR "Goes to the previous page. " CATEGORY Navigation HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick { send previous } ACTION "Go to next page" BEHAVIOR "Goes to the next page. " CATEGORY Navigation HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick { send next } ACTION "Play a Wave file" BEHAVIOR "Plays a wave file using 'WaveFile' ($$WaveFile.) and the 'playSound' function " CATEGORIES Multimedia,Audio ARG waveFile FILE "Wave Files(*.WAV),*.wav" IS "Chord.Wav" help "Play a wave file." { get playSound("$$WaveFile") } ACTION "Go to next page of background" BEHAVIOR "Goes to the next page of the current background. " CATEGORY Navigation HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick { go to the next page of this background } ACTION "Go to previous page of background" BEHAVIOR "Goes to the previous page of the current background. " CATEGORY Navigation HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick { go to the previous page of this background } ACTION "Go to next background" BEHAVIOR "Goes to the first page of the background following the current background. " CATEGORY Navigation HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick { set sysLockScreen to TRUE go to the last page of this background send next set sysLockScreen to FALSE } ACTION "Go to previous background" BEHAVIOR "Goes to the first page of the background preceeding the current background. " CATEGORY Navigation HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick { set sysLockScreen to TRUE go to page 1 of this background send previous go to page 1 of this background set sysLockScreen to FALSE } ACTION "Use basic transition effects" BEHAVIOR "$$Speed transition with $$Effect to $$pageColor. " CATEGORY Effects HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick, leavePage, leaveBackground ARG Effect ONEOF "blinds,dissolve,drip,fade,iris,puzzle,tear" IS "fade" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG pageColor ONEOF "black,blue,cyan,green,gray,magenta,red,white,yellow,lightGray,next page,previous page,first page,last page" IS "black" { transition "$$effect $$speed" to $$pageColor forward } ACTION "Use wipe transition effects" BEHAVIOR "$$Speed transition $$dest with $$Effect to $$pageColor. " CATEGORY Effects HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick, leavePage, leaveBackground ARG Effect ONEOF "wipe,push" IS "wipe" ARG dest ONEOF "left,right,top,bottom" IS "left" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG pageColor ONEOF "black,blue,cyan,green,gray,magenta,red,white,yellow,lightGray,next page,previous page,first page,last page" IS "black" { transition "$$effect $$dest $$speed" to $$pageColor forward } ACTION "Use page-turning transition effects" BEHAVIOR "$$Speed transition $$dest with $$Effect to $$pageColor. " CATEGORY Effects HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick, leavePage, leaveBackground ARG Effect ONEOF "turnPage,rain" IS "turnPage" ARG dest ONEOF "left,right" IS "left" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG pageColor ONEOF "black,blue,cyan,green,gray,magenta,red,white,yellow,lightGray,next page,previous page,first page,last page" IS "black" { transition "$$effect $$dest $$speed" to $$pageColor forward } ACTION "Use zoom transition effects" BEHAVIOR "$$Speed transition $$dest with $$Effect $$Direction to $$pageColor. " CATEGORY Effects HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick, leavePage, leaveBackground ARG Effect ONEOF "zoom,slide" IS "zoom" ARG Direction ONEOF "in,out" IS "out" ARG dest ONEOF "left,right,top,bottom" IS "left" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG pageColor ONEOF "black,blue,cyan,green,gray,magenta,red,white,yellow,lightGray,next page,previous page,first page,last page" IS "black" { transition "$$effect $$direction $$dest $$speed" to $$pageColor forward } ACTION "Use spiral transition effects" BEHAVIOR "$$Speed transition with spiral $$Direction to $$pageColor. " CATEGORY Effects HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick, leavePage, leaveBackground ARG Direction ONEOF "in,out" IS "out" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG pageColor ONEOF "black,blue,cyan,green,gray,magenta,red,white,yellow,lightGray,next page,previous page,first page,last page" IS "black" { transition "spiral $$direction $$speed" to $$pageColor forward } ACTION "Use split transition effects" BEHAVIOR "$$Speed transition $$dest with split $$Direction to $$pageColor. " CATEGORY Effects HANDLERS buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick, leavePage, leaveBackground ARG Direction ONEOF "in,out" IS "out" ARG dest ONEOF "horizontal,vertical" IS "vertical" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG pageColor ONEOF "black,blue,cyan,green,gray,magenta,red,white,yellow,lightGray,next page,previous page,first page,last page" IS "black" { transition "split $$direction $$dest $$speed" to $$pageColor forward } ACTION "Go to page of hotword" BEHAVIOR "Goes to the page corresponding to the text of the hotword. " CATEGORY Navigation HANDLERS enterHotword, buttonClick, buttonUp, buttonDown, buttonDoubleClick, rightButtonDown, rightButtonUp, rightButtonDoubleClick ARG noPage IS "That topic does not exist yet." help "Text that explains why hotword page does not exist." { if object of target is "hotword" -- build pageName get "page" && text of target -- check to see if page exists if isObject(it) -- go to page if the page exists go it -- else, display message that page does not exist else request "$$noPage" end if end if } SCRIPT "Navigate using buttonStillDown" BEHAVIOR "Implements multiple page navigation when the mouse button is held down. " CATEGORY Navigation { to handle buttonDown send next end buttonDown to handle buttonStillDown send buttondown end buttonStillDown } ACTION "Play clip in a stage object" BEHAVIOR "Plays a video or animation clip in a stage object " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" { mmPlay $$ClipRef in $$StageObj autoclose } ACTION "Play clip in a stage and wait" BEHAVIOR "Plays a video or animation clip in a stage object and waits till the clip is finished " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" { mmPlay $$ClipRef in $$StageObj wait get flushMessageQueue() } ACTION "Play clip in stage with pre transition" BEHAVIOR "Plays a video or animation clip in a stage object with a pre-effect " CATEGORIES Clips,Effects ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" ARG Effect ONEOF "blinds,dissolve,drip,fade,iris,push,puzzle,rain,slide,spiral,split,tear,turnPage,wipe,zoom" IS "fade" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG Dest ONEOF "left,right,top,bottom,horizontal,vertical,lowerLeft,upperLeft,lowerRight,upperRight" IS "left" ARG Dir ONEOF "in,out" IS "out" { -- if you select something unreasonable, ToolBook defaults to something reasonable preEffect of $$StageObj = "$$Effect $$Dir $$Dest $$Speed" mmPlay $$ClipRef in $$StageObj autoclose } ACTION "Play clip in stage with post transition" BEHAVIOR "Plays a video or animation clip in a stage object with a post-effect " CATEGORIES Clips,Effects ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" ARG Effect ONEOF "blinds,dissolve,drip,fade,iris,push,puzzle,rain,slide,spiral,split,tear,turnPage,wipe,zoom" IS "fade" ARG Speed ONEOF "Normal,Fast,Slow" IS "Normal" ARG Dest ONEOF "left,right,top,bottom,horizontal,vertical,lowerLeft,upperLeft,lowerRight,upperRight" IS "left" ARG Dir ONEOF "in,out" IS "out" { -- if you select something unreasonable, ToolBook defaults to something reasonable postEffect of $$StageObj = "$$Effect $$Dir $$Dest $$Speed" mmPlay $$ClipRef in $$StageObj autoclose } ACTION "Play clip in stage with pre- and post-transitions" BEHAVIOR "Plays a video or animation clip in a stage object with a pre-effect " CATEGORIES Clips,Effects ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" ARG PreEffect ONEOF "blinds,dissolve,drip,fade,iris,push,puzzle,rain,slide,spiral,split,tear,turnPage,wipe,zoom" IS "fade" ARG PreSpeed ONEOF "Normal,Fast,Slow" IS "Normal" ARG PreDest ONEOF "left,right,top,bottom,horizontal,vertical,lowerLeft,upperLeft,lowerRight,upperRight" IS "left" ARG PreDir ONEOF "in,out" IS "out" ARG PostEffect ONEOF "blinds,dissolve,drip,fade,iris,push,puzzle,rain,slide,spiral,split,tear,turnPage,wipe,zoom" IS "fade" ARG PostSpeed ONEOF "Normal,Fast,Slow" IS "Normal" ARG PostDest ONEOF "left,right,top,bottom,horizontal,vertical,lowerLeft,upperLeft,lowerRight,upperRight" IS "left" ARG PostDir ONEOF "in,out" IS "out" { -- if you select something unreasonable, ToolBook defaults to something reasonable preEffect of $$StageObj = "$$PreEffect $$PreDir $$PreDest $$PreSpeed" postEffect of $$StageObj = "$$PostEffect $$PostDir $$PostDest $$PostSpeed" mmPlay $$ClipRef in $$StageObj autoclose } ACTION "Play clip and hold" BEHAVIOR "Plays a video or animation clip in a stage object and holds the last frame " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" { mmOpen $$ClipRef mmPlay $$ClipRef in $$StageObj hold } ACTION "Play clip" BEHAVIOR "Plays a visual clip in the driver's window, or plays an audio clip " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." { mmPlay $$ClipRef autoclose } ACTION "Cue the first frame of an animation or video" BEHAVIOR "Preload and cue the first frame of an animation or video on an enter message " CATEGORY Clips HANDLERS enterPage,enterBackground,enterBook,enterButton,mouseEnter,enterWindow,buttonClick ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." { if mmIsOpen of $$ClipRef -- not necessary, but nice mmClose $$ClipRef wait end if mmOpen $$ClipRef wait mmCue $$ClipRef wait forward } ACTION "Cue and show the first frame" BEHAVIOR "Cue and show the first frame of an animation or video in a stage object " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for showing" { if mmIsOpen of $$ClipRef -- not necessary, but nice mmClose $$ClipRef wait end if mmOpen $$ClipRef wait -- strictly speaking, not necessary, but to be on the safe side... mmCue $$ClipRef wait mmShow $$ClipRef in $$StageObj } ACTION "Show a frame" BEHAVIOR "Show an arbitrary frame in a video or animation " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." ARG FrameRef IS "50" help "Any integer value from 0 up to the frame count of the clip." ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for showing" { -- script is as long as it is because of all the error -- handling and "nice"ness if mmIsOpen of $$ClipRef -- not necessary, but nice mmClose $$ClipRef wait end if mmOpen $$ClipRef wait oldMTF = mmTimeFormat of $$ClipRef mmTimeFormat of $$ClipRef = "frames" frameVar = $$FrameRef -- if frameVar is inappropriate for mmSeek, ToolBook will -- default to something reasonable. maxFrame = mmLength of $$ClipRef conditions when frameVar < 0 frameVar = 0 when frameVar > maxFrame frameVar = maxFrame end conditions mmSeek $$ClipRef to frameVar wait mmShow $$ClipRef in $$StageObj wait mmTimeFormat of $$ClipRef = oldMTF } ACTION "Hide a clip" BEHAVIOR "Hide a video or animation " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." { mmHide $$ClipRef } ACTION "Close a clip" BEHAVIOR "Closes any clip " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be played." { mmClose $$ClipRef } ACTION "Close all clips" BEHAVIOR "Closes all open clips, optionally of a certain type " CATEGORY Clips ARG mediaType ONEOF "all,animation,bitmap,cdAudio,digitalVideo,overlay,sequencer,vcr,videodisc,waveAudio" IS "all" help "Select a device type to close." { mmClose $$mediaType } ACTION "Stop a clip" BEHAVIOR "Stops any clip " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be stopped." { mmStop $$ClipRef } ACTION "Stop all clips" BEHAVIOR "Stops all open clips, optionally of a certain type " CATEGORY Clips ARG mediaType ONEOF "all,animation,bitmap,cdAudio,digitalVideo,overlay,sequencer,vcr,videodisc,waveAudio" IS "all" help "Select a device type to stop." { mmStop $$mediaType } ACTION "Pause a clip" BEHAVIOR "Pauses any clip " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be paused." { mmPause $$ClipRef } ACTION "Rewind a clip" BEHAVIOR "Rewinds any clip " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be rewound." { mmRewind $$ClipRef } ACTION "Pause all clips" BEHAVIOR "Pauses all open clips, optionally of a certain type " CATEGORY Clips ARG mediaType ONEOF "all,animation,bitmap,cdAudio,digitalVideo,overlay,sequencer,vcr,videodisc,waveAudio" IS "all" help "Select a device type to pause." { mmPause $$mediaType } ACTION "Restart a clip with 'release'" BEHAVIOR "For restarting a clip that will be released from the system when it finishes playing " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be restarted." { mmPlay $$ClipRef release } ACTION "Restart a clip with 'hold'" BEHAVIOR "For restarting a clip that will be held when it finishes playing " CATEGORY Clips ARG ClipRef CLIP IS "clip id 100" help "Select the clip to be restarted." { mmPlay $$ClipRef hold } ACTION "Bring up the clips db" BEHAVIOR "A simple script to bring up the clip dialog box " CATEGORY Clips { -- "to system" bypasses any custom handlers and sends the -- message straight to ToolBook send clips to system } ACTION "Bring up the resources db" BEHAVIOR "A simple script to bring up the resource manager dialog box " CATEGORY Resources { -- "to system" bypasses any custom handlers and sends the -- message straight to ToolBook send resources to system } ACTION "Get clip ref for a stage" BEHAVIOR "Gets the reference for a clip or bitmap currently displayed in a stage " CATEGORY Clips ARG StageObj OBJTYP "Stage" IS "myStage" help "Choose the stage object for playback" { get mediaOpen of $$stageObj request it } ACTION "Find out if a clip is open" BEHAVIOR "Determines whether a clip or bitmap is currently open " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { get mmIsOpen of $$clipRef request it } ACTION "Find the length of a clip" BEHAVIOR "Gets the length in time for a clip " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { clipRef = $$clipRef -- cache the reference mTF = mmTimeFormat of clipRef mmTimeFormat of clipRef = "MSms" -- minutes:seconds:milliseconds get mmLength of clipRef request clipRef && "is" && char 1 of it && "minutes," \ && chars 3 to 4 of it && "seconds, and" \ && chars 6 to 8 of it && "milliseconds long." mmTimeFormat of clipRef = mTF } ACTION "Find out if clip is playable" BEHAVIOR "Determines whether the clip is playable on the current system " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { clipRef = $$clipRef get mmPlayable of clipRef if it is TRUE request clipRef && "is playable on this system." else request clipRef && "is not playable on this system." end if } ACTION "Find a clip's source" BEHAVIOR "Determines the source of a clip, either a file or a device " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { clipRef = $$clipRef get mmSource of clipRef request "The source for" && clipRef && "is" && it } ACTION "Get the status of a clip" BEHAVIOR "Get the current status of a clip " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { get mmStatus of $$clipRef request it } ACTION "Get the time format of a clip" BEHAVIOR "Get the current time format of a clip " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { get mmTimeFormat of $$clipRef request it } ACTION "Get the size of a clip" BEHAVIOR "Get the default size of a visual clip " CATEGORY Clips ARG clipRef CLIP IS "clip id 100" help "Choose the clip" { clear sysError get mmVisualSize of $$clipRef if sysError is NULL request "The default width is" && item 1 of it \ & ", and the deafult height is" && item 2 of it else request "This property is only valid for visual media" end if } ACTION "Find all open media" BEHAVIOR "Reports a list of media that are open at any given time " CATEGORY Multimedia { request sysOpenMedia } ACTION "Find all supported media" BEHAVIOR "Reports a list of media that are supported at any given time " CATEGORY Multimedia { request sysSupportedMedia } ACTION "Find capability of the timer device" BEHAVIOR "Returns information about the capability of the timer " CATEGORY Timers { get timerCapability() if it <> NULL request "Minimum resolution of this timer device is" && item 1 of it \ && "and the maximum period for it is" && item 2 of it end if } ACTION "Start a path animation - basic" BEHAVIOR "Starts an already defined path animation. The script goes in the animated object. " CATEGORY PathAnimation { send playAnimation } ACTION "Start a path animation - complete" BEHAVIOR "Starts an already defined path animation. The script goes in the animated object. " CATEGORY PathAnimation ARG animation ONEOF "1,2,3,4,5,6" IS "1" help "Choose the path animation to play that you have already defined." ARG notifyObj IS "self" help "Determine who will be notified when the path animation terminates. Leave blank for no notification." ARG wait ONEOF "TRUE,FALSE" IS "FALSE" help "Set wait to true to prevent the user from any action while the path animation is going on." { send playAnimation $$animation, $$notifyObj, $$wait } SCRIPT "Receive path animation notification" BEHAVIOR "Skeleton script for the path animation notification message " CATEGORY PathAnimation { to handle doneAnimatingNotify status,target request "The status of the path animation is" && status & "." & CRLF &\ "The target of the path animation was" && target & "." end } SCRIPT "Full Screen Application" BEHAVIOR "Runs a book full screen " CATEGORY Viewers { to handle enterApplication send reader captionBar of mainWindow = none borderStyle of mainWindow = none state of mainWindow = maximized forward end to handle reader hide menubar captionBar of mainWindow = none borderstyle of mainWindow = none state of mainWindow = maximized forward end to handle author show menubar state of mainWindow = normal captionBar of mainWindow = normal borderstyle of mainWindow = thickframe send sizeToPage forward end } ACTION "Exit book" BEHAVIOR "Exits the current book " CATEGORY Navigation HANDLERS buttonDoubleClick, buttonDown, buttonUp, buttonClick { send exit } SCRIPT "Auto disable NEXT button" BEHAVIOR "Automatically disables the button when the last page of the background is reached " CATEGORY Navigation { notifyBefore enterpage enabled of self = (this page <> last page of this background) end } SCRIPT "Auto disable PREVIOUS button" BEHAVIOR "Automatically disables the button when page is first page of the background. " CATEGORY Navigation { notifyBefore enterpage enabled of self = (this page <> first page of this background) end } SCRIPT "Auto disable parent button" BEHAVIOR "Automatically disables button if name of page is same as button. " CATEGORY Navigation { notifyBefore enterPage enabled of self = (name of this page <> name of self) end } SCRIPT "Smart scroll bars" BEHAVIOR "Scroll bars will apper and disappear based on necessity. " CATEGORY Fields { notifyBefore enterpage if textoverflow of self > 0 or textunderflow of self > 0 if borderstyle of self <> "scrolling" borderstyle of self = "scrolling" end else if borderstyle of self <> "rectangle" borderstyle of self = "rectangle" end end end } ACTION "Show Internet Web Page (with prompt for URL)" BEHAVIOR "Shows a URL if an Internet browser is available. " CATEGORIES Navigation, Internet HANDLERS rightButtonUp, rightButtonDown, buttonDown, buttonUp, buttonClick { url = URL of self if url = NULL ask "What URL should be displayed" with "http://www.asymetrix.com" url = it URL of self = it end if url <> NULL oldCursor = syscursor syscursor = 4 getRemote QUOTE&url"E application "NETSCAPE" if "no server" is in sysError exe = internetBrowser of self if exe = NULL linkDll "shell.dll" WORD FindExecutable (STRING,STRING,POINTER) end linkDll "tb50win.dll" POINTER getMemBlock (DWORD) WORD freeMemBlock (POINTER) end lpBuffer = getMemBlock(256) if lpBuffer <> NULL status = FindExecutable("blank.htm",sysToolBookDirectory,lpBuffer) if status <= 32 request "No browser could be located." & CRLF & CRLF & \ "If an internet browser is available on your system, please associate the" && \ QUOTE &"*.htm" & QUOTE && "file extension with your browser." else exe = pointerString(0,lpBuffer) get freeMemBlock(lpBuffer) internetBrowser of self = exe run (exe&&URL) end end else run (exe&&URL) end end syscursor = oldCursor end } ACTION "Show Internet Web Page (with hard-coded URL)" BEHAVIOR "Shows a URL if an Internet browser is available. " CATEGORIES Navigation, Internet HANDLERS rightButtonUp, rightButtonDown, buttonDown, buttonUp, buttonClick { url = URL of self if url = NULL ask "What URL should be displayed" with "http://www.asymetrix.com" url = it URL of self = it end if url <> NULL oldCursor = syscursor syscursor = 4 getRemote QUOTE&url"E application "NETSCAPE" if "no server" is in sysError exe = internetBrowser of self if exe = NULL linkDll "shell.dll" WORD FindExecutable (STRING,STRING,POINTER) end linkDll "tb50win.dll" POINTER getMemBlock (DWORD) WORD freeMemBlock (POINTER) end lpBuffer = getMemBlock(256) if lpBuffer <> NULL status = FindExecutable("blank.htm",sysToolBookDirectory,lpBuffer) if status <= 32 request "No browser could be located." & CRLF & CRLF & \ "If an WWW browser is available on your system, please register the" && \ QUOTE &"*.htm" & QUOTE && "file extension with your browser." else exe = pointerString(0,lpBuffer) get freeMemBlock(lpBuffer) internetBrowser of self = exe run (exe&&URL) end end else run (exe&&URL) end end syscursor = oldCursor end }