[jawsscripts] Re: Looping

  • From: "Fernando" <iudeatic@xxxxxxxxx>
  • To: <jawsscripts@xxxxxxxxxxxxx>
  • Date: Fri, 3 Apr 2015 00:28:09 -0300

Hello:
I didn't read any message for a long time.
if this thread hasn't been sorted out yet I think I could help.
It is possible to imagine several ways to finish a loop.
;An example to understand syntax:
int endLoop = 0,
int myRow = 0
while (not endLoop)
sayLine()
let myRow = GetCursorRow()
if myRow == 4 then
let endLoop = 1
return
endIf
nextLine()
endWhile

;A second example:
var
int endLoop = 0,
string anyWord = ""
while (not endLoop)
sayWord()
let anyWord = getWord()
if anyWord == "ready" then
let endLoop = 1
return
endIf
nextWord()
endWhile

; If every row in a table has the same number of cells you could try the
following:
Int cols,
Int rows,
Int cells,
Int currentCell
Let Cols = GetCurrentRowColumnCount ()
Let rows = GetTableRowCount ()
Let cells = (Cols*rows)+1
While currentCell < cells
Let currentCell = GetTagIndex ("td")
MoveToTag (s_next, "td")

if yourCondition then
Let currentCell = cells
endIf
EndWhile

Greetings
Fernando Rojas




----- Original Message -----
From: "Marcus Canaday" <marcus.canaday@xxxxxxxxx>
To: <jawsscripts@xxxxxxxxxxxxx>
Sent: Monday, December 29, 2014 12:35 PM
Subject: [jawsscripts] Looping


Good morning,
I've developed a script that loops until certain conditions on a web page
are identified. To avoid an infinite loop, I've set the number of
iterations to 30. This works fine, but I'd like the loop to end when it
reaches the end of a table if the conditions are not found. I've not been
able to make this work ... any suggestions? Thanks.




---
This email is free from viruses and malware because avast! Antivirus
protection is active.
http://www.avast.com

__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts


__________�

View the list's information and change your settings at
http://www.freelists.org/list/jawsscripts

Other related posts: