home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Mother of All Windows Books
/
CD-MOM.iso
/
cd_mom
/
utility
/
lang
/
winbatch
/
editfile.wb_
< prev
next >
Wrap
Text File
|
1992-11-19
|
1KB
|
46 lines
EditFormat=`WWWDLGED,4.0`
EditCaption=`Edit File`
EditX=80
EditY=40
EditWidth=150
EditHeight=170
EditNumControls=14
Edit01=`5,3,40,DEFAULT,STATICTEXT,DEFAULT,"&Directory:"`
Edit02=`42,3,100,DEFAULT,VARYTEXT,editfile,""`
Edit03=`5,15,80,DEFAULT,EDITBOX,editfile,""`
Edit04=`5,30,40,DEFAULT,STATICTEXT,DEFAULT,"&File:"`
Edit05=`5,43,80,125,FILELISTBOX,editfile,DEFAULT`
Edit06=`98,17,44,DEFAULT,CHECKBOX,backup,"Make &BAK",1`
Edit07=`98,40,40,DEFAULT,RADIOBUTTON,state,"No&rmal",1`
Edit08=`98,52,40,DEFAULT,RADIOBUTTON,state,"&Zoomed",2`
Edit09=`98,64,40,DEFAULT,RADIOBUTTON,state,"&Iconized",3`
Edit10=`95,82,44,DEFAULT,PUSHBUTTON,DEFAULT,"&Notepad",1`
Edit11=`95,98,44,DEFAULT,PUSHBUTTON,DEFAULT,"&WinEdit",2`
Edit12=`95,114,44,DEFAULT,PUSHBUTTON,DEFAULT,"Wri&te",3`
Edit13=`95,130,44,DEFAULT,PUSHBUTTON,DEFAULT,"WinW&ord",4`
Edit14=`91,151,52,DEFAULT,PUSHBUTTON,DEFAULT,"&Cancel",0`
editfile = "*.*"
backup = 1
state = 2
:showdlg
retval = Dialog("Edit")
If FileExist(editfile) == @FALSE Then Goto showdlg
If backup == 0 Then Goto nobak
bakfile = StrCat(FileRoot(editfile), ".BAK")
FileCopy(editfile, bakfile, @TRUE)
:nobak
If state == 1 Then runcmd = "Run"
Else If state == 2 Then runcmd = "RunZoom"
Else runcmd = "RunIcon"
If retval == 1 Then editor = "notepad.exe"
Else If retval == 2 Then editor = "winedit.exe"
Else If retval == 3 Then editor = "write.exe"
Else editor = "winword.exe"
%runcmd%(editor, editfile)