home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Shareware 500 (First Edition)
/
disk2.img
/
FILECMDR
/
WWWFC3.MN$
/
wwwfc3.mn_
Wrap
Text File
|
1992-11-10
|
6KB
|
202 lines
; Da AutoExec Section is on top here. Actually runs before File Manager
; actually appears on the screen
; These variables should already be defined by the first menu file,
; but just to make sure...
TAB=num2char(9)
CR=strcat(num2char(13),num2char(10))
Edit &INI files
call("wwwmenus.dll","INIEDIT")
&Wallpaper
call("wwwmenus.dll","WALLPAPER")
Sound Tricks
Play WAV file
a=CurrentFile()
if FileExtension(a)=="WAV" then goto play
a=FileItemize("*.wav")
if a!="" then goto sel
dirchange(DirWindows(0)) ; Where ever you hide your main wav files
a=fileitemize("*.wav")
:sel
a=itemselect("Waveform",a," ")
if a=="" then exit
:play
playwaveform(a,1)
Play whole dir of wav files
old=Sounds(0)
a=FileItemize("*.WAV")
if a=="" then goto oop
count=itemcount(a,' ')
index=0
:loop
index=index+1
if index>count then goto zoop
b=itemextract(index,a,' ')
playwaveform(b,1)
display(3,index,b)
goto loop
:oop
message("???","No wav files in directory")
:zoop
sounds(old)
Play MID or RMI file
a=CurrentFile()
if (FileExtension(a)=="MID" || FileExtension(a)=="RMI") then goto play
a=FileItemize("*.mid *.rmi")
if a!="" then goto sel
dirchange(DirWindows(0)) ; Where ever you hide your main mid/rmi files
a=fileitemize("*.mid")
:sel
a=itemselect("MIDI Player",a," ")
if a=="" then exit
:play
a=strcat(DirGet(),a)
playmidi(a,1)
Play a CD
PlayMedia("open cdaudio shareable alias donna notify")
PlayMedia("set donna time format tmsf")
PlayMedia("play donna from 1")
PlayMedia("close donna")
_ZIP...
Zip Current File
Keep Current File
call("wwwmenus.dll","zip current keep")
Move File to Zip
call("wwwmenus.dll","zip current move")
Zip Directory
Keep Files
call("wwwmenus.dll","zip dir keep")
Move Files to Zip
call("wwwmenus.dll","zip dir move")
Zip Directory and Subdirs
Keep Files
call("wwwmenus.dll","zip subdir keep")
Move Files to Zip
call("wwwmenus.dll","zip subdir move")
Zip Hilited Files
Keep Files
call("wwwmenus.dll","zip hilited keep")
Move Files to Zip
call("wwwmenus.dll","zip hilited move")
_UnZip
All files
Into Current Dir
call("wwwmenus.dll","unzip all 1")
Specify Options
call("wwwmenus.dll","unzip all 2")
Individual
Into Cur Dir/Overwrite
call("wwwmenus.dll","unzip indiv 1")
Specify Options
call("wwwmenus.dll","unzip indiv 2")
_&View contents
By &Name
call("wwwmenus.dll","unzip view 1")
By &Extension
call("wwwmenus.dll","unzip view 2")
By &Date
call("wwwmenus.dll","unzip view 3")
By &Size
call("wwwmenus.dll","unzip view 4")
|Interactive WIL
Execute WIL Function
Call("wwwmenus.dll","CMDSTACK NEWCMD")
Execute a Previous Entry
Call("wwwmenus.dll","CMDSTACK PREVIOUS")
_Flush Previous Entries
Call("wwwmenus.dll","CMDSTACK FLUSH")
Excel DDE Example
;This code makes a multiplication table in Excel via DDE
; Find Excel
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
channel = DDEInitiate("Excel", "Sheet1")
Numbers="One Two Three Four Five Six Seven Eight Nine Ten"
offset=1
row=0
:rowloop
col=0
row=row+1
if row > 10 then goto byebye
ThisNum=ItemExtract(row,Numbers," ")
title=row+offset
DDEPoke(channel, "R1C%title%", ThisNum)
DDEPoke(channel, "R%title%C1", ThisNUm)
:colloop
col=col+1
if col > 10 then goto rowloop
expression="=%row%*%col%"
address=strcat("R",row+offset,"C",col+offset)
DDEPoke(channel,address,expression)
goto colloop
:byebye
DDETerminate(channel)
Days between today and ???
;First convert todays date to Julian Equivalent
; extracts separate M, D, and Y variables from DateTime string
; assumes international date format is standard U.S. (MM/DD/YY)
dt1 = strtrim(DateTime())
dt = ItemExtract(3,dt1," ")
if dt=="" then dt=ItemExtract(2,dt1," ")
dm = ItemExtract(1,dt,"/")
dd = ItemExtract(2,dt,"/")
dy = ItemExtract(3,dt,"/")
; performs the actual conversion
dm = dm + 9
dy = dy + dm / 12 + 399
dm = dm mod 12
today = dy * 365 + dy / 4 - dy / 100 + dy / 400 + (153 * dm + 2) / 5 + dd - 146037
xt=strtrim(AskLine("Day Counter","Enter target date",dt))
xm = ItemExtract(1,xt,"/")
xd = ItemExtract(2,xt,"/")
xy = ItemExtract(3,xt,"/")
; performs the actual conversion
xm = xm + 9
xy = xy + xm / 12 + 399
xm = xm mod 12
other = xy * 365 + xy / 4 - xy / 100 + xy / 400 + (153 * xm + 2) / 5 + xd - 146037
diff=abs(today-other);
Message("Day Counter","%dt% <=> %xt%%CR%Are %diff% days apart")
drop(dt,dm,dd,dy,xm,xd,xy,xt,today,other,diff,dt1)
_Phone Book
call("wwwmenus.dll","FONEBOOK")