07-27-2005, 06:44 PM
I have a piece of code that loops. It will run a number of times (sometimes 3, sometimes 7) and then suddenly stops and errors that an object cannot be found. I am wondering why and if you have any suggestions to fix.
The code errors out on the htm fn... line
Here is the code:
foreach cell table.cells
sel counter
case 1
0.5
out acount
fp[acount]=cell.innerText
counter=counter+1
Htm fpb=htm("TD" fp[acount] "" "Internet Explorer" "2/3" 0 0x21)
fpb.Click
wait 0 I
0.75
Htm fn=htm("INPUT" "txtFirstName" "" "Internet Explorer" "2/4" 16 0x121)
str fnt=fn.Text
Htm ln=htm("INPUT" "txtLastName" "" "Internet Explorer" "2/4" 19 0x121)
str lnt=ln.Text
al[acount].from(fnt " " lnt)
indate[acount]=""
case 2
As always, thanks for your help.
The code errors out on the htm fn... line
Here is the code:
foreach cell table.cells
sel counter
case 1
0.5
out acount
fp[acount]=cell.innerText
counter=counter+1
Htm fpb=htm("TD" fp[acount] "" "Internet Explorer" "2/3" 0 0x21)
fpb.Click
wait 0 I
0.75
Htm fn=htm("INPUT" "txtFirstName" "" "Internet Explorer" "2/4" 16 0x121)
str fnt=fn.Text
Htm ln=htm("INPUT" "txtLastName" "" "Internet Explorer" "2/4" 19 0x121)
str lnt=ln.Text
al[acount].from(fnt " " lnt)
indate[acount]=""
case 2
As always, thanks for your help.