Skip Navigation

You are here: Home > Projects > Scripts for the Mobile Speak Smartphone screen reader > Snapshot

Snapshot

This script will print a snapshot containing information about text from the off-screen model, along with all windows in the window hierarchy beginning with the current root window. This information is useful when developing scripts and can be intercepted with the CETracer program.

The available version of this script is 1.0. It was released on August 9, 2008.


Copyright (c) 2008 by Chris Nestrud
All rights reserved.


Click here to download snapshot.lua. Please see below for important usage instructions.


Follow these instructions to make use of this script.

  1. Use the CEDownload program to copy snapshot.lua to the phone as if it were the script for another application, such as \windows\putty.lua.
  2. Start the CETracer program to capture TRACE output.
  3. Run the program on the phone.
  4. Press the q key to get a snapshot of informations windows. This key will also be passed to the application.
  5. Right click in the CETracer window and select "Select All"
  6. Press enter to copy all text to the clipboard.
  7. Paste the text into notepad or some other editor.
  8. If you wish, run the separate CETracer_clean program to clean up the output.

This script collects information about windows and text. It begins with the application's root window and descends through the tree. If available, the following information is collected about each window: position in the tree (not entirely accurate), window visibility, control id, window class, window text, and window path. The script also collects the following information about each OSM record: record number, background color, foreground color, type, and text.

Following is an example of output for the window which is 1 level down from the root and which is the second window at that level.

V01 H02, Visible true, Control Id 1, Class Button, Text Open
Window path: GetWindowNextSibling(GetWindowFirstChild(ROOT():hwnd()))

The window position is best used to quickly determine which windows are related.

The window path can be pasted into a script if you need to access the specific window. This is especially helpful if a control id is not present or is not unique.

Following is an example of what is collected from the OSM.

Record 1 of 11, bkColor 16777215, color 16777215, type 0, text (top line of window)

Information is output using the TRACE function and can be intercepted with the CETracer program. You can use the separate CETracer_clean program to clean up this output.


If you have comments, please use the following form to send them.