home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World 2000 April
/
PCWorld_2000-04_cd.bin
/
Software
/
TemaCD
/
winedit
/
regscrip.dl_
< prev
next >
Wrap
Text File
|
2000-02-21
|
43KB
|
1,051 lines
;-------------------------------------------------------------------------
; Regscript.dll
;
; WinEdit checks for the existence of this file at startup, looking
; in the WinEdit directory. It allows you a chance to customize
; every part of WinEdit at startup without user intervention.
;
; If WinEdit executes the script it saves the file date stamp. Subsequently
; at startup, WinEdit will compare the file date with the saved time and
; will only re-run the script if it's newer than the saved timestamp.
;
;
gosub NukeSomeSettings ;If required
gosub SetupPage
gosub SetupFind
gosub SetupGlobal
; Set up some file types. Maybe should be run first, as later items override earlier items...
gosub SetupHTML ; This one here primarily as an example.
gosub SetupACL
gosub SetupSQL
gosub SetupPL
gosub SetupBAS
gosub SetupVBS
gosub SetupPHP
gosub SetupOthers
gosub RegisterFTP
exit
:SetupHTML
;-------------------------------------------------------------------------
; File specific settings
;
; This example sets up WinEdit for HTML files.
;-------------------------------------------------------------------------
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="HTML" ; Name of main file group for this type of files
ConfigVerWBT=6 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
; The File mapping key sets up the file extensions with a particular
; file group. e.g. HTML, HTM and ASP type files all belong to the
; HTML file group
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[HTML]", FileKind)
RegSetValue(regkey, "[HTM]", FileKind)
RegSetValue(regkey, "[ASP]", FileKind)
RegSetValue(regkey, "[XML]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.htm;*.html;*.asp;*.xml")
; case sensitivity
RegSetDWord(regkey, "[Case]", 0)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "<!--")
RegSetValue(regkey, "[Comment End 1]", "-->")
RegSetValue(regkey, "[Comment Start 2]", "")
RegSetValue(regkey, "[Comment End 2]", "")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr")
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 0)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 0)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "3")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "!")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255")
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0")
RegSetValue(regkey, "[Keyword]", "0,0,255")
RegSetValue(regkey, "[Quote]", "64,0,0")
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "HtmlPopup.mnu")
RegCloseKey(regkey)
return
:SetupPage
;-------------------------------------------------------------------------
; the PageSetup key handles all the printing settings
;First check to try not to needlessly overwrite user settings
ConfigVerWBT=2 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\PageSetup[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\PageSetup[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\PageSetup[ConfigVer]",ConfigVerWBT)
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\PageSetup")
; 0 = ANSI, 1 = OEM
RegSetDWord(regkey,"[CharSet]", 0)
; 1 = print in color, 0 = OFF
RegSetDWord(regkey, "[Color syntax]", 1)
; 1 = print italics, 0 = regular
RegSetDWord(regkey, "[Font Italic]", 0)
; name of font
RegSetValue(regkey, "[Font name]", "Courier New")
; size of font in points
RegSetDWord(regkey, "[Font size]", 12)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
; footer macro string
RegSetValue(regkey, "[Footer]", "Page $(PageNo)")
; print file time in footer, 1 = yes, 0 = no
RegSetDWord(regkey, "[FooterTime]", 0)
; header macro string
RegSetValue(regkey, "[Header]", "$(FilePath) - $(FileTime)")
; print file time in header, 1 = yes, 0 = no
RegSetDWord(regkey, "[HeaderTime]", 0)
; print line numbers, 1 = yes, 0 = no
RegSetDWord(regkey, "[Line numbers]", 0)
; print pages two up, 1 = yes, 0 = no
RegSetDWord(regkey, "[Twoup]", 0)
; 0 = use screen font, 1 = use printer font defined above
RegSetDWord(regkey, "[Use printer font]", 0)
RegCloseKey(regkey)
return
:SetupFind
;-------------------------------------------------------------------------
; the Settings\Find key handles the find\replace settings
;First check to try not to needlessly overwrite user settings
ConfigVerWBT=1 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Find[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Find[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Find[ConfigVer]",ConfigVerWBT)
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Find")
; these keys are all true/false, 1 = ON, 0 = OFF
RegSetDWord(regkey, "[Forward]", 1)
RegSetDWord(regkey, "[Match case]", 0)
RegSetDWord(regkey, "[Regular expressions]", 0)
RegSetDWord(regkey, "[Wrap search]", 0)
RegCloseKey(regkey)
return
:setupGlobal
;-------------------------------------------------------------------------
; the Settings\Main Window key handles the global editor settings
;First check to try not to needlessly overwrite user settings
ConfigVerWBT=1 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window[ConfigVer]",ConfigVerWBT)
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window")
; backup location macro string
;RegSetValue(regkey, "[Backup location]", "$(FilePath).backup")
;RegSetValue(regkey, "[Autosave location]", "$(FilePath).autosave")
; the name of the active project
RegSetValue(regkey, "[Active Workspace]", "Default")
; the autosave interval, in minutes
RegSetDWord(regkey, "[Autosave interval]", 5)
; the rest are all true/false, on/off
RegSetDWord(regkey, "[AutoSave]", 1)
RegSetDWord(regkey, "[Horizontal Scrollbar]", 1)
RegSetDWord(regkey, "[Make Backups]", 1)
; leave the cursor at the end of pasted text
RegSetDWord(regkey, "[Paste After]", 1)
; automatically save files before running tools
RegSetDWord(regkey, "[Save Before]", 1)
; don't prompt before automatically saving files
RegSetDWord(regkey, "[Prompt Before]", 0)
; reload the open files from the last session
RegSetDWord(regkey, "[Restore Workspace]", 1)
; allow only one instance of WinEdit
RegSetDWord(regkey, "[Single Instance]", 1)
; allow the cursor to move past the ends of lines
RegSetDWord(regkey, "[VirtualWhitespace]", 1)
RegCloseKey(regkey)
return
;;;;;;;;;;;;;;;Setup of strange and obscure file types
:SetupACL
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="ACL" ; Name of manil file group for this type of files
ConfigVerWBT=2 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
;ACL file group
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[SUB]", FileKind)
RegSetValue(regkey, "[LIB]", FileKind)
RegSetValue(regkey, "[ACL]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.sub;*.lib;*.acl")
; case sensitivity
RegSetDWord(regkey, "[Case]", 1)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "#")
RegSetValue(regkey, "[Comment End 1]", "")
RegSetValue(regkey, "[Comment Start 2]", "")
RegSetValue(regkey, "[Comment End 2]", "")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr")
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 0)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 1)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "3")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255")
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0")
RegSetValue(regkey, "[Keyword]", "0,0,255")
RegSetValue(regkey, "[Quote]", "0,128,128")
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "ACLPopup.mnu")
RegCloseKey(regkey)
return
:SetupSQL
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="SQL" ; Name of manil file group for this type of files
ConfigVerWBT=2 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
;SQL file group
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[SQL]", FileKind)
RegSetValue(regkey, "[SP]", FileKind)
RegSetValue(regkey, "[SPS]", FileKind)
RegSetValue(regkey, "[SPB]", FileKind)
RegSetValue(regkey, "[SPP]", FileKind)
RegSetValue(regkey, "[SF]", FileKind)
RegSetValue(regkey, "[LDR]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.sql;*.sp;")
; case sensitivity
RegSetDWord(regkey, "[Case]", 0)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "")
RegSetValue(regkey, "[Comment End 1]", "")
RegSetValue(regkey, "[Comment Start 2]", "")
RegSetValue(regkey, "[Comment End 2]", "")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr")
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 0)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 1)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "3")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255")
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0")
RegSetValue(regkey, "[Keyword]", "0,0,255")
RegSetValue(regkey, "[Quote]", "0,128,128")
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "SQLPopup.mnu")
RegCloseKey(regkey)
return
:SetupPL
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="PERL" ; Name of manil file group for this type of files
ConfigVerWBT=2 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
;PL file group - Perl
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[PL]", FileKind)
RegSetValue(regkey, "[PERL]", FileKind)
RegSetValue(regkey, "[PRL]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.perl;*.pl;*.prl")
; case sensitivity
RegSetDWord(regkey, "[Case]", 1)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "#")
RegSetValue(regkey, "[Comment End 1]", "")
RegSetValue(regkey, "[Comment Start 2]", "")
RegSetValue(regkey, "[Comment End 2]", "")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr")
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 1)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 1)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "3")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "!~$#%%'&+-,<>@?]\^.{}:/|*`_")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255")
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0")
RegSetValue(regkey, "[Keyword]", "0,0,255")
RegSetValue(regkey, "[Quote]", "0,128,128")
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "PerlPopup.mnu")
RegCloseKey(regkey)
return
:SetupBAS
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="BAS" ; Name of manil file group for this type of files
ConfigVerWBT=2 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
;BAS file group
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[BAS]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.bas")
; case sensitivity
RegSetDWord(regkey, "[Case]", 0)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "REM")
RegSetValue(regkey, "[Comment End 1]", "")
RegSetValue(regkey, "[Comment Start 2]", "")
RegSetValue(regkey, "[Comment End 2]", "")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr")
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 1)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 1)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "4")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255")
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0")
RegSetValue(regkey, "[Keyword]", "0,0,255")
RegSetValue(regkey, "[Quote]", "0,128,128")
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "BASPopup.mnu")
RegCloseKey(regkey)
return
:SetupVBS
;-------------------------------------------------------------------------
; File specific settings
;
; This example sets up WinEdit for VBS files.
;-------------------------------------------------------------------------
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="VBS" ; Name of main file group for this type of files
ConfigVerWBT=1 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
; The File mapping key sets up the file extensions with a particular
; file group.
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[VBS]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.vbs")
; case sensitivity
RegSetDWord(regkey, "[Case]", 0)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "'")
RegSetValue(regkey, "[Comment End 1]", "")
RegSetValue(regkey, "[Comment Start 2]", "`")
RegSetValue(regkey, "[Comment End 2]", "")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr") ;need path here?
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 0)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 0)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "3")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "&_<>+-.\^*=")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255") ;white
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0") ;black
RegSetValue(regkey, "[Keyword]", "0,0,255") ;ok
RegSetValue(regkey, "[Quote]", "0,128,128") ;dk cyan
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "VBSPopup.mnu")
RegCloseKey(regkey)
curdir=DirHome()
inifile=strcat(curdir, "Help\Lookup\", "WEHELP.INI")
IniWritePvt("EXTENSIONS", "VBS", "WSHHLP", inifile)
IniWritePvt("WSHHLP", "HF1", "WSHHLP.WEH 1", inifile)
IniWritePvt("", "", "", inifile)
return
:NukeSomeSettings
ConfigVerWBT=3 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window[ResetBetaVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window[ResetBetaVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\Main Window[ResetBetaVer]",ConfigVerWBT)
;Change keyword files to CLR from INI
kiki=RegOpenKey(@REGCURRENT,"Software\WinEdit Software Co.\WinEdit\Settings\File Types")
kikikeys=RegQueryKeys(kiki)
kikicount=ItemCount(kikikeys,@tab)
for xx=1 to kikicount
thiskey=ItemExtract(xx,kikikeys,@tab)
if RegExistValue(kiki,strcat(thiskey,"[keywords]"))
oldclr=RegQueryValue(kiki,strcat(thiskey,"[keywords]"))
oldclr1=FilePath(oldclr)
oldclr2=FileRoot(oldclr)
oldclr3=FileExtension(oldclr)
if strupper(oldclr3)=="INI"
oldclr=strcat(oldclr1,oldclr2,".clr")
RegSetValue(kiki,strcat(thiskey,"[keywords]"),oldclr)
endif
endif
next
RegCloseKey(kiki)
return
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
:SetupPHP
; First, verify these settings were not already installed so we don't
; overwrite changes made by the user on a mere update. If thiere is
; a real update, then yes we do overwrite user customizations.
FileKind="PHP" ; Name of manil file group for this type of files
ConfigVerWBT=1 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
;PHP file group
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File mapping")
RegSetValue(regkey, "[PHP]", FileKind)
RegSetValue(regkey, "[PHP3]", FileKind)
RegSetValue(regkey, "[PHTML]", FileKind)
RegSetValue(regkey, "[PHPS]", FileKind)
RegCloseKey(regkey)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
; add this file type to the FileOpen dialog
RegSetDWord(regkey, "[AddToFileDialog]", 1)
; description and wild cards to use in FileOpen dialog
RegSetValue(regkey, "[FileOpenMask]", "%FileKind% Files|*.php;*.php3;*.phtml;*.phps")
; case sensitivity
RegSetDWord(regkey, "[Case]", 0)
; show chroma coding
RegSetDWord(regkey, "[Chroma]", 1)
; comment definition - two available
RegSetValue(regkey, "[Comment Start 1]", "//")
RegSetValue(regkey, "[Comment End 1]", "")
RegSetValue(regkey, "[Comment Start 2]", "/*")
RegSetValue(regkey, "[Comment End 2]", "*/")
; font information for this file type
RegSetValue(regkey, "[Font name]", "Courier New")
RegSetDWord(regkey, "[Font size]", 10)
; 400 = normal, 700 = bold
RegSetDWord(regkey, "[Font weight]", 400)
RegSetDWord(regkey, "[Font italic]", 0)
; 1 = insert mode; 0 = overtype
RegSetDWord(regkey, "[Insert]", 1)
; pathname of keyword listing file
RegSetValue(regkey, "[Keywords]", "%FileKind%.clr")
; 0 = CR/LF; 1 = LF; 2 = LF/CR; 3 = CR
RegSetDWord(regkey, "[Line end type]", 0)
; leave files locked when open
RegSetDWord(regkey, "[Lock files]", 0)
; 1 = use tabs; 0 = insert spaces
RegSetDWord(regkey, "[Keep tabs]", 1)
; show visible tab marks on screen
RegSetDWord(regkey, "[Show tabs]", 0)
; tab size in characters
RegSetDWord(regkey, "[Tab size]", "3")
; extra characters to be considered part of a word
RegSetValue(regkey, "[Extra word chars]", "")
; extra characters that might start a word
RegSetValue(regkey, "[Start chars]", "")
; extra characters that might end a word
RegSetValue(regkey, "[Terminator chars]", "")
; colors. R,G,B values as a string
RegSetValue(regkey, "[Background]", "255,255,255")
RegSetValue(regkey, "[Comment]", "128,128,128")
RegSetValue(regkey, "[Default Text]", "0,0,0")
RegSetValue(regkey, "[Keyword]", "0,0,255")
RegSetValue(regkey, "[Quote]", "0,128,128")
; character set 0 = ANSI, 1 = OEM
RegSetDWord(regkey, "[CharSet]", 0)
; compile command
RegSetValue(regkey, "[Compile command]", "")
; call a custom WIL error parsing script after compiling
RegSetDWord(regkey, "[UseWBT]", 0)
; if so, the name of the script
RegSetValue(regkey, "[WBTErrorFile]", "")
; set up a file-specific popup menu
RegSetValue(regkey, "[PopupMenu]", "PHPPopup.mnu")
RegCloseKey(regkey)
return
; set up the popup menu default for all the other predefined file types
:SetupOthers
FileKind="ASM"
gosub addpopup
FileKind="BAT"
gosub addpopup
FileKind="C"
gosub addpopup
FileKind="DCL"
gosub addpopup
FileKind="JAVA"
gosub addpopup
FileKind="LSP"
gosub addpopup
FileKind="M2"
gosub addpopup
FileKind="PRG"
gosub addpopup
FileKind="TXT"
gosub addpopup
return
:addpopup
ConfigVerWBT=2 ; Configuration version number,. Update when changing this section
if RegExistValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
ConfigVerReg=RegQueryValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]")
if ConfigVerReg >= ConfigVerWBT then return ; if reg is newer, do not excecute
endif
RegSetValue(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files[ConfigVer]",ConfigVerWBT)
;-------------------------------------------------------------------------
; the File types key sets up the file extension - specific settings
regkey = RegCreateKey(@REGCURRENT, "Software\WinEdit Software Co.\WinEdit\Settings\File types\%FileKind% Files")
RegSetValue(regkey, "[PopupMenu]", "%FileKind%Popup.mnu")
RegCloseKey(regkey)
return
:RegisterFTP
regsvr=StrCat(DirWindows(1),"regsvr32.exe")
origdir=DirGet()
DirChange(DirWindows(1))
RunWait(regsvr,"/s dartsock.dll")
RunWait(regsvr,"/s dartftp.dll")
DirChange(origdir)