home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 19 / CD_ASCQ_19_010295.iso / win / tools / fc30e / wwwfc3.mn_ < prev    next >
Text File  |  1994-09-24  |  6KB  |  211 lines

  1. ; Da AutoExec Section is on top here.  Actually runs before File Manager
  2. ; actually appears on the screen
  3. ; These variables should already be defined by the first menu file,
  4. ; but just to make sure...
  5.  
  6.         TAB=num2char(9)
  7.         CR=strcat(num2char(13),num2char(10))
  8.  
  9. Edit &INI files
  10.         call("%HomeBase%wwwmenus.wil","INIEDIT")
  11.  
  12. &Wallpaper
  13.        call("%HomeBase%wwwmenus.wil","WALLPAPER")
  14.  
  15. Sound Tricks
  16.  Play WAV file
  17.         a=CurrentFile()
  18.         if FileExtension(a)=="WAV" then goto play
  19.         a=FileItemize("*.wav")
  20.         if a!="" then goto sel
  21.         dirchange(DirWindows(0))        ; Where ever you hide your main wav files
  22.         a=fileitemize("*.wav")
  23.         :sel
  24.         a=itemselect("Waveform",a," ")
  25.         if a=="" then exit
  26.         :play
  27.         playwaveform(a,1)
  28.  
  29.  Play whole dir of wav files
  30.         old=Sounds(0)
  31.         a=FileItemize("*.WAV")
  32.         if a=="" then goto oop
  33.         count=itemcount(a,' ')
  34.         index=0
  35.         :loop
  36.         index=index+1
  37.         if index>count then goto zoop
  38.         b=itemextract(index,a,' ')
  39.         playwaveform(b,1)
  40.         display(3,index,b)
  41.         goto loop
  42.         :oop
  43.         message("???","No wav files in directory")
  44.         :zoop
  45.         sounds(old)
  46.  
  47.  Play MID or RMI file
  48.         a=CurrentFile()
  49.         if (FileExtension(a)=="MID" || FileExtension(a)=="RMI") then goto play
  50.         a=FileItemize("*.mid *.rmi")
  51.         if a!="" then goto sel
  52.         dirchange(DirWindows(0))        ; Where ever you hide your main mid/rmi files
  53.         a=fileitemize("*.mid")
  54.         :sel
  55.         a=itemselect("MIDI Player",a," ")
  56.         if a=="" then exit
  57.         :play
  58.         a=strcat(DirGet(),a)
  59.         playmidi(a,1)
  60.  
  61.  Play a CD
  62.         PlayMedia("open cdaudio shareable alias donna notify")
  63.         PlayMedia("set donna time format tmsf")
  64.         PlayMedia("play donna from 1")
  65.         PlayMedia("close donna")
  66.  
  67. _ZIP...
  68.  Zip Current File
  69.   Keep Current File
  70.         call("%HomeBase%wwwmenus.wil","zip current keep")
  71.   Move File to Zip
  72.         call("%HomeBase%wwwmenus.wil","zip current move")
  73.  
  74.  Zip Directory
  75.   Keep Files
  76.         call("%HomeBase%wwwmenus.wil","zip dir keep")
  77.   Move Files to Zip
  78.         call("%HomeBase%wwwmenus.wil","zip dir move")
  79.  
  80.  Zip Directory and Subdirs
  81.   Keep Files
  82.         call("%HomeBase%wwwmenus.wil","zip subdir keep")
  83.   Move Files to Zip
  84.         call("%HomeBase%wwwmenus.wil","zip subdir move")
  85.  
  86.  Zip Hilited Files
  87.   Keep Files
  88.         call("%HomeBase%wwwmenus.wil","zip hilited keep")
  89.   Move Files to Zip
  90.         call("%HomeBase%wwwmenus.wil","zip hilited move")
  91.  
  92.  
  93.  _UnZip
  94.   All files
  95.    Into Current Dir
  96.         call("%HomeBase%wwwmenus.wil","unzip all 1")
  97.    Specify Options
  98.         call("%HomeBase%wwwmenus.wil","unzip all 2")
  99.   Individual
  100.    Into Cur Dir/Overwrite
  101.         call("%HomeBase%wwwmenus.wil","unzip indiv 1")
  102.    Specify Options
  103.         call("%HomeBase%wwwmenus.wil","unzip indiv 2")
  104.  
  105.  _&View contents
  106.   By &Name
  107.         call("%HomeBase%wwwmenus.wil","unzip view 1")
  108.   By &Extension
  109.         call("%HomeBase%wwwmenus.wil","unzip view 2")
  110.   By &Date
  111.         call("%HomeBase%wwwmenus.wil","unzip view 3")
  112.   By &Size
  113.         call("%HomeBase%wwwmenus.wil","unzip view 4")
  114.  
  115.  
  116.  
  117. |Interactive WIL
  118.  Execute WIL Function
  119.         call("%HomeBase%wwwmenus.wil","CMDSTACK NEWCMD")
  120.  Execute a Previous Entry
  121.         call("%HomeBase%wwwmenus.wil","CMDSTACK PREVIOUS")
  122.  _Flush Previous Entries
  123.         call("%HomeBase%wwwmenus.wil","CMDSTACK FLUSH")
  124.  
  125.  
  126. Excel DDE Example
  127. ;This code makes a multiplication table in Excel via DDE
  128.                                                          ; Find Excel
  129.          a=FileLocate("excel.exe")                       ; Try brute force path search
  130.          if a=="" then a=IniRead("extensions","xls","")  ; No? Try via [extensions] section
  131.          terminate(a=="","Error","Excel not found")      ; Not installed normally
  132.          b=strindex(a," ",0,@FWDSCAN)                    ; Find first space
  133.          if b==0 then b=strlen(a)+1                      ; None? ...adjust b
  134.          b=strsub(a,1,b-1)                               ; Pick off ^.xls stuff
  135.          run(b,"")                                       ; Run Excel
  136.  
  137.          channel = DDEInitiate("Excel", "Sheet1")
  138.  
  139.          Numbers="One Two Three Four Five Six Seven Eight Nine Ten"
  140.  
  141.          offset=1
  142.          row=0
  143.  
  144.          :rowloop
  145.          col=0
  146.          row=row+1
  147.          if row > 10 then goto byebye
  148.  
  149.          ThisNum=ItemExtract(row,Numbers," ")
  150.          title=row+offset
  151.          DDEPoke(channel, "R1C%title%", ThisNum)
  152.          DDEPoke(channel, "R%title%C1", ThisNUm)
  153.  
  154.          :colloop
  155.          col=col+1
  156.          if col > 10 then goto rowloop
  157.  
  158.          expression="=%row%*%col%"
  159.          address=strcat("R",row+offset,"C",col+offset)
  160.          DDEPoke(channel,address,expression)
  161.          goto colloop
  162.  
  163.          :byebye
  164.          DDETerminate(channel)
  165.  
  166.  
  167. Days between today and ???
  168.         ;First convert todays date to Julian Equivalent
  169.          
  170.         ; extracts separate M, D, and Y variables from DateTime string
  171.         ; assumes international date format is standard U.S. (MM/DD/YY)
  172.  
  173.         dt1 = strtrim(DateTime())
  174.         dt = ItemExtract(3,dt1," ")
  175.         if dt=="" then dt=ItemExtract(2,dt1," ")
  176.         dm = ItemExtract(1,dt,"/")
  177.         dd = ItemExtract(2,dt,"/")
  178.         dy = ItemExtract(3,dt,"/")
  179.  
  180.         ; performs the actual conversion
  181.         dm = dm + 9
  182.         dy = dy + dm / 12 + 399
  183.         dm = dm mod 12
  184.         today = dy * 365 + dy / 4 - dy / 100 + dy / 400 + (153 * dm + 2) / 5 + dd - 146037
  185.         xt=strtrim(AskLine("Day Counter","Enter target date",dt))
  186.  
  187.         xm = ItemExtract(1,xt,"/")
  188.         xd = ItemExtract(2,xt,"/")
  189.         xy = ItemExtract(3,xt,"/")
  190.  
  191.         ; performs the actual conversion
  192.         xm = xm + 9
  193.         xy = xy + xm / 12 + 399
  194.         xm = xm mod 12
  195.         other = xy * 365 + xy / 4 - xy / 100 + xy / 400 + (153 * xm + 2) / 5 + xd - 146037
  196.         diff=abs(today-other);
  197.         Message("Day Counter","%dt% <=> %xt%%CR%Are %diff% days apart")
  198.         drop(dt,dm,dd,dy,xm,xd,xy,xt,today,other,diff,dt1)
  199.  
  200. _Phone Book
  201.         call("%HomeBase%wwwmenus.wil","FONEBOOK")
  202.  
  203.  
  204.  
  205.           
  206.            
  207.            
  208.            
  209.            
  210.            
  211.