???????????link????.?????????????????????????:???????:

Browser("Login").Page("Page").Frame("contents").ViewLink("treeview").Image("Tplus").Click

Browser("Login").Page("Page").Frame("contents").ViewLink("treeview").Image("Tplus_2").Click

Browser("Login").Page("Page").Frame("contents").ViewLink("treeview").Link("????????").Click

Browser("Login").Page("Page").Frame("main").WebList("drpStatus").Select"????"

Browser("Login").Page("Page").Frame("main").WebButton("????").Click

Browser("Login").Page("Page").Sync

Dim finded??findCode??Nowout

'define a constrat for find

findCode = 110901 

finded = false

Function MaxPage(pageString)

  'msgbox pageString

  Dim ilen??i??j

  ilen = len(pageString)

  i=ilen

  While i>0

       j = mid(pageString??i??1)

          'msgbox j

          If instr("123456789"??j)>0 Then

          MaxPage = j

                  'msgbox MaxPage

                  Exit function

          End If

          i=i-1

  Wend

End Function

Dim trowcount??maxp

trowcount =Browser("Login").Page("Page").Frame("main_8").WebTable("???δ???").RowCount

msgbox "Rowcount: "&trowcount

Nowout = Browser("Login").Page("Page").Frame("main_8").WebTable("???δ???").GetCellData(trowcount??1)

Nowout = trim(Nowout)

maxp = MaxPage(Nowout)

msgbox "max page: "& maxp

Dim nowPage??checkid

For nowPage = 1 to maxp

  If finded Then

          Exit for

  End If

 'link to the???????page

 Ifnowpage>1 Then

   Browser("Login").Page("Page").Frame("main_8").Link("[2]").SetTOProperty"Text"??"["&nowpage&"]"

   Browser("Login").Page("Page").Frame("main_8").Link("[2]").Click

   Browser("Login").Page("Page").Sync

  end if

 'Get the rowcount of table in now page

  trowcount =Browser("Login").Page("Page").Frame("main_8").WebTable("???δ???").RowCount

  msgbox "Rowcount: "&trowcount

 'link every record in the table of the page

  for i = 2 to trowcount - 2

       Nowout =Browser("Login").Page("Page").Frame("main_8").WebTable("???δ???").GetCellData(i??2)

       'msgbox i&": "&Nowout

   checkid = "dgCourse:_ctl" &(i+1)& ":_ctl0"

   Browser("Login").Page("Page").Frame("main_8").WebCheckBox("dgCourse:_ctl3:_ctl0").SetTOProperty"name"??checkid

   Browser("Login").Page("Page").Frame("main_8").WebCheckBox("dgCourse:_ctl3:_ctl0").Set"ON"

   Browser("Login").Page("Page").Frame("main_8").Link("0901").SetTOProperty"Text"??Nowout

   Browser("Login").Page("Page").Frame("main_8").Link("0901").Click

   Browser("??????????????").Page("??????????????").Sync

       'wait(1)

       msgbox "begun"

       msgbox findCode

       msgbox Nowout

       msgbox "finished"

       If trim(findCode) = trim(Nowout)Then

       finded = true

               msgbox "find is ok!"

               wait(2)

               Exit for

       End If

   Browser("??????????????").Close

   Browser("Login").Page("Page").Sync

 next

Next