home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / WINDOWS / UTILS / FC_10N.ZIP / WWWFMEXT.FM$ < prev   
Text File  |  1992-04-28  |  11KB  |  309 lines

  1. ; AutoExec Section is on top here.  Actually runs before file manager
  2. ; appears on the screen
  3.  
  4.         TAB=num2char(9)
  5.         CR=strcat(num2char(13),num2char(10))
  6. ;       if !WinExist("Clock") then Run("Clock.exe","")
  7.  
  8. Edit FM Extender menu
  9.         a=FileLocate("wwwfmext.fme")
  10.         adir=FilePath(a)
  11.         DirChange(adir)
  12.         aroot=FileRoot(a)
  13.         bname=strcat(aroot,".BAK")
  14.         FileCopy(a,bname,@FALSE)
  15.         run("notepad.exe","wwwfmext.fme")
  16.  
  17. _Bro&wse...
  18.         l=CurrentFile()
  19.         run("browser.exe",l)
  20.         drop(a,l)
  21. &Edit...
  22.         l=CurrentFile()
  23.         ;if !IsKeyDown(@SHIFT) then l=askline("Edit","Enter file to edit",l)
  24.         if l=="" || l==" " then goto NULL
  25.         a=strscan(l,".\",0,@BACKSCAN)
  26.         if a==0 then l=strcat(l,".")
  27.         if a==0 then goto NULL
  28.         if strsub(l,a,1)!="." then l=strcat(l,".")
  29.      :NULL
  30.         run("notepad.exe",strtrim(l))
  31.         drop(a,b,l)
  32. Utilities
  33.  &Freespace on Local Drives   
  34.         Drives=DiskScan(2)     ; 2 is the code for local hard drives
  35.         Dmax=strlen(Drives)
  36.         DIndex=1
  37.         TotalSize=0
  38.         DriveReport=""
  39.  
  40.         :COUNTSPACE
  41.         NextDrive=StrSub(Drives,Dindex,1)
  42.         a=DiskFree(NextDrive)/1024
  43.         TotalSize=a+TotalSize
  44.         DriveReport=strcat(DriveReport,NextDrive," = ",TAB,a,"K",TAB,strfill("|",(a+500)/1000),"@")
  45.         DIndex=Dindex+3  ;each entry is 3 bytes long
  46.         if DIndex<=Dmax then goto COUNTSPACE
  47.         ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
  48.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  49.  
  50.  
  51.  &Wallpaper
  52.            DirChange(dirWindows(0))
  53.            a=FileItemize("*.BMP")
  54.            a=strcat("-None- ",a)
  55.            a=ItemSelect("Select New Wallpaper",a," ")
  56.            terminate(a=="","Wallpaper","No wallpaper selected")
  57.            if a=="-None-" then Wallpaper("",0)
  58.            if a=="-None-" then exit
  59.            tile=@FALSE
  60.            if FileSize(a)<40000 then tile=@TRUE  
  61.            ;if bmp size less than 40K, assume tile, else center
  62.            Wallpaper(a,tile)
  63.            drop(a,b,tile)
  64.  Edit &INI files
  65.         DirChange(DirWindows(0))
  66.         canned="BYEBYE"
  67.         IniFiles=""
  68.         bSys386=0
  69.  
  70.         :UP1
  71.         canned="byebye"
  72.         If IniFiles!="" then goto inied
  73.         IniFiles=FileItemize("*.INI")
  74.         :inied
  75.         TheFile=ItemSelect("Choose Desired INI file",IniFiles," ")
  76.         if TheFile=="" then goto newini
  77.         Sections=""
  78.  
  79.         :UP2
  80.         canned="up1"
  81.         if Sections!="" then goto sected
  82.         Sections=IniItemizePvt("",TheFile)
  83.  
  84.         :SECTED
  85.         Section=ItemSelect("%TheFile% - Choose Section",Sections,TAB)
  86.         if Section=="" then goto AddSect
  87.         if stricmp(Section,"386Enh")==0 then bSys386=1
  88.                                         else bSys386=0
  89.         KeyValues=""
  90.  
  91.         :UP3
  92.         canned="up2"
  93.         if KeyValues!="" then goto looped
  94.         Keys=IniItemizePvt(Section,TheFile)
  95.         if (bSys386) then Keys=StrReplace(Keys,"device%TAB%","")
  96.              then Keys=StrReplace(Keys,"Device%TAB%","")
  97.              then Keys=StrReplace(Keys,"DEVICE%TAB%","")
  98.              then Keys=StrReplace(Keys,"device","")
  99.              then Keys=StrReplace(Keys,"Device","")
  100.              then Keys=StrReplace(Keys,"DEVICE","")
  101.         KeyMax=ItemCount(Keys,TAB)
  102.         KeyIndex=0
  103.  
  104.         :Loop
  105.         if KeyIndex==KeyMax then goto looped
  106.         KeyIndex=KeyIndex+1
  107.         ThisKey=ItemExtract(KeyIndex,Keys,TAB)
  108.         ThisValue=IniReadPvt(Section,ThisKey,"???",TheFile)
  109.         KeyValues=strcat(KeyValues,ThisKey,"= ",ThisValue,TAB)
  110.         goto Loop
  111.  
  112.         :looped
  113.         Key=ItemSelect("%TheFile% [%Section%] - Choose Keyword",KeyValues,TAB)
  114.         if Key=="" then goto AddKey
  115.         Key=ItemExtract(1,Key,"=")
  116.  
  117.         Value=IniReadPvt(Section,Key,"???",TheFile)
  118.         goto entkey
  119.  
  120.  
  121.         :newini
  122.         canned="UP1"
  123.         TheFile=Askline("Making NEW INI file","Enter new INI file name","*.INI")
  124.         if (TheFile=="*.INI" || TheFile=="") then goto newini
  125.         IniFIles=""
  126.         goto AddSectNewIni
  127.  
  128.         :AddSect
  129.         canned="up2"
  130.         :AddSectNewIni
  131.         Section=AskLine("Add New Section to INI File","Enter new section name for%CR%   %TheFile%%CR%      [?????]","")
  132.         Sections=""
  133.         goto AddKeyNewSect
  134.  
  135.         :AddKey
  136.         canned="up3"
  137.         :AddKeyNewSect
  138.         Key=AskLine("Add New Keyword to INI File","Enter new key name for%CR%   %TheFile%%CR%      [%Section%]","")
  139.         if (bSys386 && stricmp(Key,"device"==0)) then Message("Error","Cannot modify or add DEVICE= lines to [386Enh]")
  140.                                          then goto AddKeyNewSect
  141.         Value="(Undefined)"
  142.         KeyValues=""
  143.         goto EntKeyNewKey
  144.  
  145.         :ENTKEY
  146.         canned="up3"
  147.         :EntKeyNewkey
  148.         NewValue=AskLine("Modify INI File Keyword","%TheFile%%CR%   [%Section%]%CR%      %Key% = %Value%",Value)
  149.         if NewValue!=Value then iniwritepvt(Section,Key,NewValue,TheFile)
  150.         KeyValues=""
  151.         goto up3
  152.  
  153.         :CANCEL
  154.         goto %Canned%
  155.  
  156.         :BYEBYE
  157.         exit
  158.  
  159.  Clipboard Tricks
  160.   Path and Filename to Clipboard
  161.         Clipput(strcat(DirGet(),CurrentFile()))
  162.   Copy &Directory to Clipboard
  163.         a=FileItemize("*.*")
  164.         a=StrReplace(a," ",cr)
  165.         ClipPut(a)
  166.         Drop(a)
  167.   Copy &Hilited files to Clipboard
  168.         a=FileItemize("")
  169.         a=StrReplace(a," ",cr)
  170.         ClipPut(a)
  171.         Drop(a)
  172.   Copy &Hilited dirs to Clipboard
  173.         a=DirItemize("")
  174.         a=StrReplace(a," ",cr)
  175.         ClipPut(a)
  176.         Drop(a)
  177.   Copy &Special Characters to Clipboard
  178.        a=" í| ó| ú| ñ| Ñ| ª| º| ¿| ⌐| ¬|"       ;161 thru 170
  179.        b=" ½| ¼| ¡| «| »| ░| ▒| ▓| │| ┤|"       ;171 thru 180
  180.        c=" ╡| ╢| ╖| ╕| ╣| ║| ╗| ╝| ╜| ╛|"       ;181 thru 190
  181.        d=" ┐| └| ┴| ┬| ├| ─| ┼| ╞| ╟| ╚|"       ;191 thru 200
  182.        e=" ╔| ╩| ╦| ╠| ═| ╬| ╧| ╨| ╤| ╥|"       ;201 thru 210
  183.        f=" ╙| ╘| ╒| ╓| ╫| ╪| ┘| ┌| █| ▄|"       ;211 thru 220
  184.        g=" ▌| ▐| ▀| α| ß| Γ| π| Σ| σ| µ|"       ;221 thru 230
  185.        h=" τ| Φ| Θ| Ω| δ| ∞| φ| ε| ∩| ≡|"       ;231 thru 240
  186.        i=" ±| ≥| ≤| ⌠| ⌡| ÷| ≈| °| ∙| ·|"       ;241 thru 250
  187.        j=" √| ⁿ| ²| ■|  "                       ;251 thru 255
  188.        a=strcat(a,b,c,d,e,f,g,h,i,j)
  189.        Drop(b,c,d,e,f,g,h,i,j)
  190.        a=ItemSelect("Choose a character",a,"|")
  191.        a=strsub(a,2,1)
  192.        ClipPut(a)
  193.        Drop(a)
  194.  
  195.  
  196. Accessories
  197.  Appointment   Scheduling
  198.            run("Calendar.exe","")
  199.  Calculator
  200.            run("calc.exe","")
  201.  
  202.  C&lipboard
  203.         errormode(@off)
  204.         terminate(winactivate("Clipboard"),"","") ;Already Running
  205.         errormode(@cancel)
  206.         run("Clipbrd.exe","")
  207.  
  208.  Clock
  209.         run("clock.exe","")
  210.  
  211.  Control &Panel
  212.         errormode(@off)
  213.         terminate(winactivate("Control Panel"),"","")
  214.         errormode(@cancel)
  215.         run("control.exe","")
  216.  Cardfile
  217.            run("cardfile.exe","")
  218.  
  219.  Notepad Editor
  220.            run("notepad.exe","")
  221.  
  222.  Paint
  223.            run("pbrush.exe","")
  224.  
  225.  Write
  226.            run("write.exe","")
  227.  
  228.  Run System Confi&guration Editor
  229.            run("sysedit.exe","")  ;takes care of itself
  230.  Run Windows Setup
  231.         DirChange(DirWindows(0))
  232.         run("setup.exe","")
  233.         drop(a)
  234.  _PIF Edi&t...
  235.         a=strupper(FileExtension(CurrentFile()))
  236.         if a!="PIF" then goto PIF2
  237.         run("pifedit.exe",CurrentFile())
  238.         exit
  239.         :PIF2
  240.         if IsKeyDown(@SHIFT)==@YES then DirChange(FilePath(FileLocate("_default.pif")))
  241.         a=FileItemize("*.PIF")
  242.         if a==""  then DirChange(FilePath(FileLocate("_default.pif")))
  243.         if a=="" then a=FileItemize("*.PIF")
  244.         a=ItemSelect("Choose a PIF File to edit",a," ")
  245.         run("pifedit.exe",a)
  246.         exit
  247. _&System Information
  248.        wintype="retail"
  249.        if WinMetrics(22) then wintype="debug"
  250.  
  251.         wc=WinConfig()
  252.         if !(wc&1) then mode="Real"
  253.         if wc&16 then mode="Standard"
  254.         if wc&32 then mode="Enhanced"
  255.  
  256.         if wc&2 then cpu=286
  257.         if wc&4 then cpu=386
  258.         if wc&8 then cpu=486
  259.         if wc&64 then cpu=8086
  260.         if wc&128 then cpu=80186
  261.  
  262.         Sysinfo=strcat(cpu,' ',mode,' ',wintype,' Windows ',WinVersion(1),'.',WinVersion(0),CR)
  263.  
  264.         math="No math"
  265.         if wc&1024 then math="Math"
  266.         mouse="No Mouse"
  267.         if WinMetrics(19) then mouse="Mouse"
  268.  
  269.         Sysinfo=strcat(sysinfo,math," co-processor.   ",mouse,' available.',CR)
  270.  
  271.         sysinfo=strcat(sysinfo,WinMetrics(0),'x',WinMetrics(1)," video resolution.  ",WinMetrics(-1),"  colors.",CR)
  272.  
  273.         ErrorMode(@OFF)
  274.         LastError()
  275.         PlayMedia("Status WaveForm Ready")
  276.         ErrorMode(@CANCEL)
  277.         if LastError()!=1193 then sysinfo=strcat(sysinfo,"Windows multimedia extensions present.",CR)
  278.  
  279.         bug=NetGetCaps(2)
  280.         if bug==0 then math="No n"
  281.         if bug!=0 then math="N"
  282.         if bug==256 then math="Microsoft n"
  283.         if bug==512 then math="Lan Manager n"
  284.         if bug==768 then math="Novell NetWare n"
  285.         if bug==1024 then math="Banyan Vines n"
  286.         if bug==1280 then math="10 Net n"
  287.         sysinfo=strcat(sysinfo,math,"etwork installed.",CR)
  288.  
  289.         bug=WinResources(0)/1024   ; Compute memory avail
  290.         math=strlen(bug)
  291.         if math>3 then bug=strcat(strsub(bug,1,math-3),',',strsub(bug,math-2,3))
  292.  
  293.         sysinfo=strcat(sysinfo,CR,bug," KB Free Memory",CR)
  294.         sysinfo=strcat(sysinfo,WinResources(2),"%% System Resources Free (",WinResources(3),"%% GDI, ",WinResources(4),"%% User)",CR)
  295.  
  296.         sysinfo=strcat(sysinfo,"DOS ",DosVersion(1),'.',DosVersion(0),"  using ",environment("COMSPEC"),CR)
  297.         disks=DiskScan(1)
  298.         if disks!="" then sysinfo=strcat(sysinfo,"Floppies ",disks,CR)
  299.         disks=DiskScan(2)
  300.         if disks!="" then sysinfo=strcat(sysinfo,"Hard Disks ",disks,CR)
  301.         disks=DiskScan(4)
  302.         if disks!="" then sysinfo=strcat(sysinfo,"Network Disks ",disks,CR)
  303.         sysinfo=strcat(sysinfo,"Windows Directory ",DirWindows(0),CR)
  304.         sysinfo=strcat(sysinfo,"System  Directory ",DirWindows(1),CR)
  305.         sysinfo=strcat(sysinfo,CR,"WIL Interpreter Ver ",VersionDll())
  306.  
  307.         ver=Version()
  308.         Message("File Commander %ver% SysInfo",Sysinfo)
  309.