请详细告知READ EVENTS用途?

Sander 2000-07-17 06:31:00
请详细告知READ EVENTS用途?
--------------------------------------------------------------------------------
sander 于 2000-07-16 上午 11:10:36 发表:
请详细告知READ EVENTS用途?
set talk off
set safety off
mypath=left(sys(16),rat("\",sys(16)))
set defa to (mypath)
PUBLIC MYPD
MYPD=0
DO FORM 提示信息.scx
Read events
***************
问题一、当我加了READ EVENTS 后,就象荡机一样,而我去掉READ EVENTS 则可运行?我对READ EVENTS用途还是不清楚?请高手指点!!
即GETDIR()显示窗口出现(没有READ EVENTS)
***************************

if mypd=1
jlno=0
mlpath=getdir()
cd (mlpath)
*?curdir('d') &&返回当前目录
numdir=adir(arraydir,'*.*','D') &&ADIR(ARRAYDIR)仅获取运行程序的目录
?numdir
if numdir<>0
myml=mypath+"\目录.dbf"
use &myml
zap
for ncount=1 to numdir
append blank

*删掉'.'字符
FOR N=1 TO LEN(ALLTRIM(ARRAYDIR(NCOUNT,5)))
IF SUBSTR(ALLTRIM(ARRAYDIR(NCOUNT,5)),N,1)<>'.'
EXIT
ENDIF
ENDFOR

repl 文件名 with arraydir(ncount,1),文件大小 with arraydir(ncount,2),文件日期 with arraydir(ncount,3),;
文件时间 with arraydir(ncount,4),文件属性 with SUBSTR(ALLTRIM(arraydir(ncount,5)),N,1)
*gather from arraydir
endfor
endif
dele for '.'=substr(文件名,1,1)
pack

repl all 目录 with curdir() for left(curdir(),1)<>'\'
repl all 目录 with sys(5)+curdir() for left(curdir(),1)='\'
use
sele 1
myzwj=mypath+"\总文件目录.dbf"
use &myzwj
zap
appen from &myml for upper(文件属性)<>'D'
sele 2
myzml=mypath+"\总目录目录.dbf"
use &myzml
zap
appen from &myml for upper(文件属性)='D'
loca for upper(文件属性)='D'
repl ni with '1'
do while .not.eof()

*下级目录
cd (alltrim(目录)+alltrim(文件名)+'\')
*?curdir('d') &&返回当前目录
numdir=adir(arraydir,'*.*','D') &&ADIR(ARRAYDIR)仅获取运行程序的目录
if numdir<>0
sele 3
use &myml
zap
for ncount=1 to numdir
append blank

*删掉'.'字符
FOR N=1 TO LEN(ALLTRIM(ARRAYDIR(NCOUNT,5)))
IF SUBSTR(ALLTRIM(ARRAYDIR(NCOUNT,5)),N,1)<>'.'
EXIT
ENDIF
ENDFOR

repl 文件名 with arraydir(ncount,1),文件大小 with arraydir(ncount,2),文件日期 with arraydir(ncount,3),;
文件时间 with arraydir(ncount,4),文件属性 with SUBSTR(ALLTRIM(arraydir(ncount,5)),N,1)
*gather from arraydir

repl all 目录 with curdir() for left(curdir(),1)<>'\'
repl all 目录 with sys(5)+curdir() for left(curdir(),1)='\'

endfor
endif
dele for '.'=substr(文件名,1,1)
pack
use
sele 1
appen from &myml for upper(文件属性)<>'D'

sele 2
use &myzml
appen from &myml for upper(文件属性)='D'
loca for upper(文件属性)='D'.and.ni<>'1'
repl ni with '1'
enddo
*mlpath2='d:\目录\'+substr(mlpath,rat("\",mlpath)+1,len(alltrim(mlpath))-rat("\",mlpath))

close data all
use &myzwj
go top
do while .not.eof()
myfile=alltrim(目录)+alltrim(文件名)

run/n2 Attrib.exe &myfile -r
skip
enddo
use &myzml
go top
do while .not.eof()
myfile=alltrim(目录)+alltrim(文件名)
run/n2 Attrib.exe &myfile -r
skip
enddo
*export to d:\目录\总文件目录 fields 文件名 type xls
close data all
endif
return
...全文
162 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
rongle 2000-08-27
  • 打赏
  • 举报
回复
试试将READ EVENTS语句放在主程序的最后一行.

34,575

社区成员

发帖
与我相关
我的任务
社区描述
MS-SQL Server相关内容讨论专区
社区管理员
  • 基础类社区
  • 二月十六
  • 卖水果的net
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧