Category : Windows 3.X Files
Archive   : WE-30D.ZIP
Filename : WINEDIT.MN_

 
Output of file : WINEDIT.MN_ contained in archive : WE-30D.ZIP
; AutoExec Section is on top here. Actually runs before file manager
; appears on the screen
;
TAB=num2char(9)
CR=strcat(num2char(13),num2char(10))
Home=DirHome()

Edit Utility Menu ; Manage WinEdit Utility menu and help files
TheFile=strcat(DirHome(),"WINEDIT.MNU")
WFileOpen(TheFile)
Drop(TheFile)

Edit Macro Menu ; Manage WinEdit Macro menu
; In the lite and standard versions of WinEdit,
; the MACRO.ENC file is not editable.
; In the Pro version, the file MACRO.MNU is used
; and it can be edited.
level=2
a = FileLocate("WINEDIT.INI")
if FileExist(a) then level=IniReadPvt("WINEDIT","LEVEL","2",a)
if (level < 2) then Message("Edit Macro Menu","The Macro Menu cannot be edited in the Lite or Standard versions of WinEdit")
if (level < 2) then exit
; else we can edit it
TheFile=strcat(DirHome(),"MACRO.MNU")
WFileOpen(TheFile)
Drop(TheFile)

_Key Word Help \ +{F1} ; Load help topic for word at cursor
call("wwwedit.dll","KEYWORDHELP")

Load Help File ; Load a help file (no keyword lookup)
TheFile=strcat(DirHome(),"HELP\WEHELP.INI")
Keys=IniItemizePvt("HelpAll",TheFile)
KeyMax=ItemCount(Keys,TAB)
KeyIndex=0
KeyValues=""

:ieLoop
if KeyIndex==KeyMax then goto looped
KeyIndex=KeyIndex+1
ThisKey=ItemExtract(KeyIndex,Keys,TAB)
if (stricmp(ThisKey,"DEFAULT")==0) then goto ieloop
ThisValue=IniReadPvt("HelpAll",ThisKey,"???",TheFile)
KeyValues=strcat(KeyValues,ThisValue,"|")
goto ieLoop

:looped
a=ItemSelect("Select Help File",strlower(KeyValues),"|")
if a=="" then goto DONE
b = FileLocate(strcat(DirHome(),"HELP\%a%"))
if b=="" then b=FileLocate(a)
if b=="" then Message("Helpfile %a% not found","Edit %TheFile%%CR%[HelpAll] section to%CR%point to help file location%CR%or put helpfile on DOS path.")
else WinHelp(b,"CONTENTS","")
:DONE
Drop(TheFile,Keys,KeyMax,KeyIndex,KeyValues,ThisKey,ThisValue,a,b)

Open highlighted file ; Open highlighted file
name = wEdGetWord()
length = strlen(name)
if length==0 then goto DONE
b = FileLocate(name)
if b == "" then Message("Open highlighted file","Cannot find %name%")
if b == "" then goto DONE
wFileOpen(b)
:DONE
drop(name,length)

Generate C Tags ; Index source files
; uses the TAGS.EXE program to generate WINEDIT.MRK file
; that the next function uses to look up function names
; in your source
RunWait("TAGS.EXE","-om -tWINEDIT.MRK *.c")
Message("Tags","Processing complete")

Go to tag ; Jump to function definition
; looks up the current word in WINEDIT.MRK, loads the file,
; and moves the cursor to the correct line
DEBUG(1)
goto START
:GETWORD
a = AskLine("Go to tag", "Enter function definition to jump to:", "")
strupper(a)
len = strlen(a)
if len==0 then goto NOWORD
goto START2
:START
a=WEdGetWord()
strupper(a)
len = strlen(a)
if len==0 then goto GETWORD
:START2
b=FileLocate("winedit.mrk")
WFileOpen(b)
WFind(a,@TRUE,@FALSE)
WEdHome()
WEdStartSel()
WEdEnd()
WEdEndSel()
WEdCopy()
WWinClose()
line=ClipGet()
line2=strupper(line)
c=StrIndex(line2,a,0,@FWDSCAN)
d=StrIndex(line2," ",c,@FWDSCAN)
e=StrIndex(line2,"(",d,@FWDSCAN)
filename=StrSub(line2,d,e-d)
lineno=StrSub(line2,e+1,strlen(line2)-e-1)
WFileOpen(filename)
WEdGoToLine(lineno)
WEdHome()
Drop(len,b,line,line2,c,d,e,filename,lineno)
:NOWORD
Drop(a)


Grep \ ^G ; Run fgrep
GrepWord = wEdGetWord() ; Get Selected word if any
command = AskLine("Grep","Enter the grep commmand to run:","tee.com fgrep -M %GrepWord% *.c")
wRunCommand(command,@TRUE,@TRUE)
Drop(command,GrepWord);

&Version Control ; PVCS commands
&Get a file (w/lock)
a = AskLine("PVCS Get (w/lock) Command", "Enter file you want to lock:", "")
b=strcat("tee get -L ",a)
wRunCommand(b,@TRUE,@TRUE)
Drop(b)
b=FileLocate(a)
if b=="" then goto NotFound
WFileOpen(b)
goto DONE
:NotFound
Message("???", "%a% not found...")
goto Done
:DONE
Drop(a)
Drop(b)

&Put a file back (unlock)
a = AskLine("PVCS Put (unlock) Command", "Enter file you want to put back:", "")
a=strcat("tee put ",a)
wRunCommand(a,@TRUE,@TRUE)
Drop(a)

&Enter any PVCS command
a = AskLine("PVCS Command", "Enter PVCS command:", "")
a=strcat("tee ",a)
wRunCommand(a,@TRUE,@TRUE)
Drop(a)

&Logfile Info (locked)
a = AskLine("PVCS Logfile Command", "Enter file for which you want logfile info:", "")
a=strcat("tee vlog -BL ",a)
wRunCommand(a,@TRUE,@TRUE)
Drop(a)

&Update all source files
wRunCommand("tee get -u *.??v",@TRUE,@TRUE)

Utilities ; Select from list of utilities
&Freespace on Local Drives ; Display free disk space on drives

Drive=DiskScan(2) ; 2 is the code for local hard drives
Dmax=strlen(Drive)
DIndex=1
TotalSize=0
DriveReport=""

:COUNTSPACE
NextDrive=StrSub(Drive,Dindex,1)
a=DiskFree(NextDrive)/1024
TotalSize=a+TotalSize
DriveReport=strcat(DriveReport,NextDrive," = ",a,"K","@")
DIndex=Dindex+3 ;each entry is 3 bytes long
if DIndex<=Dmax then goto COUNTSPACE
ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
Drop(xxx,TotalSize,DriveReport,NextDrive,LastDrive)

&Wallpaper ; Change the desktop wallpaper
DirChange(dirWindows(0))
a=FileItemize("*.BMP")
a=strcat("-None- ",a)
a=ItemSelect("Select New Wallpaper",a," ")
terminate(a=="","Wallpaper","No wallpaper selected")
if a=="-None-" then Wallpaper("",0)
if a=="-None-" then exit
tile=@FALSE
if FileSize(a)<40000 then tile=@TRUE
;if bmp size less than 40K, assume tile, else center
Wallpaper(a,tile)
drop(a,b,tile)
Edit &INI files ; Assisted editing of INI files
DirChange(DirWindows(0))
canned="BYEBYE"
IniFiles=""

:UP1
canned="byebye"
If IniFiles!="" then goto inied
IniFiles=FileItemize("*.INI")
:inied
TheFile=ItemSelect("Choose Desired INI file",IniFiles," ")
if TheFile=="" then goto newini
Sections=""

:UP2
canned="up1"
if Sections!="" then goto sected
Sections=IniItemizePvt("",TheFile)
:SECTED
Section=ItemSelect("%TheFile% - Choose Section",Sections,TAB)
if Section=="" then goto AddSect
KeyValues=""

:UP3
canned="up2"
if KeyValues!="" then goto looped
Keys=IniItemizePvt(Section,TheFile)
KeyMax=ItemCount(Keys,TAB)
KeyIndex=0

:Loop
if KeyIndex==KeyMax then goto looped
KeyIndex=KeyIndex+1
ThisKey=ItemExtract(KeyIndex,Keys,TAB)
ThisValue=IniReadPvt(Section,ThisKey,"???",TheFile)
KeyValues=strcat(KeyValues,ThisKey,"= ",ThisValue,TAB)
goto Loop

:looped
Key=ItemSelect("%TheFile% [%Section%] - Choose Keyword",KeyValues,TAB)
if Key=="" then goto AddKey
Key=ItemExtract(1,Key,"=")

Value=IniReadPvt(Section,Key,"???",TheFile)
goto entkey


:newini
canned="UP1"
TheFile=Askline("Making NEW INI file","Enter new INI file name","*.INI")
if (TheFile=="*.INI" || TheFile=="") then goto newini
IniFIles=""
goto AddSectNewIni

:AddSect
canned="up2"
:AddSectNewIni
Section=AskLine("Add New Section to INI File","Enter new section name for%CR% %TheFile%%CR% [?????]","")
Sections=""
goto AddKeyNewSect

:AddKey
canned="up3"
:AddKeyNewSect
Key=AskLine("Add New Keyword to INI File","Enter new key name for%CR% %TheFile%%CR% [%Section%]","")
Value="(Undefined)"
KeyValues=""
goto EntKeyNewKey

:ENTKEY
canned="up3"
:EntKeyNewkey
NewValue=AskLine("Modify INI File Keyword","%TheFile%%CR% [%Section%]%CR% %Key% = %Value%",Value)
if NewValue!=Value then iniwritepvt(Section,Key,NewValue,TheFile)
KeyValues=""
goto up3

:CANCEL
goto %Canned%

:BYEBYE
exit

Paste Special Characters ; Paste high ASCII characters to clipboard or document
Copy &FormFeed to Clipboard
Clipput(Num2char(12))
Copy &Special Characters to Document
a=" ¡| ¢| £| ¤| ¥| ¦| §| ¨| ©| ª|" ;161 thru 170
b=" «| ¬| ­| ®| ¯| °| ±| ²| ³| ´|" ;171 thru 180
c=" µ| ¶| ·| ¸| ¹| º| »| ¼| ½| ¾|" ;181 thru 190
d=" ¿| À| Á| Â| Ã| Ä| Å| Æ| Ç| È|" ;191 thru 200
e=" É| Ê| Ë| Ì| Í| Î| Ï| Ð| Ñ| Ò|" ;201 thru 210
f=" Ó| Ô| Õ| Ö| ×| Ø| Ù| Ú| Û| Ü|" ;211 thru 220
g=" Ý| Þ| ß| à| á| â| ã| ä| å| æ|" ;221 thru 230
h=" ç| è| é| ê| ë| ì| í| î| ï| ð|" ;231 thru 240
i=" ñ| ò| ó| ô| õ| ö| ÷| ø| ù| ú|" ;241 thru 250
j=" û| ü| ý| þ| ÿ" ;251 thru 255
a=strcat(a,b,c,d,e,f,g,h,i,j)
Drop(b,c,d,e,f,g,h,i,j)
a=ItemSelect("Choose a character",a,"|")
a=strsub(a,2,1)
wEdInsString(a)
Drop(a)


Accessories
Appointment Scheduling
run("Calendar.exe","")
Calculator
run("calc.exe","")

C&lipboard
errormode(@off)
terminate(winactivate("Clipboard"),"","") ;Already Running
errormode(@cancel)
run("Clipbrd.exe","")

Clock
run("clock.exe","")

Control &Panel
errormode(@off)
terminate(winactivate("Control Panel"),"","")
errormode(@cancel)
run("control.exe","")
Cardfile
run("cardfile.exe","")

Notepad Editor
run("notepad.exe","")

Paint
run("pbrush.exe","")

Write
run("write.exe","")

Run System Confi&guration Editor
run("sysedit.exe","") ;takes care of itself

Run W&indows Program
TheFile=Askline("Run a Window Program","Enter Windows program:","")
run(Thefile,"") ;takes care of itself

Run Windows Setup
DirChange(DirWindows(0))
run("setup.exe","")
drop(a)

_PIF Edi&t...
DirChange(FilePath(FileLocate("_default.pif")))
a=FileItemize("*.PIF")
if a=="" then DirChange(FilePath(FileLocate("_default.pif")))
if a=="" then a=FileItemize("*.PIF")
a=ItemSelect("Choose a PIF File to edit",a," ")
run("pifedit.exe",a)
exit
_&System Information
wintype="retail"
if WinMetrics(22) then wintype="debug"

wc=WinConfig()
if !(wc&1) then mode="Real"
if wc&16 then mode="Standard"
if wc&32 then mode="Enhanced"

if wc&2 then cpu=286
if wc&4 then cpu=386
if wc&8 then cpu=486
if wc&64 then cpu=8086
if wc&128 then cpu=80186

Sysinfo=strcat(cpu,' ',mode,' ',wintype,' Windows ',WinVersion(1),'.',WinVersion(0),CR)

math="No math"
if wc&1024 then math="Math"
mouse="No Mouse"
if WinMetrics(19) then mouse="Mouse"

Sysinfo=strcat(sysinfo,math," co-processor. ",mouse,' available.',CR)

sysinfo=strcat(sysinfo,WinMetrics(0),'x',WinMetrics(1)," video resolution. ",WinMetrics(-1)," colors.",CR)

ErrorMode(@OFF)
LastError()
PlayMedia("Status WaveForm Ready")
ErrorMode(@CANCEL)
if LastError()!=1193 then sysinfo=strcat(sysinfo,"Windows multimedia extensions present.",CR)

bug=NetGetCaps(2)
if bug==0 then math="No n"
if bug!=0 then math="N"
if bug==256 then math="Microsoft n"
if bug==512 then math="Lan Manager n"
if bug==768 then math="Novell NetWare n"
if bug==1024 then math="Banyan Vines n"
if bug==1280 then math="10 Net n"
sysinfo=strcat(sysinfo,math,"etwork installed.",CR)

bug=WinResources(0)/1024 ; Compute memory avail
math=strlen(bug)
if math>3 then bug=strcat(strsub(bug,1,math-3),',',strsub(bug,math-2,3))

sysinfo=strcat(sysinfo,CR,bug," KB Free Memory",CR)
sysinfo=strcat(sysinfo,WinResources(2),"%% System Resources Free (",WinResources(3),"%% GDI, ",WinResources(4),"%% User)",CR)

sysinfo=strcat(sysinfo,"DOS ",DosVersion(1),'.',DosVersion(0)," using ",environment("COMSPEC"),CR)
disks=DiskScan(1)
if disks!="" then sysinfo=strcat(sysinfo,"Floppies ",disks,CR)
disks=DiskScan(2)
if disks!="" then sysinfo=strcat(sysinfo,"Hard Disks ",disks,CR)
disks=DiskScan(4)
if disks!="" then sysinfo=strcat(sysinfo,"Network Disks ",disks,CR)
sysinfo=strcat(sysinfo,"Windows Directory ",DirWindows(0),CR)
sysinfo=strcat(sysinfo,"System Directory ",DirWindows(1),CR)
sysinfo=strcat(sysinfo,CR,"WIL Interpreter Ver ",VersionDll())

ver=Version()
Message("WinEdit %ver% SysInfo",Sysinfo)

Interactive Execution
if !IsDefined(uyit65) then uyit65="Message( , )"
:NEXT
uyit65=AskLine("Interactive Execution","Enter Command",uyit65)
execute %uyit65%
goto NEXT

_Run a WIL Script File
if wGetModified()==@TRUE then wFileSave()
TheFile = WGetFileName()
Call(TheFile,"")




  3 Responses to “Category : Windows 3.X Files
Archive   : WE-30D.ZIP
Filename : WINEDIT.MN_

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/