阅读:2272回复:3
AVENUE script脚本调试求助(紧急)
<P><FONT color=#cc3370 size=4>各位大虾,小弟正在学习AVENUE语言,有几个脚本还望给调试并修改一下,谢了</FONT></P>
<P><FONT size=3>SCRIPT 1</FONT></P> <P><FONT size=3>theview=av.GetActiveDoc<BR>r=theview.ReturnUserRect<BR>theview.GetDisplay.Flush<BR>for each t in theview.GetActive.Themes<BR>if(t.is(Fthemes))then<BR> theFTab=t.GetFTab<BR>End<BR>End <BR>for each rec in theFtab.GetSelection<BR>Recordlist={}<BR>For each f in theFTab.Getfields<BR>if (f.lsVisible=TRUE) then<BR> RecValue=theFTab.Return.ValueString (f.rec)<BR> Recordlist.Add(f.GetAlias.AsString+"="+RecValue)<BR>End<BR>End <BR>ret=MsgBox.ListAsString (Recordlist,"当前信息:",the.View.GetName)<BR>End</FONT></P> <P><FONT size=3>SCRIPT 2</FONT></P> <P><FONT size=3>theview=av.GetActiveDoc<BR>theTheme=theView.GetActiveThemes.Get(0)<BR>for each t in theview.GetActiveThemes ‘获取当前视图对应的表<BR>if (theTheme.is(Ftheme)) then<BR> MsgBox.info("请根据以下提示框输入查询条件","输入信息")<BR> theBitmap=theFTab.GetSelection<BR> theQuery=QueryWin.Returnquery(theFTab,"")<BR> if(theQuery=NIL) then<BR> exit<BR> end<BR> theFTab.Query(theQuery,theBitmap,#VTAB_SELTYPE_NEW)<BR> TheFTab.SetSelection(theBitmap) ‘显示空间位置<BR> TheFTab.UpdateSelection<BR> End</FONT></P> <P><FONT size=3>SCRIPT 3</FONT></P> <P><FONT size=3>theView=av.GetActiveDoc<BR>r=theVieW.ReturnUserRect '选择某一矩形区域<BR>if ( r<>NIL) then<BR> if (System.IsShiftKeyDown) then<BR> op=#VTAB-SELTYPE-OR<BR> else<BR> op=#VTAB-SELTYPE-NEW end<BR> for each t in the Themes<BR> if (t.CanSelect) then<BR> t.SelectByRect(r, op)<BR> end<BR> end<BR> end<BR> theView.GetDisplay.Flush<BR> for each t in theView.GetActiveThemes<BR> if (t.Is(FTheme))then<BR> theFTab=t.GetFTab<BR> end<BR> end<BR> for each rec in theFTab.GetSelection ’显示每一记录的属性值</FONT></P> <P><FONT size=3> RecordList={}<BR> for each f in theFTab.GetFields<BR> if (f.IsVisible=TRUE) then<BR> RecValue=theFTab.ReturnValueString(f,rec)<BR> RecordList.Add(f.GetAlias.Asstring+"="+RecValue)<BR> end<BR> end<BR> ret=Msgbox.ListAsstring(RecordList,"当前信息:",theView.GetName)<BR> end</FONT></P> <P><FONT size=3>SCRIPT 4</FONT></P> <P><FONT size=3> theView=av.GetActiveDoc<BR> theTheme=theView.GetActiveThemes.Get(0)<BR> for each t in theView. GetActiveThemes ‘获取当前视图对应的表<BR> if (t.Is( FTheme))then<BR> theFTab=t.GetFTab<BR> end<BR> end<BR> if (theTheme.Is( FTHEME))then<BR> MsgBox. Info("请根据以下提示框输入查询条件","输入信息") ‘输入查询条件<BR> theBitmap=theFTab.GetSelection<BR> theQuery=QueryWin.ReturnQuery(theFTab,"")<BR> if ( theQuery=NIL) then<BR> exit<BR> end<BR> theFTab.Query(theQuery, theBitmap, # VTAB-SELTYPE-NEW )<BR> theFTab.SetSelection(theBitmap) ’显示空间位置<BR> theFTab.UpdateSelection<BR> end</FONT></P> |
|
1楼#
发布于:2007-05-31 22:46
<img src="images/post/smile/dvbbs/em01.gif" />
|
|
2楼#
发布于:2007-06-08 22:24
?<BR>
|
|
3楼#
发布于:2007-07-03 00:23
第一个角本循环错误
|
|