home *** CD-ROM | disk | FTP | other *** search
- ; Da AutoExec Section is on top here. Actually runs before File Manager
- ; actually appears on the screen
-
- TAB=num2char(9)
- CR=strcat(num2char(13),num2char(10))
-
- Change File Commander menus ;Edit - with notepad, the file extender macros
- Edit Menu Scripts
- t1=IniReadPvt("FileCmdr","MenuTitle1","FC1","WINFILE.INI")
- t2=IniReadPvt("FileCmdr","MenuTitle2","FC2","WINFILE.INI")
- t3=IniReadPvt("FileCmdr","MenuTitle3","FC3","WINFILE.INI")
- t4=IniReadPvt("FileCmdr","MenuTitle4","FC4","WINFILE.INI")
- f1=IniReadPvt("FileCmdr","MenuFile1","WWWFC1.MNU","WINFILE.INI")
- f2=IniReadPvt("FileCmdr","MenuFile2","WWWFC2.MNU","WINFILE.INI")
- f3=IniReadPvt("FileCmdr","MenuFile3","WWWFC3.MNU","WINFILE.INI")
- f4=IniReadPvt("FileCmdr","MenuFile4","WWWFC4.MNU","WINFILE.INI")
- a=strcat(f1,TAB,t1,"~",f2,TAB,t2,"~",f3,TAB,t3,"~",f4,TAB,t4)
- drop(t1,t2,t3,t4,f1,f2,f3,f4)
- a=TextSelect("Choose Menu to Edit",a,"~")
- if a=="" then exit
- b=ItemExtract(1,a,TAB)
- a=FileLocate(b)
- adir=FilePath(a)
- DirChange(adir)
- broot=FileRoot(b)
- bname=strcat(broot,".BAK")
- FileCopy(b,bname,@FALSE)
- run("notepad.exe",b)
-
- Change Toplevel Menu Titles
- t1=IniReadPvt("FileCmdr","MenuTitle1","FC1","WINFILE.INI")
- t2=IniReadPvt("FileCmdr","MenuTitle2","FC2","WINFILE.INI")
- t3=IniReadPvt("FileCmdr","MenuTitle3","FC3","WINFILE.INI")
- t4=IniReadPvt("FileCmdr","MenuTitle4","FC4","WINFILE.INI")
- a=strcat(t1,TAB,t2,TAB,t3,TAB,t4)
- b=TextSelect("Choose Title to Change",a,TAB)
- if b=="" then exit
- c=ItemLocate(b,a,TAB)
- d=AskLine("Menu Title Change","Old title is -> %b%%CR%Enter new title. Use && to show hotkey.%CR%(e.g. FC&&1 gives FC&1",b)
- if d=="" then exit
- IniWritePvt("FileCmdr","MenuTitle%c%",d,"WINFILE.INI")
- Reload() ; Reload FM Extensions
-
-
- _Load &WIL Help File
- a=IniReadPvt("WWWSetup","FileCommander","","WWW-PROD.INI") ; Get installed directory
- if a!="" then a="%a%\HELP\" ; add HELP dir suffix
- WinHelp("%a%WIL.HLP","CONTENTS","")
-
- _Bro&wse... ;Browse hilited file
- l=strcat(CurrentPath(),CurrentFile())
- run("browser.exe",l)
- drop(a,l)
-
- &Edit... ;Edit hilited file
- l=CurrentFile()
- if l=="" || l==" " then goto NULL
- a=strscan(l,".\",0,@BACKSCAN)
- if a==0 then l=strcat(l,".")
- if a==0 then goto NULL
- if strsub(l,a,1)!="." then l=strcat(l,".")
- :NULL
- run("notepad.exe",strtrim(l))
- drop(a,b,l)
-
-
- File System
- &Size of ENTIRE file/dir structure
- tot = FileSize(FileItemize(""))
- sub1 = DirItemize("")
- if (tot==0 && sub1=="") then tot=FileSize(FileItemize("*.*"))
- then sub1=DirItemize("*.*")
- totdir=0
- level=1
- dir1=DirGet()
- numdir1 = ItemCount(sub1, " ")
- index1 = 0
-
- :loop
- If index%level% == numdir%level% Then Goto upalevel
- index%level% = index%level% + 1
- DirChange(StrCat(dir%level%, ItemExtract(index%level%, sub%level%, " ")))
- totdir=totdir+1
- tot = tot + FileSize(FileItemize("*.*"))
- level = level + 1
- dir%level% = DirGet()
- sub%level% = DirItemize("*.*")
- numdir%level% = ItemCount(sub%level%, " ")
- index%level% = 0
- goto loop
-
- :upalevel
- drop(dir%level%,sub%level%,index%level%,numdir%level%)
- level=level-1
- if level!=0 then goto loop
-
- :done
- ; -----------
- ; Termination
- ; -----------
- If StrLen(tot) < 9 Then tot = StrCat(StrFill("", 9 - StrLen(tot)), tot)
- tot = StrCat(StrSub(tot,1,3),",",StrSub(tot,4,3),",",StrSub(tot,7,3))
- tot = StrTrim(tot)
- If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
- tot = StrTrim(tot)
- If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
- tot = StrTrim(tot)
- Message("%totdir% Subdirectories included", "Total size %tot% bytes.")
- drop(tot,level,totdir)
-
- File &Info ; Display information on hilited files
- a=FileItemize("")
- if a=="" then a=FileItemize("*.*")
- tot=FileSize(a)
- c=ItemCount(a," ")
- n=0
- b=""
- :loop
- if n==c then goto show
- n=n+1
- a1=StrFix(ItemExtract(n,a," ")," ",14)
- a2=FileSize(a1)
- a3=FileTimeGet(a1)
- a4=FileAttrGet(a1)
- b=strcat(b,a1,tab,a2,tab,a3,tab,a4,"|")
- goto loop
- :show
- ItemSelect("Total Size=%tot%",b,"|")
- :cancel
- drop(a,tot,c,n,a1,a2,a3,a4,b)
-
- &Freespace on Local Drives
- Drives=DiskScan(2) ; 2 is the code for local hard drives
- Dmax=strlen(Drives)
- DIndex=1
- TotalSize=0
- DriveReport=""
-
- :COUNTSPACE
- NextDrive=StrSub(Drives,Dindex,1)
- a=DiskFree(NextDrive)/1024
- TotalSize=a+TotalSize
- DriveReport=strcat(DriveReport,NextDrive," = ",TAB,a,"K",TAB,strfill("|",(a+500)/1000),"@")
- DIndex=Dindex+3 ;each entry is 3 bytes long
- if DIndex<=Dmax then goto COUNTSPACE
- ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
- Drop(TotalSize,DriveReport,Drives,NextDrive)
-
- Floppy Space and selected files
- A:
- message(strcat("Drive A ",DiskFree("A")),strcat("Selected Files ",FileSize(FileItemize(""))))
- B:
- message(strcat("Drive B ",DiskFree("B")),strcat("Selected Files ",FileSize(FileItemize(""))))
-
-
- Clipboard Tricks
- Path and Filename to Clipboard
- Clipput(strcat(DirGet(),CurrentFile()))
- Copy &Directory to Clipboard
- a=FileItemize("*.*")
- a=ItemSort(a," ")
- a=StrReplace(a," ",cr)
- ClipPut(a)
- Drop(a)
- Copy &Hilited files to Clipboard
- a=FileItemize("")
- a=ItemSort(a," ")
- a=StrReplace(a," ",cr)
- ClipPut(a)
- Drop(a)
- Copy &Hilited dirs to Clipboard
- a=DirItemize("")
- a=ItemSort(a," ")
- a=StrReplace(a," ",cr)
- ClipPut(a)
- Drop(a)
- Run Character Mapper
- Run("charmap.exe","")
- Copy &Special Characters to Clipboard
- 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)
- ClipPut(a)
- Drop(a)
- _Start Clipboard
- run("clipbrd.exe","")
-
- |Applications
- Ami Pro (Lotus)
- a=FileLocate("amipro.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","sam","") ; No? Try via [extensions] section
- terminate(a=="","Error","AmiPro not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.sam stuff
- run(b,"") ; Run AmiPro
-
- Corel Draw! (Corel)
- a=IniRead("CorelDraw","Dir","") ; Try via INI file info
- terminate(a=="","Error","Corel Draw not found") ; Not installed normally
- a=strcat(a,"\coreldrw.exe")
- run(a,"") ;Corel Drw
-
- DynaComm (FutureSoft)
- a=FileLocate("dynacomm.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","dcm","") ; No? Try via [extensions] section
- terminate(a=="","Error","Dynacomm not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.dcm stuff
- run(b,"") ; Run Dynacomm
-
- Designer/Draw (Micrografx)
- a=IniRead("extensions","drw","") ; Try via [extensions] section
- terminate(a=="","Error","Drawing tool not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.drw stuff
- run(b,"") ; Run DRW tool
-
- Excel (Microsoft)
- a=FileLocate("excel.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","xls","") ; No? Try via [extensions] section
- terminate(a=="","Error","Excel not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.xls stuff
- run(b,"") ; Run Excel
-
- PowerPoint (Microsoft)
- a=FileLocate("powerpnt.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","ppt","") ; No? Try via [extensions] section
- terminate(a=="","Error","PowerPoint not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.ppt stuff
- run(b,"") ; Run PowerPoint
-
- Project (Microsoft)
- a=FileLocate("winproj.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","mpp","") ; No? Try via [extensions] section
- terminate(a=="","Error","Project not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.mpp stuff
- run(b,"") ; Run PowerPoint
-
- Publisher (Microsoft)
- a=FileLocate("mspub.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","pub","") ; No? Try via [extensions] section
- terminate(a=="","Error","Publisher not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.pub stuff
- run(b,"") ; Run Visual Basic
-
- Word For Windows (Microsoft)
- a=FileLocate("winword.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","dot","") ; No? Try via [extensions] section
- terminate(a=="","Error","WinWord not found") ; Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.dot stuff
- run(b,"") ; Run WinWord
-
- Visual Basic (Microsoft)
- a=FileLocate("vb.exe") ; Try brute force path search
- if a=="" then a=IniRead("extensions","frm","") ; No? Try via [extensions] section
- terminate(a=="","Error","Visual Basic not found"); Not installed normally
- b=strindex(a," ",0,@FWDSCAN) ; Find first space
- if b==0 then b=strlen(a)+1 ; None? ...adjust b
- b=strsub(a,1,b-1) ; Pick off ^.frm stuff
- run(b,"") ; Run Visual Basic
-
- _Control &Panel
- run("control.exe","")
-
- &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("File Commander %ver% SysInfo",Sysinfo)
-
-
-