; htmlpopup.mnu
;
; This is the WIL menu version of WinEdit's context menu
; for HTML files. These context menu commands only
; appear when you are editing an HTML file.
;
; HTML file type options are set in the View.Options
; property sheet, in the File Types dialog.
;
; Delete or rename this file to use WinEdit's built-in
; context menu.
;
; AutoExec Section is on top here.
;
TAB=@TAB
CR=@CRLF
EOL=@CR
Home=DirHome()
IntControl(29,@tab,0,0,0) ;Standardize on tabs as delimiters for FileItemize, etc
Insert Tags ;Insert HTML tags into this document
Anchor - Image
wImgTag()
Anchor - Text
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s) ; restore the clipboard
Applet
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsLine('')
wNewLine()
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s) ; restore the clipboard
Colors
Black
wInsString('color="#000000"')
Silver
wInsString('color="#C0C0C0"')
Gray
wInsString('color="#808080"')
White
wInsString('color="#FFFFFF"')
Maroon
wInsString('color="#800000"')
Red
wInsString('color="#FF0000"')
Purple
wInsString('color="#800080"')
Fuchsia
wInsString('color="#FF00FF"')
Green
wInsString('color="#008000"')
Lime
wInsString('color="#00FF00"')
Olive
wInsString('color="#808000"')
Yellow
wInsString('color="#FFFF00"')
Blue
wInsString('color="#0000FF"')
Navy
wInsString('color="#000080"')
Teal
wInsString('color="#008080"')
Aqua
wInsString('color="#00FFFF"')
Comment
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font Template
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font Size
Font 1
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font 2
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font 3
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font 4
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font 5
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font 6
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Font 7
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Big
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Small
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Superscript
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Subscript
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Formatting
Horizontal Rule
wInsLine('
')
Bold \^B
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Italic
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Underline
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Emphasis
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Strong Emphasis
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Headings
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('
\^
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('
\^
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('
\^
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('
\^
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('
\^
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('
\^
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Lists
Unordered
wInsLine('')
wInsLine(' - ?')
wInsLine('
- ?')
wHome()
wInsLine('
')
Ordered
wInsLine('')
wInsLine(' - ?')
wHome()
wInsLine('
- ?')
wHome()
wInsLine('
- ?')
wHome()
wInsLine('
')
Definition
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsLine('')
wInsLine(' - \^
- ?')
wHome()
wInsLine('
- ?
- ?')
wHome()
wInsLine('
- ?
- ?')
wHome()
wInsLine('
')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Tables
Table Template
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsLine('')
wInsLine('')
wInsLine(' ')
wHome()
wInsLine(' ')
wHome()
wInsLine('')
wInsLine(' ')
wHome()
wInsLine(' ')
wHome()
wInsLine('')
wNewLine()
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s) ; restore the clipboard
Row ; Insert this tag template into document
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Heading
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
Data
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsString('\^')
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s)
_View in Browser ; View the current document in a browser window
wViewHtml()
Blank HTML Document ; Insert a basic html template into the document
q = AskYesNo("New HTML Document","Open a new document?")
if q == @YES
wFileNew()
else
wEnd()
wNewLine()
wHome()
endif
ErrorMode(@OFF)
s=ClipGet()
ErrorMode(@ON)
ClipPut("") ; clear the clipboard
wCut()
wInsLine('')
wNewLine()
wInsLine('')
wNewLine()
wInsLine('')
wNewLine()
wInsLine('\^')
wNewLine()
wInsLine('')
wInsLine('')
wInsLine('')
wInsLine('')
wNewLine()
wInsLine('')
wNewLine()
wInsLine('')
wNewLine()
wNewLine()
wInsLine('')
wNewLine()
wInsLine('')
wNewLine()
wFind("\^",@FALSE,@TRUE,@FALSE,@FALSE)
wPaste()
ClipPut(s) ; restore the clipboard
_FTP Open
wFTPOpen()
FTP Save
wFTPSave()
_Undo ; Undoes the last editing action
wUndo()
;Redo ; Redoes the last editing action
; wRedo()
_Cut ; Cut the selection and put it on the clipboard
wCut()
Copy ; Copy the selection and put it on the clipboard
wCopy()
Paste ; Insert the clipboard contents
wPaste()
_Properties
wProperties()
_File
New \ ^N
wFileNew()
Open highlighted file \ ^F ; Open selected file
name = wEdGetWord()
length = strlen(name)
if length==0 then goto DONE
b = FileLocate(name)
if b == "" then Message("Open selected file","Cannot find %name%")
if b == "" then goto DONE
wFileOpen(b)
:DONE
drop(name,length,b)
Open \ ^O
wFileOpen()
Close \ ^{F4}
wWinClose()
Print \ ^P
wPrintDirect()
_How do I?... ; Learn about using scripts
Customize Menus ; Menu file reference
helpfile = strcat(DirHome(),"Windows Interface Language.hlp")
WinHelp(helpFile, "PartialKey", "Menu Files")
Write Macro Scripts ; WIL scripting language reference
helpfile = strcat(home,"Windows Interface Language.hlp")
WinHelp(helpFile, "PartialKey", "Tutorial")
Customize this menu... ; Manage WinEdit Popup menu
TheFile=strcat(DirHome(),"System\HTMLPOPUP.MNU")
WFileOpen(TheFile)
Drop(TheFile)