beautypg.com

While command, Automating tasks functions reference – Juniper Systems Allegro CE Manual User Manual

Page 193

background image

Windows CE Page 4-133

While Command
while condition
commands
end
Executes commands as long as a condition is True.
Example:
while a1>0
Set(CellRef(2, a1), a1*100)
Set(a1, a1-1)
end

You can structure your code into more simple tasks and then you can
call previously defined task from within a task using its name.
Example:
Set(a1,100)
while a1>0
Hello
Set(a1,a1-1)
end

Automating Tasks Functions Reference
Parameters in [ ] are optional.

ActiveCell()
Returns the active (highlighted) cell.
Example: Set(ActiveCell(), "Hello World!")

ActiveSheet([index])
Returns the number of the active sheet (1-based) and selects the new
one if index is specified. Returns "!!Val" if index is less than 1 or
greater than number of sheets.
Example: ActiveSheet(2)

CellRef(col, row [, sheetIndex])
Returns the cell reference.
Example: Set(CellRef(a1,2), 123);

CellTask(text, task [, icon])
Creates cell task in the current cell. Text is cell label visible in sheet,
task is task source and icon is number of icon (see Cell Task dialog for
more info). If icon=0 (or if this parameter is omitted) cell task is
executed by tapping on cell. If icon>0 then cell task is executed by
tapping on icon.