默认头像
路人甲
路人甲
  • 注册日期2007-04-09
  • 发帖数3
  • QQ
  • 铜币119枚
  • 威望0点
  • 贡献值0点
  • 银元0个
阅读:2288回复:3

AVENUE script脚本调试求助(紧急)

楼主#
更多 发布于:2007-05-31 16:06

各位大虾,小弟正在学习AVENUE语言,有几个脚本还望给调试并修改一下,谢了

SCRIPT 1

theview=av.GetActiveDoc
r=theview.ReturnUserRect
theview.GetDisplay.Flush
for each t in theview.GetActive.Themes
if(t.is(Fthemes))then
  theFTab=t.GetFTab
End
End
for each rec in theFtab.GetSelection
Recordlist={}
For each f in theFTab.Getfields
if (f.lsVisible=TRUE) then
 RecValue=theFTab.Return.ValueString (f.rec)
 Recordlist.Add(f.GetAlias.AsString+"="+RecValue)
End
End  
ret=MsgBox.ListAsString (Recordlist,"当前信息:",the.View.GetName)
End

SCRIPT 2

theview=av.GetActiveDoc
theTheme=theView.GetActiveThemes.Get(0)
for each t in theview.GetActiveThemes    ‘获取当前视图对应的表
if (theTheme.is(Ftheme)) then
 MsgBox.info("请根据以下提示框输入查询条件","输入信息")
 theBitmap=theFTab.GetSelection
 theQuery=QueryWin.Returnquery(theFTab,"")
 if(theQuery=NIL) then
 exit
 end
 theFTab.Query(theQuery,theBitmap,#VTAB_SELTYPE_NEW)
 TheFTab.SetSelection(theBitmap)    ‘显示空间位置
 TheFTab.UpdateSelection
End

SCRIPT 3

theView=av.GetActiveDoc
r=theVieW.ReturnUserRect  '选择某一矩形区域
if ( r<>NIL) then
 if (System.IsShiftKeyDown) then
   op=#VTAB-SELTYPE-OR
 else
     op=#VTAB-SELTYPE-NEW      end
   for each t in the Themes
     if (t.CanSelect) then
       t.SelectByRect(r, op)
       end
     end
 end
 theView.GetDisplay.Flush
 for each t in theView.GetActiveThemes
   if (t.Is(FTheme))then
       theFTab=t.GetFTab
     end
 end
 for each rec in theFTab.GetSelection     ’显示每一记录的属性值

   RecordList={}
   for each f in theFTab.GetFields
     if (f.IsVisible=TRUE) then
         RecValue=theFTab.ReturnValueString(f,rec)
         RecordList.Add(f.GetAlias.Asstring+"="+RecValue)
      end
    end
    ret=Msgbox.ListAsstring(RecordList,"当前信息:",theView.GetName)
  end

SCRIPT 4

theView=av.GetActiveDoc
   theTheme=theView.GetActiveThemes.Get(0)
   for each t in theView. GetActiveThemes     ‘获取当前视图对应的表
     if (t.Is( FTheme))then
         theFTab=t.GetFTab
       end
     end
   if (theTheme.Is( FTHEME))then
     MsgBox. Info("请根据以下提示框输入查询条件","输入信息")  ‘输入查询条件
     theBitmap=theFTab.GetSelection
     theQuery=QueryWin.ReturnQuery(theFTab,"")
     if ( theQuery=NIL) then
               exit
       end
     theFTab.Query(theQuery,  theBitmap,   # VTAB-SELTYPE-NEW )
     theFTab.SetSelection(theBitmap)   ’显示空间位置
     theFTab.UpdateSelection
     end

喜欢0 评分0
默认头像
路人甲
路人甲
  • 注册日期2006-06-17
  • 发帖数3108
  • QQ
  • 铜币6445枚
  • 威望0点
  • 贡献值0点
  • 银元0个
1楼#
发布于:2007-05-31 22:46
举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2006-06-01
  • 发帖数7
  • QQ
  • 铜币48枚
  • 威望0点
  • 贡献值0点
  • 银元0个
2楼#
发布于:2007-06-08 22:24
?<BR>
举报 回复(0) 喜欢(0)     评分
默认头像
路人甲
路人甲
  • 注册日期2004-12-09
  • 发帖数223
  • QQ
  • 铜币782枚
  • 威望0点
  • 贡献值0点
  • 银元0个
3楼#
发布于:2007-07-03 00:23
第一个角本循环错误
举报 回复(0) 喜欢(0)     评分
默认头像

返回顶部