home *** CD-ROM | disk | FTP | other *** search
/ How Computers Work (Alt) / HowComputersWork.iso / 3rdParty / Wilson / FILEMENU.MN_ < prev    next >
Encoding:
Text File  |  2001-04-03  |  21.0 KB  |  471 lines

  1.           editor="winbatch studio.exe"    ;Default editor
  2.           ; Common menu for all file types
  3.           ;First figure out where filemenu.dll is installed via registry lookup
  4.           ErrorMode(@OFF)
  5.           wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch\CurrentVersion")
  6.           if wbdir==0 
  7.              wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch Compiler\CurrentVersion")
  8.           endif
  9.           ErrorMode(@CANCEL)
  10.           if wbdir==0 then Display(5,"Error","Registry entries missing.  Re-install WinBatch")
  11.           homedir=strcat(wbdir,"system\")
  12.  
  13.           inifile=strcat(DirWindows(0),"FileMenu.ini")
  14.           if !FileExist(inifile) then inifile=strcat(homedir,"FileMenu.ini")
  15.           commonmenu="FileMenu for all filetypes.mnw"
  16.           defaultmenu="FileMenu for misc filetypes.mnw"
  17.           menudir=IniReadPvt("FileMenu","MenuDir",homedir,inifile)
  18.           if Strsub(menudir,strlen(menudir),1)!="\" then menudir=StrCat(menudir,"\")
  19.  
  20. Two Explorers, side by side ; Your dual window file manager
  21.         a=IntControl(31,0,0,0,0)  ;return list of ids of explorer windows
  22.         c=ItemCount(a,@TAB)
  23.         switch c
  24.            case 0
  25.               run("explorer.exe",strcat("/n,/e,",DirGet()))
  26.               while FindWindow("ExploreWClass")==""    ;wait for it to come up
  27.                 Yield
  28.               end while
  29.               ;Fall into case 1
  30.  
  31.            case 1
  32.               TimeDelay(0.5)
  33.               run("explorer.exe",strcat("/n,/e,",DirGet()))
  34.               break
  35.            case c       ; 2 or more
  36.               break
  37.         endswitch
  38.         d=1
  39.         while c<2 && d<500
  40.            a=IntControl(31,0,0,0,0)
  41.            c=ItemCount(a,@TAB)
  42.            d=d+1
  43.         endwhile
  44.         if c<2 then exit
  45.         id1=ItemExtract(1,a,@TAB)
  46.         id2=ItemExtract(2,a,@tab)
  47.         WinPlaceSet(@NORMAL,id2,"500 0 1000 900")
  48.         WinShow(id2)
  49.         Yield
  50.         Yield
  51.         WinPlaceSet(@NORMAL,id1,"0 0 500 900")
  52.         WinShow(id1)
  53.      
  54. Open Other ... ; Choose an application to view or edit the selected file.
  55.  
  56.  &Browser (binary file viewer)  ; View any file in binary format.
  57.         file = CurrFilePath()
  58.         If !(FileExist(file)) Then file = ""
  59.         Else If FileExtension(file) == "" Then file = StrCat(file, ".")
  60.         ;Run("browser.exe", FileNameShort(file))
  61.         Run("browser.exe", strcat('"',file,'"'))     
  62.  &Notepad  ; Modify small plain text files.
  63.         file = CurrFilePath()
  64.         If !(FileExist(file)) Then file = ""
  65.         Else If FileExtension(file) == "" Then file = StrCat(file, ".")
  66.         Run("notepad.exe", file)
  67.  &MSPaint (bitmap) ; View and Modify bitmaps
  68.          file = CurrFilePath()
  69.          If !(FileExist(file)) Then file = ""
  70.               Else If FileExtension(file) == "" Then file = StrCat(file, ".")
  71.          bmpfile = strlower(FileExtension(file))
  72.          If bmpfile != "bmp" && bmpfile!="jpg" && bmpfile!="gif" && bmpfile!="jpeg"
  73.               Message("Error","Select a bmp, gif or jpg file and try again.")
  74.               Exit
  75.          EndIf          
  76.          rkey=RegOpenKey(@REGMACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths")
  77.          mspaintexe=RegQueryStr(rkey,"MSPAINT.EXE")
  78.          RegCloseKey(rkey)
  79.          Run(mspaintexe,strcat('"',file,'"'))
  80.  &Wordpad (text and graphics) ; Modify WORD, RTF, plain text files. Can contain bitmaps, too.
  81.          file = CurrFilePath()
  82.          If !(FileExist(file)) Then file = ""
  83.               Else If FileExtension(file) == "" Then file = StrCat(file, ".")
  84.          rkey=RegOpenKey(@REGMACHINE,"SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths")
  85.          wordpadexe=RegQueryStr(rkey,"WORDPAD.EXE")
  86.          RegCloseKey(rkey)
  87.          Run(wordpadexe,'"%file%"')
  88.  WinBatch &Studio (text) ; Open file with WinBatch Studio
  89.         f = CurrFilePath()
  90.         If !(FileExist(f)) Then f = ""
  91.         Else If FileExtension(f) == "" Then f = StrCat(f, ".")
  92.         f=strcat('"',f,'"')
  93.         Run(editor,f)
  94.  
  95.      
  96. File Operations
  97.  
  98.  File/Folder size    ;Sum sizes of all highlighted files and folders
  99.         
  100.         tot = FileSize(FileItemize(""))
  101.         sub1 = DirItemize("")
  102.         totdir=0
  103.         level=1
  104.         dir1=DirGet()
  105.         
  106.         numdir1 = ItemCount(sub1, @tab)
  107.         index1 = 0
  108.   
  109.         :dsloop
  110.         If index%level% == numdir%level% Then Goto upalevel
  111.         index%level% = index%level% + 1
  112.         DirChange(StrCat(dir%level%, ItemExtract(index%level%, sub%level%, @tab)))
  113.         
  114.         totdir=totdir+1
  115.         tot = tot + FileSize(FileItemize("*.*"))
  116.         level = level + 1
  117.         dir%level% = DirGet()
  118.         sub%level% = DirItemize("*.*")
  119.         numdir%level% = ItemCount(sub%level%, @tab)
  120.         index%level% = 0
  121.         goto dsloop
  122.   
  123.         :upalevel
  124.         drop(dir%level%,sub%level%,index%level%,numdir%level%)
  125.         level=level-1
  126.         if level!=0 then goto dsloop
  127.  
  128.         ; -----------
  129.         ; Termination
  130.         ; -----------
  131.         
  132.         If StrLen(tot) < 9 Then tot = StrCat(StrFill("", 9 - StrLen(tot)), tot)
  133.         tot = StrCat(StrSub(tot,1,3),",",StrSub(tot,4,3),",",StrSub(tot,7,3))
  134.         tot = StrTrim(tot)
  135.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  136.         tot = StrTrim(tot)
  137.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  138.         tot = StrTrim(tot)
  139.         Message("%totdir% Subdirectories included", "Total size %tot% bytes.")
  140.  
  141.  Print (with Notepad)   ;Print text-type file with notepad on default printer
  142.         Run("notepad.exe",strcat("/p ",CurrFilePath()))
  143.  Associate              ;Associate this type of file with an application
  144.         a=strlower(FileExtension(CurrentFile()))
  145.         Terminate((a=="exe"||a=="com"||a=="bat"||a=="pif"||a=="lnk"),"Ooops","Cannot associate executable files")
  146.         b=AskFileName("Associate %a% files with","C:\","Executable Files|*.exe;*.com;*.bat;*.pif|All Files|*.*|","",1)
  147.     
  148.         rkey=RegOpenKey(@REGCLASSES,"")
  149.         ErrorMode(@OFF)
  150.         RegDeleteKey(rkey,".%a%")
  151.         ErrorMode(@CANCEL)
  152.         RegSetValue(rkey, ".%a%", "%a%_auto_file")
  153.         RegSetValue(rkey,"%a%_auto_file\shell\open\command",strcat('"',b,'" "%%1"'))
  154.         AU=StrUpper(a)
  155.         RegSetValue(rkey,"%a%_auto_file","%AU% File")
  156.         RegClosekey(rkey)
  157.  File Attributes        ;View file attributes
  158.         files = FileItemize("")
  159.         numfiles = ItemCount(files,@TAB)
  160.         While numfiles == 1
  161.         file = CurrentFile()
  162.         result = FileAttrGet(file)
  163.         If StrLen(file) > 30
  164.              fileindialog = StrSub(file,1,30)
  165.           
  166.              fileindialog = StrCat(fileindialog," ...")
  167.         Else 
  168.              fileindialog = file
  169.         EndIf
  170.      
  171.         readonly = 2
  172.         archive = 2
  173.         system = 2
  174.         hidden = 2
  175.         If StrSub(result,1,1) == "R" Then readonly = "3"
  176.         If StrSub(result,2,1) == "A" Then archive = "3"
  177.         If StrSub(result,3,1) == "S" Then system = "3"
  178.         If StrSub(result,4,1) == "H" Then hidden = "3"
  179.  
  180.                FileAttributesFormat=`WWWDLGED,5.0`
  181.                
  182.                FileAttributesCaption=`File Attributes`
  183.                FileAttributesX=7
  184.                FileAttributesY=25
  185.                FileAttributesWidth=199
  186.                FileAttributesHeight=101
  187.                FileAttributesNumControls=17
  188.                
  189.                FileAttributes01=`110,86,36,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0`
  190.                FileAttributes02=`42,18,38,DEFAULT,STATICTEXT,DEFAULT,"Read Only"`
  191.                FileAttributes03=`126,18,36,DEFAULT,STATICTEXT,DEFAULT,"System"`
  192.                FileAttributes04=`84,18,36,DEFAULT,STATICTEXT,DEFAULT,"Archive"`
  193.                FileAttributes05=`168,18,36,DEFAULT,STATICTEXT,DEFAULT,"Hidden"`
  194.                FileAttributes06=`56,86,36,DEFAULT,PUSHBUTTON,DEFAULT,"&OK",1`
  195.                FileAttributes07=`2,54,36,DEFAULT,STATICTEXT,DEFAULT,"On"`
  196.                FileAttributes08=`2,36,36,DEFAULT,STATICTEXT,DEFAULT,"Off"`
  197.                FileAttributes09=`2,4,194,DEFAULT,STATICTEXT,DEFAULT,"Set File Attributes for => %fileindialog% "`
  198.                FileAttributes10=`42,36,36,DEFAULT,RADIOBUTTON,readonly,"",2`
  199.                FileAttributes11=`42,54,36,DEFAULT,RADIOBUTTON,readonly,"",3`
  200.                FileAttributes12=`166,54,36,DEFAULT,RADIOBUTTON,hidden,"",3`
  201.                FileAttributes13=`84,36,36,DEFAULT,RADIOBUTTON,archive,"",2`
  202.                FileAttributes14=`84,54,36,DEFAULT,RADIOBUTTON,archive,"",3`
  203.                FileAttributes15=`166,36,36,DEFAULT,RADIOBUTTON,hidden,"",2`
  204.                FileAttributes16=`126,36,36,DEFAULT,RADIOBUTTON,system,"",2`
  205.                FileAttributes17=`126,54,36,DEFAULT,RADIOBUTTON,system,"",3`
  206.                
  207.                ButtonPushed=Dialog("FileAttributes")
  208.  
  209.  
  210.  
  211.            Select buttonpushed
  212.           
  213.                Case 0
  214.                     Break
  215.                     
  216.                Case 1
  217.  
  218.                     first = ""
  219.                     second = ""
  220.                     third = ""
  221.                     fourth = ""
  222.                     If readonly == 2 Then first = "r"
  223.                     If archive == 2 Then second = "a"
  224.                     If system == 2 Then third = "s"
  225.                     If hidden == 2 Then fourth = "h"
  226.                     If readonly == 3 Then first = "R"
  227.                     If archive == 3 Then second = "A"
  228.                     If system == 3 Then third = "S"
  229.                     If hidden == 3 Then fourth = "H"
  230.  
  231.                     
  232.                     
  233.                     
  234.                     attributes = StrCat( first, second, third, fourth )
  235.                     FileAttrSet(file, attributes)
  236.                     break
  237.            End Select
  238.                 
  239.  
  240.      Exit
  241.      EndWhile
  242.  
  243.      ;Set Attributes: Selected Files
  244.  
  245.      displayfiles = files
  246.      readonly = 1
  247.      archive = 1
  248.      system = 1
  249.      hidden = 1
  250.                AttribFormat=`WWWDLGED,5.0`
  251.                
  252.                AttribCaption=`Attributes`
  253.                AttribX=6
  254.                AttribY=25
  255.                AttribWidth=201
  256.                AttribHeight=101
  257.                AttribNumControls=22
  258.                
  259.                Attrib01=`110,86,36,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0`
  260.                Attrib02=`42,18,38,DEFAULT,STATICTEXT,DEFAULT,"Read Only"`
  261.                Attrib03=`126,18,36,DEFAULT,STATICTEXT,DEFAULT,"System"`
  262.                Attrib04=`84,18,36,DEFAULT,STATICTEXT,DEFAULT,"Archive"`
  263.                Attrib05=`168,18,36,DEFAULT,STATICTEXT,DEFAULT,"Hidden"`
  264.                Attrib06=`2,34,38,DEFAULT,STATICTEXT,DEFAULT,"No Change"`
  265.                Attrib07=`2,70,36,DEFAULT,STATICTEXT,DEFAULT,"On"`
  266.                Attrib08=`2,52,36,DEFAULT,STATICTEXT,DEFAULT,"Off"`
  267.                Attrib09=`42,34,36,DEFAULT,RADIOBUTTON,readonly,"",1`
  268.                Attrib10=`42,52,36,DEFAULT,RADIOBUTTON,readonly,"",2`
  269.                Attrib11=`42,70,36,DEFAULT,RADIOBUTTON,readonly,"",3`
  270.                Attrib12=`84,34,36,DEFAULT,RADIOBUTTON,archive,"",1`
  271.                Attrib13=`84,52,36,DEFAULT,RADIOBUTTON,archive,"",2`
  272.                Attrib14=`84,70,36,DEFAULT,RADIOBUTTON,archive,"",3`
  273.                Attrib15=`126,34,36,DEFAULT,RADIOBUTTON,system,"",1`
  274.                Attrib16=`126,52,36,DEFAULT,RADIOBUTTON,system,"",2`
  275.                Attrib17=`126,70,36,DEFAULT,RADIOBUTTON,system,"",3`
  276.                Attrib18=`168,34,36,DEFAULT,RADIOBUTTON,hidden,"",1`
  277.                Attrib19=`168,52,36,DEFAULT,RADIOBUTTON,hidden,"",2`
  278.                Attrib20=`168,70,36,DEFAULT,RADIOBUTTON,hidden,"",3`
  279.                Attrib21=`58,2,130,DEFAULT,STATICTEXT,DEFAULT,"Set Attributes for Selected Files"`
  280.                Attrib22=`56,86,36,DEFAULT,PUSHBUTTON,DEFAULT,"&OK",1`
  281.                
  282.                ButtonPushed=Dialog("Attrib")
  283.                
  284.  
  285.  
  286.  
  287.           Select buttonpushed
  288.           
  289.                Case 0
  290.                     Break
  291.                     
  292.                Case 1
  293.  
  294.                     first = ""
  295.                     second = ""
  296.                     third = ""
  297.                     fourth = ""
  298.                     If readonly == 2 Then first = "r"
  299.                     If archive == 2 Then second = "a"
  300.                     If system == 2 Then third = "s"
  301.                     If hidden == 2 Then fourth = "h"
  302.                     If readonly == 3 Then first = "R"
  303.                     If archive == 3 Then second = "A"
  304.                     If system == 3 Then third = "S"
  305.                     If hidden == 3 Then fourth = "H"
  306.  
  307.                     
  308.                     
  309.                     
  310.                     attributes = StrCat( first, second, third, fourth )
  311.                     FileAttrSet(files, attributes)
  312.                     break
  313.            End Select
  314.       Exit                              
  315.  
  316.  
  317.  DOS &Copy  ; Like the good, old, DOS COPY command.
  318.        s = StrTrim(FileItemize(""))
  319.        s=StrReplace(s,@tab,"|")
  320.        If s == "" Then Message("Copy Error", "No files selected")
  321.        Then Exit
  322.        If ItemCount(s, "|") == 1 Then t = s
  323.        Else t = ""
  324.        t = AskLine("Copy", StrCat(s, @CRLF, @CRLF, "to"), t)
  325.        If t == "" Then Message("Copy Error", "Cannot copy to null file name")
  326.                Then Exit
  327.        FileCopy(s, t, @TRUE)
  328.  
  329.  DOS &Rename  ;Like the good, old DOS RENAME command.
  330.        s = StrTrim(FileItemize(""))
  331.        s=StrReplace(s,@tab,"|")
  332.        If s == "" Then Message("Rename Error", "No files selected")
  333.        Then Exit
  334.        If ItemCount(s, "|") == 1 Then t = s
  335.        Else t = ""
  336.        t = AskLine("Rename", StrCat(s, @CRLF, @CRLF, "to"), t)
  337.        If t == "" Then Message("Rename Error", "Cannot rename to null file name")
  338.                   Then Exit
  339.        FileRename(s, t)
  340.  
  341.   
  342. Clipboard Tricks ; Copies just the filenames to the clipboard
  343.  FileName(s) to Clipboard ; Just the filenames
  344.         a=FileItemize("")
  345.         a=ItemSort(a,@tab)
  346.         a=strreplace(a,@TAB,@CRLF)
  347.         ClipPut(a)
  348.         Display(2,"Filenames placed on Clipboard",a)
  349.  Path and FileName(s) to Clipboard ; Copies filenames with full paths to the Clipboard
  350.         a=FileItemPath("")
  351.         a=ItemSortNC(a,@TAB)
  352.         a=StrReplace(a,@TAB,@CRLF)
  353.         ClipPut(a)
  354.         Display(2,"Full path filenames placed on Clipboard",a)
  355.  Path to Clipboard   ; Copies just the path to the clipboard
  356.         a=DirGet()
  357.         ClipPut(a)
  358.         Display(2,"Path placed on Clipboard",a)
  359.         
  360.         
  361.  _Run Clipboard Viewer   ; Lets you see what is on the clipboard
  362.         Run("clipbrd.exe","")
  363.  
  364.  
  365. WIL Interactive
  366.  Execute a function
  367.         call("%homedir%wwwmenu95.wil","CMDSTACK NEWCMD")
  368.  _Load WIL Help File
  369.         WinHelp(strcat(wbdir,"Windows Interface Language.hlp"),"CONTENTS","")     
  370.       
  371.  
  372.  
  373.      
  374. _Edit File Menus ; Modify WinBatch FileMenus here 
  375.  Edit menu for this filetype  ; Edit menus for files with a specific file extension.
  376.         b=strupper(FileExtension(CurrentFile()))
  377.         a=IniReadPvt("Menus",b,"*NONE*",inifile)
  378.         c=a
  379.         if c=="*NONE*" then a=strcat("FileMenu for %b% files",".mnw")
  380.         if FilePath(a)=="" then a=strcat(menudir,a)
  381.         ;Message(a,FileExist(a))
  382.         if  FileExist(a)
  383.                 if c=="*NONE*"
  384.                    iniwritepvt("Menus",b,a,inifile)
  385.                    Display(7,"%b% was missing from %inifile%","Adding menu file back in now")
  386.                 endif
  387.         else
  388.                 c=AskYesNo("Please note:","The menu file for the %b% filetype does not exist.  Would you like to start a new one?")
  389.                 if c==@NO then exit
  390.                 c=               "; WinBatch FileMenu for %b% filetype%@CRLF%"
  391.                 c=strcat(c,@CRLF,"; This is a sample menu file to help you get started")
  392.                 c=strcat(c,@CRLF,"; writing your very own Winbatch FileMenu menus.  It is")
  393.                 c=strcat(c,@CRLF,"; really not too bad.  WinBatch is a simple programming")
  394.                 c=strcat(c,@CRLF,"; language.  You can find out just about all you need to")
  395.                 c=strcat(c,@CRLF,"; know from the Windows Interface Language help file or")
  396.                 c=strcat(c,@CRLF,"; the manual.  Check out the section on Menu Files,")
  397.                 c=strcat(c,@CRLF,"; the WIL Tutorial and the WIL Function Reference.")
  398.  
  399.                 c=strcat(c,@CRLF,@CRLF,"; Figure out Winbatch home directory")
  400.                 c=strcat(c,@CRLF,'        ErrorMode(@OFF)')
  401.                 c=strcat(c,@CRLF,'        wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch\CurrentVersion")')
  402.                 c=strcat(c,@CRLF,'        if wbdir==0 ')
  403.                 c=strcat(c,@CRLF,'           wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch Compiler\CurrentVersion")')
  404.                 c=strcat(c,@CRLF,'        endif')
  405.                 c=strcat(c,@CRLF,'        ErrorMode(@CANCEL)')
  406.                 c=strcat(c,@CRLF,'        if wbdir==0 then Display(5,"Error","Registry entries missing.  Re-install WinBatch")')
  407.                 c=strcat(c,@CRLF,'        homedir=strcat(wbdir,"system\")')
  408.  
  409.                 c=strcat(c,@CRLF,@CRLF,'Standalone menu item            ; Sample menu item')
  410.                 c=strcat(c,@CRLF,      '        Message("Hello","There")')
  411.                 c=strcat(c,@CRLF,@CRLF,'Top Level menu item')
  412.                 c=strcat(c,@CRLF,      ' Selected File is               ; Shows currently selected file')
  413.                 c=strcat(c,@CRLF,      '        a=CurrFilePath()')
  414.                 c=strcat(c,@CRLF,      '        Message("Selected File is",a)')
  415.                 c=strcat(c,@CRLF,      ' Run Calculator                 ; Sample Run function')
  416.                 c=strcat(c,@CRLF,      '        Run("calc.exe","")')
  417.                 c=strcat(c,@CRLF,      ' Run Notepad on selected file   ; Sample Run function with filename')
  418.                 c=strcat(c,@CRLF,      '        a=CurrFilePath()')
  419.                 c=strcat(c,@CRLF,      '        Run("notepad.exe",a)')
  420.  
  421.                 c=strcat(c,@CRLF,@CRLF,'; Note: You may want to delete this menu item if you edit this file')
  422.                 c=strcat(c,@CRLF,      ' _Delete this sample menu file  ; Deletes this menu file')
  423.                 c=strcat(c,@CRLF,      '        ErrorMode(@OFF)')
  424.                 c=strcat(c,@CRLF,      '        wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch\CurrentVersion")')
  425.                 c=strcat(c,@CRLF,      '        if wbdir==0')
  426.                 c=strcat(c,@CRLF,      '           wbdir=RegQueryStr(@REGMACHINE,"SOFTWARE\Wilson WindowWare\WinBatch Compiler\CurrentVersion")')
  427.                 c=strcat(c,@CRLF,      '        endif')
  428.                 c=strcat(c,@CRLF,      '        ErrorMode(@CANCEL)')
  429.                 c=strcat(c,@CRLF,      '        if wbdir==0 then Display(5,"Error","Registry entries missing.  Re-install WinBatch")')
  430.                 c=strcat(c,@CRLF,      '        homedir=strcat(wbdir,"system\")')
  431.                 c=strcat(c,@CRLF,      '        inifile=strcat(DirWindows(0),"FileMenu.ini")')
  432.                 c=strcat(c,@CRLF,      '        if !FileExist(inifile) then inifile=strcat(homedir,"FileMenu.ini")')
  433.                 c=strcat(c,@CRLF,      '        menudir=IniReadPvt("FileMenu","MenuDir",homedir,inifile)')
  434.                 c=strcat(c,@CRLF,      '        if StrSub(menudir,strlen(menudir),1)!="\" then menudir=StrCat(menudir,"\")')
  435.                 c=strcat(c,@CRLF,      '        b=strupper(FileExtension(CurrentFile()))')
  436.                 c=strcat(c,@CRLF,      '        a=IniReadPvt("Menus",b,"*NONE*",inifile)')
  437.                 c=strcat(c,@CRLF,      '        if a=="*NONE*" then a=strcat("Files%b%",".mnw")')
  438.                 c=strcat(c,@CRLF,      '        if FilePath(a)=="" then a=strcat(menudir,a)')
  439.                 c=strcat(c,@CRLF,      '        c=AskYesNo("Are you sure you wish to delete this menu file",a)')
  440.                 c=strcat(c,@CRLF,      '        if c==@YES')
  441.                 c=strcat(c,@CRLF,      '           IniDeletePvt("Menus",b,inifile)')
  442.                 c=strcat(c,@CRLF,      '           FileDelete(a)')
  443.                 c=strcat(c,@CRLF,      '        endif')
  444.  
  445.  
  446.  
  447.  
  448.                 c=strcat(c,@CRLF)
  449.                 fh=FileOpen(a,"WRITE")
  450.                 FileWrite(fh,c)
  451.                 FileClose(fh)
  452.                 iniwritepvt("Menus",b,a,inifile)
  453.                 drop(c)
  454.                 
  455.         endif
  456.         Run(Editor,'"%a%"')
  457.  ;Edit the Miscellaneous File Menu     ; Edit menus for files with unrecognized extensions
  458.  ;       a=IniReadPvt("FileMenu","DefaultMenu",defaultmenu,inifile)
  459.  ;       if FilePath(a)=="" then a=strcat(menudir,a)
  460.  ;       Run(Editor,'"%a%"')
  461.  Edit menu for all filetypes      ; Edit global menu for all files 
  462.         a=IniReadPvt("FileMenu","CommonMenu",commonmenu,inifile)
  463.         if FilePath(a)=="" then a=strcat(menudir,a)
  464.         Run(Editor,'"%a%"') 
  465.  _Load WIL Help File
  466.         WinHelp(strcat(wbdir,"Windows Interface Language.hlp"),"CONTENTS","")     
  467.  
  468.  _About WinBatch FileMenu  ; Software from Wilson WindowWare
  469.         About()           
  470.            
  471.