// COMPILE_OPTS|D:\Users\d692908\Documents\Macro Scheduler 14\website.exe||CONSOLE=0|INCLUDES=1||RUNTIMES=1|BMPS=1 Let>FileSaved=False Dialog>MainMenu object MainMenu: TForm Left = 3533 Top = 152 HelpContext = 5000 BorderIcons = [biSystemMenu, biMaximize] Caption = 'Web-Preview' ClientHeight = 337 ClientWidth = 680 Color = clBtnFace Font.Charset = DEFAULT_CHARSET Font.Color = clWindowText Font.Height = -11 Font.Name = 'MS Sans Serif' Font.Style = [] Menu = MainMenu OldCreateOrder = True Position = poScreenCenter ShowHint = True OnTaskBar = False DesignSize = ( 680 337) PixelsPerInch = 96 TextHeight = 13 object HTML: tMSMemo Left = 8 Top = 8 Width = 289 Height = 321 Text = ''#13#10''#13#10''#13#10#13#10''#13#10'' ScrollBars = ssBoth Anchors = [akLeft, akTop, akBottom] TabOrder = 0 end object Website: tMSHTMLViewer Left = 304 Top = 8 Width = 368 Height = 317 TabOrder = 1 Anchors = [akLeft, akTop, akRight, akBottom] BorderStyle = htFocused DefFontName = 'Times New Roman' DefPreFontName = 'Courier New' HistoryMaxCount = 0 NoSelect = False PrintMarginBottom = 2.000000000000000000 PrintMarginLeft = 2.000000000000000000 PrintMarginRight = 2.000000000000000000 PrintMarginTop = 2.000000000000000000 PrintScale = 1.000000000000000000 end object Browse: tMSButton Left = 323 Top = 225 Width = 75 Height = 25 Caption = 'Browse' TabOrder = 2 Visible = False DoBrowse = False InitialDir = 'C:\Users\%USER_NAME%\Desktop' Filter = 'HTML Files (*.html) | *.HTML|All Files (*.*) | *.*' BrowseStyle = fbSave end object Open: tMSButton Left = 421 Top = 237 Width = 75 Height = 25 Caption = 'Open' TabOrder = 3 Visible = False DoBrowse = False Filter = 'HTML Files (*.html) | *.HTML|All Files (*.*) | *.*' BrowseStyle = fbOpen end object MainMenu: tMSMainMenu object MenuItem1: tMSMenuItem Caption = '&File' object OpenMenu: tMSMenuItem Caption = '&Open' end object SaveAs: tMSMenuItem Caption = '&Save As' end object Close: tMSMenuItem Caption = '&Close' end end end end EndDialog>MainMenu AddDialogHandler>MainMenu,HTML,OnChange,doCreateWebsite AddDialogHandler>MainMenu,,onClose,doClose AddDialogHandler>MainMenu,Close,onClick,doClose AddDialogHandler>MainMenu,SaveAs,onClick,doSaveAs AddDialogHandler>MainMenu,OpenMenu,onClick,doOpen Show>MainMenu Label>IdleLoop Wait>.001 Goto>IdleLoop LabelToVar>HTML1,varDefaultHTML /* HTML1: */ SRT>doCreateWebsite GetDialogProperty>MainMenu,HTML,Text,varWebsiteText SetDialogProperty>MainMenu,Website,HTML,varWebsiteText If>FileSaved=True SetDialogProperty>MainMenu,,Caption,Web-Preview - %varFilename%* Endif END>doCreateWebsite SRT>doClose Exit>0 END>doClose SRT>doSaveAs SetDialogProperty>MainMenu,Browse,Filename,*.html SetDialogProperty>MainMenu,Browse,doBrowse,True GetDialogProperty>MainMenu,Browse,Filename,varFilename GetDialogProperty>MainMenu,HTML,Text,varWebsiteText GetDialogProperty>MainMenu,,Caption,varWindowName Position>html,varFilename,1,varHTMlExists,TRUE If>varHTMlExists<1 ConCat>varFilename,.html Endif /* IfFileExists>%varFilename% Ask>%varFilename% already exists. Would you like to overwrite?,varFileExists If>varFileExists=YES DeleteFile>%varFilename% WriteLn>%varFilename%,nWLNRes,varWebsiteText Let>FileSaved=True SetDialogProperty>MainMenu,,Caption,%varWindowName% - %varFilename% Endif Else WriteLn>%varFilename%,nWLNRes,varWebsiteText Let>FileSaved=True SetDialogProperty>MainMenu,,Caption,%varWindowName% - %varFilename% Endif */ IfFileExists>%varFilename% DeleteFile>%varFilename% Endif WriteLn>%varFilename%,nWLNRes,varWebsiteText Let>FileSaved=True SetDialogProperty>MainMenu,,Caption,Web-Preview - %varFilename% END>doSaveAs SRT>doOpen SetDialogProperty>MainMenu,Open,doBrowse,True GetDialogProperty>MainMenu,Open,Filename,varFilename GetDialogProperty>MainMenu,HTML,Text,varWebsiteText ReadFile>varFilename,varHTML If>varHTML=##NOFILE## SetDialogProperty>MainMenu,HTML,Text,varWebsiteText Else SetDialogProperty>MainMenu,HTML,Text,varHTML SetDialogProperty>MainMenu,,Caption,Web-Preview - %varFilename% Endif END>doOpen