home *** CD-ROM | disk | FTP | other *** search
/ BUG 2 / BUGCD1997_01.iso / utils / winbatch / www95.wi_ < prev    next >
Text File  |  1995-09-02  |  20KB  |  513 lines

  1. ; WWWMENUS.DLL
  2. ; Common menus used by WWW Products
  3.  
  4.     CancelCmd="Exit"
  5.     goto %param1%        ; Go immediately to desired section
  6.                          ; Defined sections are:
  7.                               ZIP
  8.                               UNZIP
  9.                               SYSINFO
  10.                               INIEDIT
  11.                               FONEBOOK
  12.                               DIRSIZE
  13.                               FILEINFO
  14.                               FREESPACE
  15.                               CMDSTACK
  16.                               WALLPAPER
  17. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  18. :WALLPAPER
  19.            a=strcat(CurrentPath(),CurrentFile()) ; Is a BMP file hilited?
  20.            if FileExtension(a)=="BMP" then goto walldoit
  21.            a=FileItemize("*.bmp")                ; No?  Any in Current Directory?
  22.            if a!="" then goto sel
  23.  
  24.            ; Hmmm cannot find any BMP in current dir.  Check INI/Prompt user for info
  25.            WallDir1=inireadpvt("wallpaper","WallPaperDir","ASK","WWW-PROD.INI")
  26.            :REASK
  27.            if WallDir1=="ASK" then WallDir=AskLine("WallPaper","What directory are your *.BMP WallPaper files in?",DirWindows(0))
  28.                               else WallDir=WallDir1
  29.            ErrorMode(@off)
  30.            DirChange(WallDir)
  31.            ErrorMode(@cancel)
  32.            a=FileItemize("*.BMP")
  33.            if a=="" then Message("WallPaper Error","No *.BMP files found in %WallDir%")
  34.                     then goto REASK
  35.            if WallDir!=WallDir1 then iniwritepvt("wallpaper","WallPaperDir",WallDir,"WWW-PROD.INI")
  36.  
  37.            :sel
  38.            a=strcat("-None- ",a)
  39.            a=ItemSelect("Select New Wallpaper",a," ")
  40.            terminate(a=="","Wallpaper","No wallpaper selected")
  41.            if a=="-None-" then Wallpaper("",0)
  42.                           then exit
  43.            a=strcat(DirGet(),a)
  44.            :walldoit
  45.            tile=@FALSE
  46.            if FileSize(a)<40000 then tile=@TRUE
  47.            ;if bmp size less than 40K, assume tile, else center
  48.            Wallpaper(a,tile)
  49.            drop(a,b,tile)
  50.            Exit
  51. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  52. :CMDSTACK
  53.         ; CmdStack uses wierd variable names to reduce the chance that a user
  54.         ; will try to execute a statement using the same names!!
  55.         if !IsDefined(CMDSTK987Cmds) Then CMDSTK987Cmds=""
  56.         if !IsDefined(CMDSTK987Last) Then CMDSTK987Last="1+2+3"
  57.         goto %param2%
  58.  
  59.    :PREVIOUS
  60.         If CMDSTK987Cmds == "" Then Goto NEWCMD
  61.         CMDSTK987Now = TextSelect("Select a command, or OK to enter a new command", CMDSTK987Cmds, @tab)
  62.         If CMDSTK987Now != "" Then Goto CMDDOIT
  63.    :NEWCMD
  64.         CMDSTK987Now = AskLine("WIL Interactive", "Command to execute:", CMDSTK987Last)
  65.         If CMDSTK987Now == "" Then Goto PREVIOUS
  66.    :CMDDOIT
  67.         Execute Message(CMDSTK987Now, %CMDSTK987Now%)
  68.         if ItemLocate(CMDSTK987Now,CMDSTK987Cmds,@tab) then goto PREVIOUS
  69.         a=@tab
  70.         if CMDSTK987Cmds=="" then a=""
  71.         CMDSTK987Cmds = StrCat(CMDSTK987Cmds, a, CMDSTK987Now)
  72.         CMDSTK987Last = CMDSTK987Now
  73.         Goto PREVIOUS
  74.  
  75.    :FLUSH
  76.       If AskYesNo("Flush WIL command stack", "Really?") Then CMDSTK987Cmds = ""
  77.       Exit
  78. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  79. :FREESPACE
  80.         Drives=DiskScan(2)     ; 2 is the code for local hard drives
  81.         Dmax=strlen(Drives)
  82.         DIndex=1
  83.         TotalSize=0
  84.         DriveReport=""
  85.         madmax=0
  86.         :COUNTSPACE
  87.         NextDrive=StrSub(Drives,Dindex,1)
  88.         a=DiskFree(NextDrive)/1024
  89.         TotalSize=a+TotalSize
  90.         DriveReport=strcat(DriveReport,NextDrive," = ",@tab,a,"K","@")
  91.         DIndex=Dindex+3  ;each entry is 3 bytes long
  92.         if DIndex<=Dmax then goto COUNTSPACE
  93.         ItemSelect("Total Space Available = %TotalSize%K",DriveReport,"@")
  94.         Drop(TotalSize,DriveReport,Drives,NextDrive)
  95.         Exit
  96. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  97. :FILEINFO
  98.         CancelCmd="goto cancelfi"
  99.         a=FileItemize("")
  100.         if a=="" then a=FileItemize("*.*")
  101.         tot=FileSize(a)
  102.         c=ItemCount(a," ")
  103.         n=0
  104.         b=""
  105.         :ffloop
  106.         if n==c then goto ffshow
  107.         n=n+1
  108.         a1=StrFix(ItemExtract(n,a," ")," ",14)
  109.         a2=FileSize(a1)
  110.         a3=FileTimeGet(a1)
  111.         a4=FileAttrGet(a1)
  112.         b=strcat(b,a1,@tab,a2,@tab,a3,@tab,a4,"|")
  113.         goto ffloop
  114.         :ffshow
  115.         ItemSelect("Total Size=%tot%",b,"|")
  116.         :cancelfi
  117.         drop(a,tot,c,n,a1,a2,a3,a4,b)
  118.         Exit
  119. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  120. :DIRSIZE
  121.         tot = FileSize(FileItemize(""))
  122.         sub1 = DirItemize("")
  123.         if (tot==0 && sub1=="") then tot=FileSize(FileItemize("*.*"))
  124.                                 then sub1=DirItemize("*.*")
  125.         totdir=0
  126.         level=1
  127.         dir1=DirGet()
  128.         numdir1 = ItemCount(sub1, " ")
  129.         index1 = 0
  130.   
  131.         :dsloop
  132.         If index%level% == numdir%level% Then Goto upalevel
  133.         index%level% = index%level% + 1
  134.         DirChange(StrCat(dir%level%, ItemExtract(index%level%, sub%level%, " ")))
  135.         totdir=totdir+1
  136.         tot = tot + FileSize(FileItemize("*.*"))
  137.         level = level + 1
  138.         dir%level% = DirGet()
  139.         sub%level% = DirItemize("*.*")
  140.         numdir%level% = ItemCount(sub%level%, " ")
  141.         index%level% = 0
  142.         goto dsloop
  143.   
  144.         :upalevel
  145.         drop(dir%level%,sub%level%,index%level%,numdir%level%)
  146.         level=level-1
  147.         if level!=0 then goto dsloop
  148.  
  149.         ; -----------
  150.         ; Termination
  151.         ; -----------
  152.         If StrLen(tot) < 9 Then tot = StrCat(StrFill("", 9 - StrLen(tot)), tot)
  153.         tot = StrCat(StrSub(tot,1,3),",",StrSub(tot,4,3),",",StrSub(tot,7,3))
  154.         tot = StrTrim(tot)
  155.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  156.         tot = StrTrim(tot)
  157.         If StrSub(tot, 1, 1) == "," Then tot = StrSub(tot, 2, StrLen(tot) - 1)
  158.         tot = StrTrim(tot)
  159.         Message("%totdir% Subdirectories included", "Total size %tot% bytes.")
  160.         drop(tot,level,totdir)
  161.         Exit
  162.  
  163. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  164. :SYSINFO
  165.        wintype="retail"
  166.        if WinMetrics(22) then wintype="debug"
  167.         wcx=WinMetrics(-4)
  168.         math="Math"
  169.         switch wcx
  170.             case 1
  171.             case 2
  172.             case 3
  173.                 wc=WinConfig()
  174.                 if !(wc&1) then mode="Real"
  175.                 if wc&16 then mode="Standard"
  176.                 if wc&32 then mode="Enhanced"
  177.                 
  178.                 if wc&64 then cpu=8086
  179.                 if wc&128 then cpu=80186
  180.                 if wc&2 then cpu=286
  181.                 if wc&4 then cpu=386
  182.                 if wc&8 then cpu=486
  183.                 mode = strcat(cpu,' ',mode,' ',wintype,' Windows ')
  184.                 if !(wc&1024)  then math="No math"
  185.                 break
  186.                 
  187.             case 4
  188.                cpu= ItemExtract(6,WinSysInfo(),@tab)
  189.                wcy=WinMetrics(-3)
  190.                switch wcy    
  191.                     case 1 ; Win32 Intel
  192.                          mode="Intel 32-bit %wintype% Windows "
  193.                          break
  194.                     case 2 ; Dec Alpha
  195.                          mode="DEC Alpha %wintype% Windows NT "
  196.                          break
  197.                     case 3 ; MIPS
  198.                          mode="MIPS %wintype% Windows NT "
  199.                          break
  200.                     case 4 ; PowerPC 
  201.                          mode="PowerPC %wintype% Windows NT "
  202.                          break
  203.                endswitch
  204.                break
  205.             
  206.             case 5
  207.                 cpu= ItemExtract(6,WinSysInfo(),@tab)
  208.                 mode="Intel 32-bit %wintype% Windows 95+ Ver "
  209.                 break
  210.                 
  211.            case wcx ; Unknown 
  212.                 cpu= ItemExtract(6,WinSysInfo(),@tab)
  213.                 mode="Unknown platform %wintype% Windows  "
  214.                 break
  215.         endswitch
  216.  
  217.         Sysinfo=strcat(cpu,' ',mode,WinVersion(1),'.',WinVersion(0),@CRLF)
  218.  
  219.         mouse="No Mouse"
  220.         if WinMetrics(19) then mouse="Mouse"
  221.  
  222.         Sysinfo=strcat(sysinfo,math," co-processor.   ",mouse,' available.',@CRLF)
  223.  
  224.         sysinfo=strcat(sysinfo,WinMetrics(0),'x',WinMetrics(1)," video resolution.  ",WinMetrics(-1),"  colors.",@CRLF)
  225.  
  226.         ErrorMode(@OFF)
  227.         LastError()
  228.         PlayMedia("Status WaveForm Ready")
  229.         ErrorMode(@CANCEL)
  230.         if LastError()!=1193 then sysinfo=strcat(sysinfo,"Windows multimedia extensions present.",@CRLF)
  231.         a=NetInfo(0)
  232.         if a=="MULTINET"
  233.              b=NetInfo(1)
  234.              bug=strcat(b,"network(s) installed.)
  235.              ;Message("Multinet supporting  %count% networks", b)
  236.         else
  237.              ;Message("Installed Network", a)
  238.              bug=strcat(a," network installed")
  239.         endif
  240.         sysinfo=strcat(sysinfo,bug,@crlf)
  241.  
  242.  
  243.         bug=WinResources(11)/1024   ; Get Physical memory avail
  244.         sysinfo=strcat(sysinfo,@CRLF,bug," KB Physical Memory",@CRLF)
  245.         bug=(WinResources(14)/1024)+bug   ; Get Virtual memory + Physical avail
  246.         sysinfo=strcat(sysinfo,bug," KB Total Memory",@CRLF)
  247.  
  248.         sysinfo=strcat(sysinfo,"Console ",DosVersion(1),'.',DosVersion(0),"  using ",environment("COMSPEC"),@CRLF)
  249.         disks=DiskScan(1)
  250.         disks=StrReplace(disks,@tab," ")
  251.         if disks!="" then sysinfo=strcat(sysinfo,"Floppies ",disks,@CRLF)
  252.         disks=DiskScan(2)
  253.         disks=StrReplace(disks,@tab," ")
  254.         if disks!="" then sysinfo=strcat(sysinfo,"Hard Disks ",disks,@CRLF)
  255.         disks=DiskScan(4)
  256.         disks=StrReplace(disks,@tab," ")
  257.         if disks!="" then sysinfo=strcat(sysinfo,"Network Disks ",disks,@CRLF)
  258.         sysinfo=strcat(sysinfo,"Windows Directory ",DirWindows(0),@CRLF)
  259.         sysinfo=strcat(sysinfo,"System  Directory ",DirWindows(1),@CRLF)
  260.         sysinfo=strcat(sysinfo,@CRLF,"WIL Interpreter Ver ",VersionDll())
  261.  
  262.         ver=Version()
  263.         Message("%Param2% %ver% SysInfo",Sysinfo)
  264.         Exit
  265.  
  266. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  267. :ZIP
  268. :UNZIP
  269.     debug(1)
  270.     CancelCommand="goto ZZCANCEL"
  271.     ErrMsg=""
  272.     If !FileExist("wwwdos.bat")   Then ErrMsg="WWWDOS.BAT   not found"
  273.     If !FileExist("wwwdosp.pif")  Then ErrMsg="WWWDOSP.PIF  not found"
  274.     If !FileExist("wwwdosc.pif")  Then ErrMsg="WWWDOSC.PIF  not found"
  275.     If !FileExist("wwwzipls.exe") Then ErrMsg="WWWZIPLS.EXE not found"
  276.     If !FileExist("pkzip.exe")    Then ErrMsg="PKZIP.EXE    not found"
  277.     If !FileExist("pkunzip.exe")  Then ErrMsg="PKUNZIP.EXE  not found"
  278.     If !FileExist("%FCDir789672%browser.exe")  Then ErrMsg="%FCDir789672%BROWSER.EXE  not found"
  279.     If ErrMsg!="" Then Goto ShowError
  280.  
  281.         goto %param1%2     ; must be ZIP or UNZIP
  282.  
  283. :ZIP2
  284.         DaMove=" -a "
  285.         DaDirs=""
  286.         DaWho="*.*"
  287.         DaZip=""
  288.         DaRefresh=0
  289.         DaTitle="Files"
  290.         param3=strlower(param3)
  291.         if param3=="move" then DaMove=" -m "
  292.         goto %param2%         ; Must be CURRENT, DIR, SUBDIR, or HILITED
  293.  
  294. :CURRENT
  295.         DaWho=strcat(CurrentPath(),CurrentFile())
  296.         DaZip=strcat(FileRoot(DaWho),".ZIP")
  297.         goto ZIPDO
  298. :SUBDIR
  299.        DaDirs=" -r -p "
  300.        DaRefresh=1
  301.        DaTitle="Structure"
  302.        goto ZIPDO
  303.  
  304. :HILITED
  305.         b=FileItemize("")
  306.         If b=="" Then ErrMsg="Zip Hilited files?  No files hilited!"
  307.                  Then Goto ShowError
  308.         b=strreplace(b," ",@CRLF)
  309.         fp=FileOpen("FC-TEMP9.XCV","WRITE")
  310.         FileWrite(fp,b)
  311.         FileClose(fp)
  312.         Drop(b)
  313.         DaWho="@FC-TEMP9.XCV"
  314.         goto ZIPDO
  315.  
  316. :DIR
  317.        DaTitle="Directory"
  318.        goto ZIPDO
  319.  
  320. :ZIPDO
  321.         DaZip=AskLine("Zip %DaTitle%","Enter desired ZIP name",DaZip)
  322.         if DaZip=="" then goto zzcancel
  323.         Runwait("wwwdosc.pif","pkzip.exe %DaMove% %DaDirs% %DaZip% %DaWho%")
  324.         if DaWho=="FC-TEMP9.XCV" then FileDelete(DaWho)
  325.         Refresh(DaRefresh)
  326.         Display(3,"Zip %DaTitle%","Complete")
  327.         goto zzcancel
  328.  
  329. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  330. :UNZIP2
  331.  
  332.        ViewFlag=0
  333.        zipsort=param3
  334.        goto %param2%    ; must be ALL, VIEW, or INDIV
  335.  
  336. :ALL
  337.         zipfile=strcat(CurrentPath(),CurrentFile())
  338.         if FileExtension(zipfile)=="ZIP" then goto alldoit
  339.         zipfile=FileItemize("*.zip")
  340.         If zipfile=="" Then ErrMsg="UnZip files?  No zip files found!"
  341.                  Then Goto ShowError
  342.         zipfile=itemselect("Select file to UnZip",zipfile," ")
  343.         if zipfile=="" then goto zzcancel
  344. :alldoit
  345.         if param3==2 then goto allspec
  346.         runwait("wwwdosc.pif","pkunzip.exe -d %zipfile%")
  347.         Refresh(1)
  348.         goto zzcancel
  349.  
  350. :allspec
  351.         RetHome="allspec1"
  352.         goto DoOptions
  353. :allspec1
  354.         if overwarn==0 then overwarn=" -o "
  355.                        else overwarn=""
  356.         RunWait("wwwdosc.pif", "pkunzip.exe -d %overwarn% %zipfile% %targdir% *.*")
  357.         Refresh(1)
  358.         goto zzcancel
  359.  
  360.  
  361.  
  362. :INDIV
  363.        ViewFlag=param3
  364.        if ViewFlag==1 then zipsort=1
  365.                       then overwarn=0
  366.                       then targdir=""
  367.                       then goto VIEW
  368.  
  369.         RetHome="VIEW"
  370.         goto DoOptions
  371.  
  372. :VIEW
  373.         workdir = Environment("TEMP")
  374.         If workdir == "" Then workdir = DirWindows(0)
  375.         If StrSub(workdir, StrLen(workdir), 1) != "\" Then workdir = StrCat(workdir, "\")
  376.         if ViewFlag==0 then targdir=workdir
  377.         zipfile=strcat(CurrentPath(),CurrentFile())
  378.         if FileExtension(zipfile)=="ZIP" then goto viewdoit
  379.         zipfile=FileItemize("*.zip")
  380.         If zipfile=="" Then ErrMsg="UnZip files?  No zip files found!"
  381.                  Then Goto ShowError
  382.         if ViewFlag==0 then TSMsg="Select ZIP file to view"
  383.                        else TSMsg="Select ZIP file to use"
  384.         zipfile=itemselect(TSMsg,zipfile," ")
  385.         if zipfile=="" then goto zzcancel
  386.  
  387. :viewdoit
  388.         ziplist = StrCat(workdir, "wwwunzip.lst")
  389.         If FileExist(ziplist) Then FileDelete(ziplist)
  390.  
  391.         RunWait("wwwzipls.exe","%zipfile% %ziplist% %zipsort%")
  392.         if ViewFlag==0 then TSMsg="Select file to view"
  393.                        else TSMsg="Select file to extract"
  394. :TXSEL
  395.         OldFont=IntControl(28,1,0,0,0)        ; Set fixed pitch font in text box
  396.         member=TextBox(TSMsg,ziplist)
  397.         IntControl(28,OldFont,0,0,0)          ; Restore previous font pitch type
  398.         if member=="" then goto ZZCANCEL
  399.  
  400.         member=strsub(member,46,strlen(member)-45)
  401.         memfile=FileExtension(member)
  402.         if memfile!="" then memfile=strcat(FileRoot(member),".",memfile)
  403.                        else memfile=FileRoot(member)
  404.         
  405.  
  406.         if ViewFlag==0 then goto extract
  407.         if overwarn==0 then goto extract
  408.         If FileExist("%targdir%%memfile%") == @FALSE Then Goto extract
  409.         b= AskYesNo("%member% already exists in %targdir%", "Do you wish to replace it?")
  410.         If b == @NO Then Goto TXSEL
  411.  
  412. :extract
  413.         RunWait("wwwdosc.pif", "pkunzip.exe -o %zipfile% %targdir% %member%")
  414.         If !FileExist("%targdir%%memfile%") Then ErrMsg="Problem extracting %member% from ZIP file"
  415.                                            Then Goto ShowError
  416.  
  417.         if ViewFlag!=0 then TSMsg="Extract Another?"
  418.                        then goto TXSEL
  419.         member = StrUpper(StrCat(targdir, memfile))
  420.         RunZoomWait("%FCDir789672%browser.exe", member)
  421.         FileDelete(member)
  422.         TSMsg="View Another?"
  423.         goto TXSEL
  424.  
  425.  
  426. :SHOWERROR
  427.     Message("Error", ErrMsg)
  428.  
  429. :ZZCANCEL
  430.     if IsDefined(ziplist) then If FileExist(ziplist) Then FileDelete(ziplist)
  431.     Drop(DaMove,DaDirs,DaWho,DaZip,DaRefresh,DaTitle,ViewFlag,zipsort)
  432.     Drop(zipfile,b,RetHome,overwarn,targdir,workdir,ziplist,TSMsg,member)
  433.     Drop(ErrMsg,usecurdir,ThisDir,CheckDir,memfile)
  434.     Drop(ZippyFormat,ZippyCaption,ZippyX,ZippyY,ZippyWidth,ZippyHeight)
  435.     Drop(ZippyNumControls,Zippy01,Zippy02,Zippy03,Zippy04,Zippy05,Zippy06)
  436.     Drop(Zippy07,Zippy08,Zippy09,Zippy10,Zippy11,Zippy12,Zippy13)
  437.     exit
  438. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  439.  
  440. :DOOPTIONS
  441.         zipsort = IniReadPvt("WWWUNZIP", "SortOrder", 1, "www-prod.ini")
  442.         overwarn=IniReadPvt("WWWUNZIP","OverWarn",1,"www-prod.ini")
  443.         whichdir=IniReadPvt("WWWUNZIP","WhichDir",1,"www-prod.ini")
  444.  
  445.         ; Undocumented, new, beta dialog function being used here.  Will
  446.         ; be documented in the 2.0 release.  Good Luck.
  447.  
  448.  
  449.         ZippyFormat=`WWWDLGED,4.0`
  450.  
  451.         ZippyCaption=`Zip Options`
  452.         ZippyX=-1
  453.         ZippyY=-1
  454.         ZippyWidth=217
  455.         ZippyHeight=115
  456.         ZippyNumControls=13
  457.         Zippy01=`6,18,80,DEFAULT,RADIOBUTTON,whichdir,"Use Current Dir ->",1`
  458.         Zippy02=`6,32,80,DEFAULT,RADIOBUTTON,whichdir,"Use Specified Dir ->",2`
  459.         Zippy03=`86,32,124,DEFAULT,EDITBOX,targdir,""`
  460.         Zippy04=`16,64,56,DEFAULT,RADIOBUTTON,zipsort,"by Name",1`
  461.         Zippy05=`16,76,58,DEFAULT,RADIOBUTTON,zipsort,"by Extension",2`
  462.         Zippy06=`16,88,46,DEFAULT,RADIOBUTTON,zipsort,"by Date",3`
  463.         Zippy07=`16,100,46,DEFAULT,RADIOBUTTON,zipsort,"by Size",4`
  464.         Zippy08=`108,58,80,DEFAULT,CHECKBOX,overwarn,"Warn on Overwrite",1`
  465.  
  466.         Zippy09=`120,78,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Ok",1`
  467.         Zippy10=`120,98,64,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0`
  468.         Zippy11=`6,4,64,DEFAULT,STATICTEXT,NONAME,"Target Directory"`
  469.         Zippy12=`6,52,64,DEFAULT,STATICTEXT,NONAME,"Sort list by:"`
  470.         Zippy13=`88,20,122,DEFAULT,VARYTEXT,ThisDir,""`
  471.  
  472.  
  473. :gettarg
  474.         ; Undocumented, new, beta dialog function being used here.  Will
  475.         ; be documented in the 2.0 release.  Good Luck.
  476.         ThisDir=DirGet()
  477.         targdir = IniReadPvt("WWWUNZIP", "TargetDir", DirGet(), "www-prod.ini")
  478.         Dialog("Zippy")
  479.  
  480.         if whichdir==1 then usecurdir = @YES
  481.                        then targdir=ThisDir
  482.                        else usecurdir = @NO
  483.         targdir = StrUpper(targdir)
  484.         If targdir == "" Then usecurdir = @YES
  485.                          Then targdir = DirGet()
  486.         If StrSub(targdir, StrLen(targdir), 1) != "\" Then targdir = StrCat(targdir, "\")
  487.         If ThisDir==targdir then usecurdir = @YES
  488.                             then goto targok
  489.         DirChange(targdir)
  490.         CheckDir=DirGet()
  491.         DirChange(ThisDir)
  492.         If ThisDir!=CheckDir Then Goto targok
  493.  
  494.         b= AskYesNo("WWWUNZIP", "%targdir% does not exist.  Do you wish to create it?")
  495.         If b == @NO Then Goto gettarg
  496.         DirMake(targdir)
  497.         DirChange(targdir)
  498.         CheckDir=DirGet()
  499.         DirChange(ThisDir)
  500.         If ThisDir!=CheckDir Then Goto targok
  501.         Message("WWWUNZIP","%targdir% could not be created.  Please respecify.")
  502.         goto gettarg
  503.  
  504.         :targok
  505.         If usecurdir == @NO Then IniWritePvt("WWWUNZIP", "TargetDir", targdir, "www-prod.ini")
  506.         IniWritePvt("WWWUNZIP", "SortOrder", zipsort, "www-prod.ini")
  507.         IniWritePvt("WWWUNZIP", "OverWarn", overwarn, "www-prod.ini")
  508.         IniWritePvt("WWWUNZIP", "WhichDir", whichdir, "www-prod.ini")
  509.         goto %RetHome%
  510. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  511. :CANCEL        ; This cancel is shared by ALL the above routines.
  512. %CancelCmd%    ; Execute Cancel Command
  513.