45. [ ] Print("-------------------------------------------------------")
46. [-] if(scanPage(iPage, iPlace))
47. [ ] iTotal ++
48. [ ] Print("Page {iPage}: {iPlace} line(s) changed")
49. [ ] Print("-------------------------------------------------------")
50. [ ] Print("Total {iTotal} pages have change bar.")
51. [ ] exit
52.[ ]
53.[-] INTEGER iRGB2Int(in INTEGER iR, in INTEGER iG, in INTEGER iB)
54. [ ] return ( iB * 256 * 256 + iG * 256 + iR )
55.[ ]
56.[ ]
57.[-] BOOLEAN scanPage(int iPage, out int iLine)
58. [ ] int iBarX
59. [ ] int y
60. [ ] int my_iLine = 0
61. [ ] boolean bRet = False
62. [-] if(iPage%2 ==0)
63. [ ] iBarX = 105
64. [-] else
65. [ ] iBarX = 115
66. [ ]
67. [-] for(y =100; y<=850; y=y+9)
68. [ ] INTEGER my_iRGBValue = GetPixel(my_hDC,iBarX,y)
69. [-] if(iColor == my_iRGBValue)
70. [ ] my_iLine ++
71. [ ] bRet = True
72. [ ] iLine = my_iLine
73. [ ] return bRet
74.[ ]
75.[-] Main()
76. [ ] test_pagedown(1, 3023)
文章来源于领测软件测试网 https://www.ltesting.net/